-Pixel texel alignment        

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