Capítulo 451 de 859

Chapter 451: PixelationNode

Core Idea

A inner node definition that implements the actual pixelation TSL code.

Key Concepts

  • depthEdgeStrength : Node.<float>: The depth edge strength.
  • depthNode : TextureNode: The texture that represents the beauty's depth.
  • normalEdgeStrength : Node.<float>: The pixel size.
  • normalNode : TextureNode: The texture that represents the beauty's normals.
  • pixelSize : Node.<float>: The pixel size.
  • textureNode : TextureNode: The texture node that represents the beauty pass.
  • updateType : string: The updateType is set to NodeUpdateType.FRAME since the node updates its internal uniforms once per frame in updateBefore().

Reference Tables

Constructor

Signature
new PixelationNode( textureNode : TextureNode, depthNode : TextureNode, normalNode : TextureNode, pixelSize : Node.<float>, normalEdgeStrength : Node.<float>, depthEdgeStrength : Node.<float> )

Properties

PropertyDescription
.depthEdgeStrength : Node.<float>The depth edge strength.
.depthNode : TextureNodeThe texture that represents the beauty's depth.
.normalEdgeStrength : Node.<float>The pixel size.
.normalNode : TextureNodeThe texture that represents the beauty's normals.
.pixelSize : Node.<float>The pixel size.
.textureNode : TextureNodeThe texture node that represents the beauty pass.
.updateType : stringThe updateType is set to NodeUpdateType.FRAME since the node updates its internal uniforms once per frame in updateBefore().

Methods

MethodDescription
.setup( builder : NodeBuilder ) : ShaderCallNodeInternalThis method is used to setup the effect's TSL code.
.update( frame : NodeFrame )This method is used to update uniforms once per frame.

Key Takeaways

  1. PixelationNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: depthEdgeStrength, depthNode, normalEdgeStrength, normalNode.
  3. Key methods: setup, update.

Connects To