21.06.2014 Views

OpenGL 4.1 (Compatibility Profile) - July 25, 2010

OpenGL 4.1 (Compatibility Profile) - July 25, 2010

OpenGL 4.1 (Compatibility Profile) - July 25, 2010

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.3. ANTIALIASING 205<br />

these b bits based on the fragment’s coverage value: the bits are set to zero for no<br />

coverage and to all ones for complete coverage.<br />

The details of how antialiased fragment coverage values are computed are difficult<br />

to specify in general. The reason is that high-quality antialiasing may take<br />

into account perceptual issues as well as characteristics of the monitor on which<br />

the contents of the framebuffer are displayed. Such details cannot be addressed<br />

within the scope of this document. Further, the coverage value computed for a<br />

fragment of some primitive may depend on the primitive’s relationship to a number<br />

of grid squares neighboring the one corresponding to the fragment, and not just<br />

on the fragment’s grid square. Another consideration is that accurate calculation<br />

of coverage values may be computationally expensive; consequently we allow a<br />

given GL implementation to approximate true coverage values by using a fast but<br />

not entirely accurate coverage computation.<br />

In light of these considerations, we chose to specify the behavior of exact antialiasing<br />

in the prototypical case that each displayed pixel is a perfect square of<br />

uniform intensity. The square is called a fragment square and has lower left corner<br />

(x, y) and upper right corner (x+1, y +1). We recognize that this simple box filter<br />

may not produce the most favorable antialiasing results, but it provides a simple,<br />

well-defined model.<br />

A GL implementation may use other methods to perform antialiasing, subject<br />

to the following conditions:<br />

1. If f 1 and f 2 are two fragments, and the portion of f 1 covered by some primitive<br />

is a subset of the corresponding portion of f 2 covered by the primitive,<br />

then the coverage computed for f 1 must be less than or equal to that computed<br />

for f 2 .<br />

2. The coverage computation for a fragment f must be local: it may depend<br />

only on f’s relationship to the boundary of the primitive being rasterized. It<br />

may not depend on f’s x and y coordinates.<br />

Another property that is desirable, but not required, is:<br />

3. The sum of the coverage values for all fragments produced by rasterizing a<br />

particular primitive must be constant, independent of any rigid motions in<br />

window coordinates, as long as none of those fragments lies along window<br />

edges.<br />

In some implementations, varying degrees of antialiasing quality may be obtained<br />

by providing GL hints (section 5.8), allowing a user to make an image quality<br />

versus speed tradeoff.<br />

<strong>OpenGL</strong> <strong>4.1</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>July</strong> <strong>25</strong>, <strong>2010</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!