ptk/shaders/shader.frag.glsl

18 lines
395 B
GLSL

#version 450
int PTK_COMPONENT_TYPE_ELLIPSE = 3;
layout(location = 0) in vec3 fragColor;
layout(location = 1) flat in int shapeType;
layout(location = 2) in vec2 uv;
layout(location = 0) out vec4 outColor;
void main() {
if (shapeType == PTK_COMPONENT_TYPE_ELLIPSE) {
if (length(uv - vec2(0.5)) > 0.5) {
discard;
}
}
outColor = vec4(fragColor, 1.0);
}