Fixups to the flatten tests.
This commit is contained in:
parent
69af27d8be
commit
d1dcced1cb
@ -1,6 +1,6 @@
|
||||
#version 310 es
|
||||
|
||||
uniform vec4 PushMe[5];
|
||||
uniform vec4 PushMe[6];
|
||||
layout(location = 1) in vec4 Pos;
|
||||
layout(location = 0) out vec2 vRot;
|
||||
layout(location = 0) in vec2 Rot;
|
||||
@ -8,6 +8,6 @@ layout(location = 0) in vec2 Rot;
|
||||
void main()
|
||||
{
|
||||
gl_Position = mat4(PushMe[0], PushMe[1], PushMe[2], PushMe[3]) * Pos;
|
||||
vRot = mat2(PushMe[4].xy, PushMe[4].zw) * Rot;
|
||||
vRot = (mat2(PushMe[4].xy, PushMe[4].zw) * Rot) + vec2(PushMe[5].z);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
layout(std140) uniform UBO
|
||||
{
|
||||
uniform mat4 uMVP;
|
||||
mat4 uMVP;
|
||||
vec4 A1[2];
|
||||
vec4 A2[2][3];
|
||||
float A3[3];
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
layout(std140) uniform UBO
|
||||
{
|
||||
uniform mat4 uMVP;
|
||||
mat4 uMVP;
|
||||
};
|
||||
in vec4 aVertex;
|
||||
in vec3 aNormal;
|
||||
|
@ -4,6 +4,7 @@ layout(push_constant, std430) uniform PushMe
|
||||
{
|
||||
mat4 MVP;
|
||||
mat2 Rot; // The MatrixStride will be 8 here.
|
||||
float Arr[4];
|
||||
} registers;
|
||||
|
||||
layout(location = 0) in vec2 Rot;
|
||||
@ -12,5 +13,5 @@ layout(location = 0) out vec2 vRot;
|
||||
void main()
|
||||
{
|
||||
gl_Position = registers.MVP * Pos;
|
||||
vRot = registers.Rot * Rot;
|
||||
vRot = registers.Rot * Rot + registers.Arr[2]; // Constant access should work even if array stride is just 4 here.
|
||||
}
|
||||
|
@ -4,27 +4,27 @@
|
||||
layout(std140) uniform UBO
|
||||
{
|
||||
// 16b boundary
|
||||
uniform vec4 A;
|
||||
vec4 A;
|
||||
// 16b boundary
|
||||
uniform vec2 B0;
|
||||
uniform vec2 B1;
|
||||
vec2 B0;
|
||||
vec2 B1;
|
||||
// 16b boundary
|
||||
uniform float C0;
|
||||
float C0;
|
||||
// 16b boundary (vec3 is aligned to 16b)
|
||||
uniform vec3 C1;
|
||||
vec3 C1;
|
||||
// 16b boundary
|
||||
uniform vec3 D0;
|
||||
uniform float D1;
|
||||
vec3 D0;
|
||||
float D1;
|
||||
// 16b boundary
|
||||
uniform float E0;
|
||||
uniform float E1;
|
||||
uniform float E2;
|
||||
uniform float E3;
|
||||
float E0;
|
||||
float E1;
|
||||
float E2;
|
||||
float E3;
|
||||
// 16b boundary
|
||||
uniform float F0;
|
||||
uniform vec2 F1;
|
||||
float F0;
|
||||
vec2 F1;
|
||||
// 16b boundary (vec2 before us is aligned to 8b)
|
||||
uniform float F2;
|
||||
float F2;
|
||||
};
|
||||
|
||||
out vec4 oA, oB, oC, oD, oE, oF;
|
||||
|
Loading…
Reference in New Issue
Block a user