Basic 3D rendering
This commit is contained in:
17
res/glsl/vertex.glsl
Normal file
17
res/glsl/vertex.glsl
Normal file
@@ -0,0 +1,17 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user