third_party/spirv-cross/shaders-msl/legacy/vert/transpose.legacy.vert
raw| 1 | #version 310 es |
| 2 | |
| 3 | uniform Buffer |
| 4 | { |
| 5 | layout(row_major) mat4 MVPRowMajor; |
| 6 | layout(column_major) mat4 MVPColMajor; |
| 7 | mat4 M; |
| 8 | }; |
| 9 | |
| 10 | layout(location = 0) in vec4 Position; |
| 11 | |
| 12 | void main() |
| 13 | { |
| 14 | vec4 c0 = M * (MVPRowMajor * Position); |
| 15 | vec4 c1 = M * (MVPColMajor * Position); |
| 16 | vec4 c2 = M * (Position * MVPRowMajor); |
| 17 | vec4 c3 = M * (Position * MVPColMajor); |
| 18 | gl_Position = c0 + c1 + c2 + c3; |
| 19 | } |
| 20 |