ClearRenderTarget
Adds a "clear render target" command.
Read time 2 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
ClearRenderTarget(bool, bool, Color)
Adds a "clear render target" command.
public void ClearRenderTarget(bool clearDepth, bool clearColor, Color backgroundColor)
Parameters
ClearRenderTarget(bool, bool, Color, float)
Adds a "clear render target" command.
public void ClearRenderTarget(bool clearDepth, bool clearColor, Color backgroundColor, float depth)
Parameters
ClearRenderTarget(bool, bool, Color, float, uint)
Adds a "clear render target" command.
public void ClearRenderTarget(bool clearDepth, bool clearColor, Color backgroundColor, float depth = 1, uint stencil = 0)
Parameters
Whether to clear both the depth buffer and the stencil buffer.
Whether to clear the color buffer.
Color to clear with. All color targets specified in are cleared to this color.
clearFlagsDepth to clear with (default is 1.0).
Stencil to clear with (default is 0).
ClearRenderTarget(RTClearFlags, Color, float, uint)
Adds a "clear render target" command.
public void ClearRenderTarget(RTClearFlags clearFlags, Color backgroundColor, float depth = 1, uint stencil = 0)
Parameters
Which render targets to clear, defined using a bitwise OR combination of RTClearFlags values.
Color to clear with. All color targets specified in are cleared to this color.
clearFlagsDepth to clear with (default is 1.0).
Stencil to clear with (default is 0).
ClearRenderTarget(RTClearFlags, Color[], float, uint)
Adds a "clear render target" command.
public void ClearRenderTarget(RTClearFlags clearFlags, Color[] backgroundColors, float depth = 1, uint stencil = 0)
Parameters
Which render targets to clear, defined using a bitwise OR combination of RTClearFlags values.
Colors to clear with. If a subset of all color targets is selected using then this array should be densely packed and its length should be equal to the total number of color targets selected.
clearFlagsDepth to clear with (default is 1.0).
Stencil to clear with (default is 0).