22 lines
508 B
GLSL
22 lines
508 B
GLSL
#version 430 core
|
|
|
|
layout(location = 0) in vec3 inPosition;
|
|
layout(location = 1) in vec3 inNormal;
|
|
layout(location = 2) in vec2 inTexCoord;
|
|
|
|
|
|
out vec2 texCoords;
|
|
out vec3 fragNormal;
|
|
out vec3 fragPosition;
|
|
|
|
uniform mat4 transformation;
|
|
uniform mat4 modelMatrix;
|
|
uniform sampler2D colorTexture;
|
|
void main()
|
|
{
|
|
gl_Position = transformation * vec4(inPosition, 1.0);
|
|
fragPosition = (modelMatrix* vec4(inPosition,1)).xyz;
|
|
texCoords = inTexCoord;
|
|
fragNormal = (modelMatrix* vec4(inNormal,0)).xyz;
|
|
}
|