Sprite:setEffectStack

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
  • clear: a boolean indicating to clear the buffer before rendering. True by default for the first effect of the stack, false otherwise. optional
  • autoBuffer: a boolean to tell Gideros to resize the buffer to match the Sprite size automatically. False by default. optional
  • autoTransform: a Matrix used in computing the Sprite size when autoBuffer is enabled. optional

Parameters

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