bgfx/3rdparty/glsl-optimizer/tests/vertex/glsl140-integers-in.txt
2012-10-07 20:41:18 -07:00

26 lines
508 B
Text

#version 140
uniform vec2 p;
in vec4 position;
in vec4 icol;
out vec4 col;
flat out ivec4 colint;
void main (void)
{
gl_Position = vec4(p, 0.0, 0.0) + position;
// integers & vertex ID & instance ID
colint.x = gl_VertexID;
colint.y = gl_InstanceID ^ gl_InstanceID;
colint.z = gl_InstanceID << 2;
colint.w = colint.x + colint.y;
// new built-ins
col.x = trunc(position.x);
col.y = round(position.y);
col.z = roundEven(position.y);
col.w = cosh(position.w);
}