English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 07 February 2019, 14:46   #141
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
As suggested by Retro-Nerd, i ported the "Trinitron" version to WinUAE format.

It doesn't need the extra stuff like the original, so i made it lightweight instead.
The scanlines should look the same, unfortunatelly i can't program the masks here, but there are plenty available.

It includes some basic glow and saturation too...

Edit: it likes some games better than other, it's more a "Bubble Bobble / Rainbow Islands" and not a "Chaos Engine" shader...

Edit2: "Masks" added, and a "default" _winuae.fx, just for the case.

Edit3: Think got it this time.
Attached Files
File Type: zip CRT-Trinitron-Lite-LoRes.zip (2.2 KB, 199 views)
File Type: zip _winuae-mask5.zip (1.2 KB, 192 views)
File Type: zip _winuae-mask6.zip (1.2 KB, 201 views)
File Type: zip _winuae.zip (927 Bytes, 198 views)

Last edited by guest.r; 07 February 2019 at 23:52. Reason: Masks added.
guest.r is offline  
Old 07 February 2019, 16:04   #142
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
Ah, Trinitron sweetness. With the "Aperture2x4bg.png" it looks pretty much like your Retroarch shader in mask style 5. Fore some reason in vertical scrolling the mask/scanlines looks slighlty uneven in WinUAE, but if you press pause everything looks great (tried it with Hybris).

Couldn't find a proper PNG for Retroarch mask style 6, maybe we have to edit one of the existing masks. Anway. So far really the best CRT shader/PNG mask combination. Many thanks again for your work.













Last edited by Retro-Nerd; 07 February 2019 at 16:11.
Retro-Nerd is offline  
Old 07 February 2019, 20:29   #143
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Only for "crt-trinitron-lite" shader fans.

I've uploaded two _winuae.fx shaders above which contain mask5 and mask6 from crt-guest-dr-venom (being discussed in another thread).

Needed to reverse engineer the params a bit, but i have managed to program the _winuae shader to apply a calculated mask, which replaces other png masks. One has to be selected though to apply the effect.
Need to say, that the 3x multiplier has to be selected...(worked with me).

If you want the defaul behavior, just delete the _winuae.fx and a new will be generated.

Works with D3D9 only.


Last edited by guest.r; 07 February 2019 at 20:58.
guest.r is offline  
Old 07 February 2019, 21:13   #144
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
Nice one. It works.







But the combination of 3x multiplier+beam raced vsync makes it way too slow on my PC. I'll stick with my combination above in D3D11.
Retro-Nerd is offline  
Old 07 February 2019, 23:57   #145
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Yeah, had to dig some more into the _winuae.fx. Got it right this time i think. Now it can be used with all multipliers (still needs some user testing).
The catch is, the x-resolution must be edited (see the #defines) within the shader, now it's 1920.0 by default, should do for most folks.
As 2x is around 2.25x faster compared with 3x, maybe it will be more attractive.
guest.r is offline  
Old 08 February 2019, 00:26   #146
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
I have 50fps now with 2x multiplier but with sound crackles and heavy tearing (lagless vsync enabled, with standard vsync it's fine). With 3x multiplier it's still too slow.

edit: Ok, i've reduced the beam racing from 4 to 3 slices and everthing's smooth now. The magic works.

edit2: Argh, but not for all games. 3 slices also causes tearing for some games. Damn! I can't go lower, or the advantage from beam racing is gone.

Last edited by Retro-Nerd; 08 February 2019 at 01:01.
Retro-Nerd is offline  
Old 08 February 2019, 01:13   #147
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Hmm, maybe a version with bloom removed will be fast enough, it's a bloom approximation anyway, get's sliced by heavier masks here and there.
Just for curiosity's sake, you could comment out the saturation too, since it uses some heavier instructions.

Code:
//	float l = length(color);
//	color = normalize(pow(color, float3(saturation,saturation,saturation)))*l;
I think the shader could get fast enough...

Edit: silly PS 2.0/3.0 bug fixed.
Attached Files
File Type: zip CRT-Trinitron-Lighter-LoRes.zip (1.8 KB, 124 views)

Last edited by guest.r; 08 February 2019 at 01:25.
guest.r is offline  
Old 08 February 2019, 01:20   #148
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
Mmh, now i get a black screen. But removing the glow option would make it less attractive anyway. Damn the compromises.
Retro-Nerd is offline  
Old 08 February 2019, 01:26   #149
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Sorry, my bad. Saw the shader compile under PS 2.0, unfortunatelly it still needs PS 3.0. Fixed now.
guest.r is offline  
Old 08 February 2019, 01:31   #150
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
Yep, now it's fast enough. But i really like the basic glow option.

Would it be too tricky to create new PNGs which mimicks the masks 5 und 6 better? It doesn't need the extra CPU power then and works also in D3D11 (what i did before in post 142 with a different PNG).

Last edited by Retro-Nerd; 08 February 2019 at 01:39.
Retro-Nerd is offline  
Old 08 February 2019, 02:37   #151
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
I can try adding some masks, but they are missing some features.
You can also try to edit them in a program like Helios Paint (free one).
http://www.heliospaint.com/

The mask 6 is really tricky to emulate with a png, indeed...
Attached Files
File Type: zip crt-mask-5.zip (231 Bytes, 199 views)
File Type: zip crt-mask-6.zip (233 Bytes, 209 views)
guest.r is offline  
Old 08 February 2019, 04:04   #152
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
The PNGs look good enough to me. I guess this is it for now.
Retro-Nerd is offline  
Old 08 February 2019, 14:39   #153
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
There is still an issue with uneven scanlines in vertical scrolling. Just tried your older "CRT-Guest-Glow-Fast-Lo-Res.fx" shader and it doesn't have this problem. I can't make screenshots since it looks fine in non-scrolling/pause mode. Any clue?
Retro-Nerd is offline  
Old 08 February 2019, 15:50   #154
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Yeah, strange things can happen with "harder" scanlines...
The screenshot you posted flickers on my display.
https://abload.de/image.php?img=newa...nd_crxjkzd.png

If same phenomena occours within Retroarch or. 4k display, then the code is sensitive in regard of current display technology, which is known to smear some effects with scrolling, like masks and scanlines.

Other explanation could be that WinUAE "supersampling" and fitting the image contributes to the miss-effect also.

Personally for me it's hard to develop a new scanline formula (i tweaked this one for hours), because if it would provide the same effect it would be prone to same issues to happen.

Anyway, AMD cards are known to have some rounding issues with coordinates, i patched the shader now, but probably won't fix a thing.

If same happens with the "Lighter" version, then bloom is not to blame.
Attached Files
File Type: zip CRT-Trinitron-Lite-LoRes.zip (2.3 KB, 112 views)
guest.r is offline  
Old 08 February 2019, 16:36   #155
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
It happen with the "Lighter" version too.

Your Retroarch shader looks even worse in vertical scrolling, but the "Smart Integer Scaling" option fixed everything. Looks good to me.

Quote:
Anyway, AMD cards are known to have some rounding issues with coordinates, i patched the shader now, but probably won't fix a thing.
Yep, still uneven.


edit: With 4x multiplier the uneven scanlines are gone. But then my PC crawls (with lagless vsync enabled).

Last edited by Retro-Nerd; 08 February 2019 at 16:57.
Retro-Nerd is offline  
Old 08 February 2019, 17:16   #156
mcbpete
Zone Friend
 
mcbpete's Avatar
 
Join Date: Oct 2004
Location: London, England
Age: 41
Posts: 239
Send a message via MSN to mcbpete Send a message via Yahoo to mcbpete
Darker scan-lines make me nauseous when patterns move behind them, gives me the same effect like when I stare at an escalator floor:

mcbpete is offline  
Old 08 February 2019, 18:17   #157
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
You could try to soften the scanlines a bit with editing the parameters:

Code:
#define scanline     6.0      // scanline param, vertical sharpness
#define beam_min     0.90     // dark area beam min - narrow
#define beam_max     1.20     // bright area beam max - wide
In general, softer scanlines look more even with non-integer scaling.
guest.r is offline  
Old 08 February 2019, 18:32   #158
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
Tried that earlier. No luck. Well, it was worth a try.
Retro-Nerd is offline  
Old 08 February 2019, 18:51   #159
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Well i guess you could also try to lower the beam_min value with crt-guest-glow until you still get the desired results (and increase brightboost a bit). It's a good compromise i guess.
guest.r is offline  
Old 08 February 2019, 20:00   #160
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
I borrowed some stuff just to try it out, looks decent to me.

Hopefully the vertical scrolling issue is gone...scanlines look different but still much sharper than with crt-guest.
Attached Files
File Type: zip CRT-Trinitron-Lite-RN-LoRes.zip (2.3 KB, 121 views)
guest.r 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
Multipass shaders craig64 support.FS-UAE 21 08 December 2020 11:01
HLSL/CG Shaders and xBR Enverex support.FS-UAE 11 19 July 2013 16:44
fx Shaders in WinUAE 2.6.0 crazy46guy support.WinUAE 8 16 June 2013 14:30
[FS-UAE] Optimized or corrected Amiga Game Database Entrys nexusle support.FS-UAE 3 24 August 2012 21:30
Subpixel-corrected lines and polygons on Amiga Scali Coders. Asm / Hardware 9 11 January 2012 12:37

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 09:37.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.17830 seconds with 14 queries