โ† All examples

godot shaders

Stained glass window from Voronoi cells

Backlit stained glass: Voronoi cells filled with colours from a palette and slight glass mottling, separated by dark lead came lines, glowing as if lit from behind and slightly translucent.

Recorded render of Stained glass window from Voronoi cells

What this component contains

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

How it works

Shader type
spatial
Render modes
cull_disabled, depth_draw_always
Parameters
glass_a (vec4 = 0.75, 0.12, 0.15, 1), glass_b (vec4 = 0.12, 0.3, 0.75, 1), glass_c (vec4 = 0.95, 0.75, 0.15, 1), glass_d (vec4 = 0.15, 0.55, 0.25, 1), lead_color (vec4 = 0.06, 0.06, 0.07, 1), cell_scale (float = 6), lead_width (float = 0.07), backlight (float = 1.6) and 2 more
Use it on
A quad or window mesh with UVs spanning the window.
Result
A glowing window of irregular red, blue, gold and green panes framed by black lead.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/stained_glass_cells/

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

Panes are random cells, not a designed picture. The glow is emission, not light cast into the room; pair it with a light or a projected texture for coloured light on the floor. Transparency is not sorted per pixel.