Class CopyColorPass
Copy the given color buffer to the given destination color buffer.
You can use this pass to copy a color buffer to the destination, so you can use it later in rendering. For example, you can copy the opaque texture to use it for distortion effects.
Inherited Members
Namespace: UnityEngine.Rendering.Universal.Internal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
public class CopyColorPass : ScriptableRenderPass
Constructors
CopyColorPass(RenderPassEvent, Material, Material)
Creates a new CopyColorPass
instance.
Declaration
public CopyColorPass(RenderPassEvent evt, Material samplingMaterial, Material copyColorMaterial = null)
Parameters
Type | Name | Description |
---|---|---|
RenderPassEvent | evt | The |
Material | samplingMaterial | The |
Material | copyColorMaterial | The |
See Also
Methods
ConfigureDescriptor(Downsampling, ref RenderTextureDescriptor, out FilterMode)
Get a descriptor and filter mode for the required texture for this pass
Declaration
public static void ConfigureDescriptor(Downsampling downsamplingMethod, ref RenderTextureDescriptor descriptor, out FilterMode filterMode)
Parameters
Type | Name | Description |
---|---|---|
Downsampling | downsamplingMethod | |
RenderTextureDescriptor | descriptor | |
FilterMode | filterMode |
See Also
Execute(ScriptableRenderContext, ref RenderingData)
Execute the pass. This is where custom rendering occurs. Specific details are left to the implementation
Declaration
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | context | Use this render context to issue any draw commands during execution |
RenderingData | renderingData | Current rendering state information |
Overrides
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
.
Declaration
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | CommandBuffer to enqueue rendering commands. This will be executed by the pipeline. |
RenderingData | renderingData | Current rendering state information |
Overrides
See Also
Setup(RTHandle, RTHandle, Downsampling)
Configure the pass with the source and destination to execute on.
Declaration
public void Setup(RTHandle source, RTHandle destination, Downsampling downsampling)
Parameters
Type | Name | Description |
---|---|---|
RTHandle | source | Source render target. |
RTHandle | destination | Destination render target. |
Downsampling | downsampling | The downsampling method to use. |