Skip to main content
History: -Pixel texel alignment
View published page
Source of version: 4
(current)
{INCLUDE(page="ogrelex ext tpl")/} --- {img src="img/wiki_up/Pixel_texel_alignment.png" alt="Pixel_texel_alignment.png" imalign="right"} 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. --- {INCLUDE(page="ogrelex ext tpl")/} ---
Search by Tags
Search Wiki by Freetags
Latest Changes
Projects using OGRE
Building Your Projects With CMake
Compiled API Reference
Overlay Editor
Introduction - JaJDoo Shader Guide - Basics
RT Shader System
RapidXML Dotscene Loader
One Function Ogre
One Function Ogre
...more
Search
Find
Online Users
152 online users
OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username
Password
CapsLock is on.
Remember me (for 1 year)
Log in