SPIRV-Cross/reference/shaders/vert/invariant.vert
Hans-Kristian Arntzen 816c1167ce Handle invariant decoration more robustly.
Avoids certain cases of variance between translation units by forcing
every dependent expression of a store to be temporary.
Should avoid the major failure cases where invariance matters.
2018-11-22 11:55:57 +01:00

20 lines
390 B
GLSL

#version 310 es
invariant gl_Position;
layout(location = 0) in vec4 vInput0;
layout(location = 1) in vec4 vInput1;
layout(location = 2) in vec4 vInput2;
layout(location = 0) invariant out vec4 vColor;
void main()
{
vec4 _20 = vInput1 * vInput2;
vec4 _21 = vInput0 + _20;
gl_Position = _21;
vec4 _27 = vInput0 - vInput1;
vec4 _29 = _27 * vInput2;
vColor = _29;
}