You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2D particles are being culled when the parent object leaves the frame, when hierarchical culling is enabled.
culling_broken.mp4
Steps to reproduce
Create 2D particle system and move off screen with hierarchical culling enabled. Note that the particles disappear as soon as the origin moves off screen, rather than still showing the particles that have been emitted.
This is easy enough to fix in the meantime by turning off hierarchical culling (rendering/2D/options/culling_mode set to Item instead of Node).
I'm just fixing this now. The problem is the same as with skeletons - the bounding rect is changed by updates from the scene tree, and the local bound is never updated, so everything is culled from the parent object.
In the legacy item culling code, the bound is deferred updated when get_rect() is called on the item during the render traversal through the tree.
There's a number of ways to solve this, but I'll probably use something similar to skeletons, and trigger an update of the local bounds when the multimesh is changed (at least in the case of CPUParticles2D, haven't got to GPUparticles2D yet).
The text was updated successfully, but these errors were encountered:
lawnjelly
changed the title
2D Particle hierarchical culling not working correctly
[3.x] 2D Particle hierarchical culling not working correctly
Jul 31, 2023
Godot version
3.6 (after #68738 merged)
System information
All
Issue description
2D particles are being culled when the parent object leaves the frame, when hierarchical culling is enabled.
culling_broken.mp4
Steps to reproduce
Create 2D particle system and move off screen with hierarchical culling enabled. Note that the particles disappear as soon as the origin moves off screen, rather than still showing the particles that have been emitted.
Minimal reproduction project
particle_hierarchical_culling.zip
Discussion
This is easy enough to fix in the meantime by turning off hierarchical culling (
rendering/2D/options/culling_mode
set toItem
instead ofNode
).I'm just fixing this now. The problem is the same as with skeletons - the bounding rect is changed by updates from the scene tree, and the local bound is never updated, so everything is culled from the parent object.
In the legacy item culling code, the bound is deferred updated when
get_rect()
is called on the item during the render traversal through the tree.There's a number of ways to solve this, but I'll probably use something similar to skeletons, and trigger an update of the local bounds when the multimesh is changed (at least in the case of
CPUParticles2D
, haven't got toGPUparticles2D
yet).The text was updated successfully, but these errors were encountered: