Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

ComputeShader.SetInt

Switch to Manual
public function SetInt(name: string, val: int): void;

Parameters

name Variable name in shader code.
val Value to set.

Description

Set an integer parameter.

Constant buffers are shared between all kernels in a single compute shader asset. Therefore this function affects all kernels in this ComputeShader.

See Also: SetFloat, SetFloats, SetInts, SetVector.