Class MaskedPostProcessRunner
- Namespace
- Gamelogic.Fx.BuiltIn.PostProcessing
- Assembly
- Gamelogic.Fx.BuiltIn.dll
Runs all post-processes found in children of a given root on the Camera this script is attached to, but applies a mask and effect strength.
[ExecuteInEditMode]
public sealed class MaskedPostProcessRunner : GLMonoBehaviour
- Inheritance
-
GLMonoBehaviourMaskedPostProcessRunner
- Inherited Members
-
GLMonoBehaviour.FindObjectsOfInterface<TInterface>()GLMonoBehaviour.FindRequiredObjectOfType<T>()GLMonoBehaviour.GetRequiredComponent<T>()GLMonoBehaviour.GetRequiredComponentInChildren<T>()MonoBehaviour.IsInvoking()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.runInEditModeComponent.GetComponent<T>()Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentsInParent<T>()Component.transformComponent.gameObjectComponent.tagObject.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.nameObject.hideFlags
Remarks
Intended for the built-in render pipeline.
This script should be placed on a Camera. It calls OnRenderImage(RenderTexture, RenderTexture)
on all children with components that implement IPostProcess of the postProcessRoot configured in this inspector.
This allows you to have post-processes in separate objects and make it easier to manage if you are experimenting
with many processes at the same time.
So to add a post process to your camera:
- Add this script to the camera.
- Add an empty GameObject in your scene and call it PostEffects (or similar).
- Add a child object for each post process you want to add (e.g. AdjustGammaPostProcess), and add the post process script to it. Any script that implements IPostProcess will work.
This class can also be used to group a stack of effects as a single IPostProcess, so it can be used by effects that require an IPostProcess. In this case, you need not add the script to a camera (an empty game object will do fine). In this case, the OnRenderImage method will be called by the effect that requires this IPostProcess.
Methods
OnDisable()
public void OnDisable()
OnEnable()
public void OnEnable()
OnRenderImage(RenderTexture, RenderTexture)
public void OnRenderImage(RenderTexture sourceTexture, RenderTexture destinationTexture)
Parameters
sourceTextureRenderTexturedestinationTextureRenderTexture