English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 01 December 2020, 18:33   #1
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Made a new shader for FS-uae.

First post here, so Hello everyone!.

In latest days i've been playing with glsl and shaders.
I never used them before, nor i wrote any shader before, so probably i did some mistakes/unoptimized code, did something already existed, whatever, i don't know.

Anyway, by inspecting other's people code, i came up with a shader that looks good to me; also is very configurable,and i think it is a nice toy to play with.

It has support for several features:
* non linear scanlines on original coordinates
* non linear screenlines on screen coordinates
* custom rgb masks with(out) offset
* glowing,haloing,blooming
* gamma correction
* saturation correction
* alternate blanking (like uae's feature)
* play nicely with FS-UAE's autoscale function

Also, it is important to know that it is meant to be used with:
* line doubling enabled: line_doubling = 1
* low resolution disabled: low_resolution = 0

I've set the default values to match my real arcade crt monitor as much as i can on a 1080p, you may have much better results tuning it for 4k, of course .

Please, share your impressions, ideas, improvements...


Complete gallery for version v1.35:http://wpage.unina.it/aorefice/share...koko-aio-1.35/

Some Examples:


Latest version is 1.40, not (yet) made any screenshot, you can download it here:
http://wpage.unina.it/aorefice/share...koko-aio-1.40/

In 1.40, files are named with the scheme:
Code:
FeatureX-1.FeatureY-0-....-FeatureZ-string.shader
where 1 and 0 means that that feature is present or not, "string" describes how that feature has been configured.
Eg:
Code:
scanlines-0.glow-1.vmask-full.darklines-offset.halo-1.bloom-0.shader
...means that you get no scanlines, full vertical mask, darklines painted with an offset, halo and not bloom.

Have fun!

Last edited by kokoko3k; 18 March 2021 at 18:01.
kokoko3k is offline  
Old 01 December 2020, 23:12   #2
ztronzo
Registered User

ztronzo's Avatar
 
Join Date: Sep 2015
Location: Montreal
Posts: 194
Good job! Just curious.. how does it look in -game with Worms DC and Skeleton Krew? These games had a glitch in FS-UAE which made horizontal pixel shifting on the end of some sprites.. (red arrow in Worms DC and while moving current worm)

I will try on first chance

Sent from my SM-G920W8 using Tapatalk
ztronzo is offline  
Old 02 December 2020, 07:11   #3
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Didn't try Skeleton Krew, but Worms DC still have that glitch.
I don't think a shader can do much about that...
kokoko3k is offline  
Old 02 December 2020, 14:29   #4
ztronzo
Registered User

ztronzo's Avatar
 
Join Date: Sep 2015
Location: Montreal
Posts: 194
No worries... Skeleton Krew can be corrected with using the Low Resolution option

Checking your screenshots, I find it strange that I see vertical bands of a greenish shade when the images are at a certain size.. nice effect

Sent from my SM-G920W8 using Tapatalk
ztronzo is offline  
Old 02 December 2020, 14:37   #5
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
You've to see them at 100% size, or browser scaling makes funky effects
I know imgur is not the best hosting site in that regard, it requires you several clicks.
Also, from a smartphone i thinks is not even possible!
kokoko3k is offline  
Old 16 December 2020, 09:59   #6
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Made a lot of improvements with some presets for 1080p screens available here:
http://wpage.unina.it/aorefice/sharevari/koko-aio/

This is an attempt to mimic crt-royale with its default settings, it notably misses the bloom effect and scanlines are not "precise":
http://wpage.unina.it/aorefice/share...oko-royale.png

Last edited by kokoko3k; 16 December 2020 at 10:13.
kokoko3k is offline  
Old 29 December 2020, 12:47   #7
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 68
This is fantastic. Just popped on to say thanks its very, very good
Bladeforce is offline  
Old 29 December 2020, 16:38   #8
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
I'm very glad you liked it
kokoko3k is offline  
Old 13 January 2021, 12:40   #9
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Thanks to the pandemic, in the last few days i struggled to add bloom to the shader, and now i managed to do it in a way that could run on my poor Haswell igp.
All of the presets reaches 50fps on an intel i5-4590, but with a discrete card, you can tweak them to make them look nicer (bloom quality is very heavy).

Also, in 1.35, i removed various hacks from the shader, and i don't think there is more left to do, edited the first post with new pictures and updated download link.

Have fun!
kokoko3k is offline  
Old 13 January 2021, 14:28   #10
dreadnought
Registered User
 
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 851
I'm not very familiar with UAE emulation. So far I've copied the files from the linked page to Data/Shaders, and put the line doubling/low res lines into the config. But how do I actually "enable" it all?
dreadnought is offline  
Old 13 January 2021, 15:01   #11
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
I use fs-uae-launcher and in the advanced options, i put something like:
shader = /path/to/my/crt-shader.shader (or shader = c:\path\to\shader on windows).
kokoko3k is offline  
Old 13 January 2021, 16:00   #12
RuySan
Registered User
RuySan's Avatar
 
Join Date: Jan 2005
Location: Portugal
Age: 39
Posts: 102
By looking at the screenshots, they look pretty good, but i usually get paralysed with so many options. Do you know which one mostly resembles the image on a Commodore 1084 monitor?
RuySan is offline  
Old 13 January 2021, 16:02   #13
dreadnought
Registered User
 
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 851
Ok, that helped.

Interesting stuff, the shadowmask looks really good. Overall it's a bit blurry, but that might be down to my setup or different shaders. Do you think it might look different because I'm on a 1440p monitor?

Also, what FS UAE basic video settings should I use to achieve proper aspect ratio and max screen size?
dreadnought is offline  
Old 13 January 2021, 16:22   #14
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Quote:
Originally Posted by RuySan View Post
By looking at the screenshots, they look pretty good, but i usually get paralysed with so many options. Do you know which one mostly resembles the image on a Commodore 1084 monitor?
I know there are a lot of knobs, that's why i made a lot of presets :-P

From what i remember on my old 1084s, i think you can try the non bloomed version:
http://wpage.unina.it/aorefice/share...ingjackson.png

http://wpage.unina.it/aorefice/share...d.vmask.shader


if there is still some white "bleeding" from the scanline that you don'like, you may try to change halo_h and/or in_glow_h
Code:
"#define halo_h     1.0" (and/or "#define halo_h     1.0")
to
"#define halo_h     2.0" (and/or "#define halo_h     2.0")
 (less is more here)
and/or lowering halo_power:
Code:
#define halo_power 2.0
to 
#define halo_power 1.5
Anyway, don't change them too much, because they help in keeping the image brighter on "common" lcd backlight levels.

Last edited by kokoko3k; 13 January 2021 at 16:48.
kokoko3k is offline  
Old 13 January 2021, 16:27   #15
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Quote:
Originally Posted by dreadnought View Post
Ok, that helped.

Interesting stuff, the shadowmask looks really good. Overall it's a bit blurry, but that might be down to my setup or different shaders. Do you think it might look different because I'm on a 1440p monitor?

Also, what FS UAE basic video settings should I use to achieve proper aspect ratio and max screen size?
Did you checked the screenshots related to the presets? do them look different from what you get on screen?
I use a 1080p and no particular settings, apart from the switch i wrote in the first post:
* line doubling enabled: line_doubling = 1
* low resolution disabled: low_resolution = 0


Also, i explicitely wrote the shader to look good with fs-uae autoscale feature (so that if you like scanlines they do not "dephase" too much)
kokoko3k is offline  
Old 13 January 2021, 16:56   #16
dreadnought
Registered User
 
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 851
Yeah, when compared to your example games they look the same. I was looking at Defender Of The Crown before, maybe that's why.

Like I said, I have very little experience with UAE emulators. I use them once in blue moon to quickly check something, but not play games, so I have never messed with gfx settings. So, I'm not sure how autoscale works, or how to achieve that proper-AR/maxed-out effect I mentioned (though it's a topic for another thread.)

I asked about 1080p vs 1440p because I think I've heard somewhere that CRT shaders might differ when used in different resolution, in regard to some other emu (Retroarch or MAME, not sure). Could be that I misread it though.

Overall, great job, I will probably use this config (scanlines/vmask one) when checking stuff out from now on, because I can't stomach the raw naked pixel look.
dreadnought is offline  
Old 13 January 2021, 17:40   #17
kokoko3k
Registered User

 
Join Date: Nov 2020
Location: italy
Posts: 14
Yep (nope), in this particular case, the more the pixels, the better results
kokoko3k is offline  
Old 27 January 2021, 20:05   #18
FrodeSolheim
FS-UAE Developer
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 40
Posts: 3,811
Related feature request filed by kokoko3k: https://github.com/FrodeSolheim/fs-uae/issues/241
FrodeSolheim is offline  
Old 13 February 2021, 08:37   #19
almeath
Registered User

 
Join Date: Apr 2020
Location: Australia
Posts: 12
I want to thank all the contributors to this thread. These new shaders look great!

I was wondering if anyone could help me convert my favorite DOSBox/PCem shader to the XML format that is used by FS-UAE?

I tried it myself, but my coding skills are just not up to scratch. In fact, I cannot even tell if the functions in these shaders are backwards compatible?

Can anyone point me in the right direction? I would be thrilled to get these working in FS-UAE.
Attached Files
File Type: zip crt-lottes-fast.subtle+gain(pcem).zip (7.5 KB, 47 views)
File Type: zip lottes.fast.subtle+gain(dosbox).zip (7.4 KB, 48 views)

Last edited by almeath; 13 February 2021 at 08:49.
almeath is offline  
Old 18 March 2021, 00:09   #20
Photon
Moderator

Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,954
The only lines I see are vertical, i.e. not what ppl usually mean by scanlines.

There's also some blur and TV mask going on.

Scanlines are actually the pixels, not the space between them. This space is what's left between the glow of the pixel lines above and below the space.

PAL scales perfectly to 1080p by a factor of 4x noninterlaced.

I would love a shader that scales every horizontal Amiga pixel by exactly 4x, leaving 3px room between each scaled line, and then gives control over pixel glow to create the "scanlines". This is a correct shader.
Photon is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shader support cybermat support.FS-UAE 4 07 March 2018 14:52
sharp-bilinear-simple shader for FS-UAE rsn8887 support.FS-UAE 15 16 January 2018 08:41
fs-uae is possible made computer with 68040 but only ocs chipcset? JPQ support.FS-UAE 4 05 May 2014 18:46
Shader support and scaling options in FS-UAE 1.3 FrodeSolheim support.FS-UAE 9 18 December 2013 17:30
Please help me with my shader! tjcbs support.WinUAE 3 02 February 2013 21:49

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.10443 seconds with 16 queries