Skip to content

Commit baa1e96

Browse files
committed
Update _index.en.md
1 parent 8b29c45 commit baa1e96

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

manual/content/_index.en.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ weight: 10
99
# Introduction
1010

1111
[![CI](https://github.com/pmndrs/postprocessing/actions/workflows/ci.yml/badge.svg)](https://github.com/pmndrs/postprocessing/actions/workflows/ci.yml)
12+
[![Version](https://badgen.net/npm/v/postprocessing)](https://www.npmjs.com/package/postprocessing)
13+
[![License](https://badgen.net/github/license/pmndrs/postprocessing)](https://github.com/pmndrs/postprocessing/blob/main/LICENSE.md)
1214

1315
Welcome to the postprocessing manual!
1416

1517
## Motivation
1618

17-
The purpose of postprocessing is to provide a package of advanced, well maintained and fully documented filter effects for the popular 3D library [three.js](https://threejs.org/). It was originally created based on the [three.js examples](https://threejs.org/examples/?q=postprocessing) in the context of a university research project in 2015 and continues to evolve as a free, open-source library.
19+
The purpose of the postprocessing library is to provide a package of advanced, well maintained and fully documented filter effects for the popular 3D library [three.js](https://threejs.org/). It was originally created based on the [three.js examples](https://threejs.org/examples/?q=postprocessing) in the context of a university research project in 2015 and continues to evolve as a free, open-source library.
1820

1921
## Compatibility Policy
2022

@@ -26,11 +28,11 @@ _Please note that this library is not compatible with the postprocessing example
2628

2729
WIP
2830

29-
## Canvas Color Space
31+
## Color Space Considerations
3032

31-
New applications should follow a [linear workflow](https://docs.unity3d.com/Manual/LinearRendering-LinearOrGammaWorkflow.html) for color management and postprocessing supports this automatically. Simply set `WebGLRenderer.canvasColorSpace` to `sRGBEncoding` and postprocessing will follow suit. Built-in passes automatically encode colors when they render to screen and internal render operations are always performed in linear color space.
33+
New applications should follow a [linear workflow](https://docs.unity3d.com/Manual/LinearRendering-LinearOrGammaWorkflow.html) for color management and postprocessing supports this automatically. Simply set `WebGLRenderer.canvasColorSpace` to `SRGBColorSpace` and postprocessing will follow suit. Built-in passes automatically encode colors when they render to screen and internal render operations are always performed in the most appropriate color space.
3234

33-
While it's possible to store intermediate linear results in render targets, they require at least 12 bits per channel to prevent [color degradation and banding](https://blog.demofox.org/2018/03/10/dont-convert-srgb-u8-to-linear-u8/). By default, postprocessing will use `UnsignedByteType` sRGB frame buffers to minimize color degradation because they are more widely supported and more efficient despite the back and forth conversions from linear to sRGB and back to linear. This is a compromise; colors are clamped to [0.0, 1.0] and you still lose plenty of information in 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 like so:
35+
Postprocessing uses `UnsignedByteType` sRGB frame buffers to store intermediate results due to good hardware support and resource efficiency. This is a compromise because linear results normally require at least 12 bits per color channel to prevent [color degradation and banding](https://blog.demofox.org/2018/03/10/dont-convert-srgb-u8-to-linear-u8/). 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 like so:
3436

3537
```js
3638
import { HalfFloatType } from "three";
@@ -39,8 +41,10 @@ const pipeline = new RenderPipeline(renderer);
3941
pipeline.bufferManager.frameBufferType = HalfFloatType;
4042
```
4143

44+
See [three's color management manual](https://threejs.org/docs/#manual/en/introduction/Color-management) for more information on the topic.
45+
4246
## Performance
4347

4448
This library provides an `EffectPass` that implements a structured mechanism for merging fullscreen effects into a single compound shader by gathering and prefixing shader functions, varyings, uniforms, macros and individual blend functions. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining.
4549

46-
All fullscreen render operations also use a [single triangle](https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/) 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.
50+
All fullscreen render operations also use a [single shared triangle](https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/) 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.

0 commit comments

Comments
 (0)