Pass ForgeDocs Product page

API

Screen Looks and presets

Screen Looks switch the whole picture, and presets save and apply effect settings. The Screen Look Track blends looks from Timeline.

EffectPresetUtility

Applies screen effect presets. A preset is an ordinary Volume Profile holding Pass Forge effects, so presets can be made, shared and switched at runtime without any special asset type.

public static class EffectPresetUtility

Namespace PassForge.Effects, assembly PassForge.Runtime.

EffectPresetUtility.ApplyScreenPreset(VolumeProfile, VolumeProfile, bool, List<VolumeComponent>)

Copies every Pass Forge effect in preset into target, including which parameters are overridden, so the result matches the preset exactly.

public static void ApplyScreenPreset( VolumeProfile preset, VolumeProfile target, bool turnOffOthers, List<VolumeComponent> addedComponents = null)

EffectPresetUtility.TurnOffScreenEffects(VolumeProfile)

Switches off every Pass Forge effect in a profile, leaving its settings intact.

public static void TurnOffScreenEffects(VolumeProfile target)

EffectPresetUtility.ContainsPassForgeEffect(VolumeProfile)

True when a profile holds at least one Pass Forge effect.

public static bool ContainsPassForgeEffect(VolumeProfile profile)

EffectPresetUtility.MatchUrpTonemapping(VolumeProfile, List<VolumeComponent>)

Matches URP's Tonemapping in a profile to its AgX Tonemapping, after ApplyScreenPreset or TurnOffScreenEffects. While the profile turns AgX up, URP Tonemapping is set to None, so AgX shows instead of URP's tonemapper; once it does not, URP Tonemapping is given back. A profile without URP Tonemapping gets one, switched off again with AgX, and a profile's own gets its settings back. The preset calls copy Pass Forge effects only, so call this after them when a look may hold AgX. What it changed is remembered until scripts reload: in the editor, a profile asset matched before a reload keeps URP Tonemapping at None once AgX is off, which the AgX inspector's Use URP Neutral sets back.

public static void MatchUrpTonemapping(VolumeProfile target, List<VolumeComponent> addedComponents = null)

PassForgeScreenLook

Shows a screen look, such as a shipped screen preset or any Volume Profile holding Pass Forge effects, without setting up a Volume. The look fades in and out, can follow an area, and is played from scripts or UnityEvents with Play, Stop and PlayFor. The look asset itself is never changed.

public sealed class PassForgeScreenLook : MonoBehaviour

Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Screen Look.

PassForgeScreenLook.look

The look to show. The asset itself is never changed.

public VolumeProfile look { get; set; }

PassForgeScreenLook.activation

When the look shows. Changing it starts over at once: When Enabled and Inside Area looks play, a From Script look fades out and waits for Play. A look that keeps showing does not fade in again.

public ScreenLookActivation activation { get; set; }

PassForgeScreenLook.drawsIn

Where the look draws: over the whole picture, or only where the camera sees into the area around this object. Turning it on and off stays with activation.

public ScreenLookCoverage drawsIn { get; set; }

PassForgeScreenLook.tracked

Object whose position counts for a While Inside Area look, or null for the main camera.

public Transform tracked { get; set; }

PassForgeScreenLook.areaShape

Shape of the area the look follows or draws in.

public ScreenLookAreaShape areaShape { get; set; }

PassForgeScreenLook.areaSize

Size of the box area, in this object's space.

public Vector3 areaSize { get; set; }

PassForgeScreenLook.areaRadius

Radius of the sphere area, in this object's space.

public float areaRadius { get; set; }

PassForgeScreenLook.blendDistance

Distance outside the area over which the look fades out.

public float blendDistance { get; set; }

PassForgeScreenLook.strength

How strongly the look shows once it has faded in, from 0 to 1.

public float strength { get; set; }

PassForgeScreenLook.fadeIn

Seconds the look takes to fade in.

public float fadeIn { get; set; }

PassForgeScreenLook.fadeOut

Seconds the look takes to fade out.

public float fadeOut { get; set; }

PassForgeScreenLook.unscaledTime

Fade in real time, so a look keeps fading while the game is paused.

public bool unscaledTime { get; set; }

PassForgeScreenLook.priority

Where looks and Volumes overlap, the higher priority wins.

public float priority { get; set; }

PassForgeScreenLook.isPlaying

True while the look has been asked to show: from Play or PlayFor until Stop or the end of the duration. An Inside Area look can be playing while the tracked object is outside the area.

public bool isPlaying { get; }

PassForgeScreenLook.weight

How strongly the look shows right now, from 0 to 1, including fades and the area.

public float weight { get; }

PassForgeScreenLook.Play()

Fades the look in and keeps it on until Stop. Switches the component on if needed.

public void Play()

PassForgeScreenLook.PlayFor(float)

Fades the look in, keeps it for the given seconds and then fades it out, for hits, pickups and other moments. Calling it again restarts the duration.

public void PlayFor(float seconds)

PassForgeScreenLook.Stop()

Fades the look out.

public void Stop()

PassForgeScreenLook.CrossFadeTo(VolumeProfile)

Fades from the look on screen to another over its Fade In, for a flashback, a nightmare or a change of place, and keeps the new look on. Usable from any UnityEvent.

public void CrossFadeTo(VolumeProfile next)

PassForgeScreenLook.CrossFadeTo(VolumeProfile, float)

Fades from the look on screen to another over the seconds and keeps the new look on. The look this component shows becomes the new one.

public void CrossFadeTo(VolumeProfile next, float seconds)

PassForgeScreenLook.Toggle()

Plays the look when it is stopped and stops it when it is playing.

public void Toggle()

PassForgeScreenLook.AreaAmount(Vector3)

How much of the look an Inside Area activation allows at a position: 1 inside the area, falling to 0 at the blend distance outside it.

public float AreaAmount(Vector3 position)

PassForgeLookTrack

A Timeline track of screen looks: each clip shows a look, fading in and out with the clip's ease and cross fading where clips overlap. It shows while scrubbing in Edit Mode too.

public sealed class PassForgeLookTrack : TrackAsset

Namespace PassForge.Timeline, assembly PassForge.Timeline. Timeline track: Pass Forge > Screen Look Track.

PassForgeLookClip

A clip that shows a screen look: a shipped screen preset or any Volume Profile with Pass Forge effects.

public sealed class PassForgeLookClip : PlayableAsset, ITimelineClipAsset

Namespace PassForge.Timeline, assembly PassForge.Timeline. Timeline track: Screen Look.

PassForgeLookClip.look

The look to show. The asset itself is never changed.

public VolumeProfile look

PassForgeLookClip.strength

How strongly the look shows at the top of the clip.

public float strength

ScreenLookActivation

When a PassForgeScreenLook shows its look.

public enum ScreenLookActivation

Namespace PassForge.Effects, assembly PassForge.Runtime.

ValueMeaning
WhenEnabledShow the look while the component is enabled.
InsideAreaShow the look while the tracked object is inside the area around this object, fading it out over the blend distance. With Draws In set to Whole Screen it covers the whole picture while the tracked object is inside; to draw a look only where the area is, set Draws In to Area instead.
FromScriptShow the look only after a script or a UnityEvent calls Play or PlayFor.

ScreenLookCoverage

Where a PassForgeScreenLook draws its look.

public enum ScreenLookCoverage

Namespace PassForge.Effects, assembly PassForge.Runtime.

ValueMeaning
WholeScreenOver the whole picture.
AreaOnly where the camera sees into the area around the object, fading out over the blend distance around it. Rain falls in the courtyard and not under the roof beside it, wherever the camera is, and shows against the sky above the courtyard too. Looks made of Pass Forge's screen effects draw this way; URP's own effects and the few Pass Forge effects drawn by nodes of their own stay out.

ScreenLookAreaShape

Shape of the area a Screen Look follows or draws in.

public enum ScreenLookAreaShape

Namespace PassForge.Effects, assembly PassForge.Runtime.

ValueMeaning
BoxA box of Area Size around the object.
SphereA sphere of Area Radius around the object.