SPIRV-Cross/reference/shaders-no-opt/asm/frag/vector-shuffle-undef-index.asm.frag
Hans-Kristian Arntzen 8eb33c8017 Support -1 index in OpVectorShuffle.
-1 (0xffffffff) literal means the component should be undefined.
Since we cannot express undefined directly, just use a 0 literal in the
appropriate type.
2019-03-25 10:17:05 +01:00

13 lines
221 B
GLSL

#version 450
layout(location = 0) out vec4 FragColor;
layout(location = 0) in vec4 vFloat;
vec4 undef;
void main()
{
FragColor = vec4(undef.x, vFloat.y, 0.0, vFloat.w) + vec4(vFloat.z, vFloat.y, 0.0, vFloat.w);
}