โ† All examples

godot shaders

Lift, gamma and gain colour grading

Grade the final image like a colour corrector: lift for shadows, gamma for midtones, gain for highlights as colours, plus contrast, saturation, vibrance, white balance temperature and tint.

Recorded render of Lift, gamma and gain colour grading

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • demo.tscn
  • inspect_shader.py
  • material.tres
  • post_color_grading.gdshader
  • preview.png
  • test_package.py
  • verification/native.json

How it works

Shader type
spatial
Render modes
unshaded, cull_disabled, depth_test_disabled, depth_draw_never, skip_vertex_transform, fog_disabled
Parameters
screen_texture (sampler2D), lift (vec4 = 0.04, 0.02, 0.08, 1), gamma (vec4 = 0.5, 0.5, 0.52, 1), gain (vec4 = 1, 0.96, 0.88, 1), contrast (float = 1.1), saturation (float = 1.1), vibrance (float = 0.2), temperature (float = 0.15) and 1 more
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 slightly purple shadows, warm highlights and a little more punch.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/post_color_grading/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • contract_static
  • engine_run
  • engine_log_clean
  • shader_in_scene
  • capture_written
  • render_not_uniform
  • shader_changes_pixels

Limits to consider

Grades display-referred colour after tonemapping, not scene-linear values, so extreme settings clip. No lookup table input; for LUT grading use Godot's colour correction texture. 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.