This commit is contained in:
Felix
2024-11-26 16:18:33 +01:00
parent 7a482b74ab
commit 3e7d3dbc1b
13 changed files with 177 additions and 55 deletions

View File

@@ -1,10 +1,15 @@
attribute vec4 inPosition;
attribute vec2 inTexCoord;
// Use 'in' for vertex attributes
in vec4 inPosition;
in vec2 inTexCoord;
varying vec2 texCoord;
// Use 'out' for passing data to the fragment shader
out vec2 texCoord;
void main() {
// Transform position to clip space
vec2 pos = inPosition.xy * 2.0 - 1.0;
gl_Position = vec4(pos, 0.0, 1.0);
// Pass texture coordinates to the fragment shader
texCoord = inTexCoord;
}
}