Class EffectRenderer
Hierarchy
- EffectRenderer
Index
Constructors
constructor
Creates an effect renderer
Parameters
_engine: ThinEngine
the engine to use for rendering
Optional options: IEffectRendererOptions
defines the options of the effect renderer
Returns EffectRenderer
Methods
apply Effect WrapperSearch playground for applyEffectWrapper
Sets the current effect wrapper to use during draw. The effect needs to be ready before calling this api. This also sets the default full screen position attribute.
Parameters
effectWrapper: EffectWrapper
Defines the effect to draw with
Returns void
bind BuffersSearch playground for bindBuffers
Binds the embedded attributes buffer to the effect.
Parameters
effect: Effect
Defines the effect to bind the attributes for
Returns void
disposeSearch playground for dispose
Disposes of the effect renderer
Returns void
drawSearch playground for draw
Draws a full screen quad.
Returns void
renderSearch playground for render
renders one or more effects to a specified texture
Parameters
effectWrapper: EffectWrapper
the effect to renderer
Optional outputTexture: Nullable<RenderTargetWrapper | IRenderTargetTexture>
texture to draw to, if null it will render to the screen.
Returns void
restore StatesSearch playground for restoreStates
Restores engine states
Returns void
set ViewportSearch playground for setViewport
Sets the current viewport in normalized coordinates 0-1
Parameters
Optional viewport: Viewport
Defines the viewport to set (defaults to 0 0 1 1)
Returns void
Helper class to render one or more effects. You can access the previous rendering in your shader by declaring a sampler named textureSampler