I´m new to CUDA and i´m trying to “convert” my cpu path tracer into gpu path tracer. So I have to parallize my for-loop over the hole image or? So that every pixel is one thread in CUDA. But I don´t know how to start, because how do I kwow which thread is which pixel, how to combine them to the overall image.
Here some snippet http://s14.directupload.net/file/d/3371/7ifdabxm_png.htm
And I have another question. My cpu path tracer has some classes like Vector (with add/sub etc. operations), Material or Color. In my main program I add/sub Vectors etc. How can Cuda kwow these operations in the kernels too?
Hopefully I get some tipps, because I´m a beginner in CUDA. Thanks a lot :)