Hello everyone! This is my first post here:)
I’m currently doing radiosity simulation using CUDA and OpenGL. It is based on progressive refinement and ‘rednering’ onto hemicube. I have reasonably fast code in CUDA, simulating ‘rendering pipeline’, but when it comes to software rasterization of triangles… uh it’s really slow and ugly.
So up until rasterization phase, I have vertices of triangles that need to be ‘rendered’, in screen space coordinates, with depth and index information. Something like this:
vertices: (123,56) (110, 99) (33, 59)
triangle index: 4561 (this can be converted to color if needed)
depth: 15.3 (for zbuffer)
What i would like to do, is use hardware rasterizer to do rasterization, then take the result back to CUDA and process it. As far as I know, it is not possible to access hardware rasterizer directly from CUDA, so I would like to know, how to use only the rasterization phase with Opengl. I just need to render flat triangles with z-buffer. No textures, shading, transformations, backface-culling, frustum-culling (well, simple 2d clipping would be nice). Just pass coordinates of ready-to-render triangles and receive result as fast as possible.
The point is, I want to avoid any overheads and operations I don’t need, because this process is going to be repeated thousands of times.
Any help, ideas, suggestions will be very helpful
edit:
Another option is to include also hardware projection in this process, so culling would be done on CUDA (i use octrees to do frustum culling)and projection + rasterization in hardware. I’m just looking for fastest solution
peter