Capítulo 452 de 859

Chapter 452: PixelationPassNode

Core Idea

A special render pass node that renders the scene with a pixelation effect.

Key Concepts

  • depthEdgeStrength : number: The depth edge strength.
  • isPixelationPassNode : boolean (readonly): This flag can be used for type testing.
  • normalEdgeStrength : number: The normal edge strength.
  • pixelSize : number: The pixel size.

Code Examples

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

Reference Tables

Constructor

Signature
`new PixelationPassNode( scene : Scene, camera : Camera, pixelSize : Node.<float>

Properties

PropertyDescription
.depthEdgeStrength : numberThe depth edge strength.
.isPixelationPassNode : boolean (readonly)This flag can be used for type testing.
.normalEdgeStrength : numberThe normal edge strength.
.pixelSize : numberThe pixel size.

Methods

MethodDescription
.setSize( width : number, height : number )Sets the size of the pass.
.setup( builder : NodeBuilder ) : PixelationNodeThis method is used to setup the effect's TSL code.

Key Takeaways

  1. PixelationPassNode extends: EventDispatcher → Node → TempNode → PassNode
  2. Most relevant properties: depthEdgeStrength, isPixelationPassNode, normalEdgeStrength, pixelSize.
  3. Key methods: setSize, setup.

Connects To