Doesn't seem like too much, does it? Well, this is actually pretty cool.
Last August, after winning Assembly Summer '09's 4k intro compo with Muon Baryon, Decipher and I renounced raymarching for good. Yup, we're done with it.
What next?
Well this was just one answer to that question (among the many that I had). This image itself isn't much at the surface. But, then, why did I show it? Simple: The code is awesome :) . Look at the reflections on the objects: there's a room there. Now notice the background - no room. How can this be?
Well, back then I had this really neat idea to synthesize a room out of simple vector math, which even used the vectors already present in the Phong lighting model to compute. Needless to say, it worked beautifully :) . And you'd be surprised at how small this room actually is in code. Well, I'll show you :) . The code to generate this reflected room in GLSL is:
c+=pow(max(max(abs(r.x),.4-r.y),abs(r.z))-.4,2.);
Now, I'm going to school. Bye!! :)

0 comments:
Post a Comment