21.06.2014 Views

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

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.10. TEXTURING 330<br />

When seamless cube map filtering is disabled, the new ( s t ) is used to find a<br />

texture value in the determined face’s two-dimensional image using the rules given<br />

in sections 3.10.11 through 3.10.12.<br />

When seamless cube map filtering is enabled, the rules for texel selection in<br />

sections 3.10.11 through 3.10.12 are modified so that texture wrap modes are ignored.<br />

Instead,<br />

• If NEAREST filtering is done within a miplevel, always apply wrap mode<br />

CLAMP_TO_EDGE.<br />

• If LINEAR filtering is done within a miplevel, always apply wrap mode<br />

CLAMP_TO_BORDER. Then,<br />

– If a texture sample location would lie in the texture border in either u<br />

or v, instead select the corresponding texel from the appropriate neighboring<br />

face.<br />

– If a texture sample location would lie in the texture border in both u<br />

and v (in one of the corners of the cube), there is no unique neighboring<br />

face from which to extract one texel. The recommended method to<br />

generate this texel is to average the values of the three available samples.<br />

However, implementations are free to construct this fourth texel<br />

in another way, so long as, when the three available samples have the<br />

same value, this texel also has that value.<br />

The required state is one bit indicating whether seamless cube map filtering is<br />

enabled or disabled. Initially, it is disabled.<br />

3.10.11 Texture Minification<br />

Applying a texture to a primitive implies a mapping from texture image space to<br />

framebuffer image space. In general, this mapping involves a reconstruction of<br />

the sampled texture image, followed by a homogeneous warping implied by the<br />

mapping to framebuffer space, then a filtering, followed finally by a resampling<br />

of the filtered, warped, reconstructed image before applying it to a fragment. In<br />

the GL this mapping is approximated by one of two simple filtering schemes. One<br />

of these schemes is selected based on whether the mapping from texture space to<br />

framebuffer space is deemed to magnify or minify the texture image.<br />

<strong>OpenGL</strong> <strong>4.2</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>April</strong> <strong>27</strong>, <strong>2012</strong>

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

Saved successfully!

Ooh no, something went wrong!