postprocessing

pmndrsZlib活跃维护

为 three.js 提供实时后期处理特效的库,内置泛光、景深、抗锯齿等效果,帮你在 WebGL 场景里快速搭建高质量渲染管线。

A post processing library for three.js.

v6.39.6发布于 2026-11-01 13:58 UTC2,963star +2 / 7 天258fork同步于 2026-11-10 05:41 UTC

怎么上手

从 README 代码块原样提取,可能是其中一种安装方式
npm install three postprocessing
硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v6.39.6
  1. v6.39.6最新正式版2026-11-01 · 2026-11-01 13:58 UTC

    Requires three ≥ 0.168.0 < 0.188.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/pmndrs/postprocessing/compare/v6.39.5...v6.39.6

    Special Thanks

    Thanks @juliangarnier for the continued support! :rocket:

  2. v6.39.52026-09-09 · 2026-09-09 19:30 UTC
    查看更新说明

    Requires three ≥ 0.168.0 < 0.187.0

    What's Changed

    • EffectComposer: Add multisampling fallback #749, 03cbe765b67799ce4c14075cc6ff93a53f1b00ac, 662141f455dd455c2ebc6fc1567637b200f07a82
    • EffectComposer: Fix gl error when using r172 #750, 078a6d193ec832041694843b919e41b2088c82d1
    • EffectComposer: Use explicit default value and accurate type d714a202786609ae695f838577962a00de5e9ab4, 3e8eb85
    • Update dependencies
    • Align project files with v7 c11625fe0979070e8498e21da9c281a2dd45ce06
      • Update issue templates
      • Update code of conduct
      • Update contribution guide
      • Update workflows
      • Add dependabot check for workflow versions
      • Set pnpm as package manager

    Full Changelog: https://github.com/pmndrs/postprocessing/compare/v6.39.4...v6.39.5

    Special Thanks

    Thanks @juliangarnier for the continued support! :rocket:

  3. v6.39.42026-07-27 · 2026-07-27 22:26 UTC
    查看更新说明

    Requires three ≥ 0.168.0 < 0.186.0

    What's Changed

    • TextureEffect: Fix potential null error #747, 3af6e77

    Full Changelog: https://github.com/pmndrs/postprocessing/compare/v6.39.3...v6.39.4

    Special Thanks

    Thanks @juliangarnier and @donmccurdy for the continued support! :heart:

  4. v6.39.32026-07-18 · 2026-07-18 21:00 UTC
    查看更新说明

    Requires three ≥ 0.168.0 < 0.186.0

    What's Changed

    • EffectComposer: fix depth buffer format mismatch when depth-aware passes are added after the composer has already rendered #745, e19bfa3

    Full Changelog: https://github.com/pmndrs/postprocessing/compare/v6.39.2...v6.39.3

    Special Thanks

    Thanks @juliangarnier and @donmccurdy for the continued support! :sparkles:

  5. v6.39.22026-06-28 · 2026-06-28 22:28 UTC
    查看更新说明

    Requires three ≥ 0.168.0 < 0.186.0

    What's Changed

    • Update dependencies

    Full Changelog: https://github.com/pmndrs/postprocessing/compare/v6.39.1...v6.39.2

    Special Thanks

    Thanks @juliangarnier and @donmccurdy for the continued support! :rocket:

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Post Processing

    CI Version

    A post processing library for three.js.

    Demo · Sandbox · Documentation · Wiki

    Installation

    This library requires the peer dependency three.

    npm install three postprocessing
    

    Usage

    Post processing introduces the concept of passes and effects to extend the common rendering workflow with fullscreen image manipulation tools. The following WebGL attributes should be used for an optimal post processing workflow:

    import { WebGLRenderer } from "three";
    
    const renderer = new WebGLRenderer({
    	powerPreference: "high-performance",
    	antialias: false,
    	stencil: false,
    	depth: false
    });
    

    The EffectComposer manages and runs passes. It is common practice to use a RenderPass as the first pass to automatically clear the buffers and render a scene for further processing. Fullscreen image effects are rendered via the EffectPass. Please refer to the usage example of three.js for more information on how to setup the renderer, scene and camera.

    import { BloomEffect, EffectComposer, EffectPass, RenderPass } from "postprocessing";
    
    const composer = new EffectComposer(renderer);
    composer.addPass(new RenderPass(scene, camera));
    composer.addPass(new EffectPass(camera, new BloomEffect()));
    
    requestAnimationFrame(function render() {
    
    	requestAnimationFrame(render);
    	composer.render();
    
    });
    

    Output Color Space

    New applications should follow a linear workflow for color management and postprocessing supports this automatically. Simply set WebGLRenderer.outputColorSpace to SRGBColorSpace and postprocessing will follow suit.

    Postprocessing uses UnsignedByteType sRGB frame buffers to store intermediate results. This is a trade-off between hardware support, efficiency and quality since linear results normally require at least 12 bits per color channel to prevent color degradation and banding. With low precision sRGB buffers, colors will be clamped to [0.0, 1.0] and information loss will shift to the darker spectrum which leads to noticable banding in dark scenes. Linear, high precision HalfFloatType buffers don't have these issues and are the preferred option for HDR-like workflows on desktop devices. You can enable high precision frame buffers as follows:

    import { HalfFloatType } from "three";
    
    const composer = new EffectComposer(renderer, {
    	frameBufferType: HalfFloatType
    });
    

    Tone Mapping

    Tone mapping is the process of converting HDR colors to LDR output colors. When using postprocessing, the toneMapping setting on the renderer should be set to NoToneMapping (default) and high precision frame buffers should be enabled. Otherwise, colors will be mapped to [0.0, 1.0] at the start of the pipeline. To enable tone mapping, use a ToneMappingEffect at the end of the pipeline.

    Note that tone mapping is not applied to the clear color when using only the renderer because clearing doesn't involve shaders. Postprocessing applies to the full input image which means that tone mapping will also be applied uniformly. Consequently, the results of tone mapping a clear color background with and without postprocessing will be different, with the postprocessing approach being correct.

    Performance

    This library provides an EffectPass which automatically organizes and merges any given combination of effects. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining. Additionally, every effect can choose its own blend function.

    All fullscreen render operations also use a single triangle that fills the screen. Compared to using a quad, this approach harmonizes with modern GPU rasterization patterns and eliminates unnecessary fragment calculations along the screen diagonal. This is especially beneficial for GPGPU passes and effects that use complex fragment shaders.

    Performance Test

    Included Effects

    The total demo download size is about 60 MB.

    Custom Effects

    If you want to learn how to create custom effects or passes, please check the Wiki.

    Contributing

    Please refer to the contribution guidelines for details.

    License

    This library is licensed under the Zlib license.

    The original code that this library is based on, was written by mrdoob and the three.js contributors and is licensed under the MIT license.