1#version 430 2 3// OK: different instance names is allowed in other unit 4layout (std140, binding = 1) uniform ColorBlock 5{ 6 vec4 color1; 7 bool b; 8 vec4 color2; 9 vec4 color3; 10} uColor; 11 12// OK: different instance names is allowed in other unit 13layout (std430, binding = 1) buffer BufferBlock 14{ 15 mat4 p; 16} uBuffer; 17 18// OK: different instance names is allowed in other unit 19layout (std140, binding = 0) uniform MatrixBlock 20{ 21 mat4 uProj; 22 mat4 uWorld; 23} uMatrix; 24 25// OK, it's allowed for input/output interfaces to 26// be anonymous is one unit and not in another 27out Vertex 28{ 29 vec4 v1; 30 vec4 v2; 31}; 32 33 34in vec4 P; 35 36vec4 getColor2() 37{ 38 return uColor.color2; 39} 40 41vec4 getWorld() 42{ 43 v1 = vec4(1); 44 return uMatrix.uWorld * P; 45} 46 47