Tristam MacDonald wrote:
On Wed, Mar 24, 2010 at 7:21 PM, Gary Herron
<[email protected] <mailto:[email protected]>> wrote:
Jonathan Hartley wrote:
I'm wondering whether it's possible to compensate for
non-square pixels.
In a normal square-pixel situation, the viewport's height/width
ratio should equal the frustum's height/width ratio. In
non-square-pixel situations, those two ratios will differ.
You would need to evaluate the resulting image however - when I
experimented with this, the net result was a lot of quality loss.
Because the stretched resolutions are stretched post-rendering, you
end up with a fair amount of blurring on edges. Rearranging your
projection matrix to compensate for non-square pixels is likely to
move all your edges off of pixel boundaries, which will cause more
aliasing all on its own, and the two together can yield a truly
horrible result.
If you have significant post-process effects (i.e bloom), or enough
motion in the scene, the user probably won't notice.
--
Tristam MacDonald
http://swiftcoder.wordpress.com/
All those points are valid, but really have nothing to do with square
versus non-square pixels. Rather they are just a consequence of mapping
continuous objects into discrete pixels. ANY mapping into pixels
suffers many such aliasing effects and could benefit from various
anti-aliasing techniques. If pixels are non-square, then the resolution
in one direction is lower than the other and the aliasing effect will be
more prominent in that direction. But that's a consequence of low
resolution (along either one or both axes) not pixel shape.
A subtle point: Saying the resolution is "stretched" in one direction
over another is really just showing our bias toward square pixels. The
hardware and OpenGL has no such bias. The renderer maps the given range
of world coordinates into the given range of pixels -- and does so
independently along the two axes -- while making no assumptions about
the eventual shape of the displayed pixels. Any stretching of shrinking
is just a figment of your imagination/interpretation.
Gary Herron
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en.