struct
VolumeComponent
Zone-based post-process override (HDRP Volume analogue).
- Module
- Volumes
- Header
#include "Volumes/Components/VolumeComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
A VolumeComponent contributes its profile to the per-camera blend each frame. Two shapes: - Global (isGlobal = true): always contributes, just sorted by priority. - Local (isGlobal = false): uses the entity's TransformComponent world position + halfExtents as a box AABB; contributes when the camera is inside, with a blendDistance falloff at the box edges for a soft transition.
The profile itself can live either inline on the component (profile, the field directly below) or as a .volume asset referenced by profileAssetPath (resolved by VolumeManager — when both are present, asset wins). The inline profile is the default so new components light up without an asset round-trip.
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
bool | isGlobal | Default true. |
Vec3 | halfExtents | Box half-extents in local space. Only consulted when isGlobal=false. World transform comes from the entity's TransformComponent — the box ride along with the entity's position + rotation. Default Vec3(5.0f, 5.0f, 5.0f). |
float | priority | Volumes are processed from low to high priority. Higher-priority volumes override lower-priority slots that aren't already covered by a stronger contribution. For two volumes at equal priority, the later-walked one wins (registration order). Default 0.0f. |
float | blendDistance | Distance (in world units) outside the box AABB where the volume's influence fades from 1 to 0. Inside the box minus blendDistance weight is 1; from there to the box edge it falls off linearly. Ignored when isGlobal=true (global volumes always contribute at weight*1.0). Default 1.0f. |
float | weight | Per-volume strength multiplier on the camera-space weight (0..1). Useful for scripts cross-fading two cinematic volumes — set weight at runtime to scrub between them without changing priority order. Default 1.0f. |
std::string | profileAssetPath | Optional asset reference — when non-empty, VolumeManager loads the referenced VolumeProfileAsset and uses its profile instead of the inline one below. |
VolumeProfile | profile | Inline profile — edited via the custom HDRP-style override-toggle UI, not via the codegen-generated property panel. We tag it as a custom property type and keep it hidden so the codegen emits a PropertyType::Custom entry with key "VolumeProfile" and skips trying to introspect the struct's fields. Serialization is handled by a custom struct hook; the inspector hook reads/writes this field directly. |
Generated from Volumes/Components/VolumeComponent.h via volumes.json · Oct 26, 2026Version 1.0.0