27 lines
508 B
Plaintext
27 lines
508 B
Plaintext
|
#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);
|
||
|
}
|