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
22 lines
406 B
1 year ago
|
#version 330 core
|
||
|
|
||
|
out vec4 FragColor;
|
||
|
|
||
|
in vec3 color;
|
||
|
|
||
1 year ago
|
uniform bool drawPoints;
|
||
1 year ago
|
|
||
1 year ago
|
void main() {
|
||
1 year ago
|
if (drawPoints){
|
||
1 year ago
|
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);
|
||
|
}
|
||
1 year ago
|
}
|