CUDA Ray Tracing sources

Hello everyone) I am making some home-work in my university and I need to write Ray Tracing on CUDA. If you have written it and you can give me your sources It will be very usefull to me, because I’m a newbie in CUDA programming. Thank you)
My e-mail is ratmur@gmail.com

P.S Sorry for my English=)

Nobody can help me?

The best thing, is to study the algorithms and implement from scratch. It’s the best way to learn. Optimizing is for later.

Anyways I don’t expect many people here, eager to help do your homework ;)

[url=“https://agora.cs.uiuc.edu/display/cs419sp08/Home”]https://agora.cs.uiuc.edu/display/cs419sp08/Home[/url]

Hi:)
I’m creating a Ray Tracing program with CUDA right now.
The program used the source code of the site below.

[url=“http://www5e.biglobe.ne.jp/~liquor/raytrace/indexeng.htm”]http://www5e.biglobe.ne.jp/~liquor/raytrace/indexeng.htm[/url]

However, this code uses many global variable.
You must modify the code without global variable for multi threading.
It was difficult for me to do it, even if it was written by C.
But, I’ve modified it and I could have the same result of the site’s picture with host CPU.
And now, I’m modifying code for CUDA.

However, an internal error of the compiler of contacting the support goes out, and it doesn’t advance it previously.

Good Luck!

今日はNoridon

The source is not accessbile. It is a 404 error. Can you please put it back to the site?

Hi :)

It is amusing. It is possible to see the site from Japan.

But, I created a ray tracing code with CUDA and attached source code this time.

Please change file name RayTraceCUDA.cu.txt to RayTraceCUDA.cu before making.

You can see CPU definition in about head of source code which will render by CPU.

CUDA of the speed is about three times as high-speed.

However, it seems not to be able to use double precision for CUDA, and the execution result is not fragrant.

Good Luck!
RayTraceCUDA.cu.txt (13.1 KB)

thanks noridon

Hello there!
I’m noridon who attached the source code of ray tracing here before.
The referred table was able to be sped up by about 10% by doing assign to the constant memory.
Next, how should I do though I want to copy the memory by using the stream asynchronously with the calculation?
What should I do?
It would be greatly appreciated if someone could be taught.

P.S.
I fixed some bugs.
Please remove .txt from filename before compile.
RayTraceCUDA.cu.txt (13.7 KB)

His most recent work is located at the following page:

http://forums.nvidia.com/index.php?showtopic=74415