Get the latest tech news

Implementing Order-Independent Transparency


Hello! This will be a first attempt at coming back to writing some blog posts about interesting topics I end up rabbitholing about. All the older stuff has been sadly lost to time (and “time” here mostly means a bad squarespace website).

This requires that you make a single shader that supports all the different shading models you need, and it’ll get fatter and slower as time goes on (hurting code size, register usage, etc.). However, if transmittance is not quite reaching zero you can still put this information to good use, for example, by using variable-rate shading to make those pixels cheaper, since they’re going to be partially occluded anyway and might not need that high-frequency detail. RankExtra LightsDepth BoundsClearing CoefficientsGenerating TransmittanceWriting Overdraw DepthShading TransparencyComposite Transparency300.13ms0.17ms0.35ms0.06ms0.27ms0.04ms31000.13ms0.17ms0.35ms0.06ms0.90ms0.04ms21000.13ms0.09ms0.30ms0.06ms0.87ms0.04ms11000.13ms0.05ms0.26ms0.05ms0.83ms0.04msThe numbers here aren’t terribly useful, since it heavily depends on how much work you would need to do in the different passes.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Implementing

Implementing