Thursday, June 3rd, 2010
Realtime ray tracing^H^H^H^H^H^H texture mapping with JavaScript
<>p>We have posted about ray tracing before, and now we have another example by Jonas Wagner:The environment is mapped using cube mapping. I store all the values of the cubemap as floats. I increase the definition range by multiplying all values bigger than 0.95 with 2. This makes sure that the bright parts of the image are also very bright in the reflections. You can think of this as faking hdr. I do not calculate any lighting, it is all coming from the environment map. To make the animation look a bit more fluid and hide the aliasing I apply some fake motion blur by blending the current frame with the previous one.
You can check out the code to see how it all works. What frame rates are you getting?
Related Content:












It’s actually real raytracing not just texture mapping. You can tell from the ;)
This is very cool but definitely far from seeing actual real-world use. I was getting 11-12 fps in Chrome on medium setting (though it’s Pentium4 machine with 2GB of RAM and WinXP, so it’s probably better on something beefier).
Do people understand what ^H means nowadays?
16fps in Opera on medium setting, 5 on high