RaptorRtPostToggles
Post effects the Ray-traced preview and the 3D view can switch off.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.Render.EditorTools | RaptorRender.Editor | class | preview, since 0.1.0 |
Only the element provider API is supported.
public static class RaptorRtPostTogglesFields
All
public static readonly Element[] All;Every element in settings order: All post-processing, the Game volume master, then the other elements.
Properties
Applied
public static bool Applied { get; }Whether the current set is applied now. While it is applied, features may be switched off in memory.
Current
public static Scope Current { get; }The set that applies now: the Ray-traced preview's set while the preview is on, otherwise the 3D view's set.
Methods
Apply
public static void Apply(bool previewOn)When previewOn is true, applies the current set (Current). When false, restores everything as it was before.
| Parameter | Type | Description |
|---|---|---|
previewOn | bool | True to apply the current set; false to restore. |
IsOn
public static bool IsOn(Element e)Same as IsOn(Scope.Rt, e).
| Parameter | Type | Description |
|---|---|---|
| e | Element | The element. |
Returns: True if the element is on.
IsOn
public static bool IsOn(Scope s, Element e)Returns whether element e is on in set s. Elements are on by default; the Viewport set's All toggle starts from the view's current state.
| Parameter | Type | Description |
|---|---|---|
| s | Scope | The set. |
| e | Element | The element. |
Returns: True if the element is on.
IsOptional
public static bool IsOptional(Element e)Returns whether the element is listed only when it has a provider. The optional elements are SSAO, Haze, PsxDither and Outlines.
| Parameter | Type | Description |
|---|---|---|
| e | Element | The element. |
Returns: True for an optional element.
IsRegistered
public static bool IsRegistered(Element element)Returns whether the element has a provider, built in or registered.
| Parameter | Type | Description |
|---|---|---|
element | Element | The element. |
Returns: True if it has a provider.
Label
public static string Label(Element e)Returns the element's label in the settings (fixed ASCII text).
| Parameter | Type | Description |
|---|---|---|
| e | Element | The element. |
Returns: The label.
Present
public static bool Present(Element e)Returns whether the element has something to switch in this project (see Visible).
| Parameter | Type | Description |
|---|---|---|
| e | Element | The element. |
Returns: True if there is something to switch.
Providers
public static ElementProvider[] Providers()Returns a snapshot of the providers in All order.
Returns: The providers.
RegisterElement
public static bool RegisterElement(Element element, Func<ScriptableRendererFeature, bool> matchesFeature)Registers a renderer-feature element (see ElementProvider.Feature).
| Parameter | Type | Description |
|---|---|---|
element | Element | The element. |
matchesFeature | Func<ScriptableRendererFeature, bool> | Returns true for the renderer feature that represents the element. |
Returns: False when the element already has a provider.
Call from an [InitializeOnLoad] static constructor on the main thread.
RegisterElement
public static bool RegisterElement(Element element, Type volumeComponent, Action<VolumeComponent> switchOff)Registers a volume element (see ElementProvider.Volume).
| 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: False when the element already has a provider.
Call from an [InitializeOnLoad] static constructor on the main thread.
RegisterElement
public static bool RegisterElement(ElementProvider provider)Registers provider. If its element already has a provider, the first one is kept.
| Parameter | Type | Description |
|---|---|---|
provider | ElementProvider | The provider. |
Returns: False when the element already has a provider.
Call from an [InitializeOnLoad] static constructor on the main thread.
Set
public static void Set(Element e, bool on)Same as Set(Scope.Rt, e, on).
| Parameter | Type | Description |
|---|---|---|
| e | Element | The element. |
on | bool | True to switch it on. |
Set
public static void Set(Scope s, Element e, bool on)Switches element e in set s, saved as an editor preference. Re-applies immediately while the toggles are applied.
| Parameter | Type | Description |
|---|---|---|
| s | Scope | The set. |
| e | Element | The element. |
on | bool | True to switch it on. |
Visible
public static Element[] Visible()Returns the elements listed in the settings, in All order. An optional element without a registered provider is not listed.
Returns: The elements.
VisibleCount
public static int VisibleCount()Returns the number of elements Visible returns.
Returns: The count.
Related types
- RaptorRtPostToggles.Element: One post-processing toggle.
- RaptorRtPostToggles.ElementProvider: Defines what an optional post element switches off.
- RaptorRtPostToggles.Scope: Selects one of the two independent toggle sets.