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.
This commit is contained in:
lawnjelly 2021-04-24 10:21:33 +01:00
parent adaf488963
commit 35c5ccce9e

View file

@ -1493,7 +1493,11 @@ void RasterizerCanvasGLES3::render_joined_item(const BItemJoined &p_bij, RenderI
Light *light = r_ris.item_group_light; Light *light = r_ris.item_group_light;
bool light_used = false; bool light_used = false;
VS::CanvasLightMode mode = VS::CANVAS_LIGHT_MODE_ADD; 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) { while (light) {