diff options
author | Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> | 2015-12-09 21:39:25 +0000 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-12-11 15:28:59 +0100 |
commit | a74e8ab7841a67ae353c537d449d27a931ba67d8 (patch) | |
tree | 9d1e2aa5f46be3758c08de772a71919906a2b8df /slideshow/opengl | |
parent | 7d1c123a55d222868e27673685c25d62b1e96cd5 (diff) |
slideshow: Remove the last legacy uniforms
Change-Id: If5f7368bf53dd59e66e990e4f2c57b6ee2cba44b
Diffstat (limited to 'slideshow/opengl')
-rw-r--r-- | slideshow/opengl/basicVertexShader.glsl | 10 | ||||
-rw-r--r-- | slideshow/opengl/reflectionVertexShader.glsl | 10 |
2 files changed, 14 insertions, 6 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: */ diff --git a/slideshow/opengl/reflectionVertexShader.glsl b/slideshow/opengl/reflectionVertexShader.glsl index 566eafa7590b..96748887c308 100644 --- a/slideshow/opengl/reflectionVertexShader.glsl +++ b/slideshow/opengl/reflectionVertexShader.glsl @@ -28,6 +28,10 @@ #version 130 +attribute vec3 a_position; +attribute vec3 a_normal; +attribute vec2 a_texCoord; + uniform mat4 u_projectionMatrix; uniform mat4 u_modelViewMatrix; uniform mat4 u_sceneTransformMatrix; @@ -42,9 +46,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); v_isShadow = float(gl_VertexID >= 6); } |