I wish to implement a CUDA rasterizer and perform ray tracing for each rasterized fragment. There are some details:
- The input of rasterization and input of raytracing launch (acceleration structure, pipeline, sbt, params, etc.) is already prepared beforehand.
- I need to perform ray tracing for each fragment without depth test. (So a two-pass method using G-Buffers seems not good.)
So, is there a proper way to launch OptiX raytracing directly in fragment shader of a CUDA-implemented rasterizer?
For example, maybe I can call optixLaunch() with only 1 launch width/height/depth in host code, and implement a rasterizer in ray_gen function at a cost of very poor thread utilization.