Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

particle_looks

The eight looks a sprite particle can be drawn as — mote, glow, puff, flame, spark, ember, droplet, ring — as pure WGSL functions of the quad's uv and the particle's own life, seed and size. Each answers a LookSample { alpha, heat }; look_heat runs the particle's colour toward white by its heat, look_puff_normal is the normal a puff shades under, and look_weighted hands the blend equation the fragment it expects.

Included by every looks/shaders/look_*.shader, after particle_data, fx_noise and fx_shaping.

Authoring colour stops

A colour a look returns is linear light, and the eye reads it after the display encode. That encode lifts the middle of the range hard: a linear 0.5 arrives near 0.74, a linear 0.12 near 0.38. A stop written down as the colour it is meant to LOOK therefore arrives washed out — the vivid orange (1, 0.5, 0.12) is delivered as a dusty tan.

So a stop meant to read as a saturated colour keeps its minor channels far lower than the on-screen target: to read as (1, 0.4, 0.02) a stop holds about (1, 0.13, 0.0003). The further a colour is meant to be from grey, the wider the gap between the number and the target.

look_flame_color is the worked form. It raises the emitter's hue to a power for each stop — the cube for the tint's own colour, the sixth for the cool end — and lifts the hot end per channel rather than toward white as a colour, so the range runs red → orange → yellow → white-yellow instead of through pink.