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
Describe the bug
In 3d scenes, particles render behind PBR objects with AlphaMode::Blend but Color.alpha = 1.0. Note that the particles do get occluded when AlphaMode::Opaque.
My use case is spawning particles in a world where I have a fog of war layer between the world and the camera, but the particles render through the fog.
Expected behavior
I expect particles to be occluded by objects that are between them and the camera, even if AlphaMode is not AlphaMode::Opaque
Screenshots
Mp4 attached. The blue and green squares are both closest to the camera and the red square is behind the fireworks. This shows that with AlphaMode::Opaque (green), the particles are correctly occluded, but for AlphaMode::Blend (blue) the particles are not.
hanabi_blend_capture.mp4
The text was updated successfully, but these errors were encountered:
Katsutoshii
added a commit
to Katsutoshii/bevy_hanabi
that referenced
this issue
May 14, 2024
Order particle effects based on the distance of the emitter to the camera. This ensures they're sorted during the `Transparent3d` render phase relative to other transparent objects.
---------
Co-authored-by: Jerome Humbert <djeedai@gmail.com>
Crate versions
bevy
version: 0.13.2bevy_hanabi
version: 0.10.0Describe the bug
In 3d scenes, particles render behind PBR objects with AlphaMode::Blend but Color.alpha = 1.0. Note that the particles do get occluded when AlphaMode::Opaque.
My use case is spawning particles in a world where I have a fog of war layer between the world and the camera, but the particles render through the fog.
Expected behavior
I expect particles to be occluded by objects that are between them and the camera, even if AlphaMode is not AlphaMode::Opaque
To Reproduce
I have a minimal reproduction in this repo: https://github.com/Katsutoshii/hanabi_blend.
Screenshots
Mp4 attached. The blue and green squares are both closest to the camera and the red square is behind the fireworks. This shows that with AlphaMode::Opaque (green), the particles are correctly occluded, but for AlphaMode::Blend (blue) the particles are not.
hanabi_blend_capture.mp4
The text was updated successfully, but these errors were encountered: