2024-08-13 00:12:48 +02:00
|
|
|
// Copyright (jacekpoz 2024). Licensed under the EUPL-1.2 or later.
|
|
|
|
|
2024-08-08 14:38:43 +02:00
|
|
|
#version 450
|
|
|
|
|
2024-08-08 22:16:24 +02:00
|
|
|
layout(constant_id = 0) const int PTK_COMPONENT_TYPE_ELLIPSE = 0;
|
2024-08-08 19:14:50 +02:00
|
|
|
|
2024-08-08 19:58:53 +02:00
|
|
|
layout(location = 0) in vec3 fragColor;
|
|
|
|
layout(location = 1) flat in int shapeType;
|
|
|
|
layout(location = 2) in vec2 uv;
|
2024-08-08 19:14:50 +02:00
|
|
|
|
2024-08-08 14:38:43 +02:00
|
|
|
layout(location = 0) out vec4 outColor;
|
|
|
|
|
|
|
|
void main() {
|
2024-08-08 19:14:50 +02:00
|
|
|
if (shapeType == PTK_COMPONENT_TYPE_ELLIPSE) {
|
|
|
|
if (length(uv - vec2(0.5)) > 0.5) {
|
|
|
|
discard;
|
|
|
|
}
|
|
|
|
}
|
2024-08-08 14:38:43 +02:00
|
|
|
outColor = vec4(fragColor, 1.0);
|
|
|
|
}
|