SPIRV-Cross/shaders-msl/frag/array-component-io.frag
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
641 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) flat in float InA[2];
layout(location = 1, component = 2) flat in vec2 InB[2];
layout(location = 0, component = 1) flat in float InC[3];
layout(location = 3, component = 1) sample in float InD;
layout(location = 4, component = 2) noperspective in float InE;
layout(location = 5, component = 3) centroid in float InF;
void main()
{
A = InA;
B = InB;
C = InC;
D = InD + InE + InF;
}