Capítulo 466 de 859

Chapter 466: RGBShiftNode

Core Idea

Post processing node for shifting/splitting RGB color channels. The effect separates color channels and offsets them from each other.

Key Concepts

  • amount : UniformNode.<float>: The amount of the RGB shift.
  • angle : UniformNode.<float>: Defines in which direction colors are shifted.
  • textureNode : TextureNode: The texture node that represents the input of the effect.

Code Examples

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

Reference Tables

Constructor

Signature
new RGBShiftNode( textureNode : TextureNode, amount : number, angle : number )

Properties

PropertyDescription
.amount : UniformNode.<float>The amount of the RGB shift.
.angle : UniformNode.<float>Defines in which direction colors are shifted.
.textureNode : TextureNodeThe 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. RGBShiftNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: amount, angle, textureNode.
  3. Key methods: setup.

Connects To