My reading comprehension is probably not the best but as far as I can understand, each point on the grid includes a White sub-pixel that increases brightness. Therefore, it’s possible that there is nothing to consider as a difference from RGB vs White+RGB
I’ve got an LG OLED that is WRGB and although I don’t have a slot mask CRT to compare it to, the Guest-SM shader never looks off to me with the stock mask.
You’re missing some context. Regular subpixel spacing is important if you want mask emulation to be as accurate as possible. The magenta-green “stock” mask was created with this in mind. It might look good enough to you on your display but it’s definitely not working as intended with RGBW subpixels; it needs standard RGB subpixels to have the intended effect. To understand why this is, you have to understand that an LCD pixel is not just a tiny square that displays any color.
If something looks good enough to you, that’s all well and good, but we’re talking about accurately recreating the CRT’s phosphor structure down to the smallest level of detail possible. There’s a lot of good discussion on this elsewhere in the shaders category.
There’s definitely a difference. The subpixel-respecting masks simply won’t work as intended with RGBW subpixels. Hate to be a buzzkill but there’s no solution that doesn’t introduce more problems.
Your best solution will probably be to use one of the Lottes-type masks that disregard the subpixels. You can get a decent result with a high enough resolution, but it won’t be ideal.
That’s fine, I wasn’t suggesting that it was working as intended and as stated I don’t have anything to compare it to. I usually use royale, so I’ll probably go back to that but it still looks good to me.
I wanted to share a shader I have been cooking for some time. It started with GenesisPlusGX, adding a dedither shader before the ntsc simulation block limited the number of shaders I could stack. Unsure if this is a retroarch limitation of the number of shaders, or a limitation of the ntsc filters I started to embed effects into a single ubershader. Effects I wanted to add like vignetting, temperature, black level, and recently LUTs. Now I am able to have all this under crt-royale.
[Dedither]
00 = gdapt-pass0-stripes.glsl
01 = gdapt-pass1.glsl
[Grade]
02 = grade.glsl (GenesisPlusGX LUT fix, Black Level, Vignetting, Color Mangler, Temperature, LUT2 -to display profile-)
[NTSC]
03 = ntsc-pass1-svideo-2phase.glsl
04 = ntsc-pass2-2phase.glsl
[Scanlines]
05 = crt-royale-first-pass-linearize-crt-gamma-bob-fields.glsl
06 = crt-royale-scanlines-vertical-interlacing.glsl
07 = crt-royale-bloom-approx.glsl
08 = blur9fast-vertical.glsl
09 = blur9fast-horizontal.glsl
10 = crt-royale-mask-resize-vertical.glsl
11 = crt-royale-mask-resize-horizontal.glsl
12 = crt-royale-scanlines-horizontal-apply-mask.glsl
13 = crt-royale-brightpass.glsl
14 = crt-royale-bloom-vertical.glsl
15 = crt-royale-bloom-horizontal-reconstitute.glsl
16 = crt-royale-geometry-aa-last-pass.glsl
That screen is pretty nice!
I’ve been doing something similar with guest-dr-venom as a base. Adding vignetting, noise, etc.
I’ll check this out when I get on my PC .
EDIT: That grade shader seems pretty cool, haven’t tested it yet but I went through the code for it (saw some stuff that’ll be super helpful for me, was having issues introducing black level to color-mangler). Thanks for sharing @Dogway
Thanks! Actually the screenshot is before I did the shader refactor yesterday with the LUTs implementation (allows 2 LUTs and toggle them through GUI). I’m trying to target those colors but didn’t have enough time to play with the values. I hope I got the gamma handling correct, everything should happen linearly.
Honestly I didn’t even really pay much attention to the 2 LUT thing when I originally looked over it… Like I saw the LUT toggles but didn’t really read any of it so I guess I just assumed you had separate toggles for the LUTs for some reason that didn’t involve both of them being used in tandem, lol.
I was super curious about the black level situation and the vignette, I tend to parse through sections of code, so I end up looking over a shader multiple times before I get the whole picture of what is going on.
Now I have questions, lol.
How does that work, like does it blend both of the LUTs to get a “new LUT/color profile”?
All except the LUTs were done last year so the novelty for me was the LUTs integration. My goal was to color manage retroarch, so colors can be reproduced correctly on a calibrated display, that’s the main goal of LUT2, I guess not everybody would calibrate the display or use 2 LUTs so it can be disabled. LUT1 is for using some CRT colors emulation luts or in this case a GenesisPlusGX color fix.
Black level I did a few days ago (I posted about it a few days ago), I wanted to wash out the blacks a bit without realising that the color mangler had already a Lift parameter (in R/G/B though).
Vignette, was last year, I think I only copied a chunk from another shader and copied it over. For slang I had to be more creative since I didn’t have any reference whatsoever.
Excuse my ignorance, but how exactly do I use this? It doesn’t seem like other shader presets. I don’t think I can just copy and paste that, rename it to .glslp, etc. If I’m supposed to put it in manually, that’s fine, but as far as I can tell, “gdapt-pass0-stripes.glsl” simply doesn’t exist. I’m just going to assume I’m doing something wrong here. Shader looks amazing in the screenshot, though.
I’m pretty sure that version of gdapt isn’t part of the shader repo, you may try searching it on the forum… I know the shader exists somewhere as I remember seeing it somewhere in the shader threads, lol.
If you gather all of the shaders together, and place them in the correct places, you can copy and paste that glslp (loading it as a regular preset, meaning you don’t have to load each shader in order one at a time.
Tried searching on the forum. Got this and nothing else. I tried googling it. Same result. If anybody’s got a link or something, that would be great, but I don’t want to derail anything.
Yea, I completely understand color managing retroarch. That’s why I personally use color-mangler.
I remember you posting the color-mangler+vignette shader forever ago… I’m pretty sure I asked for a copy, lol.
Personally I prefer having a black level only setting over having to do it via the RGB Lift, so thanks so much for that.
I have a pretty decent vignette code that has a hotspot function which can be used in slang and glsl if you’re interested.
I’ll have to check out your double LUT thing for sure though.
Try this.
I think that’s it, I was posted by @Dogway here;
Seems this was @Sp00kyfox work…
If you need anymore help send me a PM.
Yes, share please, I’m not happy at all with my slang vignette.
I asked for the inclusion of the shader in that thread so I guessed it was already included. The original discussion was here. Admitedly I was a bit of a douche back then, but hey wasn’t it for me pushing forward we wouldn’t have the shader.
On the color management part what I did was calibrate the HDTV with DisplayCAL on the Reshade preset and use the generated LUT with guest.r shader. I really would like to port it to PCSX2 so if I have time I will give it a stab, at first glance the code looks simple.
I uploaded lut_x2 for anyone interested only on the double LUT part of the shader and toggling.
Ehh everyone can seem a little like that sometimes, lol. Could be worse.
I’ll send you the code when I wake up, bout to die. It works for both glsl and slang, haven’t ever messed with cg so idk if it’ll work for that.
@c9f5fdda06 You coming on to me, lol? Nah I’m good just ended up sleeping like 14 hours…
@Dogway Here ya go! Originally from https://www.shadertoy.com/view/lsKSWR
Here’s the setting parameters:
#pragma parameter XFX_VIGNETTE "[Effect] Vignette:" 0.10 0.0 0.5 0.01
#pragma parameter XFX_HOTSPOT "[Effect] Hotspot:" 15.0 10.0 40.0 1.0
The Actual Vignette Code:
vec2 vpos = pos*(TextureSize.xy/InputSize.xy);
vpos *= 1.0 - vpos.yx;
float vig = vpos.x*vpos.y * XFX_HOTSPOT;
vig = pow(vig, XFX_VIGNETTE);
color *= vig;
If you need any refrence for pos/color tags, this was pulled out of my copy of guest-dr-venom. The hotspot works differently from the yours that I tried forever ago, mainly how it interacts with a solid black screen.
Optional Shorter Version of the Vignette Code: (I have tested it on shadertoy and it worked fine so I’m assuming it works until I test it or someone else says something, was pulled from the comments on that shadertoys comment section)
vec2 vpos = pos*(TextureSize.xy/InputSize.xy);
vpos *= 1.0 - vpos;
vig = vec4(pow(vpos.x*vpos.y * XFX_HOTSPOT, XFX_VIGNETTE);
color *= vig;
The parameters values are just some guessing on my part for sane values based on the source material ie. from the shadertoy implementation.
EDIT: Formatting… Also for context about the coming on to me thing, the video link @c9f5fdda06 posted is a bird courting video (mating, lol). Also sorry @c9f5fdda06 about the joke. Sorry about the crappy joke guys…
Just had a look and it was missing a few things like the “params.” prefix for variables. I don’t like the hotspot feature so I removed it. So much better than my previous vignette. Thanks!
vec2 vpos = vTexCoord*(params.OriginalSize.xy/params.SourceSize.xy);
vpos *= 1.0 - vpos.yx;
float vig = vpos.x*vpos.y * params.str;
vig = min(pow(vig, params.pow), 1.0);
color *= (params.vignette > 0.5) ? vig : 1.0;