Configuring CRT-Easymode


#1

Hi Easymode,

First, thanks again for the incredible work on your shader. I was going through the epic “scanline screenshots thread” over at Neogaf when I saw this post you made:

Post #54; Page 2, Scroll down to 4th post.

That screenshot of Sonic is pretty much EXACTLY what I want my retro games to look like. The trouble is, CRT-Easymode with the default settings doesn’t look like that. Could you post settings for achieving the look seen in that screenshot? Edit: I just realized the screenshot you posted in that thread is a higher resolution than 1080p. Is this why the posted screenshot looks different from the default settings at 1080p? The most noticeable difference is that the grille is more defined in the screenshot, which could be explained by a higher resolution.

Another set of settings for a shadowmask TV would be helpful as well. Could you also provided a set of suggested settings to get close to the Zelda screenshot seen here (minus the screen curvature): http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Board=mamechat&Number=332320

Here’s another shot for reference, from an actual RGB CRT TV: Explore Craig Duncan

Is there some kind of guide to all these settings, somewhere? I just don’t understand all the variables well enough or the relationships between them to achieve what I want, although I know what I want is achievable given the screenshots I’ve seen of CRT-easymode in action.

I’m sure there are others who would like to know what settings to use to achieve the look seen in those shots. If you or anyone reading this can provide those settings, it would be really helpful.


#2

Hi Nesguy,

You’re correct that the higher resolution of the screenshot (1440p) is the reason for the difference in appearance when running at 1080p. The mask is fixed-pixel, so higher resolutions result in a finer dot pitch. Also, all of my screenshots are with Integer Scale turned off (under RetroArch’s video settings).

However, since crt-easymode uses a 3 color mask, and 1440p results in a 33% finer mask, using a 2 color mask @ 1080p should create a very similar result as shown here:

That screenshot is from crt-easymode-halation, which has a bunch of predefined 2 and 3 color masks. Here’s the settings I used in the above screenshot that differ from default:

Sharpness H. 0.5 Mask Type 1.0 Scanline Strength Min. 0.35 Scanline Strength Max. 0.65

If you’re able to run the new halation shader, I recommend using that over my original shader. The new shader’s parameters are more intuitive, plus it’s noticeably brighter.

For the Zelda shadowmask example try these settings:

Mask Type 6.0 Scanline Strength Min. 0.25 Scanline Strength Max. 0.75

Here’s a screenshot of the results:

Or you could use crt-lottes, which is what that original screenshot used.

As for a guide to the parameters, that’s a good idea. When I have the time I’ll make a README with explanations for everything.

In the meantime, I’ll try to explain a few quirks:

When the parameters say Min and Max (ie. Scanline Strength Min.), it allows you to set the strength of the effect differently for bright and dark colors. For example, if I want the scanlines to be invisible in white, I would set Scanline Strength Min. 0.0. Conversely, if I I want scanlines to be very bold in dark tones, I would set Scanline Strength Max. 1.0.

The beam parameters are a bit different. Setting the Min. lower (ie. 0.5) will result in a narrower beam for dark colors, while setting the Max. higher (ie. 4.0) will make the beam thicker in bright colors. This effect is the scanline variability you refer to here, although it’s not very accurate in it’s current form. I should revisit this another time.

The new Mask Type parameter in the halation shader allows you to select from 7 predefined masks:

1 - 2 color aperture grille 2 - 3 color aperture grille 3 - 2 color lottes-halation shadowmask 4 - 3 color lottes-halation shadowmask 5 - 2 color dithered mask 6 - 3 color lottes shadowmask 7 - 3 color uncompressed shadowmask (for high res displays)

Hope this clarifies a few things. Let me know how things turn out, and feel free to ask any questions.


#3

Thanks! I was wondering what the 7 mask types were trying to emulate


#4

[QUOTE=EasyMode;29063]In the meantime, I’ll try to explain a few quirks:

When the parameters say Min and Max (ie. Scanline Strength Min.), it allows you to set the strength of the effect differently for bright and dark colors. For example, if I want the scanlines to be invisible in white, I would set Scanline Strength Min. 0.0. Conversely, if I I want scanlines to be very bold in dark tones, I would set Scanline Strength Max. 1.0.

The beam parameters are a bit different. Setting the Min. lower (ie. 0.5) will result in a narrower beam for dark colors, while setting the Max. higher (ie. 4.0) will make the beam thicker in bright colors.[/QUOTE]

You say that to get scanlines to be invisible in bright colour areas you would set the ‘Scanline Strength Min’ value to ‘0.0’ BUT if you want bold scanlines in bright colour areas you changed the ‘Scanline Strength Max’ setting to 1.0???..so what happens if you dont touch the ‘Scanline Strength Max’ setting and just change ‘Scanline Strength Min’ value to 1.0???, surely that then makes the scanlines more visiable in bright colour areas???, as if setting it to ‘0.0’ makes them invisible in bright areas then setting the value to ‘1.0’ has the opposite effect and makes them very visible??, if this is the case then whats the point of the ‘scanline Strength Max’ setting??

I basically prefer the more bolder SONY BVM scanline look to my games and want to achieve equal scanline width/strength across the screen, the scanlines in the bright colour areas are the same width/strength as they are in dark colour areas. I finding it hard to understand what i need to set these Scanline Strength setting as???. I’ll take a stab at it though…

If i want to adjust the strength of the scanlines in dark colour areas i need to alter the ‘Scanline Strength Max’ setting and to adjust the strength of the scanlines in the bright colour areas i need to adjust the ‘Scanline Strength Min’ setting, is this correct??, if so is that the same for the beam parameters min and max settings also??. If this IS the cause would it make more sense to change the name of the parameters to something like…

‘Scanline Strength Bright Colours’ ‘Scanline Strength Dark Colours’

So if i changed the ‘Scanline Strength Min’ & ‘Scanline Strength Max’ to the same value, ie…

‘Scanline Strength Min 0.80’ ‘Scanline Strength Max 0.80’

would this give me equal scanlines in both dark and bright areas, or is it not as simple as that??.

Is there an algorithm that can be use in the shader so it automatically adjust the scanline strength whilst keeping equal scanline strength across the whole screen, so scanlines are the same weather in dark or light areas and call that parameter something like ‘Equal scanlines setting’ and this can just be turned on and off, so it works out what the Scanline Strength Min & Scanline Strength Max settings need to be to achieve equal scanlines without the user having to do trail and error with the min and max settings to work this out. Maybe look at then removing the Scanline Strength Min and max settings and just have one setting called ‘Scanline Strength’ or have both settings in (for people who like to manually change stuff) and enabling this ‘equal scanline setting’ disables the ‘scanline strength min & max’ settings and enables the ‘Scanline Strength’ setting . Also have the same type of option for the Scanline Beam parameters

Does any of that make any sense to you Easymode…i know its alot to throw at you, just thinking on how to make it more straight forward to achieve even scanlines or maybe it is and im just not understanding it correctly!?


#5

[QUOTE=BlockABoots;29083]You say that to get scanlines to be invisible in bright colour areas you would set the ‘Scanline Strength Min’ value to ‘0.0’ BUT if you want bold scanlines in bright colour areas you changed the ‘Scanline Strength Max’ setting to 1.0???..so what happens if you dont touch the ‘Scanline Strength Max’ setting and just change ‘Scanline Strength Min’ value to 1.0???, surely that then makes the scanlines more visiable in bright colour areas???, as if setting it to ‘0.0’ makes them invisible in bright areas then setting the value to ‘1.0’ has the opposite effect and makes them very visible??, if this is the case then whats the point of the ‘scanline Strength Max’ setting??

Clip [/QUOTE]

I think what you want can be achieved by setting both brightness min and max to their lowest value, and setting “scanline strength” to maximum.


#6

[QUOTE=EasyMode;29063] Clip

Hope this clarifies a few things. Let me know how things turn out, and feel free to ask any questions.[/QUOTE]

Great info, thanks! I’m getting some incredible results, now. I didn’t think it was possible at 1080p to do a convincing aperture grille, but you did it.

questions- if I can’t run easymode-halation, are there any other settings changes you would recommend? How does one set the different mask types in the regular version of easymode? I’m guessing dot width and stagger produce different mask types?


#7

Yes.

[QUOTE=BlockABoots;29083]If this IS the cause would it make more sense to change the name of the parameters to something like…

‘Scanline Strength Bright Colours’ ‘Scanline Strength Dark Colours’[/QUOTE]

That’s a good idea.

[QUOTE=BlockABoots;29083]So if i changed the ‘Scanline Strength Min’ & ‘Scanline Strength Max’ to the same value, ie…

‘Scanline Strength Min 0.80’ ‘Scanline Strength Max 0.80’

would this give me equal scanlines in both dark and bright areas, or is it not as simple as that??.[/QUOTE]

It’s as simple as that.

0.8 Might be a bit high for 1080p non-integer since stronger lines can look more uneven. 0.65 Is about as high as I would go. I would also recommend Mask Type 1 for you since those professional Sony CRTs have a very fine pitch.

Having min and max parameters allows the shader to achieve a wider variety of results, which is something I don’t want to sacrifice. I’d also rather not add toggle parameters for this behavior since it would increase confusion and I would prefer to keep the parameter count from growing.

[QUOTE=Nesguy;29107]Great info, thanks! I’m getting some incredible results, now. I didn’t think it was possible at 1080p to do a convincing aperture grille, but you did it.

questions- if I can’t run easymode-halation, are there any other settings changes you would recommend? How does one set the different mask types in the regular version of easymode? I’m guessing dot width and stagger produce different mask types?[/QUOTE]

I’ll probably update crt-easymode to have the same parameters as the halation shader. Setting dot width 2.0, stagger 3.0 will get you the shadowmask in the Zelda screenshot above, but the regular shader is currently limited to a 3 color mask.


#8

Thanks for the reply EasyMode, regarding the scanline beam parameter, whilst setting that at a higher makes the scanlines wider does it also make the edges of the scanline softer as they would appear on a CRT, or are the edges still sharp?

Also any decision to add a Vignette effect to your shader, kind of like that effect in solid12345’s new shader and think it would make a nice addition to your shader. Maybe have a value slider so the intensity of it can be altered?


#9

[QUOTE=EasyMode;29135]Yes.

I’ll probably update crt-easymode to have the same parameters as the halation shader. Setting dot width 2.0, stagger 3.0 will get you the shadowmask in the Zelda screenshot above, but the regular shader is currently limited to a 3 color mask.[/QUOTE]

good to know! Do you have any suggested alterations to brightness or gamma if not using the halation shader?

regarding the scanline variability, I haven’t actually been able to disable it. I thought setting beam min/max to 0.50/0.50 would do it, but I still get slightly thinner lines over white areas. I find this to be a desirable feature, but how do you actually go about disabling it, if for some reason someone wanted to?

You may want to check out crt-hyllian, I find that it does a pretty good job of handling scanline variability.


#10

I think, after playing around with the various mask options, that I’ve come to the conclusion that displays are going to need to have higher resolution than 1080p and be a lot brighter in order to properly emulate scanlines AND a mask. When you add both scanlines and a mask /aperture grille, the screen loses a ton of brightness. Cranking up the display’s backlight to 100% helps, but doesn’t fully compensate for the loss of brightness and destroys black levels. Using “brightness boost” can help, but it also washes out the colors. Reducing the scanline and/or mask strength can allow the screen to achieve a sufficient level of brightness, but then the scanlines and/or mask are too faint to achieve the desired effect, and I no longer see the point.

I couldn’t get the shadowmask to look good at a resolution of 1080p; it always resulted in a distracting “honeycomb” effect unless I was very close to the screen. Adjusting the intensity of the mask to reduce the honeycomb effect just resulted in the mask becoming too faint altogether. The aperture grille I found to be much more satisfactory, but in the end, it just causes too much brightness and contrast to be lost. Once the scanlines and mask strength are at an acceptable level, it becomes difficult/impossible to compensate for the loss of brightness without it having an adverse effect on contrast and/or color. These are the settings I found to be most satisfactory in attempting to emulating an aperture grille: Sharpness H - 0.00 Sharpness V - 0.65 Mask Strength 0.4 Scanline Strength 0.80 Scanline Beam Width Min - 0.50 Scanline Beam Width Max - 0.50 Scanline Brightness Min - 0.00 Scanline Brightness Max - 0.00 Brightness Boost 1.5 everything else - default

This is pretty good, but I find that the resolution isn’t quite high enough to make the mask look convincing, and that if I increase the mask strength much beyond this level it becomes too difficult to compensate for the loss of brightness while maintaining contrast and color. I think that it may be the case that displays will NEVER be bright enough to properly emulate a mask, because it just wouldn’t make sense for manufacturers to design TVs with maximum brightness levels that are that high. I think that a higher resolution brings better results because you can then have a finer and more defined mask while maintaining screen brightness.

So far, the most satisfactory results I’ve gotten without using a mask are with CRT-Easymode, with the following changes to the default settings: Sharpness H - 0.00 Sharpness V - 0.65 Mask Strength - 0.00 Scanline Strength - 0.80 Scanline Beam Width Min - 0.50 Scanline Beam Width Max - 0.50 Scanline Brightness Min - 0.00 Scanline Brightness Max - 0.00 Brightness Boost - 1.20

My display’s backlight setting: 80-100% depending on room light

This is crt-like enough for me, and also gets close to what the output of an XRGB-mini looks like when configured to add horizontal blur and scanlines and upscaled from 720p.

I think my “shader quest” may be over, at least until displays get a lot brighter, which might never happen. Finally, I can play some games! :slight_smile:


#11

What about…

Sharpness H - 0.75 Sharpness V - 1.00 Mask Type 1.0 Mask Strength 0.20 Scanline Strength 0.75 Scanline Beam Width Min - 0.50 Scanline Beam Width Max - 0.50 Scanline Brightness Min - 0.75 Scanline Brightness Max - 0.75 everything else - default

??


#12

[QUOTE=BlockABoots;29230]What about…

Sharpness H - 0.75 Sharpness V - 1.00 Mask Type 1.0 Mask Strength 0.20 Scanline Strength 0.75 Scanline Beam Width Min - 0.50 Scanline Beam Width Max - 0.50 Scanline Brightness Min - 0.75 Scanline Brightness Max - 0.75 everything else - default

??[/QUOTE]

I’ll try it out, I also made some minor adjustments to my last post - for the aperture grill settings, I raised scanline strength slightly to 0.8 and lowered mask strength to 0.4.


#13

[QUOTE=BlockABoots;29230]What about…

Sharpness H - 0.75 Sharpness V - 1.00 Mask Type 1.0 Mask Strength 0.20 Scanline Strength 0.75 Scanline Beam Width Min - 0.50 Scanline Beam Width Max - 0.50 Scanline Brightness Min - 0.75 Scanline Brightness Max - 0.75 everything else - default

??[/QUOTE]

I’m sorry, but no. This is far too bright and too sharp compared to any CRT I ever owned, and any scanline or mask emulation is hardly even noticeable. Not even an XRGB-mini looks this sharp unless you’re outputting at 1080p. Here are some example shots using the settings I provided. As usual, you have to click the image and then use the zoom function on the page that comes up to view the image at the correct scale. I’ve also increased my monitor’s backlight to 100%, which compensates for the loss of brightness without tampering with the colors and contrast. If these shots appear dim, you may need to increase your TV/monitor’s backlight setting.

Aperture Grill Settings:

No Mask Settings:

Currently, I’m preferring no mask. At 1080p, the mask doesn’t seem like it is worth the loss of color and contrast, even though this can be minimized with the right settings. However, some might prefer the mask if they prefer the look of “fuzzy” scanlines.

I think I may also lower V sharpness to around 50 and see how that looks.

EDIT: Just realized that you may be using the easymode-halation shader, which might look very different with the settings you posted. I’m using only CRT-Easymode by itself.


#14

Ah yes indeed I am. May I ask why your not using his newer halation shader?..you don’t have to have the halation effect enabled if you don’t want but I find it adds a nice glow that you get from crts.

Also you seem to be making conflict statements you said in a previous post…

But above you say that the settings I suggested are far too bright!!

It might be worth trying easymode’s latest version?


#15

[QUOTE=BlockABoots;29237]Ah yes indeed I am. May I ask why your not using his newer halation shader?..you don’t have to have the halation effect enabled if you don’t want but I find it adds a nice glow that you get from crts.

Also you seem to be making conflict statements you said in a previous post…

But above you say that the settings I suggested are far too bright!!

It might be worth trying easymode’s latest version?[/QUOTE]

The halation shader is more resource intensive and won’t quite run on my old dual core workstation that I’ve converted into an emu box. It could also add input lag as a result of this, and I play a lot of twitch games.

I don’t know why you think I’ve contradicted myself. To clarify: displays are going to need to be a lot brighter in order to properly emulate both scanlines and a mask without the screen becoming unacceptably dark. With the settings you posted, you’ve got a bright screen- overly bright, I’d say- but there is barely any hint of scanline or mask emulation present, and the intended effect is lost.

The challenge with all CRT shaders is overcoming the brightness limitation of current display tech while still providing convincing scanlines and/or a mask. With current display tech this means you have to strike a compromise between brightness, color, contrast, and mask/scanline intensity.

4K and OLED might solve this, but as mentioned earlier, it’s possible that displays will just never be bright enough to properly emulate the shadowmask, because it would involve a max brightness level that was much higher than would ever be used under any normal viewing conditions. Manufacturers likely aren’t going to seek to push the max brightness that high because it would be a waste and it would only serve a very small niche.


#16

[QUOTE=BlockABoots;29138]Thanks for the reply EasyMode, regarding the scanline beam parameter, whilst setting that at a higher makes the scanlines wider does it also make the edges of the scanline softer as they would appear on a CRT, or are the edges still sharp?

Also any decision to add a Vignette effect to your shader, kind of like that effect in solid12345’s new shader and think it would make a nice addition to your shader. Maybe have a value slider so the intensity of it can be altered?[/QUOTE]

If you lower the brightness the edges will appear softer, but I don’t think it’s a worthwhile trade-off. At 1080p non-integer, there isn’t much room to play with the beam parameters while keeping the lines looking even, so I keep things set to 1.0/1.0.

I’ll be adding a vignette effect with an intensity parameter, I just don’t know when. I’m pretty lazy :).

[QUOTE=Nesguy;29160]good to know! Do you have any suggested alterations to brightness or gamma if not using the halation shader?

regarding the scanline variability, I haven’t actually been able to disable it. I thought setting beam min/max to 0.50/0.50 would do it, but I still get slightly thinner lines over white areas. I find this to be a desirable feature, but how do you actually go about disabling it, if for some reason someone wanted to?

You may want to check out crt-hyllian, I find that it does a pretty good job of handling scanline variability.[/QUOTE]

Setting gamma to 2.4 in / 2.2 out should improve visibility in dark areas.

Setting the beam to 1.0 / 1.0 produces even results. However, when the brightness boost is applied it inadvertently makes those thinner lines. Lowering brightness boost to 1.0 should stop that, but like I said above, I don’t think the trade-off is worth it.

Hyllian’s scanline variability is indeed very nice looking.

Resolution and brightness are definitely the most limiting factors in CRT emulation. So many compromises have to be made, especially if you want non-integer scales to look good.

The halation shader makes some improvements when it comes to brightness. It automatically compensates as scanline or mask strength is increased, which keeps things bright and colorful. It has it’s limitations though.

I wonder if the HDR tech that’s showing up in new TVs can help in this area, assuming GPUs and shaders added support for it. Currently, RetroArch shaders are limited to outputting colors in the 0.0 to 1.0 range. An expanded range like 0.0 to 2.0 would be a godsend.


#17

[QUOTE=EasyMode;29265] Setting gamma to 2.4 in / 2.2 out should improve visibility in dark areas.[/quote]

Thanks! That helps quite a bit - see the results below. Honestly, I see very little to complain about in my latest shots that isn’t a limitation of 1080p resolution. This is coming very close to the real thing.

Is there a limit to how high gamma can be pushed? I don’t really understand gamma very well, to be honest. Does it adjust the black level and the white level at the same time? Or does it try to raise the brightness of the middle range without altering black/white level? I’ve never really understood it.

Do you have any further suggestions for brightness/gamma adjustment based on my latest shots/settings? I think contrast could be a little higher and that the color might still be a little washed out in some areas.

Setting the beam to 1.0 / 1.0 produces even results. However, when the brightness boost is applied it inadvertently makes those thinner lines. Lowering brightness boost to 1.0 should stop that, but like I said above, I don’t think the trade-off is worth it.

For kicks, I turned off the brightness boost to see what would happen. As expected, the result was an unacceptably dark screen with scanlines applied even with my display’s backlight at 100%. This was with the mask turned off, scanlines only.

I prefer to keep beam at 0.5/0.5 because this gets as close as possible to “1:1” scanlines, where the gaps are of equal thickness to the visible lines. I think 1:1 scanlines look better, and it seems to be what’s desired by those who care about scanlines. I don’t mind the slight beam variation that occurs with this - I see it as an added bonus.

I wonder if the HDR tech that’s showing up in new TVs can help in this area, assuming GPUs and shaders added support for it. Currently, RetroArch shaders are limited to outputting colors in the 0.0 to 1.0 range. An expanded range like 0.0 to 2.0 would be a godsend.

oooh, hadn’t thought of that. Yes, that would be helpful :slight_smile:

Here are my latest settings: H sharpness: 0.0 V sharpness: 0.50 mask strength: 0.60 scanline strength: 0.80 beam min width: 0.50 beam max width: 0.50 scanline min brightness: 0.00 scanlines max brightness: 0.00 input gamma: 2.4 output gamma: 2.2 brightness boost: 1.6 dilation: 0.00 everything else default.

I’m using 5x vertical integer scale for all shots in this thread, and my display’s backlight is set to 80-100%.

Here are some example shots with these settings (click image and then click the zoom icon on the new page to see at original scale) :

Here is the same shot of Samus on an NEC 2530:

You can visit the thread that the above shot came from to see several close-ups of an XM 29 plus, including one of Secret of Mana: http://shmups.system11.org/viewtopic.php?f=6&t=34162&start=30

I think this is getting pretty close to the real thing in terms of brightness, color, contrast, and the prominence of the mask/scanlines. I think the color and contrast might still be improved slightly, though.


#18

made a few changes to my settings in the last post and posted new shots; I bumped up gamma input/output to 2.6/2.4 and I reduced brightness boost to 1.4. I think this is ever so slightly better, but at this point it could be placebo.


#19

Is there any way that the automatic brightness adjustment can be added to the regular version of CRT-easymode? I think there are too many variables to consider when trying to emulate a mask and scanlines if the goal is maintaining color, brightness and contrast. I’ve been fiddling for days and while I’ve gotten results that I think are okay, I feel there is still some slight room for improvement.

The halation version is just a tad too intense for older systems, while the regular version of easymode runs fine on my old dual core workstation. This makes it ideal for MAME cabs/ emu boxes. An automatic brightness adjustment for the regular version of crt-easymode would be really useful to this group of users.


#20

Nesguy, why not try and create a overlay where you use the overlay for the increased brightness ? A overlay would be cheap, performance wise, and should run on older hardware. You could add any wanted increase in HDR, brightness/contrast/color etc… to the overlay itself, and avoid messing with the shader. For example. You could use Photoshop and create a fullsize, fullscreen white overlay, with whatever transparency setting you want, and use the alpha channel’s layer parameters (Lighten, Darken, Multiply, etc…) try Overlay, and adjust the opacity levels to suit. When used in Retroarch, the overlay should add brightness, contrast, etc… to your image. And any increase wanted could then be tweaked in Photoshop, or even the shader.