Aspect ratio adjustment shader
- Talley Rand
- Topic Author
Please Log in or Create an account to join the conversation.
github.com/Fubaxiusz/fubax-shaders/blob/...aders/AspectRatio.fx
Tell me if it works fine for you

Please Log in or Create an account to join the conversation.
- marmamowl
It's a pretty easy fix, just letting you know it's there.AspectRatio.fx(35,17-30): error X4502: invalid ps_5_0 input semantic 'SV_POISITION'

By the way, is it possible to make the shader a bit more exact? Finding the value to perfectly convert 16:9 to 4:3 for example is just a lot of guesswork and the end result may not be perfect. Maybe inputs for current aspect ratio and target aspect ratio would work? Thanks.

Please Log in or Create an account to join the conversation.

Making exact shader is possible, but there is already dedicated feature for that in graphics card control panel Adjust desktop size and position, where you can set up if the game should be stretched, have black bars or be clipped if proportions don't match monitor native.
This shader is more for hiding black bars, e.g. Mirrors Edge creates black bars to 16:9 that are painted, so GPU settings don't affect that.
Tell me if it works, or you really want exact values.
Please Log in or Create an account to join the conversation.
- lowenz
On NVidia GPUs "No scaling" works well with NO GPU forcing (display only scaling) if the height of the frame matches the monitor native one (4:3 -> 1440x1080, 16:10 -> 1728x1080 on a 1920x1080 panel)
Please Log in or Create an account to join the conversation.
- Talley Rand
- Topic Author
Fu-Bama wrote: I made shader for that. You can download it by right-clicking on "Raw" button and "Save target as".
github.com/Fubaxiusz/fubax-shaders/blob/...aders/AspectRatio.fx
Tell me if it works fine for you
Thank you so much! This is exactly what i was looking for. Fine ratio adjustment with the feature to zoom in. I've tested it with a couple of 3d and 2d games and it worked flawlessly so far.
Please Log in or Create an account to join the conversation.
- SiegWharheit
Please Log in or Create an account to join the conversation.
- Chester_Copperpot
Please Log in or Create an account to join the conversation.