A new little shader i did (glsl)

@Cyber it’s in the glsl crt folder, you can check it out there. @DariusG so with this latest update what is your recommended settings while using the slot mask from mask 6? Or is your slot mask settings something else? I want to keep the slot mask looking the same way it does in those Virtua Fighter 2 pics

1 Like

Slot mask in example will add adjustable slot mask look to an apperture grille mask like 0 or 2. Simply don’t touch it and nothing will change. But give a try using mask 2/7, slot strength 0.5, slot width 3.0, slot height 1.0 or 2.0. See if you like it.

1 Like

Ah ok. Yeah those settings give me the slot mask I use to use before guest introduced the current version I love. It’s good to have this option as well though

2 Likes

Adjusted lottes mask 1 same with mask 2 sub-pixel pattern (BGR instead of RGB), now it looks like it creates a proper pattern and not a mess like before.

https://mega.nz/file/bjpABaxb#6R02upMpVCMGnDzdj2LwkkbX3D3iER3WKW4sV2hybY4

Lottes 1 for comparison. A huge magenta line together with a green line far away somewhere.

4 Likes

Added another mask (mask 9) trying to replicate this. At some time i will sort them and dump some if not useful. Just experimenting at the moment

EDIT: fixed a mistake i did (too fast without checking lol)

https://mega.nz/file/m3JTgI5R#qzfRyMOcEpcoYadzMdth4NkntxaZiuuteb3MED3iegk

Feedback is welcomed

I use BGR, RGB is not accurate at least at my monitor

4 Likes

This seems like a brilliant idea!

1 Like

Looks like this pattern is more correct? Think so.

Real CRT shot resized and filtered

Clipboard03

Testing at Guest.r-mini for details (which is much sharper)

5 Likes

You need to add Mask King to your profile :joy::joy::joy:

Looks good, hopefully I have some free time to check stuff out soon!

3 Likes

Here is a copy if anyone wants to test, just drop it in shaders_glsl/crt/shaders

Mask 9

Updated with another mask - 10 for 4x scale

https://mega.nz/file/X2hTna5A#L9k-CBh7p_NwMBkUVD5K23XRlE5La-H_XfjAht5qnes

4 Likes

Hey @DariusG!

This thread needs a better organization. You are doing a great job with the shaders. How about keeping well-defined links for each version of your preset at the top of the page? If we like an old preset better, we should be able to find it more easily in one place. I really don’t know how to use these files in the links.

What do you think?

2 Likes

The files in the link(s), the last one I checked is just a glsl file, so you just pick that as the shader to run…

Organization sounds good tho.

2 Likes

There are versions in the main glsl shaders repository and i update them often with PRs. You can download the last one and simply pick as 1st pass and press apply. This is ongoing process, e.g. dropping some things and adding others so it would be pita to keep links for all of them.

4 Likes

Alternatively you could have a super messy GitHub with two main folders, current and older.

Just add a date or rev to the older folder shaders, dunno food for thought. (You don’t even need to maintain the older folder, just let it exist :joy:)

4 Likes

Keep up this approach @DariusG. I had mentioned mask pattern level improvements as another step after remembering what @Brainbin74 had said about the state of the current PNGs in use.

1 Like

Small but important improvement i think, multiplied each pixel’s maskDark with pixel luminance, this creates more defined emulated “pixels” e.g. dark pixels will be more defined and not blurry like before.

4 Likes

It looks like you’re onto something here! Looks great!

1 Like

It’s a bit mind-bending to think what will happen in 20 different stripes, 60 pixels total if you calculate this with that, where are the scanlines passing and darkening etc then write the code correctly. Very easy to make mistakes and rectify again and again.

2 Likes

I’m wondering if it would be worth getting a mask which just reads a png for the mask pattern.

Let me know if you’d like some help with this, I’m quite confident it will work in slang, but maybe it will work in glsl. It woud need to use the textureSize(sampler2d, 0) to get the texture resolution.

Although I’m not sure if @hunterk has already created something like this.

1 Like

my old phosphorLUT shader (the first shader I ever wrote from scratch) was all about doing exactly that. You don’t need to know the size of the LUT to make it tile, thankfully:

vec2 LUTeffectiveCoord = vec2(fract(vTexCoord.x * params.SourceSize.x / PHOSPHOR_SCALE_X), fract(vTexCoord.y * params.SourceSize.y / PHOSPHOR_SCALE_Y));

Just use that as the coord when you sample the LUT and it’ll tile.

Likewise, aliaspider and I toyed with using CMY masks to keep brightness up and resizing the mask patterns ahead of time to avoid aliasing and discoloration at runtime.

3 Likes

By pure luck and so many calculations i forgot this line that should be maskdark. In the end it resulted in 1 line shine, 1 line normal that scales well at 5x,6x, non integer etc. I actually like it more like that and it doesn’t affect performance, the shader would check every line anyway even if i had written it the other way, but maybe i will make some clean up and small changes.

this is what it does in reality, combined with the scanline it creates that slot mask pattern.

Clipboard01

The cleaned code

2 Likes