Batching - GLES3 fix light pass modulates

The final_modulate was incorrectly being set in the uniform on light passes in GLES3 in situations where color was baked in the vertices. This was already correct in GLES2. This PR makes prevents setting final_modulate in this situation.

(cherry picked from commit 35c5ccce9e)
This commit is contained in:
lawnjelly 2021-04-24 10:21:33 +01:00 committed by Rémi Verschelde
parent 3111910331
commit d696d89bc8
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1493,7 +1493,11 @@ void RasterizerCanvasGLES3::render_joined_item(const BItemJoined &p_bij, RenderI
Light *light = r_ris.item_group_light;
bool light_used = false;
VS::CanvasLightMode mode = VS::CANVAS_LIGHT_MODE_ADD;
state.canvas_item_modulate = p_ci->final_modulate; // remove the canvas modulate
// we leave this set to 1, 1, 1, 1 if using software because the colors are baked into the vertices
if (p_bij.is_single_item()) {
state.canvas_item_modulate = p_ci->final_modulate; // remove the canvas modulate
}
while (light) {