#version 330 core in vec2 FragPos; in vec2 screenSize; out vec4 FragColor; void drawDepth() { FragColor = vec4(gl_FragCoord.z, gl_FragCoord.z, gl_FragCoord.z, 1.f); } void drawPoints() { // Define the point size float pointSize = 15.0; // Get the current fragment position in screen coordinates vec2 fragCoord = gl_FragCoord.xy; // Calculate the distance from the fragment to the vertex position float dist = length(fragCoord - FragPos); // If the distance is within the point size, draw the point if (true || dist < pointSize) { FragColor = vec4(1.0, 0.0, 0.0, 1.0); // Red color for the point } else { FragColor = vec4(1.0, 1.0, 1.0, 1.0); } FragColor = vec4(FragPos.x, FragPos.y, 0, 1); } void main() { drawPoints(); // drawDepth(); }