Baltor Get started

Gallery / Godot shaders

Animated film grain with luminance response

In your harnessGodot shaderMIT

Add moving film grain whose strength follows image brightness (strongest in midtones), with adjustable grain size, colour or monochrome grain, and a gentle exposure flicker.

Render of Animated film grain with luminance response
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Shader type
spatial
Render modes
unshaded, cull_disabled, depth_test_disabled, depth_draw_never, skip_vertex_transform, fog_disabled
Parameters
screen_texture (sampler2D), amount (float = 0.35), grain_size (float = 1.6), color_grain (float = 0.25), midtone_bias (float = 0.7), frames_per_second (float = 24), flicker (float = 0.03)
Use it on
A MeshInstance3D with a 2 x 2 QuadMesh, material.tres as its material override and a large extra cull margin, as in demo.tscn.
Result
The scene with fine flickering grain most visible in its midtones.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/post_film_grain/

Limits. Hashed white noise, not a scanned film stock: grain has no clumping or shape. Visible grain changes with resolution because it is sized in screen pixels. The pass reads Godot's screen texture after opaque geometry, so transparent objects drawn after it are not processed and its order among other transparent passes is not controlled.

Details

Kind
Godot shader
Engine
Godot 4.3 or later
Files
11 files, 139.8 KB
Licence
MIT
Declared effects
reads files, runs commands
Checked with
Godot 4.7.2, opengl3 compatibility (Mesa llvmpipe, Xvfb)
Checks
contract static, engine run, engine log clean, shader in scene, capture written, render not uniform, shader changes pixels
Techniques
Hashed per-cell noise updated at a fixed frame rate, Luminance-dependent grain response, MurmurHash3 32-bit finalizer over prime-combined lattice coordinates as a hash
Tags
godot shader, spatial, post-process, film grain, noise, cinematic, analog, full-screen
Identity
library.supply.creative_originals.89f3d6733fe74a0377965e22.bd7ebed34971878d
Version
bd7ebed34971878d179aeeef3456fc2035903d8fbbfd68594ce4bbdb57231403

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.