Skip to content

Commit 6bb4347

Browse files
lhofhanslest31
authored andcommittedNov 4, 2016
Remove unused shader matrices. (#4723)
1 parent dde66a8 commit 6bb4347

File tree

5 files changed

+0
-24
lines changed

5 files changed

+0
-24
lines changed
 

Diff for: ‎client/shaders/minimap_shader/opengl_vertex.glsl

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
uniform mat4 mWorldViewProj;
2-
uniform mat4 mInvWorld;
3-
uniform mat4 mTransWorld;
42
uniform mat4 mWorld;
53

64
void main(void)

Diff for: ‎client/shaders/nodes_shader/opengl_vertex.glsl

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
uniform mat4 mWorldViewProj;
2-
uniform mat4 mInvWorld;
3-
uniform mat4 mTransWorld;
42
uniform mat4 mWorld;
53

64
uniform float dayNightRatio;

Diff for: ‎client/shaders/water_surface_shader/opengl_vertex.glsl

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
uniform mat4 mWorldViewProj;
2-
uniform mat4 mInvWorld;
3-
uniform mat4 mTransWorld;
42
uniform mat4 mWorld;
53

64
uniform float dayNightRatio;

Diff for: ‎client/shaders/wielded_shader/opengl_vertex.glsl

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
uniform mat4 mWorldViewProj;
2-
uniform mat4 mInvWorld;
3-
uniform mat4 mTransWorld;
42
uniform mat4 mWorld;
53

64
uniform float dayNightRatio;

Diff for: ‎src/shader.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,6 @@ class MainShaderConstantSetter : public IShaderConstantSetter
219219
video::IVideoDriver *driver = services->getVideoDriver();
220220
sanity_check(driver);
221221

222-
// set inverted world matrix
223-
core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
224-
invWorld.makeInverse();
225-
if(is_highlevel)
226-
services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
227-
else
228-
services->setVertexShaderConstant(invWorld.pointer(), 0, 4);
229-
230222
// set clip matrix
231223
core::matrix4 worldViewProj;
232224
worldViewProj = driver->getTransform(video::ETS_PROJECTION);
@@ -237,14 +229,6 @@ class MainShaderConstantSetter : public IShaderConstantSetter
237229
else
238230
services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);
239231

240-
// set transposed world matrix
241-
core::matrix4 transWorld = driver->getTransform(video::ETS_WORLD);
242-
transWorld = transWorld.getTransposed();
243-
if(is_highlevel)
244-
services->setVertexShaderConstant("mTransWorld", transWorld.pointer(), 16);
245-
else
246-
services->setVertexShaderConstant(transWorld.pointer(), 8, 4);
247-
248232
// set world matrix
249233
core::matrix4 world = driver->getTransform(video::ETS_WORLD);
250234
if(is_highlevel)

0 commit comments

Comments
 (0)
Please sign in to comment.