filmGrain.shader
- README.md1.3 KB
- properties.yaml1.0 KB
- shader.wgsl3.1 KB
This package holds more than this page lists. See all of its files in its world.
README.md
filmGrain
Film grain over the display's code values: the one grain the engine draws. It
runs in the display stage, after the temporal resolve, the display
transform, the debanding, the edge antialiasing and the sharpening, on the
scene before the UI is drawn over it, so its depth is the depth a viewer sees
and nothing after it averages it away. The output stage then rounds the
picture to the surface with its own one-step dither.
@builtin::systems.lensFx.lensFx registers it for the lens's grain
(grainIntensity, grainSize, grainResponse), and
@builtin::systems.debanding.debanding for a debanding grain deeper than the
output stage's dither.
Properties
| Property | Unit | Meaning |
|---|---|---|
intensity | fraction of black-to-SDR-white | Peak depth of the grain, reached where the response peaks. |
size | pixels of a frame 1080 rows tall | Size of one grain; drawn at the same fraction of every frame's height. |
response | exponent | Shape of the depth over the code value: higher narrows it to the midtones. |
floor | eight-bit code values | A grain of even depth over every code value, with the spread of a triangular dither this wide on each side. |
time | seconds | The instant the field is drawn at: each instant draws its own field. |