Jump to content
  • Advertisement
Sign in to follow this  
shiqiu1105

Discussion on GPU Ray Tracing

This topic is 2331 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

HI folks,
I am trying to write a basic ray tracer with CUDA.
What I have implemented now is simply 1 sample per pixel, and each sample is assigned to a cuda thread.
And each thread traces it's own ray.

I am writing to ask more advanced and efficient ways of doing this.

For example, what's the best the strategy for parallelizing all the tasks? When Multiple samples are used, should I assign each thread all samples in one pixel, or should I only parallelize computation within a thread and sequentially render all pixels?

And, I have also heard that it's better to trace ray in a breadth-first mannar? Why? any tutorial of how to do this?

Anyway, I will appreciate any advice and idea, thank you~

Share this post


Link to post
Share on other sites
Advertisement
There's an article in GPU Pro 3 about ray-tracing with compute shaders, which should be relevant for you. I would also try and see you can dig up some implementation details on Nvidia's Optix, since at this point it's a pretty mature library and is bound to have a lot of Cuda-specific optimizations. I'm not sure if they have public implementation details, but perhaps you could email one of the developers.

Share this post


Link to post
Share on other sites
Nvidia revealed a little of OptiX in a talk at GTC in 2010 online available here.
Also, there is the paper from Parker et al. presented at Siggraph in 2010 (though it is more explaining the general architecture of the engine).
I guess, there is more on the internet, perhaps more recent material.

Share this post


Link to post
Share on other sites
shiqiu1105, use global atomics for fetch global buffer with rays . (or increment global rays index)
this is faster, because some threads may complited fasts instead another .

you can try use a g-buffer for speed up. Edited by xma

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!