Tuesday, February 13, 2007

First ray traced image from Cell's SPU


I just created my first ray traced image on a Cell processor (or more accurately: on a SPU of a Cell processor). I ray traced the model you see in the upper right corner of this blog entry. However, that image was created with ivview. My ray tracer output is very sober, because I have not implemented shading, and the output is in ASCII. I am pleased with the code, however, as it is properly vectorized code that shoots 8-rays in parallel on a single SPU. Anyway, here is the image, with the camera head-on with the model's z-axis.

************
************
*** ***
** ****** **
** * * **
** * * **
** * * **
** * * **
** ****** **
*** ***
************
************

Friday, February 9, 2007

SDK bug squashed


I must be getting up to steam: I just squashed my first bug in the official IBM SDK for the Cell Broadband Engine. In my quest to implement Photon Mapping on the SPU, I stumbled upon this nice little gem in the development kit: the intersect_ray1_triangle8_v() function. This function will do 8 intersection tests in a single go, using optimal SIMD stream lining. However, it did not work, where as the single triangle case did. After fixing the SIMD dot3 define, it ran fine. Also, I have put some assorted development info up on my stolk.org site. My first SPU application is getting nearer. I now have to find out how I can cram photons, pixels and triangles in that really tiny 256Kbyte memory of the SPU.