SPIRV-Cross/shaders-msl/vert/array-component-io.vert
Hans-Kristian Arntzen 99ae0d32e9 MSL: Handle array with component when we cannot rely on user() attrib.
In these cases, we emit one variable per location, and so we must
flatten stuff.
2021-05-21 13:46:33 +02:00

22 lines
538 B
GLSL

#version 450
layout(location = 1, component = 0) out float A[2];
layout(location = 1, component = 2) out vec2 B[2];
layout(location = 0, component = 1) out float C[3];
layout(location = 0, component = 3) out float D;
layout(location = 1, component = 0) in float InA[2];
layout(location = 1, component = 2) in vec2 InB[2];
layout(location = 0, component = 1) in float InC[3];
layout(location = 0, component = 3) in float InD;
layout(location = 4) in vec4 Pos;
void main()
{
gl_Position = Pos;
A = InA;
B = InB;
C = InC;
D = InD;
}