English Amiga Board


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

 
 
Thread Tools
Old 11 August 2017, 23:39   #101
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
If you don't care about pixels (as in, developing, drawing), you can just pick the shader you want.

Guest-CRT is sort of going toward the right colors, but has too much blur for utility. Hyllian-CRT doesn't really do much, but it's not aligning scanlines with emulated pixels, which is a general trait of the shaders. It has less blur, but will still interfere with pixel alignment even horizontally via blur so that it's less accurate than mere Bilinear. Comparison. High contrast pixels such as black simply do not, not look thinner on a CRT.

You don't put scanlines generally across a picture that is built out of pixels, I don't care what resolution your screen is, it's just wrong. CRTs draw the pixels by way of scanlines.

All shaders avoid the use of Overlays and thereby the scaling error of WinUAE.

Otherwise it would have been a way of raising the black point, as the beam of a CRT does, again aligned with the scanlines because there is nothing else. Because overlays use standard alpha compositing.

I'm unable to do this with a Mask, since it uses Multiply instead of alpha compositing, which is correct. Still this is what is there on my CRT, and what must be there on my flatscreen in order for a scanline mask not generally just darkening the picture or alternatively wreck the gamut.

I.e. the black point must be raised along the scanline, not generally across the picture.

Fine-grained Gamma control would be nice, but it affects more than the black point. I would have to run too many tests to say colors match.

All I wanted was scanlines, and this was the journey.

1. Display > Scanlines is just every other PC pixel row black. Adjust colors then. Colors way wrong (of course).
2. Filter > Scanline level/opacity can't be matched vertically to scanlines. (Error IMO)
3. Tried Mask, didn't raise the black point (="Scanline level"). Of course. Adjust colors then. Colors less wrong but no cigar.
4. Made just an Overlay to have scanlines with raised black point, looks mint already, but error. Amiga output is shrunk regardless of overlay size; pixels skipped h and v, and general artifacting. Doesn't work as bezel either. Maybe this will be corrected.
5. OK, so give up and try shaders then. All are made for gaming/eyecandy as expected. None for actually using the Amiga. Various deviances experienced and noted.
6. Care too much (well I'm not asking much??)
7. Give up and not bother and change nothing and keep hating UAE

? I dunno. A history of something that should be simple. See my recipe above. Scanlines + correct colors is the foundation. Blur, glow, fine, add that on top.

Probably all the other emulators have gone through the same thing and I haven't bothered because I don't use them, I play them. But the recipe should be the same for them. I feel we can do more than experiment until it looks good for our own favorites. Don't think I don't understand the thrill of enjoying that.

Last edited by Photon; 11 August 2017 at 23:58.
Photon is offline  
Old 11 August 2017, 23:49   #102
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,438
Have you actually used all the available options in the shader files like guest said? Edit a value via texteditor and then load the emulator again. CRT-Guest doesn't look too much blurred imo. Especially if you are a real 1084 monitor user which has a really soft image anyway. Correct colors is a general problem, they look different on every display anyway (no matter what filter/shader you use). Guest tried do add some tweaking options a few weeks ago, but this isn't as trivial as it sounds.

Quote:
High contrast pixels such as black simply do not, not look thinner on a CRT.
Yes, they actually do. If we mean the same. The black/grey scanlines looks weaker to nearly non existent on brighter colors.

Maybe you shoud add some pics from your Amiga monitor in non-interlaced hires resolution. I really don't have an imagination what you exactly expect from a filter/shader.

Last edited by Retro-Nerd; 12 August 2017 at 00:40.
Retro-Nerd is offline  
Old 12 August 2017, 07:24   #103
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
Need to make different profiles for each case, one for A500 ADF games with shaders low res, one with A1200 ADF games with shaders low res, one A1200 HD with low res and shaders for whdload and one A4000/030 full speed for "serious apps", no any filters not even bilinear. That's what I do.

About using masks instead of shaders I would just use the built in scanlines of Winuae. I also have an 2012 netbook that struggles with new Winuae so I use an old
Winuae 2.3 version with built in scanlines.
nobody is offline  
Old 13 August 2017, 20:00   #104
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Quote:
Guest-CRT is sort of going toward the right colors, but has too much blur for utility.
It has adjustable horizontal/vertical blur, just need to edit a variable.

Code:
const vec2 scale = vec2(0.15, 0.1);	// H-V sharpness, from 0.01 to 0.25
Quote:
All I wanted was scanlines...
I have setup a scanline shader for you, no color changing, just the scanline effect through brightness adjust. The classic.

It can get complicated, so FS-UAE is mandatory.
This shader uses alligned modulo scanlines and is set up for 1080p displays. Since tastes differ i would advise to adjust the modulo weights, shouldn't be too hard. It's vanilla scanlines and should show what one can expect from a 1080p display and Amiga.

Since hires and productivity were also mentioned i set up some code to display mod 2 scanlines with higher resolutions. There is a catch though. Vertical OS resolutions up to 600 conflict with doubled lores stuff, so it's necessary to crank up the productivity resolution. OK is 640x256, 800x600 etc.. 640x512 for example is to be avoided.

This can't be fixed since the decision is exclusive. Fix WB -> breaks games.
I would also like to note some (very rare) game title screens can look odd, no way around that unless a special hybrid mode is introduced which draws pixels as they are, with doubling removed (not going to happen though).

If someone is not happy with 4x scale scanlines, well, i'm not happy too. 5x looks better and 6x much better. A display with a bigger vertical resolution helps a lot.

Not to forget, the FS-UAE config:

Code:
keep_aspect = 1.0
shader = crt-scanline-hires
Edit: new version, bugfix, gamma control.
Attached Files
File Type: rar crt-scanline-hires.rar (2.0 KB, 250 views)

Last edited by guest.r; 14 August 2017 at 11:47. Reason: Shader update.
guest.r is offline  
Old 15 August 2017, 01:59   #105
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Kewl (for FS-UAE) Gamma in=2.2 is correct.

Tested some in WinUAE. Interpolation origin does not behave as expected.

There is only the beam, no scanlines.

The beams can never be completely black. Therefore, raise black point. Beam will always be brighter than the scanlines between them, so scanlines must be a factor of brightness of beams, and there must be no scanlines across pixels in the picture.

Raised black level also matches contrast fix. Flatscreen contrast race=desaturate and raise black level, or lower contrast while keeping white level 100% and raise black level.

Hires=640. 512=interlace (deinterlace=no scanlines please). Simply do not=horizontal pixels thinner.
Photon is offline  
Old 15 August 2017, 10:05   #106
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Quote:
Tested some in WinUAE. Interpolation origin does not behave as expected.
Edit: if this refers to crt lottes, hyllian, guest and scanline for WinUAE i can confirm that the first two are good ports for WinUAE standards and the last two work as intended. They were not designed by the authors to emulate a specefic CRT hardware though. The only crt shader which tries to do such a thing is crt royale korozumi (sony PVM) and you need a 1440p/4k display to look ok. The shader framework it uses is very advanced. If someone wants various display modes to match the look of his crt, thats even harder and impossible without a proper 4k display and emu author support. You see the only data a shader gets in WinUAE is a buffer offset and the current coordinate (along with the buffer itself) and it's enough for those shaders since we have masks too.


Quote:
The beams can never be completely black. Therefore, raise black point. Beam will always be brighter than the scanlines between them, so scanlines must be a factor of brightness of beams, and there must be no scanlines across pixels in the picture.
It's not commonly used with crt shaders, but np. (see the attached shader below). You can tweak the black point variable.


Quote:
and there must be no scanlines across pixels in the picture.
This is how it looks (look at the picture). There are no scanlines across pixels in the picture, you need at least 4x vertical visual scale for this. If you want some sort of acceptable looking scanlines with lower scale ratios then you can use non aligned modulo scanlines (implemented for 800x600 Picasso96 for example) or buy a better display.

Building a custom shader can be fun nevertheless.
Attached Thumbnails
Click image for larger version

Name:	crt-scanline-hires.png
Views:	492
Size:	248.3 KB
ID:	54204   Click image for larger version

Name:	crt-scanline-hires-bp.png
Views:	475
Size:	263.1 KB
ID:	54208  
Attached Files
File Type: rar crt-scanline-hires-bp.rar (2.1 KB, 219 views)

Last edited by guest.r; 16 August 2017 at 21:40.
guest.r is offline  
Old 16 August 2017, 21:48   #107
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
This one looks nice to me, has good character.

Recommended settings for FS-UAE:

Code:
keep_aspect = 1.0
line_doubling = 0
low_resolution = 1
shader = crt-pvm-lite
It's tuned for a 1080p display so if you use something else it might need some tweaking.

Happyhats!

Edit: small tweaks
Attached Files
File Type: rar crt-pvm-lite.rar (1.8 KB, 256 views)

Last edited by guest.r; 17 August 2017 at 15:26.
guest.r is offline  
Old 16 August 2017, 23:13   #108
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
I do appreciate your efforts guys! and not sarcastic either.

As for the shader route now -
1. Still haven't been able to align beamlines with pixels. All the ones I've tried b0rk fonts and pixels look lit from below.
2. Same for removing the dark-color thinning of horizontal pixels by the B and C params (lerp)
3. Overlays just don't work currently, otherwise I could raise the black level for beamlines without applying general brightness (nothing to do with shaders, I'm explaining the below Display tweaks that shouldn't be necessary)

So there would need to be some changes for me to be able to use them with control.

Instead, this is a shaderless workhorse/precision solution with a mask plus Display settings, which can be changed to suit the resolution. Hey - no anti-ringing needed *badum-tschingg*

Enlarged 2x with Nearest Neighbor to show what I mean. (Doing the same thing in a shader, and then just Bicubic down to 1.5x, seems to be a better recipe than the lerp solution in the shader by far.)

I'm not happy with it, but I have to let this go so I'm using this now.

What I found wanting was lack of desaturation, since you should not change gamma from 2.2 for a calibrated flatscreen, and lack of working Overlay to raise the black level for beam line affected pixels only.

Edit: I have posted some more of what I'm trying to achieve in this thread, maybe you can read it and get a shader going that does 1/2/3/4 there! (This is completely independent of the bounds of the rect size you want for your "physical size flatscreen" if you know what I mean, so it has nothing to do with Windowed mode like in the screenshots. I.e. you can make it 2:2 and window size like in the shots and smaller than a 1084s depending on your flatscreen resolution, or you can make it match 13.3" or whatever it is, or you can make it 19" like a Hantarex arcade CRT, or somewhere around 17" which is what I find ideal.)

If I can make it look like clicking on the screenshots on a 1080p 27" monitor like I have, but with proper colors, this thing will be beat finally. This is how I feel. A reference, and from there favorite games can be tweaked to look shamelessly good.
Attached Thumbnails
Click image for larger version

Name:	NonShader-AsmTwoShot.png
Views:	362
Size:	174.3 KB
ID:	54235   Click image for larger version

Name:	NonShader-Dpaint-Dragon.png
Views:	415
Size:	130.9 KB
ID:	54236  

Last edited by Photon; 17 August 2017 at 00:12.
Photon is offline  
Old 17 August 2017, 16:35   #109
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Heya! I'm sorry for some confusion from my side. My bad.

If we discuss WinUAE scanline options, there are some. I'm not teaching an old expert.

Edit: tried a solid white mask and it didn't change the image ( they don't work like lerp(image_pixel, mask_pixel, alpha), more like lerp(image_pixel, mask_pixel*image_pixel, alpha) and if mask is white the image stays the same).

The formula could also be result_pixel = image_pixel*(alpha*mask_pixel + (1.0-alpha)*white), same thing assuming 0.0-1.0 color/alpha range.

Which means masks can't make an image brighter, which is bad for black point adjustment. A simple shader can be used though together with mask.

If we use integer scaling results can be nice, as intended.

FS-UAE allows you to get nitpicky with a shader though, since you get more info and the image resizing rules are scanline shader friendly.
Attached Thumbnails
Click image for larger version

Name:	MaskIntegerScanlines.png
Views:	417
Size:	5.1 KB
ID:	54250  

Last edited by guest.r; 18 August 2017 at 16:07.
guest.r is offline  
Old 18 August 2017, 02:21   #110
torturedutopian
Registered User
 
Join Date: Apr 2008
Location: France
Age: 41
Posts: 433
Hi guys !
Do you guys & gals know if it's possible to combine several shaders as in RetroArch ?
In retroarch, I usually apply an xbr filter (level 2), scaled 3 times, then apply a crt-lottes, and IMHO, it looks absolutely stunning... I would be completely crazy if I could have such a result on my favorite system, the Amiga !

(BTW, I know I'm offtopic, but is it preferable to use fs-uae with an Intel integrated GPU or an Nvidia GPU ? My Intel integrated GPU is powerful enough for the aforementioned shaders... I'm mostly concerned by input lag)
torturedutopian is offline  
Old 18 August 2017, 14:56   #111
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Can be done.

I made more versions though, the original should behave like in RA. The aditional versions are faster and tweaked a bit, should work nice on an Intel iGPU.

I think input lag is more a core-emu issue, but if a frame is rendered in 2ms instead of 10ms this might help a bit.
Attached Files
File Type: rar xbr-lottes-pack.rar (13.8 KB, 259 views)
guest.r is offline  
Old 18 August 2017, 17:30   #112
torturedutopian
Registered User
 
Join Date: Apr 2008
Location: France
Age: 41
Posts: 433
Thanks so much !!
Actually, I wonder what is better as far as input lag is concerned (along with heavy shaders) :a good NVIDIA GPU and a regular distro or a slow Intel GPU but with lakka and KMS and double buffering... Oh well, it's offtopic anyway as there is no stable fs-uae core for Lakka
torturedutopian is offline  
Old 20 August 2017, 21:57   #113
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Quote:
Originally Posted by nobody View Post
From all of these i prefer hyllian, the colors and light almost match a CRT, but scanlines are a bit too subtle.
You can edit the shader and change some default settings.

In CRT-Hyllian you can adjust the line:

Code:
#define SCANLINES_STRENGTH 0.50
to 1.0 and the scanlines will be stronger.
guest.r is offline  
Old 20 August 2017, 22:24   #114
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
I had best results with

#define SHARPNESS 2.0
#define SCANLINES_STRENGTH 1.0
nobody is offline  
Old 20 August 2017, 23:03   #115
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Yea this should look crispy with good scanlines.

You can get even stronger scanlines by reducing the parameters:

Code:
#define BEAM_MIN_WIDTH 0.86
#define BEAM_MAX_WIDTH 1.0
I'll play with the shader a bit more, perhaps i can implement another more adjustable sharpness implementation.

Edit: Implemented. Now medium sharpness is also supported, the variable to edit is:
Code:
#define SHARPNESS2 1.0     // 1.0 to 3.0
Attached Files
File Type: rar CRT-Hyllian-Lo-Res-WinUAE.rar (2.7 KB, 231 views)

Last edited by guest.r; 20 August 2017 at 23:49.
guest.r is offline  
Old 21 August 2017, 12:31   #116
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
This is after tweaking side by side comparing with my real Amiga 500 plus
(CRT-Hyllian-lowres WinUAE). Quite close but need a "hue shift" option.




#define SATURATION 1.5
#define VSCANLINES 0.05
#define InputGamma 2.5
#define OutputGamma 2.2
#define SHARPNESS 1.0 // 1.0 or 2.0
#define SHARPNESS2 1.0 // 1.0 to 3.0
#define COLOR_BOOST 2.0
#define RED_BOOST 1.5
#define GREEN_BOOST 1.4
#define BLUE_BOOST 1.3
#define SCANLINES_STRENGTH 0.8
#define BEAM_MIN_WIDTH 0.86
#define BEAM_MAX_WIDTH 1.0
#define CRT_ANTI_RINGING 0.8

Where it succeeds: colors saturation and image brightness are almost equal. "Blur" is almost equal now LCD:CRT.
Where it fails: Scanlines are more thin on real A500, there is more constrast, black is true black on CRT (it's very dark grey on LCD), the pixels are separated with a very thin black vertical line all over the image on real A500. Scanlines are almost not visible on areas with more than mid-light pixels on real A500.

Last edited by nobody; 21 August 2017 at 15:42.
nobody is offline  
Old 21 August 2017, 17:26   #117
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
You really got it going.

Yea shader authors more think in terms of RGB/display math here in a modern manner.

Quote:
Quite close but need a "hue shift" option.
Np, is doable. But i would like to remark that it's a pure mathematical implementation. It probably differs from what amiga hardware and crt's were/are doing.

Quote:
Scanlines are almost not visible on areas with more than mid-light pixels on real A500.
This can also be achieved, but could require to reconfigure other settings like gamma too, since brighter pixels would get brighter and dark darker.

You could start with something like this:

Code:
#define SCANLINES_STRENGTH 0.3
#define BEAM_MIN_WIDTH 0.4
#define BEAM_MAX_WIDTH 1.25
As i said overall brightness would be messed up and other settings should be adjusted.

Quote:
the pixels are separated with a very thin black vertical line all over the image on real A500.
Doing this on a 1366x768 display would not look authentic, and it would not look good on any display with a low sharpness shader setting since there is a lot of line interpolation going on. Thin is relative term and the best you can achieve is always 1 pixel thin. Barely noticable on a 4k display though.
Attached Files
File Type: rar CRT-Hyllian-Lo-Res-Hue-Winuae.rar (2.9 KB, 201 views)
guest.r is offline  
Old 21 August 2017, 18:14   #118
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
It took me a good 2 hours, loading stuff on my laptop and A500 Plus (Whdload) side by side and comparing and constantly tweaking here and there lol.
I will check the new one with hue shifting later. I also have a 1280x1024 monitor to test, but if it looks good on 768p i bet it would be better there.

A good example about hue shift is Great Giana Sisters, on the real A500 the sky color is almost if not the same with that blue of C64 that has a bit or red in, but on WinUAE is a clear blue.

correct color

wrong color

Last edited by nobody; 21 August 2017 at 18:41.
nobody is offline  
Old 21 August 2017, 19:55   #119
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,438
I wouldn't say this is a "wrong" color. I have a Sony Trinitron CRT TV and the blue sky color in Giana Sisters looks completely different to your Lemon 64 picture. Every Display looks different. Guest tried to add a hue option in a test shader for me, but it wasn't convincing at all. Not that easy as it seems.
Retro-Nerd is offline  
Old 21 August 2017, 19:56   #120
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
Ok i checked it, with a value around 15 to 20 the colors are almost there now. Maybe if tweaking a bit more other settings it gets better.

#define HUE 15.0 // from -180 to 180

nobody is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shaders Zeraphine support.Amiga Forever 2 15 March 2020 18:46
Looking for dithering shaders for FS-UAE switchblade support.FS-UAE 1 28 July 2015 18:13
CG Shaders Enverex support.FS-UAE 2 05 October 2014 18:51
fx Shaders in WinUAE 2.6.0 crazy46guy support.WinUAE 8 16 June 2013 14:30
Using shaders with FS-UAE on Ubuntu [Solved] DaveMB support.FS-UAE 2 14 October 2012 15:46

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

Top

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