Help with shaders

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
St_Eddie
Posts: 18
Joined: Fri Nov 04, 2016 2:18 pm
Location: UK

Help with shaders

Post by St_Eddie »

Hi, I've only just discovered the wonderful world of using shaders with ScummVM. However, I am tearing my hair out with one particular issue; out of all of the shaders which I've tried, crt-lottes-multipass is by far the best looking of the bunch when playing VGA adventure games. The only problem is that the shader has curved screen edges.

I've looked up information on how to alter the code to remove this effect but I've had no joy in attempting to do so in practice. It doesn't help that I can't even find the crt-lottes file within my ScummVM Icon folder (and yes, I've renamed the dat file to zip and extracted the contents - there's just no obvious lottes files in there at all), meaning that I had to resort to modifying a separately downloaded version of the file.

No matter what I do, the game will either launch with horribly warped graphics, or as though no shader has been applied at all.

Please could somebody advice me on what I'm doing wrong (or preferably modify the crt-lottes-multipass shader file in order to remove the curved screen edge effect and provide me with a link to the file).

Many thanks.

Ed
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Help with shaders

Post by Praetorian »

ScummVM ships with a package of shaders, ready to be used, without downloading anything additional from the internet.

In Windows case, this package is embedded in the executable (exe) so you won't be able to find them in a separate dat file there. The crt-lottes-multipass is in there.

But you can find them online here:
https://github.com/scummvm/scummvm-shaders

I see the files involved for the crt-lottes-multipass are all text files and can be easily found under the "base/crt" path (for the crt-lottes-multipass.glslp "index" file) and "base/crt/shaders/crt-lottes-multipass" for its two "shader" files).

What did you try to change? Specifically I mean.

Seems to me that just changing the warpX and warpY in scanpass.glsl to be all zeroes should do the trick:
original crt-lottes-multipass
original crt-lottes-multipass
scummvm-00032.png (1.73 MiB) Viewed 349 times
vs
custom crt-lottes-multipass
custom crt-lottes-multipass
scummvm-00031.png (1.05 MiB) Viewed 349 times
St_Eddie
Posts: 18
Joined: Fri Nov 04, 2016 2:18 pm
Location: UK

Re: Help with shaders

Post by St_Eddie »

Oh my, that works! Thank you so much!

Your explanation was the key I needed in understanding exactly how the shaders work. I didn't realise that there was an index file which references separate shader files. It all makes sense now.

Thank you, you are a star :D

EDIT: For anyone whom may stumble upon this thread, looking for help; there is an index file which acts as the overall execution of a shader. It's simply a set of instructions which inform the shader which sub-folders and sub-files to reference. Therefore, if you edit the reference files themselves, those changes shall be reflected within the shader itself. Edit the reference shaders and then point towards the index file and you're away!
St_Eddie
Posts: 18
Joined: Fri Nov 04, 2016 2:18 pm
Location: UK

Re: Help with shaders

Post by St_Eddie »

Just out of pure interest, what are the general values for glow? For example, the crt-royale shader has a silly amount of glow, but say that one wished to decrease that glow, what are the values which one would alter?

So, as an example; crt-royale; lots of glow. The values to lower that glow are (in the same way that the warp x and y affect the curvature) what exactly? I'm fascinated by the code of these shaders.
Post Reply