2024-02-07 02:59:34 +01:00
|
|
|
#version 430 core
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 inPosition;
|
|
|
|
layout(location = 1) in vec3 inNormal;
|
|
|
|
layout(location = 2) in vec2 inTexCoord;
|
2024-02-07 18:32:04 +01:00
|
|
|
layout(location = 6) in mat4 transformations;
|
2024-02-07 22:32:03 +01:00
|
|
|
layout(location = 10) in mat4 modelMatrix;
|
2024-02-07 02:59:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
out vec2 texCoords;
|
|
|
|
out vec3 fragNormal;
|
|
|
|
out vec3 fragPosition;
|
|
|
|
uniform sampler2D colorTexture;
|
|
|
|
void main()
|
|
|
|
{
|
2024-02-07 22:32:03 +01:00
|
|
|
gl_Position = transformations * vec4(inPosition, 1.0);
|
|
|
|
fragPosition = (modelMatrix* vec4(inPosition,1)).xyz;
|
2024-02-07 02:59:34 +01:00
|
|
|
texCoords = inTexCoord;
|
2024-02-07 22:32:03 +01:00
|
|
|
fragNormal = (modelMatrix* vec4(inNormal,0)).xyz;
|
2024-02-07 02:59:34 +01:00
|
|
|
}
|