โ† All examples

godot shaders

Single-pass bloom from screen mip levels

Add glow around bright areas without extra viewports: a soft threshold keeps only the bright parts, several blurred mip levels of the screen are summed with decreasing weights, and the glow is added back with a tint.

Recorded render of Single-pass bloom from screen mip levels

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • demo.tscn
  • inspect_shader.py
  • material.tres
  • post_bloom_glow.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), threshold (float = 0.62), knee (float = 0.15), intensity (float = 1.3), levels (int = 5), spread (float = 0.6), tint (vec4 = 1, 0.92, 0.8, 1)
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 soft warm halos around its brightest areas.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/post_bloom_glow/

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

Mip levels are box filtered, so the glow is less smooth than a separable Gaussian chain and can flicker on small moving highlights. The bright pass works on display colours, not HDR values. 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.