Capítulo 260 de 859

Chapter 260: OutputPass

Core Idea

This pass is responsible for including tone mapping and color space conversion into your pass chain. In most cases, this pass should be included at the end of each pass chain. If a pass requires sRGB input (e.g. like FXAA), the pass must follow OutputPass in the pass chain.

The tone mapping and color space settings are extracted from the renderer.

Key Concepts

  • isOutputPass : boolean (readonly): This flag indicates that this is an output pass.
  • material : RawShaderMaterial: The pass material.
  • uniforms : Object: The pass uniforms.

Code Examples

const outputPass = new OutputPass();
composer.addPass( outputPass );
  • What it demonstrates: Typical usage of OutputPass.

Reference Tables

Constructor

Signature
new OutputPass()

Properties

PropertyDescription
.isOutputPass : boolean (readonly)This flag indicates that this is an output pass.
.material : RawShaderMaterialThe pass material.
.uniforms : ObjectThe pass uniforms.

Methods

MethodDescription
.dispose()Frees the GPU-related resources allocated by this instance. Call this method whenever the pass is no longer used in your app.
.render( renderer : WebGLRenderer, writeBuffer : WebGLRenderTarget, readBuffer : WebGLRenderTarget, deltaTime : number, maskActive : boolean )Performs the output pass.

Key Takeaways

  1. OutputPass extends: Pass
  2. Most relevant properties: isOutputPass, material, uniforms.
  3. Key methods: dispose, render.

Connects To