Remove unused shader matrices. (#4723)
authorlhofhansl <lhofhansl@yahoo.com>
Fri, 4 Nov 2016 17:12:45 +0000 (10:12 -0700)
committerest31 <est31@users.noreply.github.com>
Fri, 4 Nov 2016 17:12:45 +0000 (18:12 +0100)
client/shaders/minimap_shader/opengl_vertex.glsl
client/shaders/nodes_shader/opengl_vertex.glsl
client/shaders/water_surface_shader/opengl_vertex.glsl
client/shaders/wielded_shader/opengl_vertex.glsl
src/shader.cpp

index 06df5a3cfa93920be3fa407cf4894392aa69b978..88f9356d5ad4d8b61ed3857cd2afc72ef5c31a74 100644 (file)
@@ -1,6 +1,4 @@
 uniform mat4 mWorldViewProj;
-uniform mat4 mInvWorld;
-uniform mat4 mTransWorld;
 uniform mat4 mWorld;
 
 void main(void)
index 28c5f197ef9dfcd8731321b5d4689e507e47cfea..44c48cc4ce139204c0397c4e7cb080fb45e9c794 100644 (file)
@@ -1,6 +1,4 @@
 uniform mat4 mWorldViewProj;
-uniform mat4 mInvWorld;
-uniform mat4 mTransWorld;
 uniform mat4 mWorld;
 
 uniform float dayNightRatio;
index 9b461f4c185e1c11609b142e3328b3cae83b4bb3..a930e7b8fcc7ca99e960ba5f57c41abc89c17fbd 100644 (file)
@@ -1,6 +1,4 @@
 uniform mat4 mWorldViewProj;
-uniform mat4 mInvWorld;
-uniform mat4 mTransWorld;
 uniform mat4 mWorld;
 
 uniform float dayNightRatio;
index c33b0a7d3ee3028622a925991db8d35d5d6367c9..86c62689629db4c3d2d8b36db681891ca2093b9c 100644 (file)
@@ -1,6 +1,4 @@
 uniform mat4 mWorldViewProj;
-uniform mat4 mInvWorld;
-uniform mat4 mTransWorld;
 uniform mat4 mWorld;
 
 uniform float dayNightRatio;
index e13ab8df30ef264282f2e823851a4c6fc16d2d5c..b0131c952f0365f2565999e0851222b14c72a179 100644 (file)
@@ -219,14 +219,6 @@ public:
                video::IVideoDriver *driver = services->getVideoDriver();
                sanity_check(driver);
 
-               // set inverted world matrix
-               core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
-               invWorld.makeInverse();
-               if(is_highlevel)
-                       services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
-               else
-                       services->setVertexShaderConstant(invWorld.pointer(), 0, 4);
-
                // set clip matrix
                core::matrix4 worldViewProj;
                worldViewProj = driver->getTransform(video::ETS_PROJECTION);
@@ -237,14 +229,6 @@ public:
                else
                        services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);
 
-               // set transposed world matrix
-               core::matrix4 transWorld = driver->getTransform(video::ETS_WORLD);
-               transWorld = transWorld.getTransposed();
-               if(is_highlevel)
-                       services->setVertexShaderConstant("mTransWorld", transWorld.pointer(), 16);
-               else
-                       services->setVertexShaderConstant(transWorld.pointer(), 8, 4);
-
                // set world matrix
                core::matrix4 world = driver->getTransform(video::ETS_WORLD);
                if(is_highlevel)