Table of Contents

Shader:setConstant

Available since version: Gideros 2015.06.30

Description:

To change the value of a uniform from lua

Syntax:

Shader:setConstant(uniform name, data type, mult, data)

Parameters:

  • uniform name: (string) The uniform name to change
  • data type: (int) The type if data to set (one of the Shader.Cxxx constants)
  • mult: (number) number of elements of the given type to set
  • data: (varies) And the actual data to set, either as a table or as multiple arguments