ComputeShader.FindKernel

Switch to Manual

Declaration

public int FindKernel(string name);

Parameters

name Name of kernel function.

Returns

int The Kernel index. If the kernel is not found, Unity logs a "FindKernel failed" error message and raises an ArgumentException.

Description

Find ComputeShader kernel index.

A single compute shader can contain many "kernels" (functions that do the computation); FindKernel returns kernel index given the name.

Additional resources: Dispatch.


Did you find this page useful? Please give it a rating: