GLES3: Skip batches with zero instance count while rendering

This commit is contained in:
HolySkyMin 2023-12-05 18:49:59 +09:00
parent 654132cb9c
commit 51dcb38840
1 changed files with 5 additions and 0 deletions

View File

@ -661,6 +661,11 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou
state.current_tex = RID();
for (uint32_t i = 0; i <= state.current_batch_index; i++) {
// Skipping when there is no instances.
if (state.canvas_instance_batches[i].instance_count == 0) {
continue;
}
//setup clip
if (current_clip != state.canvas_instance_batches[i].clip) {
current_clip = state.canvas_instance_batches[i].clip;