Linearly Transformed Cosines with Textures

Experimenting with real-time lighting from textures. This uses Linearly Transformed Cosines for the lighting. Custom raytracer.



This was done with reference to the paper Real-Time Polygonal-Light Shading with Linearly Transformed Cosines, which is a pretty fast way to handle lighting accurately. Also with referene to the amazing demo the authors provided.

I implemented lighting from a texture, though I did modify the processing of the texture part for shadertoy.


The shader is intensive and might crash mobile browsers. Click to see the shader at shadertoy:


Very long, refer to the shadertoy link.