Graphics Reference
In-Depth Information
B
A
A
B
C
B
B
C
B
B
Figure 5.6. The specialized hair antialiasing calculation is performed by finding the
distances between the pixels and the closest hair fiber edge. The blue segments here
represent the distances that are found then used to modify the hair coverage value.
The pixels marked A are nearly a half-pixel distance outside the hair fiber, so their
coverage values will be near 0. Pixels marked B are pixels near the hair fiber edge,
which means these pixels will have coverage values near 0 . 5. The pixels marked C are
nearly a half-pixel distance within the hair fiber resulting in coverage values close to 1.
5.6.1 Hair Fragment Linked List Node
The linked list node consists of color, depth, and a next node pointer. Each
component of the linked list node is stored as a 32-bit unsigned integer. The
color is the final shaded hair fragment (from a single hair fiber) and includes
alpha for hair transparency blending and hair antialiasing (see Section 5.5 for
more information on hair antialiasing). When stored into the linked list node,
color is packed into eight bits per channel (red, green, and blue) and eight bits
for alpha. The hair fragment's depth relative to the camera is stored, which will
be used for sorting the layers of hair fragments in the linked lists. The next node
pointer points to another fragment in the linked list or no fragment if the node
is at the end of the list [Yu et al. 12,Lacroix 13,Engel and Hodes 13].
5.6.2 A-Buffer Fill
During the A-Buffer Fill pass, the hair goes through a geometry pass and all
strands are rendered (see the section on Geometry Expansion for more specifics
on the geometry pass), then each individual hair fragment gets processed in the
pixel shader. Each hair fragment undergoes lighting and shading. The coverage
calculation for the specialized hair antialiasing occurs here and is applied to the
hair fragment's alpha. Lastly, the fragment is stored in the linked list of the
corresponding screen space pixel.
 
Search WWH ::




Custom Search