Class PostEffectPass
- Namespace
- Gamelogic.Fx.URP.PostProcessing
- Assembly
- Gamelogic.Fx.URP.dll
Implements a basic render pass for PostProcessRendererFeature.
public abstract class PostEffectPass : ScriptableRenderPass
- Inheritance
-
ScriptableRenderPassPostEffectPass
- Inherited Members
-
ScriptableRenderPass.renderPassEventScriptableRenderPass.colorAttachmentsScriptableRenderPass.colorAttachmentScriptableRenderPass.depthAttachmentScriptableRenderPass.colorStoreActionsScriptableRenderPass.depthStoreActionScriptableRenderPass.inputScriptableRenderPass.clearFlagScriptableRenderPass.clearColorScriptableRenderPass.profilingSamplerScriptableRenderPass.ConfigureInput(ScriptableRenderPassInput)ScriptableRenderPass.ConfigureColorStoreActions(RenderBufferStoreAction[])ScriptableRenderPass.ConfigureDepthStoreAction(RenderBufferStoreAction)ScriptableRenderPass.ResetTarget()ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier, RenderTargetIdentifier)ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier[], RenderTargetIdentifier)ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier)ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier[])ScriptableRenderPass.ConfigureClear(ClearFlag, Color)ScriptableRenderPass.Configure(CommandBuffer, RenderTextureDescriptor)ScriptableRenderPass.OnCameraCleanup(CommandBuffer)ScriptableRenderPass.OnFinishCameraStackRendering(CommandBuffer)ScriptableRenderPass.CreateDrawingSettings(ShaderTagId, ref RenderingData, SortingCriteria)
Remarks
Although this class is easy to extend, in many cases CreateSimplePass(string, Action<Material>, bool, bool) will be sufficient.
Constructors
PostEffectPass(Material, RenderPassEvent, bool, bool)
Initializes a new instance of the PostEffectPass class.
protected PostEffectPass(Material material, RenderPassEvent injectionPoint, bool requiresNormals = false, bool requiresDepth = false)
Parameters
materialMaterialThe material to use for the effect.
injectionPointRenderPassEventThe render pass event to inject the effect at.
requiresNormalsboolWhether this effect requires normals texture.
requiresDepthboolWhether this effect requires depth texture.
Properties
CommandName
The name of the command buffer used for this pass.
protected abstract string CommandName { get; }
Property Value
Methods
Execute(ScriptableRenderContext, ref RenderingData)
Execute the pass. This is where custom rendering occurs. Specific details are left to the implementation
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
Parameters
contextScriptableRenderContextUse this render context to issue any draw commands during execution
renderingDataRenderingDataCurrent rendering state information
OnCameraSetup(CommandBuffer, ref RenderingData)
This method is called by the renderer before rendering a camera
Override this method if you need to to configure render targets and their clear state, and to create temporary render target textures.
If a render pass doesn't override this method, this render pass renders to the active Camera's render target.
You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear.
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
Parameters
cmdCommandBufferCommandBuffer to enqueue rendering commands. This will be executed by the pipeline.
renderingDataRenderingDataCurrent rendering state information
- See Also
-
ConfigureTarget(RenderTargetIdentifier, RenderTargetIdentifier)
SetMaterialProperties(Material)
This sets properties on the given material.
protected abstract void SetMaterialProperties(Material material)
Parameters
materialMaterialThe material to set properties on.
Remarks
Implementors: override this to set the properties needed for your effect.