During this time, I became familiar with Cuda and added the triangle mesh model for my experiment Renderer,
We initially transplanted the original KD-tree to the GPU, but the structure of the KD-tree is still in the CPU.
From simple smallpt (all of which are sphere) to the present,ProgramThe structure has been modified several times. Currently
We still haven't found a good model. Cuda needs to inline all call functions, which causes me to only
Take a big kernel that contains all the required files, and the compilation speed is also slow.
For the lighting system and material system, the switch-case method is used for expansion and comparison.
Excuse me, which of the following experts knows better Cuda models!
MACHINE: pd820 + gts250
Speed: 1.5fps
Max-depth: 9
Total: 800spp
As an implementation that has not been optimized, the speed is acceptable.