Capítulo 464 de 859

Chapter 464: RenderOutputNode

Core Idea

Normally, tone mapping and color conversion happens automatically just before outputting a pixel to the default (screen) framebuffer. In certain post processing setups this is too late because some effects such as FXAA require e.g. sRGB input. For such scenarios, RenderOutputNode can be used to apply tone mapping and color space conversion at an arbitrary point in the effect chain.

When applying tone mapping and color space conversion manually with this node, you have to set RenderPipeline#outputColorTransform to false.

Key Concepts

  • colorNode : Node: The color node to process.
  • isRenderOutputNode : boolean (readonly): This flag can be used for type testing.
  • outputColorSpace : string: The output color space.

Code Examples

const postProcessing = new RenderPipeline( renderer );
postProcessing.outputColorTransform = false;
const scenePass = pass( scene, camera );
const outputPass = renderOutput( scenePass );
postProcessing.outputNode = outputPass;
  • What it demonstrates: Typical usage of RenderOutputNode.

Reference Tables

Constructor

Signature
new RenderOutputNode( colorNode : Node, toneMapping : number, outputColorSpace : string )

Properties

PropertyDescription
.colorNode : NodeThe color node to process.
.isRenderOutputNode : boolean (readonly)This flag can be used for type testing.
.outputColorSpace : stringThe output color space.

Methods

MethodDescription
.getToneMapping() : numberGets the tone mapping type.
.setToneMapping( value : number ) : ToneMappingNodeSets the tone mapping type.

Key Takeaways

  1. RenderOutputNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: colorNode, isRenderOutputNode, outputColorSpace.
  3. Key methods: getToneMapping, setToneMapping.

Connects To