SPIRV-Cross/shaders-hlsl-no-opt/vert/flatten-matrix-input.flatten-matrix-vertex-input.vert
Hans-Kristian Arntzen b3344174f7 HLSL: Add option to flatten matrix vertex input semantics.
Helps translation layers where we expect inputs to be multiple float
vectors rather than an indexed matrix.
2020-11-03 11:18:32 +01:00

14 lines
247 B
GLSL

#version 450
layout(location = 0) in mat4 m4;
layout(location = 4) in mat3 m3;
layout(location = 7) in mat2 m2;
layout(location = 9) in vec4 v;
void main()
{
gl_Position = m4 * v;
gl_Position.xyz += m3 * v.xyz;
gl_Position.xy += m2 * v.xy;
}