From bb9127a78bd1035b1ee8797323138844b622211e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 16 Nov 2018 10:52:31 -0300 Subject: Removed unnecesary normal multiplication (only culling was really needed), fixes #17776 --- drivers/gles2/rasterizer_scene_gles2.cpp | 1 - drivers/gles2/shaders/scene.glsl | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/gles2') 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 -- cgit v1.2.3