summaryrefslogtreecommitdiff
path: root/drivers/gles2
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-16 10:52:31 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-16 10:52:31 -0300
commitbb9127a78bd1035b1ee8797323138844b622211e (patch)
treeacea4a10bad36a453ee684f4d09f14e72b789315 /drivers/gles2
parent256bbd3561135c7886501a865be27cde3d26d47d (diff)
Removed unnecesary normal multiplication (only culling was really needed), fixes #17776
Diffstat (limited to 'drivers/gles2')
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp1
-rw-r--r--drivers/gles2/shaders/scene.glsl5
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index 64fe385889..2c2dea3535 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -2339,7 +2339,6 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
state.scene_shader.set_uniform(SceneShaderGLES2::TIME, storage->frame.time[0]);
state.scene_shader.set_uniform(SceneShaderGLES2::SCREEN_PIXEL_SIZE, screen_pixel_size);
- state.scene_shader.set_uniform(SceneShaderGLES2::NORMAL_MULT, 1.0); // TODO mirror?
}
if (rebind_light && light) {
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl
index 4c652cd9e9..bc83b69b49 100644
--- a/drivers/gles2/shaders/scene.glsl
+++ b/drivers/gles2/shaders/scene.glsl
@@ -84,7 +84,7 @@ uniform highp mat4 world_transform;
uniform highp float time;
-uniform float normal_mult;
+
#ifdef RENDER_DEPTH
uniform float light_bias;
@@ -330,11 +330,10 @@ void main() {
#endif
- vec3 normal = normal_attrib * normal_mult;
+ vec3 normal = normal_attrib;
#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP)
vec3 tangent = tangent_attrib.xyz;
- tangent *= normal_mult;
float binormalf = tangent_attrib.a;
vec3 binormal = normalize(cross(normal, tangent) * binormalf);
#endif