Debian Codegraph @

third_party/spirv-cross/shaders-msl/vert/ubo.alignment.vert

raw
1 #version 310 es
2
3 layout(binding = 0, std140) uniform UBO
4 {
5 mat4 mvp;
6 vec2 targSize;
7 vec3 color; // vec3 following vec2 should cause MSL to add pad if float3 is packed
8 float opacity; // Single float following vec3 should cause MSL float3 to pack
9 };
10
11 layout(location = 0) in vec4 aVertex;
12 layout(location = 1) in vec3 aNormal;
13 layout(location = 0) out vec3 vNormal;
14 layout(location = 1) out vec3 vColor;
15 layout(location = 2) out vec2 vSize;
16
17 void main()
18 {
19 gl_Position = mvp * aVertex;
20 vNormal = aNormal;
21 vColor = color * opacity;
22 vSize = targSize * opacity;
23 }