Import
PixelationPassNode is an addon, and must be imported explicitly, see Installation#Addons.
import { pixelationPass } from 'three/addons/tsl/display/PixelationPassNode.js';
Constructor
new PixelationPassNode( scene : Scene, camera : Camera, pixelSize : Node.<float> | number, normalEdgeStrength : Node.<float> | number, depthEdgeStrength : Node.<float> | number )
Constructs a new pixelation pass node.
| scene |
The scene to render. |
| camera |
The camera to render the scene with. |
| pixelSize |
The pixel size. Default is |
| normalEdgeStrength |
The normal edge strength. Default is |
| depthEdgeStrength |
The depth edge strength. Default is |
Properties
.depthEdgeStrength : number
The depth edge strength.
Default is 0.4.
.isPixelationPassNode : boolean (readonly)
This flag can be used for type testing.
Default is true.
.normalEdgeStrength : number
The normal edge strength.
Default is 0.3.
.pixelSize : number
The pixel size.
Default is 6.
Methods
.setSize( width : number, height : number )
Sets the size of the pass.
| width |
The width of the pass. |
| height |
The height of the pass. |
- Overrides: PassNode#setSize
.setup( builder : NodeBuilder ) : PixelationNode
This method is used to setup the effect's TSL code.
| builder |
The current node builder. |
- Overrides: PassNode#setup