What is Incisor?
Tutorials
Key Concepts
Reddit
Stack Overflow
Configuration Settings
Deprecation Schedule

EffectNode()

EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time. Ultimately, the EffectNodes on any given Material are compiled and determine the final GLSL code that comprises the associated shader for WebGL to use when rendering the associated surface. [NON-INSTANTIABLE]

new EffectNode()

MEMBERS

fragmentNode :string

The portion of the GLSL shader code for this EffectNode within the 'fragment main'. This segment of code is is where this effect can make its adjustments to the 'fragment' vec4.

fragmentNodeSupport :Array.<string>|string

The portion of the GLSL shader code for this EffectNode above the 'fragment main'. This segment of code is where uniform and varying variables for the fragment portion of this effect are likely to be declared. Support components between EffectNodes are consolidated, so if a segment of code will be used in more than on EffectNode, be sure to provide it as its own distinct array entry in each EffectNode.

inheritedTypes :object

Dictionary object listing all of the types this object is compatible with.

readonly name :string

The EffectContoller's name. This must be unique among EffectControllers.

requiresDerivativesShaderExtension :boolean

Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'Derivatives' extension.

requiresDrawBuffersShaderExtension :boolean

Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'DrawBuffers' extension.

requiresFragDepthShaderExtension :boolean

Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'FragDepth' extension.

requiresTextureLODShaderExtension :boolean

Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'TextureLOD' extension.

type :string

Type identifier

vertexNode :string

The portion of the GLSL shader code for this EffectNode within the 'vertex main'. This segment of code is is where this effect can make its adjustments to the 'vertex' vec3.

vertexNodeSupport :Array.<string>|string

The portion of the GLSL shader code for this EffectNode above the 'vertex main'. This segment of code is where uniform and varying variables for the vertex portion of this effect are likely to be declared. Support components between EffectNodes are consolidated, so if a segment of code will be used in more than on EffectNode, be sure to provide it as its own distinct array entry in each EffectNode.

METHODS

getAssociatedEffectControllers() returns {Array.<string>}

Returns the list of EffectControllers that are associated with this EffectNode.

Returns:
Array.<string>

setAssociatedEffectControllers(effectControllers)

Updates the list of EffectControllers associated with this EffectNode.

Parameters:
Name Type Attributes Default Description
effectControllers Array.<string>    

An array of the EffectControllers that this EffectNode is associated with. The associated EffectControllers will be the means of dynamic manipulation for this this EffectNode's visual effects. See 'nc.effectControllers' for a list of available EffectControllers.