Sunday, March 25, 2012

Modules of Basic Ray Tracing

Modules 1: Mesh Import. This part is done by CPU
Modules 2: Construct KD-Tree.This module is finished in CPU.
Modules 3: Main part. GPU is responsible for this module. 
Basically each thread is responsible for one ray. 
Step1, Generate rays. 
Step2, find intersections. Kernel functions: 1. KD-Tree search. 2. KD-Restart 3. KD-BackTrack
Step3, calculate colors and reflected refracted rays
Then go to step 2. 

One of the biggest problem is still how to reduce the recursion of module 3. Maybe create a big buffer for every iteration and then add them together. However, this is really memory-consuming. 

No comments:

Post a Comment