1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Avoid updating particles during 2D rendering

In 2D the particle uniform set isn't obtained until the render pass. So in 2D just avoid rendering if not updated yet.
This commit is contained in:
clayjohn
2022-12-22 12:04:34 -07:00
parent c547c4ef59
commit 41021b07be
4 changed files with 15 additions and 2 deletions

View File

@@ -790,7 +790,7 @@ void RendererCanvasRenderRD::_render_item(RD::DrawListID p_draw_list, RID p_rend
ERR_BREAK(particles_storage->particles_get_mode(pt->particles) != RS::PARTICLES_MODE_2D);
particles_storage->particles_request_process(pt->particles);
if (particles_storage->particles_is_inactive(pt->particles)) {
if (particles_storage->particles_is_inactive(pt->particles) || particles_storage->particles_get_frame_counter(pt->particles) == 0) {
break;
}