PDA

View Full Version : awesome new way to do lighting


rouncer
06-20-2007, 02:53 PM
you basicly treat the light as if it was a sphere map, you give the light
front up and right vectors and you transform the vertex normal through
it and you read off a sphere map lookup table of colours, and you can put
colour gradients in it, and control falloff via the texture.

you can do the same with specular, but you use the half vector instead.

you might as well put sphere mapping on top of it just to polish it off. :yes:

kusma
06-20-2007, 04:29 PM
Environment mapping based lighting is by no means new. It has been used quite commonly in the demoscene for more than 12 years now - here's one example: http://www.pouet.net/prod.php?which=37
For modern stuff it's not really awesome either: you already pollute your texture caches quite heavy, and on top of that, once you have normal maps etc, you get poor locality and thus bad performance. Normal GPUs can perform a single dot3 in one cycle, so caching the results in textures are pretty pointless.

rouncer
06-21-2007, 12:53 AM
its new for me anyway...