bgfx/3rdparty/glsl-optimizer/tests/vertex/glsl140-integers-in.txt

27 lines
508 B
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
#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);
}