Log inGet started
Package

fantasyGlow.shader

Newest version

README.md

fantasyGlow

A PBR surface that lights itself where its albedo's alpha says, with the light moving: carved runes that breathe, violet veins with pulses running along them, magma cracks, a faint elven inlay, twinkling stars on night-blue cloth. The surface is the engine's own PbrSurface shaded by zero_pbr_shade (every light, shadow and debug pass reads real material data); the glow goes in emissive. Three textures: albedo (+ emission mask in A), ORM (+ pulse phase or star id in A), normal (green up). pulse_mode 0 steady, 1 travelling pulses, 2 breathing, 3 blinking, 4 twinkling. Optional clear coat and cloth sheen. Forked from scifiMaterials' scifiGlow (Hull and Hologram, MIT).

The glow is built as a gradient so it reads as light under a filmic tone curve, not as flat pastel paint. Everything is scaled by glow_intensity and the pulse:

  • body glow_color * mask * glow_body: the broad, saturated part. Keep glow_intensity * glow_body near 1 so it lands around 0.6-1.5 after exposure and stays coloured.
  • core smoothstep(glow_core_start, 1, mask)^4 * glow_hot, whitened by glow_core: a thin white-hot line at the top of the mask (author the mask as a soft groove-floor gradient so the core is thin).
  • spill glow_color * albedo * blur * spill_intensity: the mask sampled again at two coarser mips (textureSampleBias by spill_bias and spill_bias + 2) lights the surface around the glow in its colour, pulsing with it. Seamless (mips of a repeat-wrapped texture). Off by default (spill_intensity 0); dark surfaces want 4-8, pale ones well under 1.

glow_color white takes the glow's colour from the albedo under the mask (ember cracks).