New CRT shader from Guest + CRT Guest Advanced updates

Step 1: Organize Your ROMs

Make sure your games are in two separate folders:

  • /roms/GameBoy/ → for Game Boy games
  • /roms/GameBoyColor/ → for Game Boy Color games

Step 2: Set Up GB Shader

  1. Launch a GB game from /roms/GameBoy/
  2. Open Quick MenuShaders → Load your preferred DMG-style shader
  3. Go to Overrides → select "Save Content Directory Overrides"

Step 3: Set Up GBC Shader

  1. Launch a GBC game from /roms/GameBoyColor/
  2. Apply your GBC shader (or leave it as-is if you like the default)
  3. Again, go to Overrides"Save Content Directory Overrides"
4 Likes

I did everything except the overrides. I didn’t know it play a major role in that. Thank you.

Yea, it is still not working. Idk why and it did the same with my last RA which was 1.17, I think. Idn what is going on.

Hey! I can’t say anything certain without a tester, but it’s quite possible that the default layout will be suitable, since white subpixels aren’t anything new with OLED’s.

Some while ago the BGR layout was ‘blue pixel first’, but it didn’t work out to well with slot masks, so i changed it back to RBG for a current whole pixel.

It might work out with the new OLEDs as well if we push red subpixel to the beginning.

If testings prove differently, then a new layout could be inserted. Lots of room for this regarding parameter values.

1 Like

try to go to :

../config/core_name/

delete all shaders related files (.slangp)

then re-do the saving procedure

Load game -> load the shader

then

Shaders -> Save Preset -> Save Content Directory Preset

(there should be no need to save any overrides…)

5 Likes

Worked like a charm, thanks and sorry for being way offtopic.

3 Likes

It’s not loading the preset, I’m afraid. It read “Failed to Apply Preset” I put it in the shaders directory as you instructed too. Idk why this pops up, honestly.

new version NES https://www.mediafire.com/file/1thnh8jgfynm2mv/nes.slangp/file

3 Likes

Thanks, works like a charm, Bact.

4 Likes

Still in the lab messing about, been playing with colors like crazy, probably came up with about 100 different preset variations since I last posted. I think this look might be the one I may go with though, I think the colors got a nice pop to it which is my aim.

Edit:

More tweaking this time with some before and after shots. First pic is from my currently available preset pack (haven’t touched those presets in months) second pics are what I’m working on now:

Trying to improve the 480i image as well.

7 Likes

Looks like a great update, would definitelly go for it.

From my experience a tad different filtering setup can benefit high resolution content the most. But if your presets involve the HD version, then the user can simply play with the internal resolution or ntsc resolution scaling parameters for the desired effect.

Not much need to change other settings for a start.

2 Likes

Yeah maybe I should stop here and just put out what I have, if not I’ll literally keep tweaking because I’ll just keep experimenting with different looks. Even since the last post I created about 5 different new variations lol, just a habit of mines.

Oh yeah HD is pretty much the only version of your shader that I use, I think that one is the best out of all of them. I love it so much I even made my own Frankenstein version by swapping out all the passes in the ntsc guest shader and replaced them with all the hd passes.

I think I did try playing with the internal resolution setting once, can’t remember the results it gave me but I guess I can try one more time.

This is the latest look I have at the moment:

Colors popping out everywhere, might be too saturated for some but I like this look. Maybe I should just wrap things up here and go with it I’ll see.

8 Likes

I think the 480i is a definite upgrade. For the 240p, :thinking:, not sure. I like the softer look of the original but I like the lack of strong vertical lines in the new one. I can see more of the black background rather than the slight lines that appear.

1 Like

Yeah the saturation and brightness was one of the main issues with 480i content, I think I found a sweet spot for them both now.

I know what you mean by the “softness”, it was the “magic glow low strength” that gave it that look but only because I had it cranked up. The sacrifice to that was that it literally made certain details on pixels dissappear like the shade in Ryu’s clothing or the shade in the OutRun clouds:

Before and after pics:

I also finally lowered that “black mask” setting that was causing the vertical lines as you say, lowered it down to .03 I believe.

Couple other pics I took the other day still messing about:

I’m trying to stop and just put this pack out but then I end up going back to tweak something again thinking I can either add or change something lol.

4 Likes

Gotta say, I’ve been skeptical about some of the changes since your last pack was released, but each time you post screens and explain what to look for I fully get what you’re going for and can clearly see the improvement. What you’ve got now is nothing short of amazing! Honestly, I’d love to take the current version for a spin. If you don’t mind me asking, what’s the big “thing” you’re displeased with at the moment?

2 Likes

Thank you I appreciate it. To answer your question my answer is literally “I don’t even know”. My end goal is always a “vibrant and colorful image” so my thing these days is pretty much colors, I like playing around with the different tint settings in grade and creating new looks with the colors.

I saw Hyllian say in a post the other day he’s creating his own “LUT”, I guess I’m doing something similar except I’m not basing it on any known television set, I’m simply going off what my eyes thinks looks “cool” and if I can make the overall image look better than my last pack that’s always a bonus. Can’t say I’m going for anything “accurate” either especially since I purposefully raised saturation and brightness through the roof.

I’m pretty much 90 percent finished tweaking though, I may go play around with composite just a bit more then I’ll just throw this out there, I’m always looking for ways to get a cleaner sharper composite image. I can always come back and make revisions later if I need to.

Edit:

Speaking of sharpening composite @guest.r I’ve been doing some random testing with both the “ntsc filtering gamma correction” and the “fsharpen - deblur strength” settings. I’ll start with the first one.

So I noticed on 3phase games if I turn that gamma correction setting all the way down it kind of “cleans” up some fuzzy looking blur in between pixels for example here’s my composite preset with ntsc gamma correct at default 1.0:

Here’s after turning it down to 0.25

In the first shot if you look at Mario’s eye, his side burn, the vertical black line in the coins at the top, the outline of the “x” and the mushroom icon they all have this extra “pixel fuzz” as I like to call it but it mostly clears up after lowering that gamma setting making for a cleaner looking image.

Another example shot before and after shot:

You can see in all the cactus eyes are not fuzzy looking anymore, Marios face and the castle seem to have more clarity and sheen as well even the letter “m” and “w”.

On 2phase games though it seems I get better results actually raising that setting. For example here’s the Sonic waterfall with default ntsc gamma correct:

Here’s after raising it to about .40:

The waterfall white streaks seem to have a bit more shine to them making the waterfall itself appears a bit more vibrant.

Another example with the Shinobi III waterfall:

This one probably isn’t as noticeable as the Sonic example but there’s a small difference between the waterfalls if you compare them.

On to the “deblur” setting I noticed I can seem to achieve similar results in 3phase games as far as getting rid of those “fuzzy pixels” in between lines. Here’s with deblur at default (off):

Notice Mario’s eye and in between the “$” sign at the bottom. Now after raising the deblur setting it clears that up:

That seems good until I apply that to 2phase games. Here’s deblur off:

Here’s after cranking it up barely pass 2.00:

If you noticed where Sonic is raising the peace sign there’s these 4 “dots” at the corner of eye that’s revealed the most, the deblur setting makes two of those pixel dots dissappear making for a weird looking image. I’m not sure where else on the screen where it may have “stripped” away other small pixel details that O haven’t noticed but that’s the main one.

My question in all of this is is there a way to achieve both looks on 2phase/3phase games without messing up the other? Maybe even possibly having two separate “ntsc gamma correction settings” for both phases?

4 Likes

Hey @sonkun,

can you try this altered version of custom-fast-sharpen.slang ?

Looks fine with me, makes the contrast a bit better, but you are good into testing atm. :smiley:

#version 450

/*
   Fast Sharpen Shader (Custom)
   
   Copyright (C) 2005 - 2025 guest(r)

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

layout(push_constant) uniform Push
{
	vec4 SourceSize;
	vec4 OriginalSize;
	vec4 OutputSize;
	uint FrameCount;
	float CSHARPEN, CCONTR, CDETAILS, DEBLUR;
} params;

#pragma parameter CSHARPEN  "FSharpen - Sharpen strength"         0.00 0.0 5.00 0.10 
#pragma parameter CCONTR    "FSharpen - Sharpen Contrast/Ringing" 0.05 0.0 0.25 0.01 
#pragma parameter CDETAILS  "FSharpen - Details sharpened"        1.00 0.0 1.00 0.05 
#pragma parameter DEBLUR    "FSharpen - Deblur Strength"          1.00 1.0 7.00 0.25 
#pragma parameter ntsc-row6 "------------------------------------------------" 0.0 0.0 0.0 1.0


#define CSHARPEN params.CSHARPEN
#define CCONTR params.CCONTR
#define CDETAILS params.CDETAILS
#define DEBLUR params.DEBLUR

layout(std140, set = 0, binding = 0) uniform UBO
{
	mat4 MVP;
} global;

#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;

void main()
{
   gl_Position = global.MVP * Position;
   vTexCoord = TexCoord;
}

#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D PrePass0;

const mat3 yiq2rgb_mat = mat3(
   1.0, 0.956, 0.6210,
   1.0, -0.2720, -0.6474,
   1.0, -1.1060, 1.7046);

vec3 yiq2rgb(vec3 yiq)
{
   return yiq * yiq2rgb_mat;
}

const mat3 yiq_mat = mat3(
      0.2989, 0.5870, 0.1140,
      0.5959, -0.2744, -0.3216,
      0.2115, -0.5229, 0.3114
);

vec3 rgb2yiq(vec3 col)
{
   return col * yiq_mat;
}

void main()
{
	vec2 g01 = vec2(-0.5*params.OriginalSize.z, 0.0);
	vec2 g21 = vec2( 0.5*params.OriginalSize.z, 0.0); 

	vec3 c01 = texture(Source, vTexCoord + g01).rgb;
	vec3 c21 = texture(Source, vTexCoord + g21).rgb;
	vec3 c11 = texture(Source, vTexCoord      ).rgb;
	
	vec3 b11 = 0.5*(c01+c21); 
	
	float contrast = max(max(c11.r,c11.g),c11.b);
	contrast = mix(2.0*CCONTR, CCONTR, contrast);
	
	vec3 mn = min(min(c01,c21),c11); vec3 mn1 = min(mn,c11*(1.0-contrast));
	vec3 mx = max(max(c01,c21),c11); vec3 mx1 = max(mx,c11*(1.0+contrast));
	
	vec3 dif = pow(mx1-mn1+0.0001, vec3(0.75,0.75,0.75));
	vec3 sharpen = mix(vec3(CSHARPEN*CDETAILS), vec3(CSHARPEN), dif);
	
	vec3 res = clamp(mix(c11,b11,-sharpen), mn1,mx1);

if (DEBLUR > 1.125) 
{
	vec2 tex = floor(params.OriginalSize.xy * vTexCoord)*params.OriginalSize.zw + 0.5*params.OriginalSize.zw;
	vec2 dx = 2.0 * g21;

	c01 = texture(PrePass0, tex - dx).rgb;
	c11 = texture(PrePass0, tex     ).rgb;
	c21 = texture(PrePass0, tex + dx).rgb;

	c01 = min(min(c01,c21),c11);
	c21 = max(max(c01,c21),c11);
	
	mn1 = sqrt(c01*mn);
	mx1 = sqrt(c21*mx);

	vec3 dif1 = max(res-mn1, 0.0) + 0.00001; dif1 = pow(dif1, DEBLUR.xxx);
	vec3 dif2 = max(mx1-res, 0.0) + 0.00001; dif2 = pow(dif2, DEBLUR.xxx);
	
	vec3 ratio = dif1/(dif1+dif2);
	sharpen  = min(mix(mn1, mx1, ratio), pow(res,mix(0.75.xxx,1.10.xxx, res)));
	res = rgb2yiq(res);
	res.x = dot(sharpen,vec3(0.2989, 0.5870, 0.1140));
	res = max(yiq2rgb(res),0.0);
}
	
	FragColor = vec4(res,1.0); 
}
4 Likes

Ok so I tested it out (sorry I didn’t get to test it yesterday when you put it up was busy all day), it seems like you reworked that deblur setting. Right away I tested that Sonic goal post that I mentioned in the last post and it appears those pixel “dots” don’t fade out all the way when turning the deblur setting up.

Deblur at 3.00:

Still kind of fades out a little but I can still see them on the left side unlike the last image I posted.

Next I tried it by the waterfall.

Here’s with deblur off:

Deblur 3.00:

Kind of brings out the white highlights in the waterfall a bit more.

Deblur at 3.00 plus ntsc gamma correct at 0.30:

Brings out those highlights even more but may be a bit much.

Same as above but with rainbows:

Moving 9n to 3phase content here’s with deblur off:

Deblur 3.00:

More before and after images:

That deblur setting definitely helps in getting a less fuzzy looking ntsc image for sure. In any case I’m amazed I can even get guest-ntsc-advanced looking as sharp as it is in its current state, getting closer to even looking like my rgb preset but in composite form

Composite:

RGB:

Also it seems like anywhere between 2.00 and 3.00 is as high I should raise that deblur setting, any further and it starts “fading” small pixel edges out it seems.

4 Likes

Thanks for testings and very informative feedback. I also took a look at the alignments of the ntsc passes, which are a bit tricky to set, especially because linear sampling has it’s own quirks here.

Current version seems not to be perfectly aligned with the deblur pass, which may cause a stray pixel to turn out a bit off. Deblur seems to prune more from right to left…

I’m working on a new release version with better pixel alignment. “Pruning” from adaptive sharpen and deblur is now centered.

Perhaps i’m able to improve deblur a bit more, i guess i’ll have some more time after some bussy period.

I like to mention that deblur has it’s advantage over adaptive sharpening, it’s much more nicer to fringing for example. If you don’t like fringing, then adaptive sharpen might do better.

Ofc. a combo can also be quite nice.

8 Likes

I didn’t know how to describe what I was seeing but you summed it up in better technical terms there, it was that “right to left” “smearing” of the pixels that I was seeing. I’m also glad this was brought to attention cause now you also noticed something is off.

I’ll be on the look out for the next release, this might be one of the final things I need with this tweaking madness I’ve been doing the last few days (weeks).

I also like to mention that I changed all ntsc passes from linear to nearest as that seems to help give me a sharper ntsc image. The only ntsc pass I left linear was pass 2 I believe as linear seems to help blend vertical line dithering a bit better than nearest.

3 Likes