FilterNode

clay.compositor. FilterNode

# new FilterNode()

Source:

Filter node

Example
var node = new clay.compositor.FilterNode({
        name: 'fxaa',
        shader: clay.Shader.source('clay.compositor.fxaa'),
        inputs: {
            texture: {
                    node: 'scene',
                    pin: 'color'
            }
        },
        // Multiple outputs is preserved for MRT support in WebGL2.0
        outputs: {
            color: {
                attachment: clay.FrameBuffer.COLOR_ATTACHMENT0
                parameters: {
                    format: clay.Texture.RGBA,
                    width: 512,
                    height: 512
                },
                // Node will keep the RTT rendered in last frame
                keepLastFrame: true,
                // Force the node output the RTT rendered in last frame
                outputLastFrame: true
            }
        }
    });

Extends

Members

# __uid__ :number

Source:
Inherited From:
Type:
  • number
Source:
Overrides:

Input links, will be updated by the graph

Type:
  • Object

# inputs :Object

Source:
Type:
  • Object

# name :string

Source:
Overrides:
Type:
  • string
Source:
Overrides:

Output links, will be updated by the graph

Type:
  • Object

# outputs :Object

Source:
Type:
  • Object

# pass :clay.compositor.Pass

Source:
Type:

# shader :string

Source:
Type:
  • string

Methods

# after(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of once('after' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# before(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of once('before' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# define(symbol, valopt)

Source:

Proxy of pass.material.define('fragment', xxx);

Parameters:
Name Type Attributes Description
symbol string
val number <optional>

# error(action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of on('error')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# getParameter(name)

Source:
Overrides:

Get parameter value

Parameters:
Name Type Description
name string
Returns:

# has(name, action) → {boolean}

Source:
Inherited From:
Mixes In:

If registered the event handler

Parameters:
Name Type Description
name string
action function
Returns:
Type
boolean

# off(action, contextopt)

Source:
Inherited From:
Mixes In:

Remove event listener

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# on(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Register event handler

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# once(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Register event, event will only be triggered once and then removed

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# render(renderer)

Source:
Parameters:
Name Type Description
renderer clay.Renderer

# setParameter(name, value)

Source:
Overrides:

Set parameter

Parameters:
Name Type Description
name string
value

# setParameters(obj)

Source:
Overrides:

Set parameters

Parameters:
Name Type Description
obj Object

# success(action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of on('success')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# trigger(name)

Source:
Inherited From:
Mixes In:

Trigger event

Parameters:
Name Type Description
name string

# undefine(symbol)

Source:

Proxy of pass.material.undefine('fragment', xxx)

Parameters:
Name Type Description
symbol string