Graphics Reference
In-Depth Information
The term water tightness expresses the
concern about neighboring patches that share
a common edge. Take, for example, a plastic
bath toy—a rubber duck—that needs to float
in water. If there are any gaps or holes in its
surface, it would not be water tight and would
sink. Similarly, if this rubber duck were a
geometric model being rendered and had gaps
between the patches that defined, it we could
also declare it as not being water-tight.
Figure 4.14. Mirrored values on neighboring
edge.
There are guarantees from the fixed-function tessellator that assist in this job. First,
for a given tessellation factor and partitioning method, it will generate consistent and re-
peatable distributions of samples—the precision and layout are tightly controlled by both
the hardware and software specifications. Second, sample locations are symmetrical about
the midpoint of any given edge.
Ultimately, it is responsibility of the author of the domain shader to ensure water
tightness. Given U, UV, or UVW sample locations along a common edge, the domain shader
code should generate the same output vertex.
Figure 4.14 demonstrates this mirrored distribution along an edge. Due to vertex
ordering, or the geometric layout, it is possible that the U, UV, or UVW values are reversed
in neighboring patches that share a common edge.
Samples are effectively mirrored around the midpoint (0.5 in Figure 4.14) such that a
sample at X will be the same as the sample at 1.0-X on an inverted edge.
A simple solution to this problem is to require neighboring patches to use the same
tessellation factors along common edges. You then push the problem of blending between
different tessellation factors to the inner surface area of the geometry.
Figure 4.15. Independent edge factors.
Search WWH ::




Custom Search