From 6f322af3fb111928e4a17bc4911ff824358b739a Mon Sep 17 00:00:00 2001 From: clayjohn Date: Tue, 21 Apr 2020 17:46:40 -0700 Subject: [PATCH] Rebind material when skeleton changes in GLES2 --- drivers/gles2/rasterizer_scene_gles2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index e5215ea7203..04ff585a271 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -2370,6 +2370,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements, if (vertex_lit != prev_vertex_lit) { state.scene_shader.set_conditional(SceneShaderGLES2::USE_VERTEX_LIGHTING, vertex_lit); prev_vertex_lit = vertex_lit; + rebind = true; } if (!unshaded && !accum_pass && e->refprobe_0_index != RenderList::MAX_REFLECTION_PROBES) { @@ -2459,8 +2460,8 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements, state.scene_shader.set_conditional(SceneShaderGLES2::USE_SKELETON, false); state.scene_shader.set_conditional(SceneShaderGLES2::USE_SKELETON_SOFTWARE, false); } - rebind = true; } + rebind = true; } if (e->owner != prev_owner || e->geometry != prev_geometry || skeleton != prev_skeleton) {