Simulate thousands of n-Pendula (up to 32) with Position Based Dynamics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
406 B

#version 330 core
out vec4 FragColor;
in vec3 color;
uniform bool drawPoints;
void main() {
if (drawPoints){
vec2 coord = gl_PointCoord - vec2(0.5);
if (length(coord) > 0.5)
discard;
if (length(coord) > 0.4)
FragColor = vec4(1, 1, 1, 1);
else
FragColor = vec4(0, 0, 0, 1);
} else {
FragColor = vec4(color, 1);
}
}