Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit7f5b4059ea

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

PropertyUnitMeaning
intensityfraction of black-to-SDR-whitePeak depth of the grain, reached where the response peaks.
sizepixels of a frame 1080 rows tallSize of one grain; drawn at the same fraction of every frame's height.
responseexponentShape of the depth over the code value: higher narrows it to the midtones.
flooreight-bit code valuesA grain of even depth over every code value, with the spread of a triangular dither this wide on each side.
timesecondsThe instant the field is drawn at: each instant draws its own field.