Sprite:setShaderConstant

From GiderosMobile
Revision as of 09:00, 18 December 2020 by Hgy29 (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Available since: Gideros 2017.4
Class: Sprite

Description

To change the value of a uniform from lua

 Sprite:setShaderConstant(uniform name,data type,mult,data,program type,program variant)

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
program type: (int) optional The type of program this constant applies to
program variant: (int) optional The variant of program this constant applies to