Corrections + warning notices

This commit is contained in:
mklefrancois 2020-12-14 17:13:43 +01:00
parent b7611150fa
commit 27d8a79ce3

View file

@ -1368,10 +1368,9 @@ itself, but hit groups can comprise up to 3 shaders (intersection, any hit, clos
The ray generation and closest hit shaders can trace rays, making the ray tracing a potentially recursive process. To The ray generation and closest hit shaders can trace rays, making the ray tracing a potentially recursive process. To
allow the underlying RTX layer to optimize the pipeline we indicate the maximum recursion depth used by our shaders. For allow the underlying RTX layer to optimize the pipeline we indicate the maximum recursion depth used by our shaders. For
the simplistic shaders we currently have, we set this depth to 1, meaning that even if the shaders would trigger the simplistic shaders we currently have, we set this depth to 1, meaning that we must not trigger
recursion (ie. a hit shader calling `TraceRayEXT()`), this recursion would be prevented by setting the result of this trace recursion at all (i.e. a hit shader calling `TraceRayEXT()`). Note that it is preferable to keep the recursion level
call as a miss. Note that it is preferable to keep the recursion level as low as possible, replacing it by a loop as low as possible, replacing it by a loop formulation instead.
formulation instead.
```` C ```` C
rayPipelineInfo.setMaxPipelineRayRecursionDepth(1); // Ray depth rayPipelineInfo.setMaxPipelineRayRecursionDepth(1); // Ray depth
@ -2161,6 +2160,11 @@ At the end of the method, we destroy the shader module for the shadow miss shade
m_device.destroy(shadowmissSM); m_device.destroy(shadowmissSM);
```` ````
!!! WARNING Recursion Limit
The spec does not guarantee a recursion check at runtime. If you exceed either
the recursion depth you reported in the raytrace pipeline create info, or the
physical device recursion limit, undefined behaviour results.
## `traceRaysKHR` ## `traceRaysKHR`
The addition of the new miss shader group has modified our shader binding table, which now looks like: The addition of the new miss shader group has modified our shader binding table, which now looks like: