Class: ShaderFilterOpacity

ShaderFilterOpacity


new ShaderFilterOpacity(opacity [, options])

Creates an opacity filter

Parameters:
Name Type Argument Description
opacity number

Initial opacity value [0-1]

options Object <optional>

Additional filter options

Source:

Extends

Methods


<abstract> fragDataSrc(gl)

Generates filter-specific GLSL function

Parameters:
Name Type Description
gl WebGLRenderingContext

WebGL context

Inherited From:
Overrides:
Source:
Returns:

GLSL function definition

Type
string | null

getSampler(name)

Finds a sampler by name

Parameters:
Name Type Description
name string

Base sampler name

Inherited From:
Overrides:
Source:
Returns:

Found sampler or undefined

Type
ShaderFilter~Sampler | undefined

setMode(mode, id)

Sets the active mode for the filter

Parameters:
Name Type Description
mode string

Mode category to modify

id string

Specific mode ID to enable

Inherited From:
Overrides:
Source:
Throws:

If shader not registered or mode doesn't exist

Type
Error

setUniform(name, value)

Sets a uniform variable value

Parameters:
Name Type Description
name string

Base name of uniform variable

value number | boolean | Array

Value to set

Inherited From:
Overrides:
Source:
Throws:

If shader not registered

Type
Error