realtime raytracing very non-optimized version burns cpu cycles!! on my machine it's smooth at 150*150, but starts to get choppy around 200*200. animated gif, lo-fi colors (realtime dithered to 256 colors): the code is ugly at times, haven't prettified it, or structured it properly. lots of short-hands and hacks, single one-directional light (like the sun), diffuse lighting (no specular), one level of reflection only (no recursion in js), the eye/camera and fov (field of view) is a bit messed up. i might do some refactoring/cleanup, etc... and, i would be grateful for any ideas about optimizations! all of a sudden the triggers stopped working, they're supposed to start ('1') and stop ('0') the animation, or do single-frame rendering ('2'). but you can also change the anim time manually with the 'theta' slider - ccernn
the gfx_setpixel() has no mercy on my cpu. :O i would suggest more primitive spheres if you are planning to make the fx with real time animation. take a look at senocular's planets demo: a sphere constructed from lots of rectangles (gfx_rectto()) may be lot faster and not bad looking either - stylized it can still has primitive shadows and reflections.
--------------------- Scottie Sharpe 68 2002 M20 Conversion, G265, Ireland coilovers, e12 brakes 88 Dinan M5, M88/3 Conversion, Dinan Stage 4, Miller MAF and WAR, Perfect Power SMT6, B&B exhaust, Racelogic Traction Control and Launch 95 525i 87 K100RT 62 R60/2 Webmaster f
cool, for speed you could try tweaking it to render random rays, and make them blobs rather than pixels (so you get motion blur and weird quality) edit: I couldn't help myself, here's a faster, cartoony mod:
I think I may have to cancel my forum account so someone else can use my username. You've earnt it.
--------------------- 93 325is - total M3 conversion and more - Dinan SC kit - RMS aftercooler and tuning - 395rwhp on 91 octane. "....She may not look like much, but she's got it where it counts, kid. I've made a lot of special modifications myself." -Han Solo CarDomain