Debian Codegraph @

tests/auto/render/gltfplugins/ontopmaterialES2.vert

raw
1 attribute highp vec3 vertexPosition;
2 attribute highp vec3 vertexOffset;
3
4 uniform highp mat4 modelViewProjection;
5 uniform highp vec3 globalOffset;
6 uniform int extraYOffset;
7 uniform bool reverseOffset;
8
9 void main()
10 {
11 vec4 offset = vec4(globalOffset, 0.0) + vec4(0.0f, float(extraYOffset), 0.0f, 0.0f);
12 if (reverseOffset)
13 offset *= -1.0f;
14 gl_Position = modelViewProjection
15 * (vec4(vertexPosition, 1.0) + offset + vec4(vertexOffset, 0.0));
16 // Set the Z value of the vertex so that it'll always get drawn on top of everything else
17 gl_Position.z = -1.0;
18 }