third_party/spirv-cross/shaders-msl/vert/packed-bool2-to-packed_uint2.vert
raw| 1 | #version 450 core |
| 2 | |
| 3 | struct Struct |
| 4 | { |
| 5 | bvec2 flags[1]; |
| 6 | }; |
| 7 | |
| 8 | layout(set=0, binding=0, std140) uniform defaultUniformsVS |
| 9 | { |
| 10 | Struct flags; |
| 11 | vec2 uquad[4]; |
| 12 | mat4 umatrix; |
| 13 | }; |
| 14 | |
| 15 | layout (location = 0) in vec4 a_position; |
| 16 | |
| 17 | void main() |
| 18 | { |
| 19 | gl_Position = umatrix * vec4(uquad[gl_VertexIndex], a_position.z, a_position.w); |
| 20 | if (flags.flags[0].x) |
| 21 | gl_Position.z = 0.0; |
| 22 | } |