19 lines
545 B
GLSL
19 lines
545 B
GLSL
#version 460 core
|
|
layout(location = 0) in vec3 position;
|
|
layout(location = 1) in vec3 normal;
|
|
layout(location = 2) in vec2 textureCoords;
|
|
|
|
uniform mat4 transformationMatrix;
|
|
uniform mat4 projectionMatrix;
|
|
uniform mat4 viewMatrix;
|
|
|
|
out vec2 pass_textureCoords;
|
|
out vec3 surfaceNormal;
|
|
|
|
void main() {
|
|
vec4 worldPosition = transformationMatrix * vec4(position, 1.0f);
|
|
gl_Position = projectionMatrix * viewMatrix * worldPosition;
|
|
pass_textureCoords = textureCoords;
|
|
|
|
surfaceNormal = (transformationMatrix * vec4(normal , 0.f)).xyz;
|
|
} |