Capítulo 392 de 859

Chapter 392: ChromaticAberrationNode

Core Idea

Post processing node for applying chromatic aberration effect. This effect simulates the color fringing that occurs in real camera lenses by separating and offsetting the red, green, and blue channels.

Key Concepts

  • centerNode : Node: A node holding the center point of the effect.
  • scaleNode : Node: A node holding the scale factor for stepped scaling.
  • strengthNode : Node: A node holding the strength of the effect.
  • textureNode : texture: The texture node that represents the input of the effect.

Code Examples

import { chromaticAberration } from 'three/addons/tsl/display/ChromaticAberrationNode.js';
  • What it demonstrates: Typical usage of ChromaticAberrationNode.

Reference Tables

Constructor

Signature
new ChromaticAberrationNode( textureNode : TextureNode, strengthNode : Node, centerNode : Node, scaleNode : Node )

Properties

PropertyDescription
.centerNode : NodeA node holding the center point of the effect.
.scaleNode : NodeA node holding the scale factor for stepped scaling.
.strengthNode : NodeA node holding the strength of the effect.
.textureNode : textureThe texture node that represents the input of the effect.

Methods

MethodDescription
.setup( builder : NodeBuilder ) : ShaderCallNodeInternalThis method is used to setup the effect's TSL code.

Key Takeaways

  1. ChromaticAberrationNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: centerNode, scaleNode, strengthNode, textureNode.
  3. Key methods: setup.

Connects To