28 lines
794 B
GLSL
28 lines
794 B
GLSL
|
#version 430 core
|
||
|
|
||
|
layout(location = 0) in vec3 vertexPosition;
|
||
|
layout(location = 1) in vec3 vertexNormal;
|
||
|
layout(location = 2) in vec2 vertexTexCoord;
|
||
|
layout(location = 3) in vec3 vertexTangent;
|
||
|
layout(location = 4) in vec3 vertexBitangent;
|
||
|
|
||
|
uniform mat4 transformation;
|
||
|
uniform mat4 modelMat;
|
||
|
|
||
|
out vec3 vertexNormalOut;
|
||
|
out vec3 vertexTangentOut;
|
||
|
out vec3 vertexBitangentOut;
|
||
|
out vec3 vertexPosOut;
|
||
|
out vec2 vertexTexCoordOut;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
gl_Position = transformation * vec4(vertexPosition, 1.0);
|
||
|
vertexNormalOut = (modelMat * vec4(vertexNormal, 0.0)).xyz;
|
||
|
vertexTangentOut = (modelMat * vec4(vertexTangent, 0.0)).xyz;
|
||
|
vertexBitangentOut = (modelMat * vec4(vertexBitangent, 0.0)).xyz;
|
||
|
vertexPosOut = (modelMat * vec4(vertexPosition, 1.0)).xyz;
|
||
|
vertexTexCoordOut = vertexTexCoord;
|
||
|
}
|
||
|
|