기술 자료

Unity Engine

Unity Engine

GetKernelThreadGroupSizes(int, out uint, out uint, out uint)

Get kernel thread group sizes.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetKernelThreadGroupSizes(int, uint, uint, uint)

public void GetKernelThreadGroupSizes(int kernelIndex, out uint x, out uint y, out uint z)

Parameters

kernelIndex

Which kernel to query. A single compute shader asset can have multiple kernel entry points.

Thread group size in the X dimension.

Thread group size in the Y dimension.

Thread group size in the Z dimension.

Remarks

Work group size for each compute shader kernel is specified in the shader code itself (using "numthreads" HLSL attribute). Use this function to query it.