Graphics Reference
In-Depth Information
possibility of recovering pixels that were valid in the previous frames but invalid
in the current frame is essential and is going to give much better results and
stabilize the algorithm. It's also possible to get huge speedups by not running
theray-marchingcodeiftherecoveryis accurate enough so that we don't need
to recalculate the reflection at all.
This little enhancer walks hand in hand with Section 4.6.2, “Multiple Ray
Bounces,” since both rely on re-projection.
4.6.6 Travel Behind Surfaces
It is possible to travel behind objects using a Minimum and a Maximum Hi-Z
buffer. In case the ray crosses a cell and ends up behind both the minimum
and the maximum depth of the new cell, we can just cross that cell as well
and continue with the Hi-Z traversal. This assumes that the surface has not
infinitely long depth. A global small epsilon value can also be used, or a per
object thickness epsilon value into a render target. Traveling behind objects is
really a hard problem to solve if we do not have information on object thickness.
4.6.7 Ray Marching Toward the Camera
We've looked at the algorithm using a Minimum Hi-Z hierarchy for rays to travel
away from the camera. It's also possible for mirror-like reflected rays to travel
toward the camera and thereby have a chance of hitting something, though this
chance is very small and would mostly benefit curved surfaces. A small change
is required for the algorithm, which makes use of an additional hierarchy, the
Maximum Hi-Z, for any ray that would want to travel toward the camera.
A texture format such as R32G32F would be appropriate for this change, the
R channel would store the minimum and the G channel would store the maximum.
There is a very small amount of pixels that have a chance of actually hitting
something, so this change might not be worth it as this would add an overhead
to the entire algorithm.
4.6.8 Vertically Stretched Anisotropic Reflections
In the real world the more grazing angles we see on glossy surfaces, the more
anisotropic reflections we perceive. Essentially the reflection vectors within the
reflection lobe are spread more vertically than horizontally, which is the main
reason why we get the vertical stretching effect.
To achieve this phenomenon with screen-space reflections, we have to use the
SampleGrad function of our color texture during the cone-tracing accumulation
pass of the reflection colors, give this sampler hardware some custom calcu-
lated vertical and horizontal partial derivatives, and let the hardware kick the
anisotropic filterer to stretch the reflections for us. This is highly dependent on
the BRDF used and how roughness values map to the reflection lobe.
Search WWH ::




Custom Search