Field of the Invention
[0001] This invention relates generally to computer graphics, and more particularly to a
method and apparatus for producing composite color images defined by subpixel resolution.
Background
[0002] Many computer graphics systems use pixels to define images. The pixels are arranged
on a display screen as a rectangular array of points. Aliasing occurs because the
pixels have a discrete nature. Artifacts can appear when an entire pixel is given
a light intensity or color based upon an insufficient sample of points within that
pixel. To reduce aliasing effects in images, the pixels can be sampled at subpixel
locations within the pixel. Each of the subpixel sample locations contributes color
data that can be used to generate the composite color of that pixel. However, some
graphics systems may limit the amount of memory for storing subsample color data for
each pixel. Thus, such graphic systems must carefully select which color data are
stored so that these systems can still accurately produce a composite color for each
pixel.
[0003] Hence, there is a need for a method and an apparatus that, for each pixel, can make
color selections and replacements without introducing unsatisfactory artifacts into
a displayed image.
[0004] An example graphics system is described in US 5,594,854 which performs coarse sub-pixel
correction so as to improve the general quality of displayed images. The graphics
system uses a rasterizer unit within a pipelined architecture to decompose a graphical
primitive into a series of fragments, each fragment only covering a part of a pixel
and having an associated 'alpha value' representing the percentage pixel coverage.
An 'alpha test unit' compares a fragment's alpha value with a reference alpha value
and may conditionally reject a fragment if it is deemed that the final colour of the
pixel would not be rendered correctly, for example, if a percentage coverage of a
pixel by a new fragment is too low.
Summary of the Invention
[0005] In accordance to the present invention which is defined by the appended claims, an
objective is to provide an apparatus and method for determining colors of pixels.
The invention makes it possible to operate effectively within memory constraints for
storing pixel data by selecting the fragment data that contributes to the color of
a given pixel, which can be from fragments of different objects or surfaces of the
image, while minimizing noticeable color differences for the pixel and avoiding the
introduction of unsatisfactory artifacts.
[0006] The present invention, in its broad form, resides in a method and an apparatus for
determining a color of a pixel, as recited in claims 1 and 11 respectively. In the
method, the arrangement stores up to a predetermined number of fragment values for
the pixel. Each stored fragment value is associated with a fragment of an image that
is visible in that pixel. A new fragment is determined to be visible in the pixel
with at least one other fragment with a stored fragment value still being visible
in the pixel. The fragment value of one of the visible fragments is discarded to determine
which fragment values are stored and subsequently used to generate the color of the
pixel.
[0007] According to the present invention, the discarded fragment value is one of the stored
fragment values.
[0008] Preferably, the new fragment is part of a different surface of the image than each
of the fragments associated with a stored fragment value.
[0009] In one embodiment, the method selects for discarding the stored fragment value with
the Z-depth value that is larger than the Z-depth value of each other stored fragment
value, and replaces that fragment value with the new fragment value. The greater the
Z-depth value, the farther the associated fragment is from the viewer of the image.
[0010] In another embodiment, the method selects for discarding the stored fragment value
with the color value that produces a numerically smaller color difference than the
color value of each other stored fragment value when compared to the color value of
the new fragment value. Discarding the fragment value that produces the smallest color
difference minimizes any noticeable color change for the pixel.
[0011] In terms of the apparatus, the arrangement comprises a memory and a graphics device.
The memory stores up to a predetermined number of fragment values for a given pixel.
Each stored fragment value is associated with a fragment of an image that is visible
in that pixel. The graphics device determines that a new fragment is visible in the
pixel with at least one other fragment with a stored fragment value still being visible
in the pixel. The graphics device discards the fragment value of one of the visible
fragments to determine which fragment values can be used to generate the color of
the pixel.
Brief Description of the Drawings
[0012] An exemplary embodiment of the invention will be described with reference to the
accompanying drawings, in which:
◆ FIG. 1 is a block diagram of an exemplary computer graphics system that can be used
to practice the invention;
◆Figs. 2A-2C represent various subdivisions of a pixel into subpixels, and illustrate
exemplary sparse supersampling patterns that can be used to sample the subpixels;
◆ FIG. 3 represents an exemplary linking of subpixel samples in one of the supersampling
patterns of FIG. 2A-2C to two fragment triples stored in a pixel memory;
◆ FIG. 4 represents another linking of subpixel samples for when a third fragment
appears in a pixel;
◆ FIG. 5A-5C illustrate alternative linkings of subpixels samples for when a third
fragment appears in a pixel;
◆ FIGs. 6A-6B illustrate a logical representation of the pixel memory including indices
to the stored fragment triples;
◆ FIGs. 6C-6D illustrate a logical representation of the pixel memory including coverage
masks associated with the stored fragment triples; and
◆ Fig. 7 illustrates a flow diagram describing an exemplary process using the present
invention.
DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT
System Overview
[0013] FIG. 1 shows a computer system 100 that can generate monochrome or multicolor 2-dimensional
(2D) and 3-dimensional (3D) graphic images for display according to the principles
of the present invention. The computer system 100 can be one of a variety of raster
graphics systems including, for example, a personal computer, a workstation, or a
mainframe.
[0014] In the computer system 100, a system chipset 104 provides an interface among a processing
unit 102, a main memory 106, a graphics accelerator 108 and devices (not shown) on
an 1/0 bus 110. The processing unit 102 is coupled to the system chipset 104 by the
host bus 112 and includes a central processing unit (CPU) 118. The main memory 106
interfaces to the system chipset 104 by bus 114.
[0015] The graphics accelerator 108 is coupled to the system chipset 104 by a bus 116, by
which the graphics accelerator 108 can receive graphics commands to render graphical
images. A graphics memory 122 and a display device 126 are coupled to the graphics
accelerator 108; the graphics memory 122 is coupled by bus 124, and the display device
126, by bus 127. The display device 126 includes a cathode ray tube (CRT) raster display
monitor 128 with a display surface or screen 130. The CRT 128 produces color images,
but the invention can also be practiced with a monochrome monitor to display gray-scale
images or with printers that prints black and white or color images.
[0016] An image 132 appears on the display screen 130 by illuminating a particular pattern
of individual points called pixels 134. The image 132, for example, can be 2D alphanumeric
characters or a 3D scene filled with objects. The display screen 130 includes a two-dimensional
array of such pixels 134. The array size of display screens 130 can vary widely. Examples
of display screen 130 sizes include 1024 x 768 and 1920 x 1200 pixels. For the purposes
of practicing the invention, the display device 126 may be any other pixel-based display
such as a liquid-crystal display or a dot matrix printer.
[0017] The graphics memory 122 includes storage elements for storing an encoded version
of the graphical image 132. There is a direct correspondence between the storage elements
and each pixel 134 on the display screen 130. The storage elements are allocated to
store data representing each pixel 134, hereafter referred to as pixel data. For example,
five bytes may be used to encode a color representation for each pixel.
[0018] The values stored in the storage elements for a particular pixel controls the color
of the particular pixel 134 on the screen 130. By "color", it is to be understood
that the brightness or intensity of the pixel 134 is also intended. Pixel data can
translate directly into colors or into indices to access a color lookup table.
[0019] During operation, the computer system 100 can issue graphics commands that request
an object to be displayed. The graphics accelerator 108 executes the graphics commands,
converting the object into primitives and then into fragments. A primitive is a graphical
structure, such as a line, a triangle, a circle, or a surface patch of a solid shape,
which can be used to build more complex structures. A fragment is a 2D polygon created
by clipping a primitive of the image 132, such as a line, triangle, or circle, to
the boundaries of the pixel 134. A more detailed description of fragments is provided
by Loren Carpenter in "The A-buffer, an Antialiased Hidden Surface Method", Computer
Graphics Vol. 18, No. 3, 1984, pp. 103-107. There, techniques merge fragments into
a fragment list when the fragments are from the same object or surface of the image.
Here, the fragments that are combined to produce the color of a pixel can have a different
relationship to each other: that is, the fragments can be from different objects or
surfaces of the image 132.
[0020] The graphics accelerator 108 renders the fragments, and loads the pixel data corresponding
to the fragments into the appropriate storage elements of the graphics memory 122.
The pixel data can be transferred into the graphics memory 122 from the main memory
106 via busses 112, 114, 116, and 124, or written directly into the graphics memory
122 by the graphics accelerator 108.
[0021] To display the image 132, the CRT monitor 128 projects a beam onto the screen 130.
In synchrony, the pixel data are read out of the graphics memory 122 as the beam scans
the screen 130. The CRT monitor 128 renders the pixel data as illuminated points of
color on the display screen 130.
[0022] Figs. 2A-2C illustrate various exemplary subdivisions of a pixel 134. FIG. 2A shows
pixel 134 divided into a 4 x 4 array 200 of evenly spaced points called subpixels
206; FIG. 2B shows an 8 x 8 array 202 of subpixels 206; and FIG. 2C shows a 16 x 16
array 204. Dividing a pixel 134 into subpixels 206 provides multiple points at which
the image 132 covering that pixel 134 can be sampled. For reference, the center 201
of the pixel 134 is shown as an X.
[0023] Generally, the more subpixels 206 there are in the array, the greater the resolution
of the pixel 134. Thus, the displayed color of the pixel 134 does not rely entirely
on one sample point, but upon several subpixel samples 206. Methods for calculating
a pixel value from multiple sample points are well known in the art.
[0024] Known implementations sampled at every subpixel 206 in a pixel 134. While, theoretically,
such full scene supersampling presented opportunities for attaining high resolution,
the technique unnecessarily consumed memory resources. Each sampled subpixel 206 required
memory resources to store and use the sampled data. Thus, fully sampling the 4 x 4
array 200 of subpixels 206 required memory storage for sixteen samples, in addition
to the typical memory requirements for each pixel 134. If the sixteen samples each
required, for example, eight bytes of storage, then implementing full scene supersampling
could require an additional 295 MBytes of memory for a 1920 x 1200 pixel display screen
130. The 16 x 16 array 204, which requires storage for 256 samples, needs sixteen
times as much memory.
[0025] Accordingly, recent modern implementations do not sample at every subpixel 206. Rather,
those subpixels 206 which are sampled are sparsely distributed in the subpixel array.
In general, the antialiasing results were almost as effective for such sparse supersampling
as for the full scene supersampling technique.
[0026] Figs. 2A-2C each illustrate an exemplary sparse supersampling pattern 210, 220, 230
that can be used to sample the subpixels 206 of the corresponding subpixel array.
The illustrated exemplary sample patterns 210, 220, 230 each have N samples distributed
uniformly throughout an N x N subpixel array with exactly one subpixel sample in any
particular row and in any particular column.
[0027] The sampling pattern 210 has four subpixels samples S1-S4 (N equals 4). For sampling
pattern 220, N equals 8, and the eight subpixel samples 222 are S1-S8. For sampling
pattern 230, N equals 16, and the sixteen subpixel samples 232 are S1-S16. The sampling
pattern 210, 220, 230 can be repeated for every pixel 134 on the display screen 130.
Various other sampling patterns can be used to practice the principles of the invention.
[0028] Although sparse supersampling uses less memory than full scene supersampling, considerable
amounts of additional memory are still required. For example, when N equals 4, a 1920
x 1200 pixel screen 130 still needs eight bytes storage for each of four subpixel
samples. This requires an additional 74 Mbytes of pixel data. The requirements are
doubled and quadrupled when N equals 8 and 16, respectively.
[0029] The described arrangements can reduce the storage requirements even more than such
sparse supersampling without reducing the number of subpixel samples for an N x N
subpixel array. The method and apparatus described herein rely upon the observation
that typically only a few fragments of the image 132 are visible within a given pixel.
[0030] For static and animated images, the antialiasing effects achieved by eight sparse
supersamples in the 8 x 8 array 202 appear significantly better than for four samples
in the 4 x 4 array 200. But differences between sixteen samples in the 16 x 16 array
204 and eight samples in the 8 x 8 array 202 may be indistinguishable.
[0031] FIG. 3 shows an exemplary pixel 300 that is part of the image 132 and is subdivided
into a 4 x 4 subpixel array 200. The pixel 300 has four sampling positions according
to sampling pattern 210 of FIG. 2A. Two fragments 301, 302 are in pixel 300. Each
fragment 301, 302 is associated with a fragment value, called a fragment triple 310,
312. For example, in FIG. 3, fragment triple 310 is associated with fragment 302,
and fragment triple 312 with fragment 301.
[0032] Fragment values are called fragment triples because each fragment triple 310, 312
includes three values: a color value 304, a Z-depth value 306, and a stencil value
308. The color value 304 represents the color and opacity of the corresponding fragment.
The Z-depth value 306 represents a Z-coordinate value of the corresponding fragment
along a Z-axis that is perpendicular to the image 132 to provide 3D depth. The stencil
value 308 can be used to group or identify sets of fragments of the image 132, or
to logically or arithmetically process or count operations upon fragments, or for
other purposes known to those skilled in the art.
[0033] In the preferred embodiment, the exemplary fragment triples 310, 312 each use five
bytes to represent the color 304, three bytes for the Z-depth 306 and one byte for
the stencil 308. The five color 304 bytes accommodate four 10-bit color channels:
Red, Green, Blue, and Alpha.
[0034] The color of a fragment is expressed by the combination of the values stored in the
Red, Green and Blue (RGB) channels. The value stored in each RGB channel indicates
the intensity (or brightness) of that color channel. Low values correspond to low
intensity, dark colors; high values correspond to high intensity, light colors. Various
methods for producing the color by combining the RGB values are well known in the
art.
[0035] The opacity of the fragment is expressed by the value stored in the Alpha channel.
For example, a 1.0 value (i.e., all 10 Alpha-channel bits are 1) indicates that the
associated fragment is opaque, a 0.0 value indicates that the fragment is invisible,
i.e., completely transparent, and values between 0.0 and 1.0 indicate degrees of transparency.
[0036] Memory is allocated to each pixel 134 for storing a predetermined number of fragment
triples. This memory can be either graphics memory 122, as shown in FIG. 3, or main
memory 106. In the example shown in FIG. 3, the pixel memory 314 is allocated for
one particular pixel 300. Conceivably, a group of pixels, like a 2 x 2 array of pixels
134, can share a particular pixel memory 314. Any fragment triples stored in the pixel
memory 314 would be used by each pixel 134 in the group, rather than by only one particular
pixel 300. This can save more memory than storing a predetermined number of fragments
for every pixel 134, particularly for portions of the image 132 that change color
and Z-depth gradually.
[0037] Alternatively, memory for storing fragment triples can be dynamically allocated to
each pixel 134 rather than fixed to a predetermined number. Here, a variable number
of fragment triples can be stored for each pixel 134, the graphics accelerator 108
allocating memory to the pixel 134 as needed, presuming there is still available pixel
memory in the system 100. Another method combines aspects of both above-described
methods, allocating memory to each pixel 134 for storing a predetermined number of
fragment triples, and dynamically allocating additional memory to a particular pixel
134 when needed to store a fragment triple beyond the predetermined number.
[0038] The exemplary embodiment shown in FIG. 3 stores two fragment triples 310, 312 in
the pixel memory 314, These fragment triples 310, 312 are associated with the fragments
301, 302 that cover the pixel 300. Before the fragments 301, 302 appear in the pixel
300, the pixel memory 314 can be initialized to contain a default fragment value.
The default value represents a background fragment that can be used when no fragments
cover a particular subpixel sample or when all fragments that cover the particular
subpixel sample are transparent. Alternatively, this default fragment value can be
stored in the graphics memory 122 where the value can be shared by multiple pixels
134. Each pixel 134 could store a special index value that pointed to the default
fragment.
[0039] Other embodiments can store more than two triples in order to improve the quality
of the antialiasing. Storing few triples saves memory, but can produce lesser quality
antialiasing than storing many triples. For instance, it is observed that for the
8 x 8 subpixel array 202 and the sampling pattern 220 (N=8), storing three triples
produces better antialiasing results than storing two triples.
[0040] Pointers 320-326 link the subpixel samples S1-S4 to the associated fragment triples
310, 312 stored in the pixel memory 314. By link, what is meant is a logical association
between the subpixel samples S1-S4 and the fragment triples 310, 312. As examples,
pointer 326 links subpixel S1 to fragment triple 312, while pointers 320-324 link
subpixels S2-S4 to fragment triple 310.
[0041] In one embodiment, described further in connection with FIG. 6A, the linking is accomplished
by storing an index value for each subpixel sample S1-S4. Accordingly, this embodiment
is coined indexed sparse supersampling. In another embodiment, described in connection
with FIG. 6C, the linking is accomplished by storing a coverage mask, or bit pattern,
for each stored fragment value. This embodiment is hereafter referred to as an improved
A-buffer technique. Collectively, the embodiments are referred to as improved supersampling
techniques.
[0042] To determine the color of the exemplary pixel 300, the graphics accelerator 108 uses
one of the pixel subdivisions 200, 202, 204 and a sampling pattern 210, 220, 230 to
sample the portion of the image 132 covering the pixel 300. For example in FIG. 3,
the graphics accelerator 108 uses the 4 x 4 array 200 with the N = 4 sampling pattern
210 to sample pixel 300. As shown, the fragment 301 covers subpixel sample S1, and
the fragment 302 covers the three subpixels samples S2-S4. A fragment covers a subpixel
when the center of the subpixel sample is within an area enclosed by the fragment
or, in certain cases, on an edge of the fragment.
[0043] Generally, the graphics accelerator 108 determines which fragments 301, 302 are visible
at each subpixel sample S1-S4. From the perspective of a viewer of the image 132,
which, for the purposes of illustrating the invention is 3D, some fragments can be
closer to the viewer and in front of other fragments. The closer fragments are referred
to as foreground fragments and the farther fragments, as background fragments. An
opaque foreground fragment can occlude a background fragment behind that foreground
fragment.
[0044] Accordingly, each fragment must pass a Z-depth test at one of the subpixel samples
S1-S4, that is, the Z-value 306 of the fragment triple associated with that fragment
must be smaller, i.e., closer from the perspective of the viewer, than the Z-value
306 for every other opaque fragment. If a fragment passes the Z-depth test, then the
graphics accelerator 108 stores the fragment triple associated with the visible fragment
in the pixel memory 314.
[0045] When the fragment 301, for example, is determined to be visible at the subpixel sample
S1 of the pixel 300, the pointer 326 is generated linking that subpixel S1 to the
appropriate stored fragment triple 312. In the preferred embodiment, the pointer 326
is stored in the pixel memory 314 along with the fragment triples 310, 312 associated
with the pixel 300.
[0046] Rather than storing four fragment triples in the pixel memory 314, one for each of
the four subpixel samples S1-S4, which would be done using typical supersampling techniques,
the exemplary embodiment in FIG. 3 stores only two fragment triples 310, 312. Accordingly,
it is possible to avoid storing redundant data for the pixel 300 because only one
instance of the fragment triple 310 is stored for the three subpixel samples S2-S4.
By so doing, the storage requirements for fragment triples are considerably reduced.
[0047] For example, if each fragment triple 310, 312 requires nine bytes of storage, then
the improved supersampling techniques use approximately eighteen bytes of memory per
pixel fewer than typical supersampling methods. The improved supersampling techniques
do use additional memory for storing the pointers 320-326, but this amount is small
when compared to the memory saved by storing only two fragment triples 310, 312 for
the four subpixel samples S1-S4.
[0048] The memory savings increase when the pixel 300 is subdivided into one of the larger
subpixel arrays 202, 204. With the 8 x 8 subpixel array 202 and the sampling pattern
220 (N equals 8), the improved supersampling techniques use fifty-four fewer bytes
per pixel than typical supersampling. This is because only two of eight sampled fragment
triples are stored in the pixel memory 314. For the 16 x 16 subpixel array 204 and
the sampling pattern 230 (N equals 16), only two of sixteen sampled fragment triples
are stored in the pixel memory 314, and so 112 bytes per pixel are saved. For a display
screen 130 with 1920 x 1200 pixels, such savings amount to approximately 258 Mbytes.
[0049] The displayed color of the pixel 300 depends upon which filtering function is used
to combine the fragment triples associated with the four subpixel samples S1-S4. One
function is simply to average the colors of the fragment triples associated with the
four subpixels samples S1-S4.
[0050] FIG. 4 illustrates an exemplary case in which a third visible fragment 400 appears
in the pixel 300 of FIG. 3. As indicated by an arrow 402, the third fragment 400 is
linked to a new fragment triple 410. The new fragment triple 410 is different from
the stored fragment triples 310, 312.
[0051] In this example, the third fragment 400 occludes a portion of fragment 302 and is
visible at subpixel sample S4. The fragment 301 is still visible at the subpixel S1,
as is fragment 302 at the subpixels S2-S3. Accordingly, the subpixel sample S1 remains
linked to the fragment triple 312 by the pointer 326. Subpixels S2 and S3 remain linked
to the fragment triple 310 by the pointer 324 and pointer 322, respectively. To illustrate
that the fragment 302 is no longer visible at the subpixel sample S4, the link 320
from the subpixel sample S4 to the fragment triple 310 is shown as broken.
[0052] When the third fragment 400 is processed by the graphics accelerator 108, the fragment
triples 310, 312 are already stored in the pixel memory 314, and the fragment triple
410 is shown as not yet being stored in the pixel memory 314. Described below are
various ways to handle the third fragment triple 410.
[0053] FIG. 5A shows one technique for handling the third visible fragment 400 in the pixel
300, that is, to store the corresponding fragment triple 410 in the pixel memory 314,
along with the other fragment triples 310, 312. This technique presumes either that
the memory 314 allocated for the predetermined number of fragment triples can accommodate
the additional fragment triple 410 or that the memory 314 needed for storing the new
fragment triple 410 can be dynamically allocated.
[0054] A drawback to storing additional fragment triples in the pixel memory 314 is that
the amount of storage needed for the improved supersampling methods approaches or
even exceeds that of typical sparse supersampling. Should a fourth fragment be visible
in the pixel 300, then, in the example of the 4 x 4 subpixel array, the improved supersampling
methods and sparse supersampling would each store four fragment triples. But for the
larger subpixels arrays, such as the 8 x 8 array and 16 x 16 array, there is still
a strong likelihood that there are fewer visible fragments in the pixel 300 than subpixel
samples, and thus a corresponding savings of memory remains. Further, when pixel memory
314 is dynamically allocated beyond the predetermined number of fragment triples,
in general, relatively few pixels will need dynamically allocated storage. Although
improved supersampling methods might then require more storage for a given pixel 134
than typical sparse supersampling, the improved methods might use less storage for
the entire image 132 overall.
ADAPTIVE PROCESS
[0055] Alternatively, an adaptive process can reduce the number of subpixel samples at which
to sample the pixel 300 when the number of visible fragments in the pixel 300 exceeds
the available storage for fragment triples, such as when the pixel memory 314 allocated
for the predetermined number of fragment triples is already filled, or no pixel memory
is available to dynamically allocate for the new fragment triple 410.
[0056] For example, if there is storage for only two fragment triples, but there are four
different visible fragments in the pixel 300, a different fragment for each of the
four subpixel samples S1-S4, then backing off to only two subpixel samples will ensure
sufficient storage for the fragments covering those two samples.
[0057] The backing off on the number of samples can be gradual. For example, if eight subpixel
samples S1-S8 are used, then the process could start with eight samples, reduce to
six, then four, and eventually to two, as the number of different visible fragments
appear in the pixel beyond the available storage.
[0058] The process can operate independently upon each pixel. For example, the process may
use all four subpixel samples S1-S4 for one pixel, and back off to only two subpixel
samples S1-S2 for another pixel.
[0059] FIG. 5B illustrates still another approach for handling the third visible fragment
400 in the pixel 300, that is, to blend the corresponding fragment triple 410 with
the other fragment triples 310, 312 stored in the pixel memory 314. The circled plus
signs ("+") in FIG. 5B illustrate the blending process.
[0060] An exemplary blending process weights the color contribution of each fragment triple
310, 312 and the new fragment triple 410 to the blended fragment triple 530, 532.
[0061] For example, the color contribution of each stored fragment triple 310, 312 is determined
by multiplying the color value 304 of that fragment triple by the number of samples
still covered by that fragment triple; then by dividing the result by the number of
samples S1-S4 previously covered by that fragment triple before the new fragment 400
appeared. The color contribution of the new fragment triple 410 is obtained by multiplying
the color value 304 of the new fragment triple 410 by the number of samples covered
by the stored fragment triple, but now covered by the new fragment 400; then by dividing
the result by the number of samples S1-S4 previously covered by the stored fragment
triple 310, 312 before the new fragment 400 appeared.
[0062] Here, the fragment triple 310 would contribute 2/3 of its color value 304 to the
blended fragment triple 530, and the new fragment triple 410 would contribute 1/3
of its color value 304. For the blended fragment triple 532, the fragment triple 312
contribute all of its color value (1/1), and the new fragment triple 410, which covers
no sample points associated with the fragment triple 312, would contribute none of
its color value (0/1). Then, these weighted color values 304 are added. Other color
blending techniques that are known in the art can be used.
[0063] In FIG. 5B, the fragment triple 410 is blended with fragment triple 310 to produce
a blended fragment triple 530, and the pointers 322, 324 linking subpixels S2-S3 to
the fragment triple 310 now point to the blended fragment triple 530. Also, fragment
triple 410 is blended with fragment triple 312 to produce a blended fragment triple
532, and the pointer 326 linking subpixel S1 to fragment triple 312 now points to
the blended fragment triple 532. Subpixel S4 is linked to the blended fragment triple
530. Alternatively, the subpixel S4 can be linked to the other fragment triple 532.
[0064] The blended fragment triples 530, 532 are stored in the pixel memory 314. The blended
fragment triple 530 occupies the memory addresses previously occupied by the fragment
triple 310. The addresses of pixel memory 314 that previously stored the fragment
triple 312, now stores the blended fragment triple 532.
[0065] According to the present invention, FIG. 5C shows an exemplary approach for accommodating
the third visible fragment 400 in the pixel 300. This approach replaces one of the
fragment triples 310, 312 previously stored in the pixel memory 314 with the third
fragment triple 410. For example, the fragment triple 310 is replaced by the new fragment
triple 410. To execute this replacement the graphics accelerator 108 would write the
data of the new fragment triple 410 over the data of the previously stored fragment
triple 310, in effect, discarding the data of fragment triple 310. Alternatively,
memory can be deallocated for the fragment triple 310, and allocated for fragment
triple 410.
[0066] In FIG. 5C, the data of the new fragment triple 410 occupies the particular addresses
of pixel memory 314 that previously stored the fragment triple 310. The pointers 322,
324 point to these particular addresses of pixel memory. Where previously the pointers
322, 324 linked the subpixels S2-S3 to the fragment triple 310, these pointers 322,
324 now link the subpixels S2-S3 to the new fragment triple 410.
[0067] Techniques for selecting which fragment triples 310, 312, or 410 is discarded are
described below.
Selection Schemes:
Z-priority
[0068] In accordance with the present invention one technique for selecting the fragment
triple 310, 312 to replace, called the Z-priority method, is to determine which fragment
triple 310, 312 stored in the pixel memory 314 has the largest Z-depth value 306.
From the perspective of a viewer, the greater the Z-depth value 306, the farther is
the corresponding fragment from the viewer. For example, if the Z-depth value 306
of the fragment triple 310 is 4 and the Z-depth value 306 of the fragment triple 312
is 2, then fragment triple 310 is replaced by the new fragment triple 410. The pointers
322-324 that previously linked subpixel samples S2-S3 to the fragment triple 310 now
link the subpixel samples to the fragment triple 410. In the event that more than
one stored fragment triple 310, 312 has the largest Z-depth value 306, the fragment
triple 310, 312 with the fewer pointers 320-326 can be replaced.
Basic Color Difference
[0069] Another technique according to the present invention, for selecting which fragment
triple 310, 312 to replace, called the basic color difference method, involves determining
which fragment triple 310, 312 stored in the pixel memory 314 has a color value 304
that is most like the color value 304 of the new fragment triple 410 i.e., produces
the smallest color difference. The color value 304 of the new fragment triple 410
is compared with the color value 304 of each stored fragment triple 310, 312. Although
described below using the RGB color model, this method can be applied to other color
models, such as the Hue, Lightness and Saturation (HLS) and the Hue, Saturation and
Value (HSV) color models.
[0070] More specifically, the basic color difference method compares the 10-bit value for
the RED channel of the new fragment triple 410 with the 10-bit value for the RED channel
of each stored fragment triple 310, 312. Comparisons are also made for the GREEN and
BLUE channels. Values in the Alpha channels are not compared.
[0071] The absolute values of the differences between the values of the channels of the
new fragment triple 410 and the values of the channels of the stored fragment triples
310, 312 are summed. Then, the sum is multiplied by the number of subpixel samples
that point to the stored fragment triple 310, 312. This produces a total color difference
that would result if that stored fragment triple 310, 312 were replaced by the new
fragment triple 410. The fragment triple 310, 312 that produces the smaller color
difference is replaced by the new fragment triple 410.
[0072] Using an overly simplified example with reference to FIG. 5C, the fragment triple
310 has a RED value of 0, GREEN value of 2, and a BLUE value of 4; the fragment triple
312 has a RED value of 2, a GREEN value of 4, and a BLUE value of 0; and the new fragment
triple 410 has a RED value of 0, a GREEN value of 3, and a BLUE value of 3. Also,
as shown in FIG. 5C, there are two subpixels pointing to the fragment triple 310 --
when the new fragment 400 is determined to be visible at sample point S4, the pointer
320 (see FIG. 3) from S4 to fragment triple 310 is invalidated -- and one subpixel
pointing to the fragment triple 312.
[0073] The total color difference between fragment triple 310 and new fragment triple 410
is 4, e.g., ( |0-0| + |2-3| + |4-3| ) * 2, and the total color difference between
fragment triple 312 and new fragment triple 410 is 6, e.g., ( |2-0| + |4-3| + |0-3|)
* 1. Thus, the fragment triple 310 is therefore replaced.
Color Difference and Transparent Fragments
[0074] When transparent fragments are involved in color difference, the impact of each possible
replacement upon the final pixel color is compared to the ideal final pixel color
that would result if the new fragment triple 410 could be stored in the pixel memory
314. That stored fragment triple 310, 312, which produces a final pixel color with
the smallest color difference when compared to the ideal final pixel color, is selected
for replacement. In a stack of transparent fragments, this selection tends to replace
the more distant transparent fragments that are hard to see.
N-Squared Color Difference
[0075] In addition to comparing the new fragment triple 410 with each stored fragment triple
310, 312, as is done in the color difference method, the N-squared color difference
method compares each stored fragment triple 310, 312 against each other. This method
either replaces one of the stored fragment triples 310 with the new fragment triple
410, or replaces one of the stored fragment triples 310, 312 with another of the stored
fragment triples 310, 312, i.e., by changing the pointers from the one stored fragment
triple to that other stored fragment triple. The new fragment triple 410 is written
at the addresses of pixel memory where the replaced fragment triple was previously
stored. The N-squared color difference does not appear to perform significantly better
than the color difference process.
Visual Sensitivity Color Difference Methods
[0076] Other techniques that may yield satisfactory results rely on the characteristics
of the human visual system. For example, the ability of a human eye to distinguish
changes in brightness may be less than the ability to perceive changes in hue. Accordingly,
an exemplary visual sensitivity replacement scheme can capitalize on this characteristic
by replacing the fragment triple 310, 312 that is brighter or dimmer than the new
fragment triple 410 instead of the fragment triple 310, 312 that has a different hue.
Such a method would prefer to replace the stored fragment triple 310, 312 with a color
value 304 that differs equally, or almost equally, in each of the RGB color channels
from the color value 304 of the new fragment triple 410.
[0077] Another exemplary technique can rely on the logarithmic behavior of luminance perception
in humans. In general, a human eye can detect, approximately, a 2% change in the brightness
of a color. Consequently, large numerical differences between high color values 304
(i.e., colors of high intensity) can be less noticeable than small numerical differences
between low color values (i.e., colors of low intensity). So luminance differences
are computed as ratios of color values 304, rather than as numerical differences between
color values. The fragment triple 310, 312 that produces the lower luminance differences,
i.e., the smaller ratio of colors, when compared to the new fragment triple 410 is
replaced.
Z-priority Color Difference
[0078] For background information, this technique combines the Z-priority method with any
of the above mentioned color difference methods to produce a replacement scheme that
can perform better than any of the methods alone. The above-described color difference
methods operate to replace a stored fragment triple with the new fragment triple.
The Z-priority Color Difference method considers additionally whether one of the stored
fragment triples 310, 312 should instead replace the new fragment triple 410.
[0079] Here, the method computes color differences between the new fragment triple 410 and
each stored fragment triple 310, 312 that may replace the new fragment triple 410.
These color differences are computed for each of those stored fragment triples that
are in front of the new fragment, i.e., lower Z-depth value, but not for those stored
fragment triples that are behind the new fragment.
[0080] Accordingly, a stored fragment triple 310, 312 may be selected to replace the new
fragment triple 410 when that fragment triple 310, 312 produces the smallest color
difference and that fragment triple 310, 312 is associated with a fragment that is
in front of the new fragment. In this case, replacement means that each subpixel sample
covered by the new fragment are linked to the selected stored fragment triple 310,
312 and the new fragment triple 410 is discarded.
[0081] In general, if more than one replacement is possible, then the replacement affecting
the fewer number of subpixel samples should occur. For example, if either the new
fragment triple or a stored foreground fragment triple can be replaced, then the stored
fragment triple replaces the new fragment triple if the stored foreground triple covers
more subpixel samples than the new fragment triple.
Area Coverage
[0082] Another effective process according to the present invention selects the fragment
triple that is visible at the fewest number of subpixel samples, and replaces that
fragment triple with the new fragment triple 410. Afterwards, each pointer to the
replaced fragment triple points to the new fragment triple.
Semaphore Process
[0083] The Z-priority Color Difference method allows existing foreground fragments to replace
new background fragments, but does not allow existing background fragments to replace
new foreground fragments. This is done to avoid losing large foreground surfaces that
are made up of small foreground fragments - the large surface could be lost if the
process allowed each of the small foreground fragments to be replaced by a larger
background fragment. The Semaphore Process also avoids this problem.
[0084] The Semaphore Process associates a semaphore bit with each pixel. Initially, each
semaphore bit is set to 0. If it is determined that replacing a new foreground fragment
with an existing background fragment produces a smallest color difference, and the
associated semaphore bit is 0, then the semaphore process allows the existing background
fragment to replace the new foreground fragment. The associated semaphore bit is set
to 1. This ensures that two such replacements cannot occur consecutively. If the replaced
new foreground fragment was part of a larger foreground surface, then the next new
foreground fragment for that larger surface will replace the existing background fragment
because the semaphore bit is a 1. However, it was observed that this basic semaphore
process can produce some unsatisfactory artifacts.
Fragment Centroid Distance Methods
[0085] For background information such methods base color replacement on the distance between
the new fragment and each possible fragment that the new fragment can replace. Accordingly,
a new fragment can be extended to cover adjacent subpixel samples rather than replace
stored fragments that cover distant subpixel samples. Further, it is likely that subpixel
samples near the covered subpixel samples will later become covered.
[0086] Figs. 6A and 6B illustrate a logical representation of the pixel memory 314 used
by the indexed sparse supersampling technique. The pixel memory 314 includes indices
600 and fragment triples 310, 312. The pixel memory 314 provides storage for a predetermined
number of fragment triples. Although shown to be contiguous in the graphics memory
122, the indices 600 can be separate from each other or from the fragment triples
310, 312.
[0087] The indices 600 indicate where in the pixel memory 314 the fragment triple associated
with each subpixel sample can be found. Each index 602-608 of the indices 600 is associated
with one of the subpixel samples S1-S4. For example, as shown in FIG. 6B, index 602
is associated with subpixel sample S1, index 604 is associated with subpixel sample
S2, and so forth. For the sampling pattern 220, there are eight indices for the eight
subpixel samples S1-S8, and for sampling pattern 230, where N = 16, there are sixteen.
[0088] The value stored in each index 602-608 points to one of the fragment triples 310,
312. Accordingly, each index 602-608 links the associated subpixel sample S1-S4 to
one of the fragment triples 310, 312.
[0089] When two fragment triples 310, 312 are stored in the pixel memory 314, then each
index 602-608 can be represented by one data bit. The bit value stored in each index
602-608 directs the graphics accelerator 108 to the fragment triple 310, 312 associated
with each subpixel sample S1-S4. In the example shown in FIG. 6B, a "1" is stored
in index 602, and a "0" in each of the other indices 604-608. A zero bit value points
to the first fragment triple 310 in the pixel memory 314, and a one bit value points
to the second fragment triple 312.
[0090] If, alternatively, there are three fragment triples stored in the pixel memory 314,
then two bits per index 602-608 are needed. Two bits per index 602-608 can accommodate
as many as four stored fragment triples, three bits, as many as eight triples, and
four bits, as many as sixteen.
[0091] With one bit per index 602-608, the sampling pattern 210 (N=4) needs four bits of
pixel memory 314 to implement the indices 600. The storage requirements for indices
600 of larger sampling patterns 220, 230 is also small. For example, the sampling
pattern 230 (N = 16) would need 16 bits per pixel 134 to implement one bit per index.
Implementing four bits per index uses 64 bits per pixel, which still provides a sizable
storage savings over typical sparse supersampling techniques that store sixteen fragment
triples for the sixteen subpixels samples S1-S16.
[0092] To compute a color for the pixel 300, the color value 304 of each stored fragment
triple 310, 312 is multiplied by the percentage of subpixel samples linked by an index
to that fragment triple. Then these weighted color values are added together to produce
the pixel color.
[0093] Figs. 6C and 6D illustrate an exemplary logical representation of the pixel memory
314 used by the improved A-buffer technique. The pixel memory 314 includes coverage
masks (or bit patterns) 620, 622 and stored fragment triples 310, 312. The pixel memory
314 provides storage for a predetermined number of fragment triples. Although shown
to be contiguous in the graphics memory 122, the coverage masks 620, 622 can be separate
from each other or from the fragment triples 310, 312. An alternative embodiment,
including a third coverage mask 624 and the third stored fragment triple 410, is illustrated
in Figs. 6C and 6D with dashed lines.
[0094] The coverage masks 620, 622 link the subpixel samples S1-S4 to the fragment triples
310, 312 stored in the pixel memory 314. There is one coverage mask 620, 622 associated
with each stored fragment triple 310, 312. Referring to FIG. 6D, the coverage mask
620 is associated with fragment triple 310, for example, as indicated by arrow 621,
and the coverage mask 622 is associated with fragment triple 312 as indicated by arrow
623. In the illustrated alternative embodiment, the coverage mask 624 is associated
with the third fragment triple 410 by arrow 625.
[0095] Each coverage mask 620, 622, 624 includes one bit for each subpixel sample S1-S4.
In FIG. 6D, the associations between the bits in the coverage masks and the subpixel
samples S1-S4 are represented by arrows 634-640. For example, subpixel sample S1 is
associated with bits 626, subpixel sample S2 with bits 628, sample S3 with bits 630
and sample S4 with bits 632.
[0096] With one bit per sample S1-S4, the sampling pattern 210 (N=4) needs four bits 626,
628, 630, 632 of pixel memory 314 to implement each coverage mask 620, 622, 624. In
the shown alternative embodiment, in which three fragment triples are stored, the
combined requirement for the three associated coverage masks 620, 622, 624 is twelve
bits.
[0097] For the sampling pattern 220, each coverage mask 620, 622, 624 requires eight bits,
one for each of the eight subpixel samples S1-S8. As for the sampling pattern 230,
which has sixteen subpixel samples S1-S16, there would be sixteen such bits in each
coverage mask. Yet even with 16 bits per coverage mask, the storage savings are sizable
over known sparse supersampling techniques that store sixteen fragment triples for
the sixteen subpixels samples S1-S16.
[0098] The value stored in each bit of a given coverage mask indicates whether the subpixel
sample associated with that bit is linked to the fragment triple associated with the
given coverage mask. When a sample is linked to a fragment triple, this means that
the fragment associated with that fragment triple is visible at that sample.
[0099] In the example shown in FIG. 6D, a bit pattern "0 1 1 1" is stored in the coverage
mask 620. The "1" value in bits 628, 630 and 632 of the coverage mask 620 link the
subpixel samples S2-S4 to the stored fragment triple 310, indicating that the fragment
302 is visible at those sample points S2-S4. Conversely, the "0" value in bit 626
of the coverage mask 620 indicates that the fragment 302 is not visible at the subpixel
sample S1. Clearly, the role of each bit value can be reversed so that the "1" bit
value indicates that the fragment is not visible at a given sample point, and that
the "0" bit value indicates that the fragment is visible.
[0100] In the alternative embodiment shown in FIG. 6D, a third coverage mask 624 links the
subpixel sample S4 to the third fragment triple 410 stored in the pixel memory 314.
The association between the third coverage mask 624 and the third fragment triple
410 is noted by arrow 625.
[0101] The exemplary bit pattern stored in coverage mask 624 is "0 0 0 1", indicating that
the third fragment 400 is visible at sample S4 only. Recall from FIG. 4 that new fragment
400 is linked to the fragment triple 410. For the purposes of the following illustration
example, the third fragment 400 is treated as transparent. (Note that if the third
fragment 400 was opaque, as described in connection with FIG. 4, then the bit pattern
in the coverage mask 620 would change from "0 1 1 1" to "0 1 1 0" to indicate that
the fragment 400 occluded the fragment 302 at the subpixel sample S4.)
[0102] Because the third fragment 400 is transparent, two coverage masks 620, 624 link the
subpixel sample S4 to two stored fragment triples 310, 410. The "1" bit values in
bit positions 632 of the coverage mask 620 and 624 indicate that both fragments 302
and 400 are visible at the subpixel sample S4. Generally, any subpixel sample S1-S4
can be linked to multiple stored fragment triples, where one fragment is opaque and
each other fragment is transparent. In fact, all of stored fragment values can be
transparent when a default background fragment value is used.
[0103] Accordingly, the improved A-buffer technique described herein can support order-independent
transparency, i.e., the system 100 does not need to partition primitives of the image
132 so as to present transparent fragments to the graphics accelerator 108 after presenting
all opaque fragments, nor does the system 100 need to sort the transparent primitives
so as to present transparent fragments in Z-depth order.
[0104] To compute the color of the pixel 300, a color is first computed for each subpixel
sample S1-S4, and then the computed colors are combined. Where a subpixel sample is
linked to one opaque fragment only, such as sample S1, the color for that subpixel
sample S1 is the color of the associated stored fragment value 312.
[0105] Where a subpixel sample, such as sample S4, is linked to two stored fragment triples
310, 410, one transparent 400 and the other opaque 302, the color for the subpixel
sample S4 is the sum of the color contributions of those two fragment triples 310,
410. The color contribution of the transparent fragment 400 is the opacity of that
fragment 400, as indicated by the value stored in the Alpha channel, multiplied by
the color of that fragment 400. The contribution C of the opaque fragment 302 is the
color of that fragment f(c) 302 multiplied by 1 minus the opacity of the transparent
fragment f(o). 400, e.g., C = f(c) x (1 - f(o)).
[0106] The exemplary embodiments shown in Figs. 6A-6D can achieve satisfactory antialiasing
results by storing two fragment triples for four subpixel samples. Eight subpixel
samples with two stored fragment triples usually looks better than four subpixel samples
with two fragment triples, but can look worse when one of the additional four subpixel
samples requires replacing one of the stored triples with a third fragment triple,
and that third fragment triple appears in the pixel memory last. Thus, allocating
storage for a third fragment triple can make a marked improvement for eight subpixel
samples over storing two fragment triples.
[0107] Clearly, the antialiasing results can be made to approach the results of typical
sparse supersampling as more fragment triples are stored, but each additional triple
erodes the memory savings provided by the improved supersampling techniques.
[0108] Fig. 7 illustrates a flow diagram 700 describing the process of generating an image
132 using the present invention. In the early stages of processing the image 132,
the image 132 is partitioned into fragments. When processing each new fragment, the
graphics accelerator 108 determines whether the new fragment is visible at any of
the subpixel samples S1-S4 covered by the new fragment. The graphics accelerator 108
compares the Z-depth value of the new fragment with the Z-depth value of the stored
fragment associated with each covered subpixel sample S1-S4 (step 702).
[0109] If the new fragment has a smaller Z-depth value than the Z-depth value of a stored
fragment for any covered subpixel sample S1-S4, then the new fragment is in front
of that stored fragment and, consequently, is visible. An exception, however, is when
the new fragment has an Alpha value of 0.0. In this instance the new fragment is completely
transparent. The graphics accelerator 108 does not need to store the fragment value
of the new fragment because the new fragment is, in effect, invisible.
[0110] If instead the new fragment has a larger Z-depth value than the Z-depths values for
all of the covered subpixel samples S1-S4, then the new fragment is behind one or
more stored fragments and may be invisible. If the new fragment is behind opaque foreground
fragments, then the new fragment is invisible, and the processing of the new fragment
for the pixel 134 is complete. If, however, the new fragment is immediately behind
a transparent foreground fragment, then the new fragment can still be seen.
[0111] When the new fragment is visible at one of the covered subpixel samples, then the
graphics accelerator 108 invalidates the link between each covered sample and a stored
fragment, if the new fragment obscures the stored fragment for that covered subpixel
sample. For the indexed sparse supersampling technique, the graphics accelerator 108
maintains control bits for keeping track of the validity of each index and invalidates
each index linking a covered subpixel sample to an obscured fragment. The control
bits may direct the graphics accelerator 108 to use the default background color if
no fragments cover a subpixel sample. For the improved A-buffer technique, the bits
in the coverage mask associated with each covered subpixel sample are unchanged when
the new fragment is transparent and are set to "0" when the new fragment is opaque.
[0112] Then, in step 708, the number of links pointing to each fragment triple is counted.
For the indexed sparse supersampling technique, step 708 counts the number of indices
linked to that stored fragment triple. For the improved A-buffer technique, step 708
counts the number of bits in each coverage mask that have a "1" bit value.
[0113] A fragment triple is free and available when there are no links pointing to the fragment
triple. In this case a new fragment triple associated with the new fragment can replace
that free fragment triple.
[0114] If step 710 determines that a fragment triple is free, then the new color associated
with the new fragment is stored in the freed fragment triple (step 712). In step 714,
the links of the subpixel samples covered by the new fragment are set to the new fragment
triple.
[0115] If step 710 determines that no fragment triples are free, then a replacement scheme,
such as the color difference technique described above, selects one of the stored
fragment triples for replacement (step 716). Replacement means changing the color,
Z-depth, and stencil values stored in the selected fragment triple to the color, Z-depth,
and stencil values of the new fragment triple.
[0116] In step 718, the new color is written to the selected fragment triple. The links
originally pointing to the selected fragment triple are still pointing to that fragment
triple. Because the selected fragment triple now contains a value representing the
new color, the subpixel samples associated with such links are thereby associated
with the new color. Those links corresponding to the subpixel samples covered by the
new fragment are set to point to the new color (step 714).
[0117] In step 720, the pixel color is computed from the subpixel samples as described above
in connection with Figs. 6A-6D. The links associated with the subpixel samples S1-S4
point to the stored colors that are used to produce the color of the pixel 134. Accordingly,
the pixel color can change as each new fragment appears in the pixel 134.
[0118] When, in step 722, the graphics accelerator 108 is through processing all fragments,
then the pixels are ready for display (step 724).
[0119] In FIG. 7, an alternative process for generating an image computes the color of the
pixel in step 720', illustrated as dashed lines, before determining whether there
are any fragment triples available in which to store the new fragment value associated
with the new fragment. The existing colors stored in the fragment triples and the
new color value combine to produce the pixel color. The effect is to compute the color
as though an additional triple was available.
[0120] After computing the pixel color in step 720', the alternative process may then replace
an existing stored color with the new fragment triple as described above in connection
with the steps 716-718. If each fragment processed after this new fragment does not
lead to a new computation of the pixel color, then no color data is lost despite the
replacement.
[0121] It is to be understood that the above-described embodiments are simply illustrative
of the principles of the invention.
[0122] The scope of the invention is limited by the appended claims only.
1. Computergrafisches Verfahren zum Erzeugen einer Farbe eines Bildpunktes (300) eines
Bildes (132) einer gerenderten Szene, wobei der Bildpunkt mehreren Fragmenten (301,
302) zugewiesen ist, von denen jedes durch Anhängen einer grafischen Grundform an
die Grenzen des Bildpunktes (300) bestimmt wird, wobei das Verfahren folgende Schritte
umfasst:
Speichern bis zu einer vorgegebenen Anzahl von Fragmentwerten (310, 312) für den Bildpunkt
(300), wobei jeder gespeicherte Fragmentwert (310, 312) einem Fragment (302, 301)
zugewiesen ist, das in dem Bildpunkt (300) sichtbar ist;
Bestimmen eines neuen Fragmentwertes (410) eines neuen Fragments (400), das in dem
Bildpunkt (300) sichtbar ist, wobei wenigstens ein weiteres Fragment mit einem gespeicherten
Fragmentwert immer noch in dem Bildpunkt sichtbar ist, nachdem das neue Fragment (400)
bestimmt wurde;
Auswählen eines der Fragmente, die immer noch in dem Bildpunkt (300) sichtbar sind;
und
Ersetzen des gespeicherten Fragmentwertes des ausgewählten Fragments durch den neuen
Fragmentwert (410), und wobei die gespeicherten Fragmentwerte anschließend zum Erzeugen
der Farbe des Bildpunktes (300) verwendet werden.
2. Verfahren nach Anspruch 1, wobei der Schritt des Ersetzens das Überschreiben des gespeicherten
Fragmentwertes des ausgewählten Fragments mit dem neuen Fragmentwert (410) beinhaltet.
3. Verfahren nach Anspruch 1, wobei das neue Fragment (400) Teil einer anderen Fläche
des Bildes (132) ist als jedes der Fragmente (301, 302), die einem gespeicherten Fragmentwert
zugewiesen sind.
4. Verfahren nach Anspruch 1, wobei jeder gespeicherte Fragmentwert (310, 312) einen
Z-Tiefenwert (306) enthält und wobei der Schritt des Auswählens den gespeicherten
Fragmentwert (310, 312) mit einem Z-Tiefenwert (306) auswählt, der größer ist als
der Z-Tiefenwert (306) jedes anderen gespeicherten Fragmentwertes.
5. Verfahren nach Anspruch 1, wobei jeder Fragmentwert (310, 312) einen Farbwert (304)
enthält, und wobei das Verfahren des Weiteren den Schritt des Vergleichens des Farbwertes
des neuen Fragmentwertes (410) mit dem Farbwert (304) jedes gespeicherten Fragmentwertes
(310, 312) umfasst, und wobei der Schritt des Auswählens den gespeicherten Fragmentwert
(310, 312) mit dem Farbwert (304) auswählt, der eine numerisch kleinere Farbdifferenz
erbringt als der Farbwert jedes anderen gespeicherten Fragmentwertes, wenn er mit
dem Farbwert des neuen Fragmentwertes (410) verglichen wird.
6. Verfahren nach Anspruch 5, wobei der Farbwert (304) jedes Fragmentwertes (310, 312,
410) mehrere Farbkanalwerte enthält und wobei der Schritt des Vergleichens Folgendes
beinhaltet:
Bestimmen einer Farbdifferenz zwischen dem Farbwert des neuen Fragmentwertes (410)
und dem Farbwert (304) eines bestimmten der gespeicherten Fragmentwerte (310, 312)
durch:
Berechnen, für jeden Farbkanalwert, einer absoluten Wertdifferenz zwischen jedem Farbkanalwert
des neuen Farbwertes und einem entsprechenden Farbkanalwert des Farbwertes eines bestimmten
gespeicherten Fragmentwertes;
Summieren der absoluten Wertdifferenzen, die für jeden Farbkanalwert berechnet wurden,
des Weiteren umfassend den folgenden Schritt:
Multiplizieren der Summe der absoluten Wertdifferenzen mit einer Fläche des Bildpunktes
(300), die von dem Fragment bedeckt wird, das dem bestimmten gespeicherten Fragmentwert
zugewiesen ist.
7. Verfahren nach Anspruch 5, wobei der Schritt des Vergleichens das Vergleichen des
Farbwertes (304) jedes gespeicherten Fragmentwertes (310, 312) mit dem Farbwert jedes
anderen gespeicherten Fragmentwertes enthält und wobei der Schritt des Auswählens
den gespeicherten Fragmentwert (310, 312) mit dem Farbwert (304) auswählt, der eine
numerisch kleinste Farbdifferenz erbringt, wenn er mit dem Farbwert des neuen Fragmentwertes
(410) und mit dem Farbwert jedes anderen gespeicherten Fragmentwertes verglichen wird.
8. Verfahren nach Anspruch 1, wobei der Schritt des Auswählens einen gespeicherten Fragmentwert
(310, 312) auswählt, der, wenn er durch den neuen Fragmentwert (410) ersetzt werden
würde, eine visuell weniger erkennbare Farbdifferenz entstehen lassen würde, als sie
für jeden anderen gespeicherten Fragmentwert entstände, wenn dieser andere gespeicherte
Fragmentwert durch den neuen Fragmentwert (410) ersetzt werden würde.
9. Verfahren nach Anspruch 1, das des Weiteren folgende Schritte umfasst:
Bestimmen einer Fläche des Bildpunktes (300), die von jedem Fragment (301, 302) bedeckt
wird, für die das Fragment sichtbar ist; und
wobei der Schritt des Auswählens den Fragmentwert des Fragments mit einer kleineren
Fläche sichtbarer Überdeckung als jedes andere Fragment auswählt.
10. Verfahren nach Anspruch 1, das des Weiteren folgende Schritte umfasst:
Zuordnen eines Zeichenträger-Bits zu dem Bildpunkt (300);
Setzen des Zeichenträger-Bits auf einen vorgegebenen Wert; und
wobei der Schritt des Ersetzens den gespeicherten Fragmentwert (310, 312) durch den
neuen Fragmentwert (410) ersetzt, wenn das Zeichenträger-Bit auf den vorgegebenen
Wert gesetzt wird; und
Setzen des Zeichenträger-Bits auf einen zweiten vorgegebenen Wert, wenn der gespeicherte
Fragmentwert (310, 312) zum Ersetzen ausgewählt wird.
11. Computergrafikvorrichtung (100), die dafür geeignet ist, eine Farbe eines Bildpunktes
(300) eines Bildes (132) einer gerenderten Szene zu erzeugen, wobei der Bildpunkt
(300) mehreren Fragmenten (301, 302) zugewiesen ist, die durch Anhängen einer grafischen
Grundform an die Grenzen des Bildpunktes (300) bestimmt werden, wobei die Vorrichtung
Folgendes umfasst:
Mittel (106) zum Speichern bis zu einer vorgegebenen Anzahl von Fragmentwerten für
den Bildpunkt (300), wobei jeder gespeicherte Fragmentwert (310, 312) einem Fragment
(302, 301) zugewiesen ist, das in dem Bildpunkt (300) sichtbar ist;
Mittel (102) zum Bestimmen eines neuen Fragmentwertes (410) eines neuen Fragments
(400), das in dem Bildpunkt (300) sichtbar ist, wobei wenigstens ein weiteres Fragment
mit einem gespeicherten Fragmentwert immer noch in dem Bildpunkt sichtbar ist, nachdem
das neue Fragment (400) bestimmt wurde;
Mittel (102) zum Auswählen eines der Fragmente, die immer noch in dem Bildpunkt (300)
sichtbar sind; und
Mittel (102) zum Ersetzen des gespeicherten Fragmentwertes (310, 312) des ausgewählten
Fragments durch den neuen Fragmentwert (410), und wobei die gespeicherten Fragmentwerte
anschließend zum Erzeugen der Farbe des Bildpunktes (300) verwendet werden.