Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetGlobalConstantBuffer

Add a command to bind a global constant buffer.
Read time 1 minuteLast updated 5 days ago

Definition

SetGlobalConstantBuffer(ComputeBuffer, int, int, int)

Add a command to bind a global constant buffer.
public void SetGlobalConstantBuffer(ComputeBuffer buffer, int nameID, int offset, int size)

Parameters

The buffer to bind.

nameID

The name ID of the constant buffer retrieved by Shader.PropertyToID.

offset

Offset from the start of the buffer in bytes.

size

Size in bytes of the area to bind.

Remarks

SetGlobalConstantBuffer(ComputeBuffer, string, int, int)

Add a command to bind a global constant buffer.
public void SetGlobalConstantBuffer(ComputeBuffer buffer, string name, int offset, int size)

Parameters

The buffer to bind.

name

The name of the constant buffer to override.

offset

Offset from the start of the buffer in bytes.

size

Size in bytes of the area to bind.

Remarks

SetGlobalConstantBuffer(GraphicsBuffer, int, int, int)

Add a command to bind a global constant buffer.
public void SetGlobalConstantBuffer(GraphicsBuffer buffer, int nameID, int offset, int size)

Parameters

The buffer to bind.

nameID

The name ID of the constant buffer retrieved by Shader.PropertyToID.

offset

Offset from the start of the buffer in bytes.

size

Size in bytes of the area to bind.

Remarks

SetGlobalConstantBuffer(GraphicsBuffer, string, int, int)

Add a command to bind a global constant buffer.
public void SetGlobalConstantBuffer(GraphicsBuffer buffer, string name, int offset, int size)

Parameters

The buffer to bind.

name

The name of the constant buffer to override.

offset

Offset from the start of the buffer in bytes.

size

Size in bytes of the area to bind.

Remarks