menu_bookDocumentation
PostProcessVolume: Camera-Based Effect Blending with Box, Sphere, and Infinite Modes
The PostProcessVolume component in s&box applies post-processing effects to cameras inside its volume. Effect components can be on the same GameObject or child GameObjects.
Volume Shapes
- Box — rectangular region
- Sphere — spherical region
- Infinite — applies globally regardless of camera position
Blending
The BlendDistance property controls how the effect fades in as the camera enters the volume. Further inside = stronger effect.
Setup Pattern
- Create a GameObject with PostProcessVolume component
- Add effect components (e.g., FilmGrain, Tonemapping) on the same or child GameObjects
- Configure volume shape and blend distance
- Effects automatically apply when any camera enters the volume
Dynamic Usage
CSHARP
// Fade radiation effect based on player health
var ppVolume = Components.Get<PostProcessVolume>();
ppVolume.BlendWeight = 1.0f - (health / maxHealth);Editor Preview
When selected in the editor, the volume shows a preview of its effects. Disable Editor Preview on the component if this is distracting during level design.
Was this helpful?