2018-03-11 11:58:50 +01:00
|
|
|
#version 150 core
|
|
|
|
#extension GL_ARB_explicit_attrib_location : require
|
|
|
|
|
|
|
|
in vec4 inCoord;
|
|
|
|
in vec3 inNormal;
|
|
|
|
in vec2 inUV;
|
|
|
|
in vec4 inColor;
|
|
|
|
|
2018-03-11 14:16:23 +01:00
|
|
|
uniform mat4 uModelMatrix;
|
|
|
|
uniform mat4 uViewMatrix;
|
|
|
|
uniform mat4 uProjectionMatrix;
|
2018-03-11 17:30:56 +01:00
|
|
|
uniform mat3 uNormalMatrix;
|
2018-03-11 11:58:50 +01:00
|
|
|
uniform vec3 uLightDirection;
|
2018-03-11 14:16:23 +01:00
|
|
|
uniform vec3 uViewPosition;
|
2018-03-11 11:58:50 +01:00
|
|
|
|
|
|
|
smooth out vec4 ioFragColor;
|
|
|
|
out vec3 ioNormal;
|
2018-03-11 14:16:23 +01:00
|
|
|
out vec3 ioFragPosition;
|
2018-03-11 11:58:50 +01:00
|
|
|
|
|
|
|
void main() {
|
2018-03-11 14:16:23 +01:00
|
|
|
gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * inCoord;
|
2018-03-11 11:58:50 +01:00
|
|
|
ioFragColor = inColor;
|
2018-03-11 17:30:56 +01:00
|
|
|
ioNormal = uNormalMatrix * inNormal;
|
2018-03-11 14:16:23 +01:00
|
|
|
ioFragPosition = (uModelMatrix * inCoord).xyz;
|
2018-03-11 11:58:50 +01:00
|
|
|
}
|