Merge pull request #38099 from clayjohn/GLES2-skeleton-rebind

Rebind material when skeleton changes in GLES2
This commit is contained in:
Rémi Verschelde 2020-04-22 08:23:43 +02:00 committed by GitHub
commit ade57c4bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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) {