2013-04-09 01:20:01 +00:00
|
|
|
#version 300 es
|
|
|
|
|
2013-04-10 02:06:46 +00:00
|
|
|
layout(location = 7) in vec3 c;
|
2013-04-09 01:20:01 +00:00
|
|
|
layout(LocatioN = 3) in vec4 p;
|
|
|
|
out vec4 pos;
|
2013-04-10 02:06:46 +00:00
|
|
|
out vec3 color;
|
2013-04-09 01:20:01 +00:00
|
|
|
|
2013-04-10 20:15:16 +00:00
|
|
|
layout(shared, column_major, row_major) uniform mat4 badm4; // ERROR
|
|
|
|
layout(shared, column_major, row_major) uniform; // default is now shared and row_major
|
2013-04-09 01:20:01 +00:00
|
|
|
|
2013-04-10 02:06:46 +00:00
|
|
|
layout(std140) uniform Transform { // layout of this block is std140
|
|
|
|
mat4 M1; // row_major
|
|
|
|
layout(column_major) mat4 M2; // column major
|
|
|
|
mat3 N1; // row_major
|
2013-04-10 22:26:56 +00:00
|
|
|
centroid float badf; // ERROR
|
|
|
|
in float badg; // ERROR
|
2013-04-10 02:06:46 +00:00
|
|
|
} tblock;
|
|
|
|
|
2013-04-10 20:15:16 +00:00
|
|
|
uniform T2 { // layout of this block is shared
|
|
|
|
bool b;
|
|
|
|
mat4 t2m;
|
|
|
|
};
|
|
|
|
|
2013-04-10 02:06:46 +00:00
|
|
|
layout(column_major) uniform T3 { // shared and column_major
|
|
|
|
mat4 M3; // column_major
|
2013-04-10 20:15:16 +00:00
|
|
|
layout(row_major) mat4 M4; // row major
|
2013-04-10 02:06:46 +00:00
|
|
|
mat3 N2; // column_major
|
2013-04-10 20:15:16 +00:00
|
|
|
int b; // ERROR, redefinition (needs to be last member of block for testing, following members are skipped)
|
2013-04-10 02:06:46 +00:00
|
|
|
};
|
2013-04-09 01:20:01 +00:00
|
|
|
|
2013-04-10 22:26:56 +00:00
|
|
|
out badout { // ERROR
|
|
|
|
float f;
|
|
|
|
};
|
|
|
|
|
2013-04-09 01:20:01 +00:00
|
|
|
void main()
|
|
|
|
{
|
2013-04-10 20:15:16 +00:00
|
|
|
pos = p * (tblock.M1 + tblock.M2 + M4 + M3 + t2m);
|
2013-04-10 02:06:46 +00:00
|
|
|
color = c * tblock.N1;
|
2013-04-09 01:20:01 +00:00
|
|
|
}
|