Skip to content

Commit

Permalink
Merge pull request #85778 from HolySkyMin/weird_box_killer_try2
Browse files Browse the repository at this point in the history
GLES3: Skip batches with zero instance count while rendering canvas
  • Loading branch information
YuriSizov committed Dec 8, 2023
2 parents f160575 + 51dcb38 commit 36f260b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gles3/rasterizer_canvas_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 36f260b

Please sign in to comment.