Sprite:setEffectConstant: Difference between revisions

From GiderosMobile
No edit summary
m Text replacement - "</source>" to "</syntaxhighlight>"
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
=== Description ===
=== Description ===
Change the value of an effect constant from lua.
Change the value of an effect constant from lua.
<source lang="lua">
<syntaxhighlight lang="lua">
Sprite:setEffectConstant(effectIndex,uniform name,data type,mult,data)
Sprite:setEffectConstant(effectIndex,uniform name,data type,mult,data)
</source>
</syntaxhighlight>


=== Parameters ===
=== Parameters ===

Latest revision as of 13:33, 13 July 2023

Available since: Gideros 2021.1
Class: Sprite

Description

Change the value of an effect constant from lua.

Sprite:setEffectConstant(effectIndex,uniform name,data type,mult,data)

Parameters

effectIndex: (int) the effect index in the effect stack
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