Capítulo 374 de 859
A render pass node that creates an anaglyph effect using physically-correct off-axis stereo projection.
This implementation uses CameraUtils.frameCorners() to align stereo camera frustums to a virtual screen plane, providing accurate depth perception with zero parallax at the plane distance.
import { anaglyphPass, AnaglyphAlgorithm, AnaglyphColorMode } from 'three/addons/tsl/display/AnaglyphPassNode.js';
Constructor
| Signature |
|---|
new AnaglyphPassNode( scene : Scene, camera : Camera ) |
Properties
| Property | Description |
|---|---|
.algorithm : string | Gets the current anaglyph algorithm. |
.algorithm : string | Sets the anaglyph algorithm. |
.colorMode : string | Gets the current color mode. |
.colorMode : string | Sets the color mode. |
.eyeSep : number | The interpupillary distance (eye separation) in world units. Typical human IPD is 0.064 meters (64mm). |
.isAnaglyphPassNode : boolean (readonly) | This flag can be used for type testing. |
.planeDistance : number | The distance in world units from the viewer to the virtual screen plane where zero parallax (screen depth) occurs. Objects at this distance appear at the screen surface. Objects closer appear in fron… |
Methods
| Method | Description |
|---|---|
.setup( builder : NodeBuilder ) : PassTextureNode | This method is used to setup the effect's TSL code. |
.updateStereoCamera( coordinateSystem : number ) | Updates the internal stereo camera using frameCorners for physically-correct off-axis projection. |