16 lines
368 B
GLSL
16 lines
368 B
GLSL
// Use 'in' for vertex attributes
|
|
in vec4 inPosition;
|
|
in vec2 inTexCoord;
|
|
|
|
// 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;
|
|
}
|