Factorize and optimize raytracing render pass
- Replace the custom VisRTX full-screen shader with the standard VTK FSQ helper.
- Use the same shader for OSPRay (upload a new texture in this case)
- Let OpenGL make the alpha blending and depth testing instead of using the costly CPU
WriteLayer
method when using the render pass. This also avoids downloading the previous pixels that was necessary to blend the images on the CPU.
Previously, the main issue was that the OSPRay result was copied to the default framebuffer (using the vtkRenderWindow methods). This was not working when the result was supposed to be drawn on an offscreen framebuffer (when the OSPRay pass is only a delegate pass).
Edited by Michael Migliore