lab_glass
Laboratory glass for *Mother Liquor* — borosilicate, amber reagent glass, a fume hood sash, a wired door pane and the liquid standing in a burette, all off one surface shader.
lab_glass
Laboratory glass for Mother Liquor — borosilicate, amber reagent glass, a fume hood sash, a wired door pane and the liquid standing in a burette, all off one surface shader.
It reads the scene already drawn behind the fragment through zero::scene_color
and displaces that read by the surface's own tilt in clip space, so a piece of
this glass bends the room standing behind it. That matters here because the
film has no sky and no outdoors: the builtin PBR transmission refracts the
environment probe, and an interior that has killed its skybox has nothing in one.
Three reads a hair apart give a thick edge its colour fringe.
Beer–Lambert absorption runs over the path the wall makes at the current angle,
so wall_thickness and absorb_color turn one shader into a 2 mm borosilicate
that barely tints and a 3 mm amber Winchester that goes brown. The white line
every real piece of glassware carries — the rim, the ground lip, the moulded
graduation — comes from edge_color against the grazing angle, and the specular
comes from the room's own practicals through zero_pbr_shade over a black
albedo.
Coverage, and why a material on this shader composites premultiplied
One scene-colour copy serves the whole transparent pass, so every blended
surface in a frame reads the same picture: the lit opaque scene as it stood
before any of them drew. A piece of glass returning alpha = 1 therefore paints
that picture over every other piece already drawn behind it — a rack forty
pieces deep shows only its front pane, and the pane erases the rack.
So this shader states how much of the background it actually disturbs.
coverage is that fraction looked at straight on — near 0.1 across a clean flat
pane, near 0.9 through an amber vessel wall — and it rises to 1 at a grazing
angle either way. The fragment returns its contribution already multiplied by
it, and the material asks for blend: premultiplied (src + dst * (1 - src.a)),
so what is left of the background is whatever was drawn there, glass included.
Layers then stack: the sash keeps its highlight, the flask behind it keeps its
bend, and neither erases the other.
A material on this shader that asks for alphaBlend instead will hide
everything behind it. cull: none and depth_write: false are the other two
render-block values a vessel wants, so both walls draw and overlapping pieces
both survive.
Properties
tint · roughness · ior — the glass itself.
refract_strength · dispersion — how far the bend drags the frame, and how
far apart the three colour reads sit.
absorb_color · absorb_distance · wall_thickness — the absorption integral.
edge_color · edge_power · edge_gain — the white rim.
spec_gain · opacity · coverage — the highlight, the overall presence, and
the compositing fraction above.
Scoped to this part · feeds back into the world's score.