Difference between revisions of "PixelEffect:send"
m |
m (clarify difference between sending a table and sending multiple values) |
||
Line 19: | Line 19: | ||
<source lang="lua"> | <source lang="lua"> | ||
PixelEffect:send( name, ... ) | PixelEffect:send( name, ... ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|string|name|Name of the array to send to the pixel effect.}} | ||
+ | {{param|number|...|Numbers to send to the pixel effect as a vector. Up to four can be sent. These values can be accessed inside the shader via an array.}} | ||
+ | === Returns === | ||
+ | Nothing. | ||
+ | |||
+ | == Function == | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | PixelEffect:send( name, values ) | ||
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
{{param|string|name|Name of the vector to send to the pixel effect.}} | {{param|string|name|Name of the vector to send to the pixel effect.}} | ||
− | {{param| | + | {{param|table|values|Numbers to send to the pixel effect as a vector. At least two and up to four can be sent. These values can be accessed inside the shader via a vector.}} |
=== Returns === | === Returns === | ||
Nothing. | Nothing. |
Revision as of 19:41, 14 May 2012
Available since LÖVE 0.8.0 |
This function is not supported in earlier versions. |
Sends one or more values to a pixel effect using the specified name.
This function allows certain aspects of a pixel effect to be controlled by Lua code.
Contents
Function
Synopsis
PixelEffect:send( name, number )
Arguments
string name
- Name of the number to send to the pixel effect.
number number
- Number to send to the pixel effect.
Returns
Nothing.
Function
Synopsis
PixelEffect:send( name, ... )
Arguments
string name
- Name of the array to send to the pixel effect.
number ...
- Numbers to send to the pixel effect as a vector. Up to four can be sent. These values can be accessed inside the shader via an array.
Returns
Nothing.
Function
Synopsis
PixelEffect:send( name, values )
Arguments
string name
- Name of the vector to send to the pixel effect.
table values
- Numbers to send to the pixel effect as a vector. At least two and up to four can be sent. These values can be accessed inside the shader via a vector.
Returns
Nothing.
Function
Synopsis
PixelEffect:send( name, matrix )
Arguments
string name
- Name of the matrix to send to the pixel effect.
table matrix
- 2x2, 3x3, or 4x4 matrix to send to the pixel effect. Using table form:
{{a,b,c,d}, {e,f,g,h}, ... }
Returns
Nothing.
Function
Synopsis
PixelEffect:send( name, image )
Arguments
string name
- Name of the Image to send to the pixel effect.
Image image
- Image to send to the pixel effect for use as extra data.
Returns
Nothing.
Function
Synopsis
PixelEffect:send( name, canvas )
Arguments
string name
- Name of the Canvas to send to the pixel effect.
Canvas canvas
- Canvas to send to the pixel effect for use as extra data.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info