Honestly quiet a few of MAMEs passes can be used with other presets. (At least like 3-4 off the top of my head.)
any ideas ? i may appreciate any preset you could know in how to mix those two passes with:
shader0 = "../crt/shaders/mame_hlsl/shaders/mame_ntsc_encode.slang"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "NTSCPass"
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "../crt/shaders/mame_hlsl/shaders/mame_ntsc_decode.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "ColorPass"
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
ntscsignal = "1.000000"
shadowalpha = "0.100000"
avalue = "0.000000"
bvalue = "0.000000"
pvalue = "1.100000"
scantime = "47.700073"
notch_width = "3.450001"
ifreqresponse = "1.750000"
qfreqresponse = "1.450000"
Here’s gamma 1.0/1.0, blend mode 2 with a few tweaks (mask strength 100%, etc). Looks fantastic! The edges and beam variation look very natural.
What settings did you use to produce the first screenshot you posted?
I used blend mode 2.0 and increased ntsc resolution. The downside is that it doesn’t blend dithering with games which use this technique, but should look very nice with nes… games.
Some posts above i replied that ntsc blending looks better with lower gamma and why 2.0 is defaulted instead of 2.4. Circumstances connected with bloom/glow passes which tend to share the same gamma value are such, that if glow/bloom/halation is used it looks quite different with low gamma. So 2.0 is a compromise, but 1.0 can be used np with presets which don’t rely on some lighting effects.
Is there any reference to the use case/intention of each mask option? Aesthetically I’m fond of mask 1 but I’m not 100% on when to use which options.
Hey,
masks are currently like WYSWYG and imo it shouldn’t be too hard to pick your fauvorite one or change some options.
Nevertheless, a short description:
-1.0: no mask
0.0: a dense magenta-green mask
1.0: Lottes RGB mask with a some sort of slotmask
2.0: Lottes RGB mask
3.0: Lottes - a bit enlarged and shifted RGB mask
4.0: Lottes - 2x enlarged and shifted RGB mask, looks nicer with 4k+
5.0: a dense magenta green mask (trinitron mask controls)
6.0: RGB mask (trinitron mask controls)
7.0: BW mask (trinitron mask controls)
8.0: BWW mask (trinitron mask controls)
9.0: magenta-green-black mask (trinitron mask controls)
10.0: RGBX mask (trinitron mask controls)
11.0: Red-Yellow-Cyan-Blue mask (nice for 1440p+)
12.0: Red-Magenta-Cyan-Green mask (similar to 11.0, but for BGR panel layout)
13.0: RRGGBBX mask (looks nice with 4k+)
Slotmask options are a bit more complicated to describe, it’s desired to match the slotmask width with the used regular mask width and then increase both strength values.
Some parameters are a bit self explaining i guess, don’t be afraid to experiment a bit…
Also note that if you change the “mask shift/stagger” value for a mask, it changes dramatically. For example mask 2 with stagger 1 looks similar to mask 3 with stagger 0, but a bit better for 480p content.
What kind of monitor is that? That’s typically only a problem for very old displays, even a cheap 1080p work monitor shouldn’t have any such problems these days. EDIT okay so this can still be a thing on recent monitors, apparently, particularly the ones that boast 120+ Hz refresh rates.
Probably won’t help, but have you tried flipping the mask?
All LCD monitors have inversion artifacts. There doesn’t exist any LCD panels that don’t have it. What kind of artifacts depends on which inversion scheme the monitor uses. Mine (a 165Hz IPS) just happens to exhibit artifacts with that particular mask pattern, that’s all.
I don’t know what that means
Just saying that the only time I’ve ever encountered anything like that was with a 10+ year old display. Guess I’ve had good luck in that regard.
try adding this line
mask_layout = "1.000000"
Oh you meant BGR. No it doesn’t fix it. It reduces it a bit though.
Yeah that was a shot in the dark. IIRC the only way to eliminate it completely is to reduce the mask strength until the inversion artifacts go away.
I like to decrease the step value in the shader for some parameters, but when I do this the shader just quits (doesn’t get applied).
for example for bloom default is:
#pragma parameter bloom " Bloom Strength" 0.0 -2.0 2.0 0.05
#define bloom global.bloom // bloom effect
but when changing the step value to 0.01, like below, the shader doesn’t get applied any more:
#pragma parameter bloom " Bloom Strength" 0.0 -2.0 2.0 0.01
#define bloom global.bloom // bloom effect
this also happens with some other parameters, like bright boost dark pixels, lowering step value isn’t possible. In older shaders this used to cause no issues.
Any idea what’s happening? Above was tested with hires shader and vulkan driver.
This is a parameter duplication issue, when a parameter line resides in two separate shader files. You need to adjust the step value in the main shader file as well as in the deconvergence pass. Then it should work.
Hey guys - hope everyone is having a nice week. I read through most of this chain just to increase my own knowledge of shader stuff in general, and came away with some questions. I hope these aren’t dumb questions but maybe there are other lurkers or readers who might have similar questions, so I’ll go ahead and ask.
I am struggling to understand: what are the key differences between what (I think) are the three main shaders being discussed here:
- SM
- Advanced
- Dr. Venom
I suppose what I am asking is, does each have a specific “character” or “quality” that differs from the others? Like were each of them designed independently (by Guest) for different purposes/intents? I know they are all configurable. I know that the scanline appearance can be changed in all of them, and the masks - is it possible to use SM and get very similar results to DV? Or do they have inherent qualities to them? Like SM blends things in a different way than Advanced than Dr. Venom, etc.
Said another way, is there a reason why someone would or should pick one of these over the others?
Follow-up - I understand that the NTSC (incorporating NTSC effects) and hires (intended for use on content above 480p) versions of the shaders are variations of the original underlying shader. What about the fast and fastest variations - do those just take the shader in question and strip out some configuration options in order to reduce the passes and improve performance?
Fingers crossed these aren’t dumb questions!
Just use the ‘advanced’ version, crt-guest-dr-venom and crt-guest-sm are discontinued and the ‘advanced’ version is a ‘superset’ regarding features of these two.
Well, they have less features which brings more speed, like 4k usage can be achieved on weaker adapters, they are igpu/apu friendly etc.
But you can get almost identical results with all three versions (regular, fast, fastest).
Most prominent regular version candies are:
- TATE mode
- afterglow / phosphor trails
- raster bloom
- smart edge interpolation
If you don’t mind these effects you can use the fast version np.
There is also the ‘HD’ version, which can filter in both horizontal and vertical direction, very nice for high res content, xbrz textures etc. It’s lighter than the hires version, but has better filtering. Hires version has some ‘regular version’ candies though.
Thanks - this is a hugely helpful reply. I will focus only on the advanced variations from here on out. I’m liking your shaders because they play nicely without integer scaling. There are some other shaders I like well enough, but which exhibit moire and/or uneven (clumped/banded) scanlines. I’m looking to output at 1080p (even when connected to a 4k TV) and use crt-styled overlays to cover the black bars (like the Exodus CRT overlays) - so integer scaling is out; having a shader that won’t do weird stuff in this use-case is a must for me.
I also appreciate that this shader allows selection of different masks, so it can effectively replicate crt-aperture or crt-lottes or a pvm - thereby sort of serving as a kind of “master shader” which can get you to any destination you might have in mind. If that is the intent then kudos.
I’ll have to play around with more of the features to see what I need and what I don’t. What is TATE mode and what is smart edge interpolation?
I didn’t realize this was the case. Dropping the other 2 variants will certainly make it easier to integrate everything whenever I update the official repo