One Actor Per Effect Layer
In the Unreal Engine 5.8 showcase, place a ScopedPostProcessLayer actor for each post-process effect and assign its material or material instance. The actor owns the post-process component and a dynamic material instance; it does not replace materials on target meshes.
Target Rules
| Setup | Result |
|---|---|
| Whole Scene | Applies globally and uses no stencil channel when there are no exclusions. |
| Include Rules Only | Targets explicit actors, actor classes (including derived classes), or actor tags. |
| Whole Scene + Excludes | Ignores selected actors, classes, or tags. |
| Explicit Re-add | An explicit actor include can override class or tag exclusions. |
Overlapping Layers
Selective layers automatically reserve individual Custom Stencil bits. A mesh can carry several bits, so several post-process actors can affect the same static or skeletal mesh. Up to eight selective layers can be active at once; pure whole-scene layers do not consume a bit.
MAP_06_ScopedPostProcessLayers to see class inclusion, explicit actor inclusion, class exclusion, explicit re-add, and overlapping effects together.Material Contract
A selective post-process material must expose scalar parameters AOS_ScopeEnabled and AOS_StencilBit, read CustomStencil, and blend its processed colour with PostProcessInput0 only when its assigned bit is present. Use M_PP_ScopedStylize as the reference implementation.
Enable Custom Depth-Stencil Pass: Enabled with Stencil in Project Settings. Translucent target materials must also enable Allow Custom Depth Writes.
Runtime Control
Blueprint can add or remove included and excluded actors, refresh resolved targets after spawning or tag changes, and set scalar or vector parameters on the layer's dynamic material instance.