Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

ComputeShader.FindKernel

public function FindKernel(name: string): int;

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. If name is not found, -1 is returned.