aspect ratios / displays / resolutions etc.
category: general [glöplog]
the vpos register, used on ps3.0 to give you the current pixel on screen.
for example "float2 ScreenPosition : VPOS;"
in opengl its called something else, WPOS maybe?
for example "float2 ScreenPosition : VPOS;"
in opengl its called something else, WPOS maybe?
kb_: sorry for the confusion, i hadn't read your message before i posted that. i agree there's probably no 100% solution for this issue, unfortunately :/
smash: ok thnx.
neils: hey, at least i didnt say "rtfm." :)
i'm just beeee-hind on my hands-on rendering-of-today stuff. thanks to shitty consoles like gcn and wii.
Quote:
i'm just beeee-hind on my hands-on rendering-of-today stuff. thanks to shitty consoles like gcn and wii.
Hehe, well I've almost finished a game now with a ps3.0 renderer and often I can't help but think 'oh man, I could probably do this in tev stages'. Except of course that writing HLSL (actually CG in my case) code takes MUCH less time, and it's easier :)
ravity, actually when I did the Wii version of our engine, I inadvertently ended up with what is an almost complete shader compiler backend (that outputs those things you've mentioned, among other... things ;). It'd be fun to write an HLSL parser frontend for that to translate 1.1 pixel shaders directly, but luckily I haven't had the time yet ;)
and speaking of consoles and aspect ratios: The notion of non-square pixel modes seems very unknown to many programmers... "huh? how can a 640x480 screen be 16:9?" *sigh*
On the issue of not being able to know the /real/ aspect of the screen, all modern monitors do expose the dimensions via DDC or whatever. Most operating systems use this to set the DPI value, but I guess Windows still just randomly picks 96DPI ;)
Example:
$ xdpyinfo | grep dimensions
dimensions: 1152x864 pixels (363x272 millimeters)
(DisplayHeight/WidthMM() in Xlib)
There must be a way to query this info in Windows...?
So in your auto-config magic, as long as you pick a resolution that has the same aspect as we know the monitor has (to avoid it stretching or squashing), you *should* be able to get it right in all circumstances...
Example:
$ xdpyinfo | grep dimensions
dimensions: 1152x864 pixels (363x272 millimeters)
(DisplayHeight/WidthMM() in Xlib)
There must be a way to query this info in Windows...?
So in your auto-config magic, as long as you pick a resolution that has the same aspect as we know the monitor has (to avoid it stretching or squashing), you *should* be able to get it right in all circumstances...
nagato: Wrong. Read again what I've written. You still don't know if the GPU or display are scaling the image and how. You can change the scaling modes at least with NVIDIA cards, and I also know of many monitors able to change the scaling settings - and those aren't transmitted to the PC via DDC/EDID. You're completely ouf of luck.
the only solution i can see is to somehow check registry entries whether the driver will keep or discard the aspect ratio :/
I said, "as long as you pick a resolution that has the same aspect as we know the monitor has".
Only a reeeeally braindead monitor would squish an image that had the /same/ aspect as the panel.
Or, I guess one that has been instructed to do so by the user ('cinema mode' on some TVs...), but then they deserve all they get ;)
Of course, I've never tried to implement aspect scaling based on this in an app people actually *use*. Perhaps there are monitors that lie about their physical dimensions. I was just throwing it out there since no one had mentioned that particular data yet.
Only a reeeeally braindead monitor would squish an image that had the /same/ aspect as the panel.
Or, I guess one that has been instructed to do so by the user ('cinema mode' on some TVs...), but then they deserve all they get ;)
Of course, I've never tried to implement aspect scaling based on this in an app people actually *use*. Perhaps there are monitors that lie about their physical dimensions. I was just throwing it out there since no one had mentioned that particular data yet.
Gargaj that's a hell another story. As far as I know it's not specified which specific keys in the registry should be set to what values with which format. In fact these values might change from driver to driver and I'm almost certain that OEMs that provide drivers for their lovely laptops will just ignore the spec and push a lot differently formatted values if they even do it that is. On the other hand, some users might not have access to the registry, even for reading which is yet another story. So I guess gambling for the aspect ratio is saner.
tevstages are no laughing matter rav :)
they're some kind of sadomasochism
i liked it. for a bit.
they're some kind of sadomasochism
i liked it. for a bit.