My assignment was to create a graphics demo of "A pearlescent car on a wet tarmac road".
Wet tarmac road, simple. Just create a reflective surface with a reflection map to change the level of reflection per pixel. Made some nice puddles, looked ace.
Pearlescent car, hmm. Many papers were skim-read (such as ATi's famous one) but we didn't have time to steal the code as it was in ASM format, one which we are too dumb to read.
So we came up with the first ever Lolgorithm. By creating a 1D texture that blended between green and purple, we used NdotL to index into this texture to give an image of the car changing colour when looking at it from different angles. This has absolutely NO likeness to real life, at all.
Post your lolgorithms here. Here's a recent one for producing heat haze:
// LOLOLOLOLOLOLOLOLOLOLOLOLOLOL // O O // L Lolgorithm Begin! L // O O // LOLOLOLOLOLOLOLOLOLOLOLOLOLOL float4 texcoord; texcoord = mul(wPos, ProjectiveTexturing); texcoord.x += ( 0.2 * sin(g_fMotionFactor + wPos.x * 3.141 * 1 ) / 512) * texcoord.x; texcoord.y += (sin(g_fMotionFactor + wPos.y * 3.141 * 1 ) / 512) * texcoord.y; // LOLOLOLOLOLOLOLOLOLOLOLOLOLOL // O O // L Lolgorithm End! L // O O // LOLOLOLOLOLOLOLOLOLOLOLOLOLOL float4 colour = tex2Dproj( g_SceneSampler, texcoord ); colour.w = 1.0; return colour;












