System and method for path rendering with multiple stencil samples per color sample
First Claim
1. A method for rendering an image sample associated with a geometric primitive, the method comprising:
- selecting the image sample for rendering based on the image sample being at least partially covered by the geometric primitive;
performing a stencil test on each stencil sample covered by the geometric primitive included in a plurality of stencil samples associated with the image sample to generate a set of stencil test results, wherein each stencil test result comprises a Boolean value of either pass or fail;
based on the set of stencil test results, calculating a coverage percentage that indicates how much of the image sample is covered by the geometric primitive object;
computing, via a processing unit, a color value based on a color shading operation associated with the geometric primitive; and
computing a modulated color value for the image sample based on the color value and the coverage percentage.
1 Assignment
0 Petitions
Accused Products
Abstract
One embodiment of the present invention sets forth a technique for improving path rendering on computer systems by efficiently representing and computing sub-pixel coverage for path objects. A stencil buffer is configured to store multiple stencil samples per pixel stored in an image buffer. The stencil samples undergo stencil testing to produce a set of Boolean values per pixel, which collectively define a geometric coverage percentage for the pixel. The coverage percentage is used to modulate a color value for the pixel. The modulated color value is then blended into the image buffer as an anti-aliased pixel. This technique advantageously enables efficient anti-aliasing for path rendering.
44 Citations
24 Claims
-
1. A method for rendering an image sample associated with a geometric primitive, the method comprising:
-
selecting the image sample for rendering based on the image sample being at least partially covered by the geometric primitive; performing a stencil test on each stencil sample covered by the geometric primitive included in a plurality of stencil samples associated with the image sample to generate a set of stencil test results, wherein each stencil test result comprises a Boolean value of either pass or fail; based on the set of stencil test results, calculating a coverage percentage that indicates how much of the image sample is covered by the geometric primitive object; computing, via a processing unit, a color value based on a color shading operation associated with the geometric primitive; and computing a modulated color value for the image sample based on the color value and the coverage percentage. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A non-transitory computer-readable storage medium including instructions that, when executed by a processing unit, cause the processing unit to render an image associated with a path object, by performing the steps of:
-
selecting the image sample for rendering based on the image sample being at least partially covered by the geometric primitive; performing a stencil test on each stencil sample covered by the geometric primitive included in a plurality of stencil samples associated with the image sample to generate a set of stencil test results, wherein each stencil test result comprises a Boolean value of either pass or fail; based on the set of stencil test results, calculating a coverage percentage that indicates how much of the image sample is covered by the geometric primitive object; computing a color value based on a color shading operation associated with the geometric primitive; and computing a modulated color value for the image sample based on the color value and the coverage percentage. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A computing device, comprising:
-
a memory system; a processing unit coupled to the memory system and configured to; select a image sample for rendering based on the image sample being at least partially covered by a geometric primitive; perform a stencil test on each stencil sample covered by the geometric primitive included in a plurality of stencil samples associated with the image sample to generate a set of stencil test results, wherein each stencil test result comprises a Boolean value of either pass or fail; based on the set of stencil test results, calculating a coverage percentage that indicates how much of the image sample is covered by the geometric primitive; compute a color value based on a color shading operation associated with the geometric primitive; compute a modulated color value for the image sample based on the color value and the coverage percentage; and blend the modulated color value with a previously stored color value and storing a resulting blended color value into the image buffer, wherein the stencil samples are stored in a stencil buffer, and wherein the stencil buffer and the image buffer reside in the memory system. - View Dependent Claims (24)
-
Specification