API Docs for:
Show:

gs.GraphicEffect Class

The base class of all shader-based graphic effect. If you want to create an own custom graphic effect you have to inherit from this class. See Effects > CircularDistortionEffect in Script Editor for an example.

Constructor

gs.GraphicEffect

()

Item Index

Methods

Methods

setup

(
  • effect
  • task
  • texture
)

Setup the effect for rendering. All uniforms/shader-inputs need to be set here.

Parameters:

  • effect gs.Effect
    • The shader-effect/program object which allows you to set uniforms.
  • task gs.RenderTask
    • The render-task object contains additional information about the object being rendered.
  • texture gs.Texture2D
    • The texture used for rendering.

Properties

enabled

Boolean

Indicates if the effect is enabled.

Default: false

mipmap

Boolean

Indicates if mip-mapping should be enabled for the effect. That is necessary for certain kind of effects such as LOD blur.

Default: false

name

String

The name of the graphic effect. This name must match the name used in the gs.EffectInfo structure when register the effect using gs.Effect.register.

Default: "unknown"

textureFilter

gs.TextureFilter

The texture-filter to use for this effect. If null, the current filter will not change.

Default: null

type

gs.GraphicEffectType

The type of the graphic effect.

Default: gs.GraphicEffectType.ADDON