15 lines
591 B
GLSL
15 lines
591 B
GLSL
#version 330
|
|
uniform mat4 mvpMatrix; // model-view-projection matrix
|
|
in vec4 vertexPosition;
|
|
void main()
|
|
{
|
|
// My image was 90' rotated in the clockwise direction and I don't
|
|
// know exactly why, but my Ansatz was to simply rotate the rendered
|
|
// image by 90'
|
|
float radians = -90.0 * 3.1416 / 180.0;
|
|
vec4 newImage;
|
|
newImage = vec4(cos(radians) * vertexPosition.x - sin(radians) * vertexPosition.y,1+ sin(radians) * vertexPosition.x + cos(radians) * vertexPosition.y, vertexPosition.z, vertexPosition.w);
|
|
|
|
gl_Position = mvpMatrix * newImage; // same kiel antaux
|
|
}
|
|
|