Page 1 of 1
View too tall when mouselooking in OpenGL
Posted: Fri Nov 26, 2010 23:31
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.
Re: View too tall when mouselooking in OpenGL
Posted: Sat Nov 27, 2010 21:05
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.
Re: View too tall when mouselooking in OpenGL
Posted: Sat Nov 27, 2010 22:07
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.
Re: View too tall when mouselooking in OpenGL
Posted: Sun Apr 05, 2015 8:58
by Graf Zahl
got fixed in the mean time.