ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > General Discussion > ScummVM needs OpenGL with xBRZ support Goto page 1, 2  Next
ScummVM needs OpenGL with xBRZ support
  Author    Thread Reply to topic
Alien Grey



Joined: 18 Sep 2014
Posts: 12
Location: Belgium
ScummVM needs OpenGL with xBRZ support 

I think that OpenGL with xBRZ support should be added to ScummVM. This would make ScummVM games look a lot nicer without the need of slow scalers.

There's an unofficial ScummVM build with xBRZ support available from the xBRZ author. Perhaps someone should ask the xBRZ author to add official support for xBRZ to ScummVM.

 Reply with quote  
Post Mon Dec 25, 2017 7:54 am 
 View user's profile Send private message
Dark-Star



Joined: 30 Oct 2005
Posts: 128
Location: Reutlingen, GERMANY
 

What do you mean by "slow scalers"? I mean, even on my 6 year old rig the scalers impose no frame rate drop, they don't even increase CPU load measurably.

 Reply with quote  
Post Wed Dec 27, 2017 11:25 am 
 View user's profile Send private message
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 871
 

Alien Grey: It would have been useful to include a link to the xBRZ code and patches.

I have searched and found this here:
https://sourceforge.net/projects/xbrz/files/ScummVM/ScummVM_1.9.0%2BxBRZ_Sources.zip.zip/download

This includes the latest xBRZ v1.5 patched into ScummVM v1.9.0.

xBRZ is licensed under GPLv3 so I think we can import this.

I can look at adding this as a Pull Request.

 Reply with quote  
Post Wed Dec 27, 2017 11:59 am 
 View user's profile Send private message
Alien Grey



Joined: 18 Sep 2014
Posts: 12
Location: Belgium
 

quote:
Originally posted by Dark-Star
What do you mean by "slow scalers"? I mean, even on my 6 year old rig the scalers impose no frame rate drop, they don't even increase CPU load measurably.


I don't mean that the scalers are actually slow but compared to xBRZ they are. xBRZ is faster than the HQ scalers and gives the same or better image. The HQ scalers in ScummVM gives an fps drop on my Windows 10 X64 device.
 Reply with quote  
Post Sat Dec 30, 2017 1:02 pm 
 View user's profile Send private message
Alien Grey



Joined: 18 Sep 2014
Posts: 12
Location: Belgium
 

quote:
Originally posted by digitall
Alien Grey: It would have been useful to include a link to the xBRZ code and patches.

I have searched and found this here:
https://sourceforge.net/projects/xbrz/files/ScummVM/ScummVM_1.9.0%2BxBRZ_Sources.zip.zip/download

This includes the latest xBRZ v1.5 patched into ScummVM v1.9.0.

xBRZ is licensed under GPLv3 so I think we can import this.

I can look at adding this as a Pull Request.


I didn't want to add a link because I don't know if this is allowed.

It would be awesome if this could be imported to ScummVM. I think it gives the best result with xBRZ and bilinear filtering disabled. The image looks nice, smooth and still sharp like that. With bilinear filtering enabled it starts to look a bit blur.
 Reply with quote  
Post Sat Dec 30, 2017 1:08 pm 
 View user's profile Send private message
cwadge



Joined: 08 Feb 2018
Posts: 51
Location: USA
 

xBRZ is currently the best (and one of the fastest) software upscalers available today. Currently I run ScummVM with OpenGL/unfiltered, but I might actually use xBRZ if it was integrated. Very Happy


 Reply with quote  
Post Fri Feb 09, 2018 12:09 am 
 View user's profile Send private message Visit poster's website
rootfather



Joined: 31 Mar 2015
Posts: 27
Location: Germany
 

digitall, any progress on this? Sadly, I wasn't able to build this patched ScummVM 1.9.0 package due to some dependency issues (missing header files)...

 Reply with quote  
Post Sun Mar 04, 2018 11:42 am 
 View user's profile Send private message Send e-mail Visit poster's website
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 871
 

rootfather: I have managed to get the xBRZ source and the modified v1.9.0 source code. However, the modified ScummVM source code has a lot of "noise" due to IDE auto-formatting and other unrelated changes.

I started a branch to look at cleaning up the required source changes so they can be reviewed, but haven't got this to a clean state yet. The changes are functionally limited to four files:
backends/graphics/opengl/opengl-graphics.{cpp,h}
backends/graphics/opengl/texture.{cpp,h}

However, this means that the filter is "hacked" into the OpenGL backend and will not be available for other backends.
Apart from this, the actual xBRZ code is provided by an object file dropped in from the zBRZ project and no porting or hooking of that code into ScummVM has been done.

Overall, this is a good proof of concept hack and working code, but it can't be merged as-is without some fairly major work :/

 Reply with quote  
Post Sun Mar 04, 2018 2:25 pm 
 View user's profile Send private message
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 871
 

rootfather: Have now managed to clean up the xBRZ patch to the ScummVM source, which is here and shows the remaining issues I indicated:
https://github.com/digitall/scummvm/tree/branch-1-9-0_xBRZ

https://github.com/digitall/scummvm/commit/f0889dcdb01dcca060921440eb015ae6220f9714

 Reply with quote  
Post Tue Mar 06, 2018 5:29 am 
 View user's profile Send private message
cwadge



Joined: 08 Feb 2018
Posts: 51
Location: USA
 

quote:
Originally posted by digitall
rootfather: Have now managed to clean up the xBRZ patch to the ScummVM source, which is here and shows the remaining issues I indicated:
https://github.com/digitall/scummvm/tree/branch-1-9-0_xBRZ

https://github.com/digitall/scummvm/commit/f0889dcdb01dcca060921440eb015ae6220f9714
Awesome. Very Happy
 Reply with quote  
Post Tue Mar 06, 2018 6:39 am 
 View user's profile Send private message Visit poster's website
Raziel
ScummVM Porter


Joined: 25 Oct 2005
Posts: 944
Location: A haunted Castle somewhere in the Bavarian Mountains
 

Wow, that looks so much better

Me wants

 Reply with quote  
Post Tue Mar 06, 2018 11:51 am 
 View user's profile Send private message Visit poster's website
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 871
 

To be clear, I was a bit understated when I said "minor formatting cleanup". The v1.9.0 code changes were not supplied as a patch file, so I have to locate the correct base revision to difference against and there was a fair amount of IDE / editor auto-formatting cruft on the changed files that took me quite a while to unpick to get this commit with clean diff / patch for review.

However, it is clear that this is "hacked in" a bit and the changes will break things if applied as-is so some work is needed to assess if this is the correct approach and location to add this code or whether it should be implemented by the shaders API as per other filters.

Apart from that, it pulls in several std library parts which may not be present on all ports and should be replaced by Common code usage and/or rewritten... and even then I haven't managed to build this as the external xBRZ code needs a separate build ... and I am still not sure if this needs some changes to get this to build and link correctly.

The tl;dr is don't hold your breath on this being merged, at least as-is.

 Reply with quote  
Post Tue Mar 06, 2018 9:09 pm 
 View user's profile Send private message
cwadge



Joined: 08 Feb 2018
Posts: 51
Location: USA
 

quote:
Originally posted by digitall
The tl;dr is don't hold your breath on this being merged, at least as-is.


Understood, but thanks for giving it some attention regardless.
 Reply with quote  
Post Tue Mar 06, 2018 11:31 pm 
 View user's profile Send private message Visit poster's website
LouEatingSalami



Joined: 20 Feb 2018
Posts: 2
 

I would love to see this implemented officially into ScummVM. It seems to upscale low-res pixel art much more accurately than the HQX filter.

 Reply with quote  
Post Wed Mar 07, 2018 11:53 am 
 View user's profile Send private message
digitall
ScummVM Developer


Joined: 02 Aug 2012
Posts: 871
 

Raziel: Did a bit more work so that all the required source files are in commits on my branch. Discovered that this depends on the Microsoft Parallel Patterns library, which is Windows only / non-portable, so no chance of merging this as-is unless we can rewrite the code to remove that dependency. Neutral

https://github.com/scummvm/scummvm/compare/branch-1-9-0...digitall:branch-1-9-0_xBRZ

 Reply with quote  
Post Wed Mar 07, 2018 4:08 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page 1, 2  Next


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