RaptorRtPostToggles.ElementProvider
Defines what an optional post element switches off.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.Render.EditorTools | RaptorRender.Editor | class | preview, since 0.1.0 |
Create with Feature or Volume.
public sealed class ElementProviderProperties
Element
public Element Element { get; }The element this provider supplies.
IsFeature
public bool IsFeature { get; }True for a feature element, false for a volume element.
MatchesFeature
public Func<ScriptableRendererFeature, bool> MatchesFeature { get; }For a feature element, returns true for the renderer feature this element switches. Null for a volume element.
SwitchOff
public Action<VolumeComponent> SwitchOff { get; }For a volume element, writes the off override into the profile's component.
VolumeType
public Type VolumeType { get; }For a volume element, the VolumeComponent type added to the override profile. Null for a feature element.
Methods
Feature
public static ElementProvider Feature(Element element, Func<ScriptableRendererFeature, bool> matchesFeature)Creates a renderer-feature element. A matching feature that is inactive still counts as present.
| Parameter | Type | Description |
|---|---|---|
element | Element | The element. |
matchesFeature | Func<ScriptableRendererFeature, bool> | Returns true for the renderer feature that represents the element. |
Returns: The provider.
Volume
public static ElementProvider Volume(Element element, Type volumeComponent, Action<VolumeComponent> switchOff)Creates a volume element. switchOff receives the profile's volumeComponent.
| Parameter | Type | Description |
|---|---|---|
element | Element | The element. |
volumeComponent | Type | The volume component's type. |
switchOff | Action<VolumeComponent> | Switches the component off in a profile. |
Returns: The provider.
Related types
- RaptorRtPostToggles: Post effects the Ray-traced preview and the 3D view can switch off.