pouët.net

Go to bottom

Answer to auld about the raytracer test

category: general [glöplog]
 
Yes auld, just 1 rayreflection and no shadows. I can add shadows and more reflections, I suppose it would go at 60-70% of speed. I have not add shadows because the harder part in a raytracer are reflections (you don't need to order distances to the first hit, so the way I do it you don't need sqrt, you only use ambient lightning and you stop when you find the first hit, so it is much faster than reflection). About not adding a second reflection or more, it would look like shit in the test because of too little re-reflected spheres, when the spheres are too little, without antialiasing flicks, you know.

About the gpu... I'm not very sure if it would be faster or not in a gpu. By one hand, it is brute force algorithm, that runs in simd fashion, so no trees or whatever, so it should be easy to port to gpu. I've not used trees because by the current speed of my spherehit, a scene to be accelerated by a tree would need something like 10 times more spheres I suppose, else the cost of generating and traveling the tree would be higher. But, this is an only integer raytracer (using mmx for simd). To make it possible I use geometrical raytracing (usual raytracing 32bits are not enough precission). It runs about 8x times faster than the floats one. In my computer, the test does more than 2 hundred million spherehits per second (Pentium D 3Ghz). So, I don't know if it would be faster in a gpu or not. Maybe it depends of the gpu.

I'm not a gpu coder, I'm a oldschool software rendering coder. If you want to try it, I could send you the code in c without the mmx/multithread shit with some comments...
added on the 2006-11-12 11:29:14 by texel texel

login

Go to top