count | 缓冲区中元素的数量。 |
stride | Size of one element in the buffer, in bytes. Must be a multiple of 4 and less than 2048, and match the size of the buffer type in the shader. See Compute Shaders for cross-platform compatibility information. |
type | 该缓冲区的类型,默认为 ComputeBufferType.Default(结构化缓冲区)。 |
usage | Usage mode of the buffer, default is ComputeBufferModeImmutable. |
创建计算缓冲区。
不再需要时,使用 Release 来释放该缓冲区。
另请参阅:SystemInfo.supportsComputeShaders、ComputeShader 类、Shader.SetGlobalBuffer、Material.SetBuffer、计算着色器概述。