View too tall when mouselooking in OpenGL

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
Sodahollic
Posts: 1
Joined: Fri Nov 26, 2010 23:12

View too tall when mouselooking in OpenGL

Post by Sodahollic »

When you mouselook in gl, the view is not correctly scaled. Specifically, no matter what the view pitch is the renderer always stretches the view vertically by 1.2, and while this looks correct in software (and in gl when looking straight forward). The z in the world needs to be stretched, not the height of the rendered screen. This effect can be seen when looking all the way down, the flat graphic is taller, and when rotating, it looks distorted.
Last edited by Sodahollic on Thu May 03, 2012 21:01, edited 1 time in total.
User avatar
NeuralStunner
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Re: View too tall when mouselooking in OpenGL

Post by NeuralStunner »

1.2 vertical scaling is not defined anywhere. The equivalent of a 320x200 view (16:10) is scaled to fit into any aspect ratio used.

I think the most you would need is an option to disable the "stretch to fit" behavior in 4:3, if that's possible. I don't think this should change permanently.
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: View too tall when mouselooking in OpenGL

Post by Graf Zahl »

That's precisely what he's reporting. The aspect ratio stretching is currently done in the projection matrix but that's the wrong place. It needs to be in the modelview matrix as the last transformation being added.

This still won't be a quick fix though. The math is a bit tricky to get right.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: View too tall when mouselooking in OpenGL

Post by Graf Zahl »

got fixed in the mean time.
Locked

Return to “Closed Bugs”