Files
Sandbox/res/glsl/vertex.glsl
2026-04-01 00:13:07 -05:00

18 lines
437 B
GLSL

#version 450 core
layout (location = 0) in vec3 position;
layout (location = 1) in vec2 texCoord;
layout (location = 2) in float texIndex;
layout (location = 3) in mat4 theModelMatrix;
out vec3 textureCoord;
uniform mat4 theViewMatrix;
uniform mat4 theProjMatrix;
void main()
{
gl_Position = theProjMatrix * theViewMatrix * theModelMatrix * vec4(position, 1.0);
textureCoord = vec3(1.0 - texCoord.x, 1.0 - texCoord.y, texIndex);
}