Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ComputeShader.SetBuffer

Switch to Manual
public function SetBuffer(kernelIndex: int, name: string, buffer: ComputeBuffer): void;

Parameters

Description

Sets an input or output compute buffer.

Buffers and textures are set per-kernel. Use FindKernel to find kernel index by function name.

See Also: FindKernel, SetTexture, ComputeBuffer.