Please show off what crt shaders can do!

Yes convergence offsets (R.G.B.) to be precise.

ok, yeah, for that, you just need to sample separately for each color and make texcoord offset (in x and y) for each one.

So, instead of texture(Source, vTexCoord).rgb (that is, sampling all 3 components at once), you do texture(Source, vTexCoord + vec2(r_offset_x, r_offset_y)).r for red, then repeat for blue and green and then merge them together for a combined.rgb.

make sense?

2 Likes

I could never get that Yaba Sanshiro thing to work. I build it, and when I hit “apply” it just goes back to “shader passes=0” or whatever.

I’m not sure :joy:.

I’ve added this:

> float COFFSETR;
> float COFFSETG;
> float COFFSETB;
> 
> #pragma parameter COFFSETR "Convergence offset Red" 0.0 0.0 1.0 0.01
> #pragma parameter COFFSETG "Convergence offset Green" 0.0 0.0 1.0 0.01
> #pragma parameter COFFSETB "Convergence offset Blue" 0.0 0.0 1.0 0.01
> 
> #define TEX2D(c) pow(texture(tex, c + vec2(0.0, 1.0)).r, vec2(params.COFFSETR)
> #define TEX2D(c) pow(texture(tex, c + vec2(0.0, 0.0)).g, vec2(params.COFFSETG)
> #define TEX2D(c) pow(texture(tex, c + vec2(0.0, 1.0)).b, vec2(params.COFFSETB)

I think i need to add vec2 coffset = something (-coffset,0.0,coffset) or else ?

Just to check I went ahead and built the shader chain from scratch and it loads up fine on my end. Did you make sure to start the first pass with stock? Good news is there’s a new shader called crt-guest-dr-venom-stock.glslp that does exactly what I have, you can find it in the crt folder. The weird news is that for some reason the shader is glitchy and doesnt look right, you’ll notice right away when you play any 2d fighter and simply jump up. If you build the chain yourself that glitchiness doesn’t happen for some reason. If anything I’ll just post my preconfigured shader up. I actually tweaked the guest shader again and replaced the interlace shader pass with crt geom, it handles the interlacing for games like Last Bronx, VF2 way better, I’ll post more on that soon as well

I think you’re going to need both X and Y offsets for each color.

Try this:

float COFFSET_X_R, COFFSET_Y_R, COFFSET_X_G, COFFSET_Y_G, COFFSET_X_B, COFFSET_Y_B;

#pragma parameter COFFSET_X_R "Convergence offset Red X" 0.0 -1.0 1.0 0.01
#pragma parameter COFFSET_X_G "Convergence offset Green X" 0.0 -1.0 1.0 0.01
#pragma parameter COFFSET_X_B "Convergence offset Blue X" 0.0 -1.0 1.0 0.01
#pragma parameter COFFSET_Y_R "Convergence offset Red Y" 0.0 -1.0 1.0 0.01
#pragma parameter COFFSET_Y_G "Convergence offset Green Y" 0.0 -1.0 1.0 0.01
#pragma parameter COFFSET_Y_B "Convergence offset Blue Y" 0.0 -1.0 1.0 0.01

#define TEX2D(c) vec3(texture(tex, c + vec2(COFFSET_X_R, COFFSET_Y_R)).r, \
texture(tex, c + vec2(COFFSET_X_G, COFFSET_Y_G)).g, \
texture(tex, c + vec2(COFFSET_X_B, COFFSET_Y_B)).b)

Do be aware that an offset of 1.0 is the entire screen, though, so you’ll probably want to divide the offset by something, such as SourceSize (the *.zw swizzles are handy for this, since they are already 1.0/whatever). That would make something like texture(tex, c + vec2(offx, offy) * params.SourceSize.zw)

2 Likes

Well, pretty busy this week, maybe i can look into the shader at the weekend :slight_smile:

1 Like

And yes, it’s always the pixel grid that breaks the illusion. But at 4K the fun begins… well until you get closer than about 8inches to the TV (well on a 75 inch screen). I think good Black frame insertion is more key to the illusion than the 1000nits, just because the aperture grille doesn’t blur away at any motion, if it’s done right, even on super dark color values.

1 Like

Ok so I think I made some further progress with the guest shader. The main problem I had with it was getting it to look good with interlaced games and 480 content in addition to 240 content but I think I solved it along with getting it to also look good with vertical games making it closer to being an all purpose shader. I ended up going with a slotmask type of look (it’s not perfect but it works), I then added the crt geom and image adjustment shader into the mix for extra effects like partial grain, luminance etc. If viewing on mobile switch your browser to desktop mode to view the images in hd on that site

Imgur

Imgur

480 and interlaced games:

Imgur

Imgur

Imgur

Imgur

If any of you want to try it out I made a slang and glslp (using the “stock” guest shader so that it can also work on Android devices) version that you can get here.

For my Android users if you want to build the chain manually for the yabasanshiro and mupen64 cores just do this for the glsl version:

Shader passes: 14

Shader #0: stock.glsl, Shader #0 Filter: Nearest, Shader #0 Scale: 1x

Shader #1: lut.glsl, Shader #1 Filter: Nearest, Shader #1 Scale: 1x

Shader #2: color-profiles.glsl, Shader #2 Filter: Nearest, Shader #2 Scale: 1x

Shader #3: d65-d50.glsl, Shader #3 Filter: Nearest, Shader #3 Scale: 1x

Shader #4 stock.glsl, Shader #4 Filter: Nearest, Shader #4 Scale: 1x

Shader #5 stock.glsl, Shader #5 Filter: Nearest, Shader #5 Scale: 1x

Shader #6 stock.glsl, Shader #6 Filter: Nearest, Shader #6 Scale: 1x

Shader #7 linearize.glsl, Shader #7 Filter: Nearest, Shader #7 Scale: 1x

Shader #8 blur_hotiz.glsl, Shader #8 Filter: Nearest, Shader #8 Scale: 1x

Shader #9 blur_vert.glsl, Shader #9 Filter: Nearest, Shader #9 Scale: 1x

Shader #10 linearize_scanlines.glsl, Shader #10 Filter: Linear, Shader #10 Scale: 1x

Shader #11 crt-guest-dr-venom.glsl, Shader #11 Filter: Linear, Shader #11 Scale: 1x

Shader #12 crt-geom.glsl, Shader #12 Filter: Don’t Care, Shader #12 Scale: Don’t Care

Shader #13 image-adjustment.glsl, Shader #12 Filter: Don’t Care, Shader #12 Scale: Don’t Care

After you hit apply go into parameters and change:

LUT Colors: 1.00 (Optional. Makes the overall colors appear stronger) Raster bloom %: 5.00 (optional and works on slang version only), Scanline dark: 0.50, Scanline bright: 0.80, Horizontal sharpness: 2.75, Subtractive sharpness: 0.00, Corner size: 0.01, CurvatureX: 0.03, CurvatureY: 0.04, Glow Strength: 0.30, CRT Mask: 6.00, Slot Mask Strenghth: 0.25, Slot Mask Width: 3.00, Slot Mask Height: 2.00, Lottes maskDark: 0.00, LottesmaskLight: 0.00, CRTGeom Dot Mask Toggle: 0.00, CRTGeom Luminance: 0.70, Black Level: 0.07, Blue Channel: 1.10, Film Grain: 6.00 and leave the rest as is.

The Slang version is a lot easier to build. Simply load the crt-guest-dr-venom shader then add in the last two passes, hit apply then change the parameters the same way.

Any and all feedback to improve it is welcome, trying to max this shader out.

2 Likes

Hey thank you it was useful to me, I looked at the similarities between what you posted and other shaders which allowed me to understand a little better how certain values ​​work.

Also libretro users,i have a question for you. Which screenshots have the best color rendering on your screen ? (1 or 2 )

A. (1) https://pasteboard.co/ISyR54n.png (2) https://pasteboard.co/ISyRdJV.png

B. (1) https://pasteboard.co/ISyRLxL.png (2) https://pasteboard.co/ISyRUqT.png

C. (1) https://pasteboard.co/ISyS376.png (2) https://pasteboard.co/ISyS8wS.png

D. (1) https://pasteboard.co/ISyRvCW.png (2) https://pasteboard.co/ISyRD6G.png

3 Likes

At first glance number 1 seems more as it should be for gamma and color accuracy. Number 2 always looks oversaturated in very dark color parts (=my eye tells me to high gamma curve). But as a suggestion, i would do a bit less contrast (at least what’s contrast on crt-royale), that the very bright parts would look a bit less artificially compressed, if it makes sense to you :slight_smile:

3 Likes

Thank you for the feedback :handshake:. The reason for my request is that I am curious how users perceive colors differently. The other day I was wondering if some shaders that looks good in full rgb would also work in limited rgb(and also TV’s with different black levels). Many uses screens in limited mode , which gave me the idea of ​​making a double preset. One that is not washed out for one type of users and another that is not too dark. I am using a modified version of crt-aperture with a cool trick that I found (changing luminance or other word i should probably use only in dark areas without touching bright ones,well it’s more complicated than that but I’m limited in English).

Here are screenshots with changed parameters, from darkest to brightest.

  1. https://pasteboard.co/ISSELaK.png
  2. https://pasteboard.co/ISSEShv.png
  3. https://pasteboard.co/ISSF9OV.png
  4. https://pasteboard.co/ISSFlfD.png

I need to change others things with this preset,this is not the final version.

Edit: In summary, I try to make a preset that can be fun for those who play with screens with low specs, I don’t try to make an accurate preset of crt.

2 Likes

Hey professorBraun ,Love your work

on post 678 of this topic you uploaded a shader that I used to use but lost it recently. The link no longer works . would you please reupload the shader ? thanks

I added some nice options to use the crt-guest-dr-venom shader without scanlines and with heavy masks. Some games might look very nice because of the composition of the pixel art.

8 Likes

Looks good. IIRC, Metal Slug 6 was released on NAOMI hardware, which supports running in 480p, so this should be a good way of reproducing that, if desired.

4 Likes

Yeah, older version isn’t equipped properly for 480p/i content. In general, mentioned composition looks better with moving scenes as scanline smearing isn’t present and mask smearing with horizontal movement is not this bad. I mentioned heavy masks because now the bloom effect is allowed to override 50% of them with bright colors. Before, the overall brightness reduction could be quite strong.

4 Likes

Oh you upgraded the shader? Cant wait to get home and play around with it. I’ve been customizing your shader for a while now. Last I read I believe you added bloom to it, that’s a game changer already right there.

2 Likes

Yeah, it’s a decent update for sure. In general, i avoid messing with this shader unless there are issues that are to be considered. One of them was raster bloom calculation pass, which was sluggish with high res content or even not working. Now you couldn’t even notice it’s there. :grin:

Another issue that i was made aware off was a scanline desaturation method which also de-colorised a lot with stronger scanlines type 1 and 2.

A nice feature that was requested and now implemented is interlacing plus some other filtering without displaying scanlines.

By my own initiative i implemented bloom and new horizontal filtering possibilities with substractive sharpening.

I thought i’ll drop a short overview here since the shader’s main thread is on the English Amiga Boards. ^^ :wink:

8 Likes

Love the latest guest-venom update. With all defaults it’s a little softer, which seems to work better with certain shading details, without being muddy. And it’s regained a little brightness.

2 Likes

Will glsl version be updated?

Thanks!

3 Likes