Stefan Dresselhaus
24e05db27d
- objects use their position and scale - cube hacky nailed down at camera-pos. - started working on Icons
24 lines
757 B
GLSL
24 lines
757 B
GLSL
#version 330
|
|
|
|
layout(location=0) in vec3 Position;
|
|
layout(location=1) in vec3 Normal;
|
|
layout(location=2) in vec2 TexCoord;
|
|
uniform mat4 ProjectionMatrix;
|
|
uniform mat4 ViewMatrix;
|
|
uniform mat3 NormalMatrix;
|
|
uniform vec3 PositionOffset = vec3(5.0,2.0,5.0);
|
|
uniform vec3 Scale = vec3(1.0,1.0,1.0);
|
|
uniform float TessLevelInner = 1.0; // controlled by keyboard buttons
|
|
uniform float TessLevelOuter = 1.0; // controlled by keyboard buttons
|
|
|
|
out vec3 vPosition;
|
|
out vec3 vNormal;
|
|
|
|
void main () {
|
|
vPosition = Position;
|
|
//gl_Position = vec4(Position,1);
|
|
// component-wise
|
|
gl_Position = ProjectionMatrix * ViewMatrix * vec4(PositionOffset + (Scale * Position), 1);
|
|
vNormal = Normal;
|
|
}
|