Film grain synthesis
Adds grain from a stochastic model of film grains rather than uniform noise, giving intensity-dependent, resolution-independent texture; real-time shaders approximate it with filtered noise.
In the family Post-processing, color & imaging, film look
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | Official add-on | import { film } from 'three/addons/tsl/display/FilmNode.js' (WebGL: FilmPass) docs Simple noise grain, not physically based synthesis. |
| Babylon.js 9.38.0 | Built in | pipeline.grainEnabled = true (GrainPostProcess) docs Simple noise grain, not spectral synthesis. |
| Godot 4.7 | None found | No built-in film grain pass on Environment; implement via CompositorEffect or a screen shader. |
| Unity | Built in | Volume > Add Override > Post-processing > Film Grain docs Texture-based grain presets or a custom texture, not spectral grain synthesis. |
| Unreal 5.7 | Built in | Post Process Volume > Film Grain docs |
| Blender 5.2 | Built in | Compositor > Add > Camera Lens Effects > Film Grain docs |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Newson et al. model film as a Boolean process: grains are discs of random radius scattered over the image as a Poisson point process. A pixel's output value is the probability that it is covered by some grain, which is a function of the input intensity. Rendering simulates by Monte Carlo: for each output pixel, a few random points are drawn over a window, grains are placed around the nearest Poisson grid cells, and the covered fraction is counted. Rendering at any resolution is possible because the model is defined in continuous space. Mid-tones get the strongest grain, while shadows and highlights show less, matching real film. Real-time engines substitute luminance-weighted blue-ish noise with a grain size parameter.
When to choose it
Reach for it when
- digital image looks too clean and sterile
- want grain that resembles a real film stock
- uniform noise looks fake and resolution dependent
- grain should be stronger in midtones than highlights
- match cinematic texture across different output sizes
Choose it when you want grain whose size and distribution match a real film stock and survive resolution changes.
Prefer cheap hash noise scaled by luminance for games, and apply it after Chromatic aberration and vignette. Prefer a full Film emulation (spectral stock simulation) pipeline if colour behaviour matters, not only texture.
Field marks
- Animated grain crawls and shimmers if the seed is not changed per frame at film rate
- Grain applied before AA or upscaling is smeared or reinforced by the filter
- Plain Gaussian noise looks digital and shows in sky gradients as banding structure
- Video compression erases fine grain at low bitrates
Presets
A smooth grey ramp. Left: uniform additive noise. Right: correlated grain scaled by an intensity function
{
"GRAINSZ": 1.6,
"AMT": 0.55
}Show GLSL (18 lines)
float hash(vec2 c){uvec2 u=uvec2(ivec2(floor(c)));uint h=u.x*1597334673u^u.y*3812015801u;h^=h>>15;h*=2246822519u;h^=h>>13;h*=3266489917u;h^=h>>16;return float(h)*(1./4294967296.);}
float lum(vec3 c){return dot(c,vec3(.2126,.7152,.0722));}
vec3 gam(vec3 c){return pow(clamp(c,0.,1.),vec3(1./2.2));}
const float GRAINSZ=1.6; // P
const float AMT=0.55; // P
float vn(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.-2.*f);
return mix(mix(hash(i),hash(i+vec2(1.,0.)),f.x),mix(hash(i+vec2(0.,1.)),hash(i+vec2(1.,1.)),f.x),f.y);}
void mainImage(out vec4 fragColor,in vec2 fragCoord){
vec2 uv=(fragCoord-.5*iResolution.xy)/iResolution.y;bool R=uv.x>0.;vec2 q=vec2(uv.x+(R?-.25:.25),uv.y);
float L=clamp((q.x+.25)/.5,0.,1.);if(uv.y<0.)L=.5;
float g=(vn(fragCoord/GRAINSZ+3.)+.5*vn(fragCoord/(GRAINSZ*.5)+9.)-.75)*1.6;
float n=hash(fragCoord)-.5;
float v=R?L+g*AMT*sqrt(max(L*(1.-L),0.))*.5:L+n*.18;
vec3 col=vec3(clamp(v,0.,1.));
if(abs(uv.x)<.0015)col=vec3(1.);
fragColor=vec4(col,1.);
}Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| film-grain-synthesis-specimen | Tesla T4 1920x1080 | 2.93× baseline (light) · 0.097 ms / 0.100 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| film-grain-synthesis-specimen | NVIDIA L4 1920x1080 | 2.58× baseline (light) · 0.041 ms / 0.041 ms · 2.4× faster on L4 | opengl-timer-query · Cross-architecture validation |
| film-grain-synthesis-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 1.72× baseline (feather) · 0.049 ms / 0.050 ms · 1.9× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Procedural noise for texturing, Worley (Cellular) Noise.
Crosses
- Film emulation (spectral stock simulation): Grain is the last stage of a film-stock simulation.
Sources
- primaryAlasdair Newson, Noura Faraj, Bruno Galerne, Julie Delon (2017). Realistic Film Grain Rendering. Image Processing On Line.Verified via doi.org · 2026-11-29doi:10.5201/ipol.2017.192
- primaryA. Newson, J. Delon, B. Galerne (2017). A Stochastic Film Grain Model for Resolution‐Independent Rendering. Computer Graphics Forum.Verified via crossref · 2026-11-29doi:10.1111/cgf.13159
- implementationmrdoob (2010). mrdoob/three.js. JavaScript 3D Library.GitHub API · license MIT · 2026-11-29