remove unneeded position from frag shader

This commit is contained in:
jacekpoz 2024-08-08 19:58:53 +02:00
parent 36176e1ea6
commit f30af266e0
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
2 changed files with 6 additions and 9 deletions

View file

@ -2,10 +2,9 @@
int PTK_COMPONENT_TYPE_ELLIPSE = 3;
layout(location = 0) in vec2 position;
layout(location = 1) in vec3 fragColor;
layout(location = 2) flat in int shapeType;
layout(location = 3) in vec2 uv;
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;

View file

@ -10,17 +10,15 @@ layout(location = 1) in vec3 inColor;
layout(location = 2) in int inShapeType;
layout(location = 3) in vec2 inUv;
layout(location = 0) out vec2 outPosition;
layout(location = 1) out vec3 fragColor;
layout(location = 2) out int outShapeType;
layout(location = 3) out vec2 outUv;
layout(location = 0) out vec3 fragColor;
layout(location = 1) out int outShapeType;
layout(location = 2) out vec2 outUv;
void main() {
vec2 normalized = ((inPosition / ubo.initialWindowSize) - 0.5) * 2.0;
gl_Position = vec4(normalized, 0.0, 1.0);
fragColor = inColor;
outPosition = normalized;
outShapeType = inShapeType;
outUv = inUv;
}