mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
GLES3: Skip batches with zero instance count while rendering
(cherry picked from commit 51dcb38840
)
This commit is contained in:
parent
4cce0d9711
commit
fc15ffed1e
1 changed files with 5 additions and 0 deletions
|
@ -661,6 +661,11 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou
|
||||||
state.current_tex = RID();
|
state.current_tex = RID();
|
||||||
|
|
||||||
for (uint32_t i = 0; i <= state.current_batch_index; i++) {
|
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
|
//setup clip
|
||||||
if (current_clip != state.canvas_instance_batches[i].clip) {
|
if (current_clip != state.canvas_instance_batches[i].clip) {
|
||||||
current_clip = state.canvas_instance_batches[i].clip;
|
current_clip = state.canvas_instance_batches[i].clip;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue