Graphics Reference
In-Depth Information
buffer, then a new node is added in the node storage buffer, while adjusting the
corresponding linked list to point to it. If the pixel doesn't point to any valid
location in the node storage buffer, meaning this is the first pixel to be added for
its equivalent render target pixel, then a new node in the node storage buffer is
added. The head pointer buffer is then updated to point to that node.
Via this method, one is able to keep track of all rendered fragments for each
pixel on-screen. For simplicity, we will collectively refer to these two UAV buffers
throughout this chapter as a per-pixel linked list, since their end-product yields
exactly that.
2.3.2 The Scene vs. Deformer Mesh
For clarification, throughout this chapter we will refer to the scene as any mesh
that has to be rendered to the end user that could be deformed. In Figure 2.3,
the cube would be considered the scene. Any and all pixels that were derived via
rendering calls from the scene are thus referred to as pixels from the scene. For
simplicity, we will also refer to pixels from the scene as M+ pixels.
In contrast, for generating the CSG algorithm, we will also utilize a deformer
mesh. The deformer mesh will not appear in the final image that is displayed
to the user. Its sole purpose is to have its pixels as part of the heuristics in
constructing a deformed mesh to the end user in the final image. Any and all
pixels that were derived via rendering calls from the deformer mesh are thus
referred to as deforming pixels. For simplicity, we will also refer to pixels from
deforming mesh as M
pixels.
2.3.3 Per-Pixel Linked List Node
Each node in the per-pixel linked list will contain the rendered pixel RGB color,
its depth value, and a flag indicating if it is a back-facing or front-facing generated
pixel, as well as a flag indicating if the pixel belongs to M+ or M
.
2.3.4 Rendering the Scene and the Deformer Mesh
into the Per-Pixel Linked List
The first step in the algorithm is to render the front-facing pixels of the entire
scene plus the front-facing pixels of the deformer mesh into the per-pixel linked
list. The second step is to render the back-facing pixels of the entire scene plus
the back-facing pixels of the deformer mesh into the per-pixel linked list. Two
constant buffer variables are used in these two rendering passes. One buffer is
used to express to the shader storing the pixels into the linked list that the incom-
ing fragments are either front facing or back facing. The other buffer provides
information to the shader that the incoming fragments belong to M+ or M
.All
this data is then stored in each node in the linked list.
Search WWH ::




Custom Search