ドキュメント

Unity Engine

Unity Engine

SetBuffer

Binds an input or output compute buffer.
読み終わるまでの所要時間 3 分最終更新 1ヶ月前

Definition

SetBuffer(int, ComputeBuffer)

Binds an input or output compute buffer.
public void SetBuffer(int nameID, ComputeBuffer buffer)

Parameters

nameID

The ID of the buffer name in shader code. Use Shader.PropertyToID to get this ID.

The buffer to bind.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalBuffer method instead.

SetBuffer(int, GraphicsBuffer)

Binds an input or output compute buffer.
public void SetBuffer(int nameID, GraphicsBuffer buffer)

Parameters

nameID

The ID of the buffer name in shader code. Use Shader.PropertyToID to get this ID.

The buffer to bind.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalBuffer method instead.

SetBuffer(int, GraphicsBufferHandle)

Binds an input or output compute buffer.
public void SetBuffer(int nameID, GraphicsBufferHandle bufferHandle)

Parameters

nameID

The ID of the buffer name in shader code. Use Shader.PropertyToID to get this ID.

The handle of the buffer to bind.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalBuffer method instead.

SetBuffer(string, ComputeBuffer)

Binds an input or output compute buffer.
public void SetBuffer(string name, ComputeBuffer buffer)

Parameters

name

The name of the buffer in shader code.

The buffer to bind.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalBuffer method instead.

SetBuffer(string, GraphicsBuffer)

Binds an input or output compute buffer.
public void SetBuffer(string name, GraphicsBuffer buffer)

Parameters

name

The name of the buffer in shader code.

The buffer to bind.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalBuffer method instead.

SetBuffer(string, GraphicsBufferHandle)

Binds an input or output compute buffer.
public void SetBuffer(string name, GraphicsBufferHandle bufferHandle)

Parameters

name

The name of the buffer in shader code.

The handle of the buffer to bind.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalBuffer method instead.