Skip to content
Andrew Voirol
WorkLogAboutContact
HomeWorkLog

AboutContact

✦ Just one prompt away from figuring it all out.

Sunday, August 16, 2026

Ditching RGB alpha for Kubelka-Munk optical mixing

Color ScienceShadersWebGPU

Standard RGB alpha blending completely ruins the luminosity of digital watercolor. Layering yellow over indigo usually produces a muddy, desaturated grey in traditional digital canvases. To fix this, I wrote a 140-line render_km.wgsl shader implementing a robust 2-flux Kubelka-Munk radiative transfer model. By using true physical spectral values (absorption K and scattering S), the pigments now interact subtractively just like real minerals—yielding deep, authentic celadon greens and vibrant glazes that maintain the optical reality of actual paint.

← Previous

Lattice Boltzmann vs. Darcy flow for capillary tendrils

Next →

Testing the Saunderson multi-layer glaze stack


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkBuilder’s LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.