-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about forcing an aspect ratio that isn't the same as the current resolution #11738
Comments
Look into Display Layout Editor stretching options, if I recall it had a weird almost 4:3 stretching for BlackBerry devices in the past. It could possibly also support custom stretching, through it doesn't as cases like yours are extremely rare/weird and only ruin the quality. Just to note you could as well just stretch the image with a custom postprocess shader. Edit: Actually I was overthinking. Just using normal stretching instead of automatic scaling(in display layout editor) should be enough in what you want. Stretching to fill 16:9 display does slightly deform PSP resolution which isn't exactly 16:9, but this is soo minimal it's only a concern of pixel perfect quality, not really giving a noticeable deformation for aspect ratio and quality in your case is already ruined by abusing modern display outside of it's native res&ratio. |
Yeah, stretching to display should do it. But what kind of monitors are you using that still don't support native 16:9 resolutions? Some strange widescreen arcade monitors? |
Thank you both! I'll test this and close if I'm able to get it working. Sounds promising. |
So I'm trying to get the display layout editor to work but the interface doesn't seem to be working correctly. I can set the scale and orientation but selecting move or resize does nothing and the selection cursor seems to disappear often. I'll try a newer commit than I'm on, maybe it was a bug that got fixed. But just in case, can sometime give me a quick tutorial on how the specific settings in the INI file work? |
Move and resize change what you do with touch/mouse cursor when interacting with the screen visualization(grayish rectangle). What you were told to do through doesn't involve neither moving or resizing, you simply have to swith "Options" from default "auto scaling" to "stretching". This screen was made for touch/mouse input and can't be fully utilized by keyboard/gamepad only. The selection doesn't really disappear, it's just that pressing direction buttons can cycle through noninteractive parts of the interface since again it was made for touch or mouse input only. |
That is greatly informative. Thanks! I'll try with a mouse tomorrow. And I did change the setting to stretch but it didn't seem to fix the aspect ratio. I essentially need to resulting image to have black bars on both the left and the right of the display, causing the stretched resolution to "unstretch", and setting it to stretch adds black borders on top and bottom, seemingly skewing the image further. Again, the problem is not with the software, it's with the monitor. I'm trying to make the software accommodate for it by displaying a 533x600 image on a screen resolution of 800x600.
|
Will continue messing with it, but so far have not yet been successful. Using the mouse and clicking/dragging was the missing element to using the display layout editor, so thank you greatly for that. Thus far we haven't been able to figure out how to change the resulting aspect ratio to be "thinner". |
literally spent hours trying different things... here's what I learned...
So let me ask again, please, is there a way to stretch the screen's height and width separately at different scales to result in a non-standard aspect ratio? And if so, can you PLEASE provide some tips on how to set this in the INI file rather than using the screen? |
Thanks @hrydgard for the screenshot. I can definitely see that screen, but I cannot interact with the box at all to actually change it's shape/size. Can you please provide some guidance on the settings in the INI file so that I can try to adjust this manually without the screen? |
As said above there's no way to edit the aspect ratio / width and height separately neither on that screen or ini files. The only way you can do that without building your own, customized ppsspp version is to use post process shader to resize the screen for you in a way you desire, ie a shader like this:
Or similar, I wrote that quickly based on basic fxaa. Display Layout Screen was made when people were requesting integer zoom and ability to place smaller window into any place on the screen they wanted(ie to not be obscured by on screen touch controls which btw uses pretty much same interface and is also not possible to use via gamepad. That screen is neither useless nor bad, it simply was never made for what you want and if the stretching doesn't do the job on your system, it's probably some platform specific issue since stretching should fill the display and it does so as planned when setting modern 16:9 display into 800x600 resolution and launching ppsspp under Windows 10. |
Ignore the square, just by setting it to "Stretching" it should be ok, right? If not, try to tweak the settings in the .ini file, memstick/PSP/SYSTEM/ppsspp.ini |
@LunaMoo - thanks for the reply!! I am sorry if I made the display layout editor screen sound useless, I simply mean that I am currently unable to use it the way you are asking. I am not familiar with custom shaders or fxaa, and don't understand the math you've written into that shader. If you think it will work the way you have written it then I will try your code in a shader. Please let me know. @hrydgard - when I set it to stretching it makes the problem worse. It appears to try and stretch the display to what it thinks is a 16:9 display, but that is not the solution. The resolution is 4:3 - 800x600 and the monitor stretches it to look like it's 1067x600 (without changing the resolution), which causes the image to be distorted. The software is not aware of this happening. So I need to change the output dimensions of the display to be 533x600 so that when the monitor stretches it out, it results in the correctly scaled display. I have tried to tweak settings in the INI file but I do not know which settings to change or what values to set them to. Which settings does the display layout editor use and what values do you recommend I try? |
In preparation of a possible patch, I'm reading over your SDLMain.cpp code... I may still need to add a patch to provide the x and y position for the SDL window, because right now they are being set as undefined and the resulting window is not positioned correctly unless I force it to --fullscreen. I welcome both of your expertise and feedback! |
If you want to try quick solution here's a ready shader for you: just extract into your assets/shaders and edit .fsh file to scale X and Y separately. Then in PPSSPP just select that post process shader(requires buffered rendering ofc). |
I'm good to go! :) thank you for being so responsive and helpful |
So the issue at hand is that if I select a 4:3 resolution on a widescreen monitor/tv, most of these displays have a native aspect ratio of 16:9. These displays have a setting in them that will automatically stretch the 4:3 display to take up the full screen, which obviously distorts the image. Not all displays have the ability to turn this off. So the workaround for it would need to be a setting that could be turned on and off. I don't know of such a feature currently in ppsspp.
I recently had to fix this in another emulator by editing the rendering math to detect if the current resolution aspect was 4:3 and then (if a config setting was set to on) it would recalculate what the 16:9 resolution would be and render a distorted (skinny) display so that when the monitor stretched the image it actually resulted in the correctly scaled display.
For example, (and using some rounded numbers) 800x600 (which is 4:3) is stretched by the monitor to an emulated 16:9, which is 1067x600. So even though the output is 800x600 it's stretched to 1067x600. In order to properly render the image that would stretch back to the correct display ratio I had to force it to render 533x600, as that will stretch it back out to 800x600. Crazy, right?
I'm looking at a need to do the same edit to ppsspp (if I have to), but you guys are usually really responsive to my questions so I wanted to ask if ANYTHING like this exists somewhere in your code already. Is there anywhere for me to override the detected resolution? If not, can you please at least point me to the right location in your code so that I can start doing some testing? My system is an ARM SBC using SDL and GLES on a Mali 450 GBM driver. So I assume I should be starting somewhere in your GLES rendering code. Thanks in advance!
The text was updated successfully, but these errors were encountered: