Graphics Reference
In-Depth Information
Section 4.4.5 will propose a method that is merely an approximation but runs
really fast without the need for firing multiple rays or jittering. By just navigating
in the hierarchy of the blurred color images we discussed in this pass, depending
on the reflection distance and roughness of the surface we are reflecting from, we
can produce accurate glossy reflections.
4.4.5 Cone-Tracing Pass
The cone-tracing pass runs right after the Hi-Z ray-tracing pass finishes, and it
produces the glossy reflections of the algorithm. This pass uses all our hierarchical
buffers.
The output from the ray-tracing pass is our screen-space intersection coor-
dinate as we saw earlier. With that we have all the knowledge to construct a
screen-space aligned cone, which essentially becomes an isosceles triangle.
The idea is simple; Figure 4.17 shows a cone in screen space that corresponds
to how much the floor diverges the reflection rays at maximum. Our goal is to
accumulate all the color within that cone, basically integrate for every single ray
that diverges. This integration can be approximated by sampling at the circle
centers, where the size of the circle decides at which hierarchy level we read the
color from our textures, as we saw in Section 4.4.3. Figure 4.18 illustrates this.
We determine whether the cone intersect our Hi-Z at all. If it does, we de-
termine how much it intersects and multiply this weight with the pre-integrated
visibility for that level and point. This final weight is accumulated until we reach
100%, and we weigh the color samples as well during the traversal. How you de-
termine whether the cone intersects the Hi-Z for empty space is highly dependent
on whether you use a post-projected Hi-Z or view-space Hi-Z.
First, we need to find the cone angle for a specific roughness level. Our
reflection vector is basically the Phong reflection model because we just compute
a reflection vector by reflecting the view direction on the normal. To approximate
Figure 4.17. A cone in screen space is essentially an isosceles triangle with the in-radius
circles that will be able to sample/read the hierarchical buffers.
Search WWH ::




Custom Search