07 February 2019, 14:46 | #141 |
Registered User
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. Last edited by guest.r; 07 February 2019 at 23:52. Reason: Masks added. |
07 February 2019, 16:04 | #142 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
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. |
07 February 2019, 20:29 | #143 |
Registered User
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. |
07 February 2019, 21:13 | #144 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
|
07 February 2019, 23:57 | #145 |
Registered User
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. |
08 February 2019, 00:26 | #146 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
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. |
08 February 2019, 01:13 | #147 |
Registered User
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; Edit: silly PS 2.0/3.0 bug fixed. Last edited by guest.r; 08 February 2019 at 01:25. |
08 February 2019, 01:20 | #148 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
Mmh, now i get a black screen. But removing the glow option would make it less attractive anyway. Damn the compromises.
|
08 February 2019, 01:26 | #149 |
Registered User
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.
|
08 February 2019, 01:31 | #150 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
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. |
08 February 2019, 02:37 | #151 |
Registered User
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... |
08 February 2019, 04:04 | #152 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
The PNGs look good enough to me. I guess this is it for now.
|
08 February 2019, 14:39 | #153 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
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?
|
08 February 2019, 15:50 | #154 |
Registered User
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. |
08 February 2019, 16:36 | #155 | |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
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:
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. |
|
08 February 2019, 17:16 | #156 |
Zone Friend
|
Darker scan-lines make me nauseous when patterns move behind them, gives me the same effect like when I stare at an escalator floor:
|
08 February 2019, 18:17 | #157 |
Registered User
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 |
08 February 2019, 18:32 | #158 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
|
Tried that earlier. No luck. Well, it was worth a try.
|
08 February 2019, 18:51 | #159 |
Registered User
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.
|
08 February 2019, 20:00 | #160 |
Registered User
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. |
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 |
|
|