-Pixel texel alignment        
Print

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0-9


Pixel_texel_alignment.png
D3D pixels different from D3D9 texels in that pixels have whole values at the centers, but texels have whole values at the corners. Therefore, if you do any 2D rendering that needs 1:1 pixel-texel alignment, you need to subtract 0.5 pixels from the pixel position or add 0.5 to the texel position (of course, if your texture values are in [0..1] range, you'll need to divide 0.5 by width and/or height). This is not an issue under OpenGL because both OpenGL pixels *and* texels have whole values at the centers, so no alignment is necessary.


A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0-9


 


Contributors to this page: jacmoe111451 points  and OgreWikiBot .
Page last modified on Friday 08 of January, 2010 00:18:29 GMT by jacmoe111451 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.