This commit is contained in:
2026-02-04 13:56:37 +01:00
parent 42c5a81473
commit 8b42f97594
4 changed files with 14 additions and 12 deletions

View File

@@ -2,9 +2,11 @@
in layout(location = 1) vec2 textureCoordinates;
layout(binding = 0) uniform sampler2D textureSampler;
out vec4 fragColor;
void main()
{
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
fragColor = texture(textureSampler, textureCoordinates);
}

View File

@@ -1,6 +1,6 @@
#version 430 core
in layout(location = 0) vec2 position;
in layout(location = 0) vec3 position;
in layout(location = 2) vec2 textureCoordinates_in;
out layout(location = 1) vec2 textureCoordinates;
@@ -9,6 +9,6 @@ uniform mat4 orthoMatrix;
void main()
{
gl_Position = vec4(position, 0.0, 1.0);
gl_Position = orthoMatrix * vec4(position.xy, 0.0, 1.0);
textureCoordinates = textureCoordinates_in;
}