mbrea-c / bevy_firework

🎆 CPU-driven, batch-rendered particle system for the Bevy game engine.
Apache License 2.0
38 stars 6 forks source link

Soft particle-scene intersection, solid collider collision #7

Closed mbrea-c closed 9 months ago

mbrea-c commented 9 months ago

Soft particle-scene intersection

Billboarded particles produce hard edges when intersecting with scene geometry, which is ugly. This PR introduces configurable soft particle edges which fade in intersections with geometry, very useful for smoke-like particle effects. It also adds configuration options for rounded particle edge fading.

This feature requires the camera to have the depth prepass enabled (i.e. the DepthPrepass component added). If it is not present, the behaviour is as before.

Solid collider collisions

Previously, all colliders were treated as hollow. This adds support for solid colliders, and forces particles out of them.