Compute Shader のためにデータを格納するデータバッファ
ComputeShader programs often need arbitrary data to be read & written into memory buffers.
ComputeBuffer class is exactly for that - you can create & fill them from script code,
and use them in compute shaders or regular shaders.
Compute shaders need a fairly modern GPU (with shader model 5.0 support) and are at the moment available on DirectX 11, PS4, XboxOne and OpenGL ES 3.1.
On shader side, ComputeBuffers map to StructuredBuffer<T> and RWStructuredBuffer<T> in HLSL.
関連項目: SystemInfo.supportsComputeShaders、ComputeShader クラス、Shader.SetGlobalBuffer、Material.SetBuffer、Compute Shader
ComputeBuffer | Compute Buffer を作成します |
GetData | バッファからデータの値を配列へと読み出します |
GetNativeBufferPtr | Retrieve a native (underlying graphics API) pointer to the buffer. |
Release | Compute Buffer をリリースします |
SetCounterValue | append/consume バッファのカウンターの値を設定します。 |
SetData | 配列から値をバッファへと設定します |
CopyCount | append/consume バッファの値を別のバッファにカウンター変数をコピーします。 |