Class ScriptableRenderPass
Inherit from this class to perform custom rendering in the Lightweight Render Pipeline.
Inheritance
System.Object
ScriptableRenderPass
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.Rendering.LightweightPipeline
Syntax
public abstract class ScriptableRenderPass
Methods
CreateDrawRendererSettings(Camera, SortFlags, RendererConfiguration, Boolean)
Declaration
protected DrawRendererSettings CreateDrawRendererSettings(Camera camera, SortFlags sortFlags, RendererConfiguration rendererConfiguration, bool supportsDynamicBatching)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | |
| SortFlags | sortFlags | |
| RendererConfiguration | rendererConfiguration | |
| System.Boolean | supportsDynamicBatching |
Returns
| Type | Description |
|---|---|
| DrawRendererSettings |
Execute(ScriptableRenderer, ScriptableRenderContext, ref RenderingData)
Execute the pass. This is where custom rendering occurs. Specific details are left to the implementation
Declaration
public abstract void Execute(ScriptableRenderer renderer, ScriptableRenderContext context, ref RenderingData renderingData)
Parameters
| Type | Name | Description |
|---|---|---|
| ScriptableRenderer | renderer | The currently executing renderer. Contains configuration for the current execute call. |
| ScriptableRenderContext | context | Use this render context to issue any draw commands during execution |
| RenderingData | renderingData | Current rendering state information |
FrameCleanup(CommandBuffer)
Cleanup any allocated data that was created during the execution of the pass.
Declaration
public virtual void FrameCleanup(CommandBuffer cmd)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | Use this CommandBuffer to cleanup any generated data |
RegisterShaderPassName(String)
Declaration
protected void RegisterShaderPassName(string passName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | passName |
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, TextureDimension)
Declaration
protected static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorAttachment, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, ClearFlag clearFlags, Color clearColor, TextureDimension dimension)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | |
| RenderTargetIdentifier | colorAttachment | |
| RenderBufferLoadAction | colorLoadAction | |
| RenderBufferStoreAction | colorStoreAction | |
| ClearFlag | clearFlags | |
| Color | clearColor | |
| TextureDimension | dimension |
SetRenderTarget(CommandBuffer, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, RenderTargetIdentifier, RenderBufferLoadAction, RenderBufferStoreAction, ClearFlag, Color, TextureDimension)
Declaration
protected static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorAttachment, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction, RenderTargetIdentifier depthAttachment, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction, ClearFlag clearFlag, Color clearColor, TextureDimension dimension)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | |
| RenderTargetIdentifier | colorAttachment | |
| RenderBufferLoadAction | colorLoadAction | |
| RenderBufferStoreAction | colorStoreAction | |
| RenderTargetIdentifier | depthAttachment | |
| RenderBufferLoadAction | depthLoadAction | |
| RenderBufferStoreAction | depthStoreAction | |
| ClearFlag | clearFlag | |
| Color | clearColor | |
| TextureDimension | dimension |