Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetRandomWriteTarget

Set random write target for Shader Model 4.5 level pixel shaders.
Read time 2 minutesLast updated 5 days ago

Definition

SetRandomWriteTarget(int, RenderTargetIdentifier)

Set random write target for Shader Model 4.5 level pixel shaders.
public void SetRandomWriteTarget(int index, RenderTargetIdentifier rt)

Parameters

index

Index of the random write target in the shader.

RenderTargetIdentifier to set as the write target.

Remarks

This is the CommandBuffer equivalent of Graphics.SetRandomWriteTarget. The same limitations and exceptions apply to this call as to Graphics.SetRandomWriteTarget.

SetRandomWriteTarget(int, ComputeBuffer, bool)

Set random write target for Shader Model 4.5 level pixel shaders.
public void SetRandomWriteTarget(int index, ComputeBuffer buffer, bool preserveCounterValue)

Parameters

index

Index of the random write target in the shader.

Buffer to set as the write target.

preserveCounterValue

Whether to leave the append/consume counter value unchanged.

Remarks

This is the CommandBuffer equivalent of Graphics.SetRandomWriteTarget. The same limitations and exceptions apply to this call as to Graphics.SetRandomWriteTarget.

SetRandomWriteTarget(int, ComputeBuffer)

Set random write target for Shader Model 4.5 level pixel shaders.
public void SetRandomWriteTarget(int index, ComputeBuffer buffer)

Parameters

index

Index of the random write target in the shader.

Buffer to set as the write target.

Remarks

This is the CommandBuffer equivalent of Graphics.SetRandomWriteTarget. The same limitations and exceptions apply to this call as to Graphics.SetRandomWriteTarget.

SetRandomWriteTarget(int, GraphicsBuffer, bool)

Set random write target for Shader Model 4.5 level pixel shaders.
public void SetRandomWriteTarget(int index, GraphicsBuffer buffer, bool preserveCounterValue)

Parameters

index

Index of the random write target in the shader.

Buffer to set as the write target.

preserveCounterValue

Whether to leave the append/consume counter value unchanged.

Remarks

This is the CommandBuffer equivalent of Graphics.SetRandomWriteTarget. The same limitations and exceptions apply to this call as to Graphics.SetRandomWriteTarget.

SetRandomWriteTarget(int, GraphicsBuffer)

Set random write target for Shader Model 4.5 level pixel shaders.
public void SetRandomWriteTarget(int index, GraphicsBuffer buffer)

Parameters

index

Index of the random write target in the shader.

Buffer to set as the write target.

Remarks

This is the CommandBuffer equivalent of Graphics.SetRandomWriteTarget. The same limitations and exceptions apply to this call as to Graphics.SetRandomWriteTarget.