DiligentGraphics / DiligentSamples

Sample projects demonstrating the usage of Diligent Engine
http://diligentgraphics.com/diligent-engine/samples/
Apache License 2.0
333 stars 82 forks source link

Question about Sample Render Pass and Sample Hybrid Raytracing #90

Closed DaOnlyOwner closed 2 years ago

DaOnlyOwner commented 2 years ago

Hello,

so the sample Render Pass uses Subpasses etc. to write to the gbuffer, but the Hybrid Raytracing apparently doesn't employ Subpasses. In Hybrid Raytracing, no dependencies between passes are specified. What method is recommended for use, Render Passes or the way it is done in Hybrid Raytracing?

TheMostDiligent commented 2 years ago

Render passes optimize performance for mobile devices. They are useful when you can reuses some data from the framebuffer as the render passes tutorial shows. It may be possible to do inline ray tracing from a subpass of a render pass, but this will unlikely give any benefit. Doing it in a compute shader is more natural.

DaOnlyOwner commented 2 years ago

Okay thank you, I will use the Hybrid Rasterization approach as I am not targeting mobile devices.