mirror of
https://github.com/13hannes11/LU_opengl_solarsystem_visualization.git
synced 2024-09-04 01:11:01 +02:00
21 lines
438 B
GLSL
21 lines
438 B
GLSL
#version 330
|
|
|
|
layout(location = 0) in vec3 position;
|
|
layout(location = 1) in vec2 texturePos;
|
|
layout(location = 2) in vec3 normalVec;
|
|
|
|
out vec2 fragTexCoord;
|
|
out vec3 fragNormal;
|
|
out vec3 fragPos;
|
|
|
|
uniform mat4 ModelMatrix;
|
|
uniform mat4 CameraMatrix;
|
|
|
|
void main() {
|
|
gl_Position = CameraMatrix * ModelMatrix * vec4(position, 1.0);
|
|
|
|
fragTexCoord = texturePos;
|
|
fragNormal = normalVec;
|
|
fragPos = vec3(ModelMatrix * vec4(position, 1));
|
|
}
|