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
Syntax
public class CopyColorPass : ScriptableRenderPass
Constructors
CopyColorPass(RenderPassEvent, Material)
Create the CopyColorPass
Declaration
public CopyColorPass(RenderPassEvent evt, Material samplingMaterial)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderPassEvent | evt | |
| Material | samplingMaterial |
Methods
Configure(CommandBuffer, RenderTextureDescriptor)
Declaration
public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescripor)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | |
| RenderTextureDescriptor | cameraTextureDescripor |
Overrides
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
FrameCleanup(CommandBuffer)
Cleanup any allocated data that was created during the execution of the pass.
Declaration
public override void FrameCleanup(CommandBuffer cmd)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | Use this CommandBuffer to cleanup any generated data |
Overrides
Setup(RenderTargetIdentifier, RenderTargetHandle, Downsampling)
Configure the pass with the source and destination to execute on.
Declaration
public void Setup(RenderTargetIdentifier source, RenderTargetHandle destination, Downsampling downsampling)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTargetIdentifier | source | Source Render Target |
| RenderTargetHandle | destination | Destination Render Target |
| Downsampling | downsampling |