#version 330 core in vec4 color; in float dist; uniform vec2 u_resolution; uniform float u_dashSize; uniform float u_gapSize; out vec4 FragColor; void main() { if (fract(dist / (u_dashSize + u_gapSize)) > u_dashSize/(u_dashSize + u_gapSize)) discard; FragColor = color; }