summaryrefslogtreecommitdiff
path: root/slideshow/opengl/basicVertexShader.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/opengl/basicVertexShader.glsl')
-rw-r--r--slideshow/opengl/basicVertexShader.glsl10
1 files changed, 7 insertions, 3 deletions
diff --git a/slideshow/opengl/basicVertexShader.glsl b/slideshow/opengl/basicVertexShader.glsl
index ebd5dbcc6585..cd68b16a161c 100644
--- a/slideshow/opengl/basicVertexShader.glsl
+++ b/slideshow/opengl/basicVertexShader.glsl
@@ -28,6 +28,10 @@
#version 120
+attribute vec3 a_position;
+attribute vec3 a_normal;
+attribute vec2 a_texCoord;
+
uniform mat4 u_projectionMatrix;
uniform mat4 u_modelViewMatrix;
uniform mat4 u_sceneTransformMatrix;
@@ -41,9 +45,9 @@ void main( void )
{
mat4 modelViewMatrix = u_modelViewMatrix * u_operationsTransformMatrix * u_sceneTransformMatrix * u_primitiveTransformMatrix;
mat3 normalMatrix = mat3(transpose(inverse(modelViewMatrix)));
- gl_Position = u_projectionMatrix * modelViewMatrix * gl_Vertex;
- v_texturePosition = gl_MultiTexCoord0.xy;
- v_normal = normalize(normalMatrix * gl_Normal);
+ gl_Position = u_projectionMatrix * modelViewMatrix * vec4(a_position, 1.0);
+ v_texturePosition = a_texCoord;
+ v_normal = normalize(normalMatrix * a_normal);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */