google-code-export / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

default orthogonal projection not aligned with viewport resolution #535

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Orthogonal projection is off by half a pixel resulting in a little bit blury 
look when using bilinear filtering and wrong rendering when using point 
filtering.

A patch is attached, see the attached images for a 1x1 raster rendered with the 
original projection and with the fixed projection on a Radeon 6970.

This will have a different effect on different graphic cards. Basically when a 
line is rendered at 0,0 to 0,10 it renders the line at the left side of the 
left borders pixel. Some graphic cards rasterize "correctly" (in my test a 
nVidia card) and some "wrong" (eg Amd Radeon 6970. Correctly and wrong is not 
really right here because it is a precision problem becaus the rasterized 
samples lie exactly between two pixels and nVidia seems to keep on the same 
side over the hole image while Amd does not.

Original issue reported on code.google.com by ar...@gmx.com on 16 Sep 2011 at 10:57

Attachments: