Vizard 8 » Command Index » Vizard modules » viz » <viz>.addEffect
8.0

<viz>.addEffect

Add an effect object

<viz>.addEffect(  
source  
)  
source
Source code or filename containing effect defintion

Remarks

This command creates a new effect object from the specified source. The returned effect object can be applied to any <node3d> object or added to an existing <composer> object.

Return Value

<effect> object

Example

code = """
Effect "MyEffect" {

    Shader {
        BEGIN Material
        m.diffuse = vec3(1.0,0.0,0.0);
        END
    }
}
"""
effect = viz.addEffect(code)

See also

<viz>.addEffectComposer
<node3d>.apply