Log inGet started
World

Rune and Ember: The Fantasy and Magic Material Collection

Branchmain
Branchesmain
Commitd4577ba01c

README.md

fantasyStainedGlass

A leaded cathedral window that glows with the light behind it, built on Looking Glass's glassStained panes (glassLiquidsMaterials, MIT), whose colour, lead mask and normal map it borrows by asset id, plus one detail texture of its own laid on the same pane layout (detail_texture: R pane random, G distance from the lead, B density streaks with seeds, A grisaille paint).

Each pane's family is read from the hue of the borrowed colour and turned into real pot-metal glass: ruby, amber, gold, emerald, cobalt, violet (pale panes become thin gold or straw cathedral glass), each pane shifted in hue and thickness by its own random number. Transmittance is colour ^ thickness, and the thickness varies like antique glass: per sheet, along streaky cords, thicker toward the came; seeds pass a little more light. Brown-black grisaille paint (stippled matte toward the lead, traced contours, petals, folds, leaf veins) blocks the light it covers and reads as matte paint from the front. Deep colours pass far less light than the pale gold (deep_dim), so under the tone curve ruby and cobalt stay jewel-dark while the gold panes burn white-hot and bloom.

The lead came (mask R) is an opaque dark-metal PBR surface with a soft highlight; each glass piece is a clear dielectric front (the room's reflection) plus, as emission, the light that comes through it from behind in its own colour: a steady backlight (the bright world beyond the wall, default 4.0), the sky the pane looks out on, the sun or moon when it stands behind the window (shadow-tested shadow_reach metres behind the pane, spread by a Henyey–Greenstein forward lobe, scatter_g), and every point and spot lamp behind it. It draws OPAQUE (queue 2000, no blending), so overlapping windows never sort wrong; four texture samples. Shaded through the engine's zero_pbr_shade, so every light, shadow and debug pass reads real material data.