ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > Slow OpenGL mode in SCUMM Goto page Previous  1, 2
Slow OpenGL mode in SCUMM
  Author    Thread Reply to topic
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 540
Location: West Sussex, UK
 

Oh. Without even looking at the images I know what you mean.

This is related to what I explained in this post. When using OpenGL the aspect ratio correction and stretching is done all in one pass, respecting the "Filter graphics" option. But in SDL mode the aspect ratio correction is done first (for example to go from 320x200 to 320x240) and then the stretching is done in a second pass. The "Filter graphics" option then only impacts the second pass.

It is actually possible to change the interpolation done for the aspect ratio correction in SDL graphics modes by changing this line of code (for example using kSuperFastAndUglyAspectMode to get nearest neighbor interpolation) and recompiling the code. However this is not going to be perfect due to image being scaled in two passes.

Ideally we should change the way the SDL graphics modes handle aspect ratio so that it works in a way similar to OpenGL. This is something that I have plans to work on as part of some changes I am working on in the way we handle aspect ratio correction (to handle corrections different from the 6:5 correction we currently always do - as is explained in this pull request). However I have not had much time lately to make progress on that Sad

 Reply with quote  
Post Thu Oct 11, 2018 5:24 pm 
 View user's profile Send private message
UrQuan



Joined: 10 Oct 2018
Posts: 9
 

quote:
Originally posted by criezy
Oh. Without even looking at the images I know what you mean.

This is related to what I explained in this post. When using OpenGL the aspect ratio correction and stretching is done all in one pass, respecting the "Filter graphics" option. But in SDL mode the aspect ratio correction is done first (for example to go from 320x200 to 320x240) and then the stretching is done in a second pass. The "Filter graphics" option then only impacts the second pass.

It is actually possible to change the interpolation done for the aspect ratio correction in SDL graphics modes by changing this line of code (for example using kSuperFastAndUglyAspectMode to get nearest neighbor interpolation) and recompiling the code. However this is not going to be perfect due to image being scaled in two passes.

Ideally we should change the way the SDL graphics modes handle aspect ratio so that it works in a way similar to OpenGL. This is something that I have plans to work on as part of some changes I am working on in the way we handle aspect ratio correction (to handle corrections different from the 6:5 correction we currently always do - as is explained in this pull request). However I have not had much time lately to make progress on that Sad

I wish you good luck with that. It would kill two birds with one stone and you would have my eternal gratitude as well Wink

One thing I have to ask: Would it be possible to implement a 4x scaler.... A. as a stop-gap measure (assuming the fixed aspect ratio correction won't happen for a while) and B. to compliment the pixel-perfect stretch mode.

Currently 3x and pixel-perfect stretch mode at 1080p is obviously the same as playing with "centered" or windowed, which is too small. On 2x it doubles the window size but because of that same aspect ratio issue we run into more scaling artifacts. Having a native 4x scaler, while not 100% sharp because of the aspect ratio issue, would at least produce a reasonable image, "good enough" and big enough for 1080p.

From what I've read, the 4x or 5x scaling issue comes up every once in a while, but those requests were ultimately shut down since the whole scaling system was to be replaced with some more flexible like this: https://github.com/scummvm/scummvm/pull/1255

Do you think this will arrive sometime in the near future, or if not, same question: could a 4x scaler be implemented as a stop-gap measure?
 Reply with quote  
Post Fri Oct 12, 2018 7:12 am 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge