01 December 2020, 18:33 | #1 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
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... Latest version is 1.42, not (yet) made any screenshot, you can download it here: http://wpage.unina.it/aorefice/share...koko-aio-1.42/ Screenshots for 1.42 here: http://wpage.unina.it/aorefice/share...2/screenshots/ In 1.42, files are named with the scheme: Code:
FeatureX-1.FeatureY-0-....-FeatureZ-string.shader Eg: Code:
scanlines-0.glow-1.vmask-full.darklines-offset.halo-1.bloom-0.shader The following reflects an outdated version, see screenshots for 1.42 instead. Complete gallery for version v1.35:http://wpage.unina.it/aorefice/share...koko-aio-1.35/ Some Examples: Have fun! Last edited by kokoko3k; 13 October 2021 at 11:48. |
01 December 2020, 23:12 | #2 |
Registered User
Join Date: Sep 2015
Location: Montreal
Posts: 297
|
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 |
02 December 2020, 07:11 | #3 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
Didn't try Skeleton Krew, but Worms DC still have that glitch.
I don't think a shader can do much about that... |
02 December 2020, 14:29 | #4 |
Registered User
Join Date: Sep 2015
Location: Montreal
Posts: 297
|
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 |
02 December 2020, 14:37 | #5 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
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! |
16 December 2020, 09:59 | #6 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
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. |
29 December 2020, 12:47 | #7 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 72
|
This is fantastic. Just popped on to say thanks its very, very good
|
29 December 2020, 16:38 | #8 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
I'm very glad you liked it
|
13 January 2021, 12:40 | #9 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
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! |
13 January 2021, 14:28 | #10 |
Registered User
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 1,912
|
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?
|
13 January 2021, 15:01 | #11 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
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). |
13 January 2021, 16:00 | #12 |
Registered User
Join Date: Jan 2005
Location: Portugal
Age: 42
Posts: 139
|
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?
|
13 January 2021, 16:02 | #13 |
Registered User
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 1,912
|
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? |
13 January 2021, 16:22 | #14 | |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
Quote:
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) Code:
#define halo_power 2.0 to #define halo_power 1.5 Last edited by kokoko3k; 13 January 2021 at 16:48. |
|
13 January 2021, 16:27 | #15 | |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
Quote:
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) |
|
13 January 2021, 16:56 | #16 |
Registered User
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 1,912
|
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. |
13 January 2021, 17:40 | #17 |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
Yep (nope), in this particular case, the more the pixels, the better results
|
27 January 2021, 20:05 | #18 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Related feature request filed by kokoko3k: https://github.com/FrodeSolheim/fs-uae/issues/241
|
18 March 2021, 00:09 | #19 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
|
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. |
18 March 2021, 09:49 | #20 | |
Registered User
Join Date: Nov 2020
Location: italy
Posts: 23
|
Quote:
This is scanlines.tweaked.shader preset from version 1.35: Here is a closeup of the terrain: On the other side, doing what you ask the way you ask, would mean: * Doubling the gpu use because the glowing code would need to operate on 4 lines for every drawn pixel, on 4K it would mean doing 4X the work. * losing the compatibility with fs-uae autoscale That said, my old 1084s was so little compared the the monitor i use today and i wonder why (as you suggest for 1080p) i should think to zoom by a factor of 3 the space between a scanline and the other and not zooming the scanline itself. The following are shots from my real arcade crt as today: Last edited by kokoko3k; 18 March 2021 at 10:15. |
|
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 |
|
|