Difference between revisions of "Sprite:setEffectStack"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2021.1<br/> '''<translate>Class</translate>:''' Sprite<br/> === <tr...")
 
(remove language stuff)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2021.1<br/>
'''<translate>Available since</translate>:''' Gideros 2021.1<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
 
Sets or remove post processing effects for this sprite. <br/>
 
The effect stack is an array of tables, each one describing a post processing stage. Each table can have the following fields:
 
* '''buffer''': A [[RenderTarget]] that will hold the input of this post processing stage
 
* '''shader''': A [[Shader]] that will be used to draw the buffer above onto the next stage, or on screen '''optional'''
 
* '''transform''': A [[Matrix]] to transform the input buffer before processing '''optional'''
 
* '''postTransform''': A [[Matrix]] to transform the final stage output before displaying '''optional'''
 
* '''textures''': An array of [[TextureBase]] to be used by the shader. By default the buffer is used. '''optional'''
 
  
 +
=== Description ===
 +
Sets or removes post processing effects for this sprite.
 
<source lang="lua">
 
<source lang="lua">
Sprite:setEffectStack(effectStack,mode)
+
Sprite:setEffectStack(effectStack,mode)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''effectStack''': (table) A table describing the post processing phases to be applied<br/>
+
 
'''mode''': (number) One of the Sprite.EFFECT_MODE_* constants '''optional'''<br/>
+
The effect stack is an array of tables, each one describing a post processing stage. Each table can have the following fields:
 +
* '''buffer''': a [[RenderTarget]] that will hold the input of this post processing stage
 +
* '''shader''': a [[Shader]] that will be used to draw the buffer above onto the next stage, or on screen '''optional'''
 +
* '''transform''': a [[Matrix]] to transform the input buffer before processing '''optional'''
 +
* '''postTransform''': a [[Matrix]] to transform the final stage output before displaying '''optional'''
 +
* '''textures''': an array of [[TextureBase]] to be used by the shader. By default the buffer is used. '''optional'''
 +
 
 +
=== Parameters ===
 +
'''effectStack''': (table) a table describing the post processing phases to be applied<br/>
 +
'''mode''': (number) one of the Sprite.EFFECT_MODE_* constants '''optional'''<br/>
  
 
{{Sprite}}
 
{{Sprite}}

Revision as of 23:19, 2 February 2021

Available since: Gideros 2021.1
Class: Sprite

Description

Sets or removes post processing effects for this sprite.

Sprite:setEffectStack(effectStack,mode)


The effect stack is an array of tables, each one describing a post processing stage. Each table can have the following fields:

  • buffer: a RenderTarget that will hold the input of this post processing stage
  • shader: a Shader that will be used to draw the buffer above onto the next stage, or on screen optional
  • transform: a Matrix to transform the input buffer before processing optional
  • postTransform: a Matrix to transform the final stage output before displaying optional
  • textures: an array of TextureBase to be used by the shader. By default the buffer is used. optional

Parameters

effectStack: (table) a table describing the post processing phases to be applied
mode: (number) one of the Sprite.EFFECT_MODE_* constants optional