Tornado-Visualization/datenvisualisierung_sose2024/lines_vshader_contour.glsl

16 lines
591 B
Text
Raw Normal View History

2024-06-11 11:02:20 +00:00
#version 330
uniform mat4 mvpMatrix; // model-view-projection matrix
in vec4 vertexPosition;
void main()
{
2024-06-15 18:50:23 +00:00
// 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
2024-06-11 11:02:20 +00:00
}