Method and apparatus for compositing colors of images with memory constraints for storing pixel data
First Claim
1. A computerized method for determining a color of a pixel of an image, the pixel being associated with a set of subpixel samples, the set of subpixel samples having a plurality of subpixel samples, the set of subpixel samples having a number of subpixel samples, comprising:
- storing a plurality of distinct fragment values for the pixel up to a predetermined maximum number of distinct fragment values, each stored fragment value being associated with at least one subpixel sample, each stored fragment value being associated with a fragment that is visible in the pixel, the predetermined maximum number of fragment values being less than the number of subpixel samples;
determining 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 new fragment having a new fragment value;
selecting one of the visible stored fragment values; and
replacing the selected fragment value with the new fragment value wherein the stored fragment values are subsequently used to generate the color of the pixel.
3 Assignments
0 Petitions
Accused Products
Abstract
A method and an apparatus determine a color for pixels in a graphics system in which images are defined by pixels. Multiple fragments of an image may be visible in any given pixel. Each visible fragment has a fragment value that includes the color of that fragment. For such given pixel, up to a predetermined number of the fragment values are stored. When a new fragment is visible in the given pixel, one of the fragment values is discarded to determine which fragment values are stored and subsequently used to generate the color of the pixel. The discarded fragment value may be the new fragment value or one of the stored fragment values. Various strategies can be used to determine which fragment value is discarded. One such scheme selects the stored fragment value with the greatest Z-depth. Another scheme selects the stored fragment value that produces the smallest color difference from the new fragment value. Still another scheme selects the new fragment value when one of the fragments is in front of the new fragment and the stored fragment value of that fragment produces the smallest color difference from the new fragment value.
-
Citations
29 Claims
-
1. A computerized method for determining a color of a pixel of an image, the pixel being associated with a set of subpixel samples, the set of subpixel samples having a plurality of subpixel samples, the set of subpixel samples having a number of subpixel samples, comprising:
-
storing a plurality of distinct fragment values for the pixel up to a predetermined maximum number of distinct fragment values, each stored fragment value being associated with at least one subpixel sample, each stored fragment value being associated with a fragment that is visible in the pixel, the predetermined maximum number of fragment values being less than the number of subpixel samples;
determining 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 new fragment having a new fragment value;
selecting one of the visible stored fragment values; and
replacing the selected fragment value with the new fragment value wherein the stored fragment values are subsequently used to generate the color of the pixel. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
generating the color of the pixel using the new fragment value and each stored fragment value before replacing the fragment value of a stored visible fragment.
-
-
6. The method of claim 1 wherein each stored fragment value includes a Z-depth value, and
the selecting selects the stored fragment value with the Z-depth value that is larger than the Z-depth value of each other stored fragment value; - and
the replacing replaces the selected stored fragment value with the new fragment value.
- and
-
7. The method of claim 1 wherein
the selecting selects the stored fragment value that, if replaced by the new fragment value, would produce a less visually detectable color difference than would be produced for each other stored fragment value if that other stored fragment value were replaced by the new fragment value; - and
the replacing replaces the selected stored fragment value with the new fragment value.
- and
-
8. The method of claim 1 further comprising:
-
determining an area of the pixel covered by each fragment for which that fragment is visible;
wherein the selecting selects the fragment value of the fragment with a smaller area of visible coverage than each other fragment.
-
-
9. The method of claim 1 wherein
the selecting selects the stored fragment value of the fragment that is spatially closer to the new fragment than each other fragment; - and
the replacing replaces the selected stored fragment value with the new fragment value.
- and
-
10. The method of claim 1, wherein at least one of the fragments that are visible in the pixel is transparent.
-
11. The method of claim 1, wherein each fragment value includes a color value, and further comprising:
comparing the color value of the new fragment value with the color value of each stored fragment value, wherein the selecting selects the one stored fragment based on a result from the comparing.
-
12. The method of claim 11 wherein each fragment value includes a Z-depth value, and wherein
the selecting selects the new fragment value when one of the stored fragment values has a lower Z-depth value than the Z-depth value of the new fragment value and the color value of that stored fragment value produces a numerically smaller color difference when compared to the color value of the new fragment value than each other color difference between two fragment values; - and
the replacing replaces the new fragment value with that stored fragment value.
- and
-
13. The method of claim 11, wherein the color value include color channels,
the comparing determines total color differences between the new fragment value and the stored fragment values, each total color difference being determined by summing a color difference for each color channel of the new fragment value and one of the stored fragment values to generate a sum, and multiplying the sum by the number of subpixel samples associated with the stored fragment to generate the total color difference, the selecting selects the stored fragment value with the color value that produces a numerically smaller total color difference than other total color differences; - and
replacing the selected stored fragment value with the new fragment value.
- and
-
14. The method of claim 11 wherein the comparing includes comparing the color value of each stored fragment value with the color value of each other stored fragment value, and the selecting selects the one stored fragment based on a result from the comparing.
-
15. The method of claim 14, wherein the color value includes color channels,
the comparing determines total color differences between the new fragment value and the stored fragment values, each total color difference being determined by summing a color difference for each color channel of the new fragment value and one of the stored fragment values to generate a sum, and multiplying the sum by the number of subpixel samples associated with the stored fragment to generate the total color difference, the selecting selects the stored fragment value with the color value that produces a numerically smallest total color difference than the other total color differences. -
16. The method of claim 15 wherein
the replacing replaces the selected stored fragment value with the new fragment value.
-
17. A computerized method for determining a color of a pixel of an image, comprising:
-
storing up to a predetermined number of fragment values, each stored fragment value being associated with a fragment that is visible in the pixel, each fragment value including a color value, wherein the color value of each fragment value includes a plurality of color channel values;
determining 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 new fragment having a new fragment value;
comparing the color value of the new fragment value with the color value of each stored fragment value including;
determining a color difference between the color value of the new fragment value and the color value of a particular one of the stored fragment values by;
computing, for each channel value, an absolute value difference between each color channel value of the new color value and a corresponding color channel value of the color value of particular stored fragment value; and
summing the absolute value differences computed for each color channel value; and
selecting 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; and
replacing the selected fragment value with the new fragment value to determine which fragment values are stored and subsequently used to generate the color of the pixel. - View Dependent Claims (18)
multiplying the sum of the absolute value differences by an area of the pixel covered by the fragment associated with the particular stored fragment value.
-
-
19. A computerized method for determining a color of a pixel of an image, comprising:
-
storing up to a predetermined number of fragment values, each stored fragment value being associated with a fragment that is visible in the pixel;
determining 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 new fragment having a new fragment value;
associating a semaphore bit with the pixel;
initially setting the semaphore bit to a predetermined value;
selecting the new fragment value when the semaphore bit is set to the predetermined value, the color value of a particular stored fragment value produces a numerically smaller color difference when compared to the color value of the new fragment value than each other color difference between two fragment values, and the new fragment value has a Z-depth value that is less than or equal to a Z-depth value of the particular stored fragment value;
discarding the selected fragment value to determine which fragment values are stored and subsequently used to generate the color of the pixel; and
setting the semaphore bit to a second predetermined value when the new fragment value is selected. - View Dependent Claims (20)
selecting one of the stored fragments when the semaphore bit is set to the second predetermined value, the color value of that stored fragment value produces a numerically smaller color difference when compared to the color value of a subsequent new fragment value than each other color difference between two fragment values, and the subsequent new fragment value has a Z-depth value that is less than or equal to a Z-depth value of that stored fragment value; and
replacing the selected stored fragment value with the new fragment value.
-
-
21. A computerized method for determining a color of a pixel of an image, the pixel being associated with a set of subpixel samples, the set of subpixel samples having a plurality of subpixel samples, the set of subpixel samples having a number of subpixel samples, comprising:
-
associating a set of fragment values with the pixel, each fragment value in the set corresponding to a fragment that is visible when the pixel is rendered, each fragment value in the set of fragment values being distinct, the set of fragment values having up to a predetermined maximum number of distinct fragment values, each fragment value being associated with at least one subpixel sample, each fragment value being visible in the pixel, the predetermined maximum number of fragment values being less than the number of subpixel samples;
storing the set of the associated fragment values; and
using the fragment values of the set to generate the color of the pixel.
-
-
22. An apparatus for determining a color of a pixel, the pixel being associated with a set of subpixel samples, the set of subpixel samples having a plurality of subpixel samples, the set of subpixel samples having a number of subpixel samples, comprising:
-
means for storing a plurality of distinct fragment values for the pixel up to a predetermined maximum number of distinct fragment values, each stored fragment value being associated with at least one subpixel sample, each stored fragment value being associated with a fragment of an image that is visible in the pixel, the predetermined maximum number of fragment values being less than the number of subpixel samples;
means for determining 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 new fragment having a new fragment value;
means for selecting one of the visible stored fragment values; and
means for replacing the selected fragment value with the new fragment value wherein the stored fragment values are subsequently used to generate the color of the pixel.
-
-
23. An apparatus for determining a color of a pixel, the pixel being associated with a set of subpixel samples, the set of subpixel samples having a plurality of subpixel samples, the set of subpixel samples having a number of subpixel samples, comprising:
-
memory storing a plurality of distinct fragment values for the pixel up to a predetermined number of distinct fragment values for the pixel, each stored fragment value being associated with at least one subpixel sample, each stored fragment value being associated with a fragment of an image that is visible in the pixel, the predetermined maximum number of fragment values being less than the number of subpixel samples; and
a graphics device coupled to the memory, the graphics device determining 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 new fragment having a new fragment value, the graphics device selecting one of the visible stored fragment values;
the graphics device replacing the selected fragment value with the new fragment value wherein the stored fragment values are subsequently used to generate the color of the pixel.- View Dependent Claims (24, 25)
the comparing determines total color differences between the new fragment value and the stored fragment values by summing a color difference for each color channel of the new fragment value and one of the stored fragment values to generate a sum, and multiplying the sum by the number of subpixel samples associated with the stored fragment to generate the total color difference, and the graphics device compares the total color differences between the new fragment value and each stored fragment value, wherein the graphics device selects one of the stored fragment values based on the comparison of the total color differences.
-
-
26. An apparatus for determining a color of a pixel, comprising:
-
a memory storing up to a predetermined number of fragment values, each stored fragment value being associated with a fragment that is visible in the pixel, each fragment value including a color value, wherein the color value of each fragment value includes a plurality of color channel values; and
a graphics device, coupled to the memory, that;
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 new fragment having a new fragment value;
compares the color value of the new fragment value with the color value of each stored fragment value including;
determining a color difference between the color value of the new fragment value and the color value of a particular one of the stored fragment values by;
computing, for each channel value, an absolute value difference between each color channel value of the new color value and a corresponding color channel value of the color value of particular stored fragment value; and
summing the absolute value differences computed for each color channel value; and
selects 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; and
replaces the fragment value of one of the visible fragments to determine which fragment values are stored and subsequently used to generate the color of the pixel by replacing the selected stored fragment value with the new fragment value. - View Dependent Claims (27)
-
-
28. An apparatus for determining a color of a pixel, comprising:
-
a memory that stores up to a predetermined number of fragment values, each stored fragment value being associated with a fragment that is visible in the pixel; and
a graphics device, coupled to the memory, that;
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 new fragment having a new fragment value;
associates a semaphore bit with the pixel;
initially sets the semaphore bit to a predetermined value;
selects a new fragment value when the semaphore bit is set to the predetermined value, the color value of a particular stored fragment value produces a numerically smaller color difference when compared to the color value of the new fragment value than each other color difference between two fragment values, and the new fragment value has a Z-depth value of the particular stored fragment value;
discards the selected fragment value to determine which fragment values are stored and subsequently used to generate the color of the pixel; and
sets the semaphore bit to a second predetermined value. - View Dependent Claims (29)
wherein the graphics device replaces the selected stored fragment value with the subsequent new fragment value.
-
Specification