Class SeparableRendererFeature<TShaderProperties>
- Namespace
- Gamelogic.Fx.URP.PostProcessing
- Assembly
- Gamelogic.Fx.URP.dll
Implements a separable post-processing effect for the Universal Render Pipeline using two render passes.
public class SeparableRendererFeature<TShaderProperties> : SeparableRendererFeature, IDisposable where TShaderProperties : SeparableShaderProperties, new()
Type Parameters
TShaderPropertiesThe type that defines the shader properties and kernel configuration for this separable effect.
- Inheritance
-
ScriptableRendererFeatureSeparableRendererFeature<TShaderProperties>
- Implements
- Derived
- Inherited Members
-
ScriptableRendererFeature.isActiveScriptableRendererFeature.OnCameraPreCull(ScriptableRenderer, in CameraData)ScriptableRendererFeature.Dispose()Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)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
This renderer feature is the URP counterpart to the built-in
SeparablePostProcess<TShaderProperties>.
- A horizontal pass with direction
(1, 0). - A vertical pass with direction
(0, 1).
RecordRenderGraph
and UnityEngine.Rendering.RenderGraphModule.Util.RenderGraphUtils.AddBlitPass.
On older versions or when compatibility mode is active, the legacy Execute path
is used with CommandBuffer.Blit.
To implement a new separable URP post-process:
- Create a subclass of SeparableShaderProperties defining the kernel and shader parameters.
- Create a concrete renderer feature inheriting from SeparableRendererFeature<TShaderProperties>.
- Add the renderer feature to a URP renderer asset.
Methods
AddRenderPasses(ScriptableRenderer, ref RenderingData)
Injects one or multiple ScriptableRenderPass in the renderer.
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
Parameters
rendererScriptableRendererRenderer used for adding render passes.
renderingDataRenderingDataRendering state. Use this to setup render passes.
Create()
Initializes this feature's resources. This is called every time serialization happens.
public override void Create()
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposingbool
OnValidate()
public void OnValidate()