A new little shader i did (glsl)

Github with some old versions of shaders i tweaked

Here is a little shader i did by tweaking other shaders and learning things and adding my own. I wanted something looking sharp, not so artificial, and having some beam dynamics (brightening bright areas etc), based mostly on mask manipulation as a real crt beam would do. Mostly oriented on sharp PVM look, i believe some people will like that (and me too). I tested it on 1080p. So test it yourself tell me what you think. Maybe some things could be improved.

Download here https://mega.nz/file/m6gUwKiZ#dUQXPSDwM9KP7Dn0vWlGpCjZ3hM0Sp_OHSEWlncZFY4

7 Likes

Some of that code look familiar. :wink:

As you’re using the tweak the texture coordinates and use a single texture read approach you should provide a .glslp file so people will use linear texture filtering.

3 Likes

Yeah I am using the filter from CRT-Pi, I like how sharp it looks. Yeah you are right about the linear filter.

1 Like

Added some options for full “beam” control and a proper glslp file included.

4 Likes

A complete rework based on the same idea, due to initital not scaling well with integer more than 4x. I believe it should be really fast and good looking for what it needs to run.

Parts of this shader come from:

  • scanline function from CRT-Pi, modified to work as i wanted
  • screen filter from zfast-crt, adjustable
  • masks from crt-geom, lottes, and Guest.r-Dr.Venom
  • saturation code from shadertoy

https://mega.nz/file/m6gUwKiZ#dUQXPSDwM9KP7Dn0vWlGpCjZ3hM0Sp_OHSEWlncZFY4

1 Like

I’m planning on checking this out when I get a minute. You’re making me want to not be a potato :joy:

2 Likes

New version here for anyone who cares lol. Some unneeded things removed, added color temperature from guest.r-dr.venom. Don’t expect any miracles on overall brightness.

https://mega.nz/file/375wDDBS#gJSHAgZbPrGVuj1uY4S-bgLzGoIBTdCyDEjXJ393HsM

2 Likes

Imho, I’d have preferred if you had gutted grades white point/sat/gamma code instead of using guests white point code tbh

Nothing wrong with guests wp code, just prefer grades overall control over color.

Regardless, I love the progress and I’m hyped you continue to update it.

1 Like

You can always use Grade as 1st pass, and yes it’s White point works better, plus many more options.

shaders = "2"
feedback_pass = "0"
shader0 = "shaders_glsl/misc/grade.glsl"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_glsl/crt/shaders/CRT-Beam.glsl"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"

Ye ik I can just add grade, it just made my sense to me to bake it’s code into the shader vs using the other code that did less.

Still cool regardless, just throwing ideas at the wall ya know.

1 Like

Thing is that is a huge shader and imo it would be better just add it as 1st pass instead of just gut it out and add it to a shader. I just checked to add “sega luminance fix” and that would require quite some job while you can have it in 5 seconds just by adding it as 1st pass. But some interesting things from other shaders could be added if they are light and straight-forward.

You don’t need the whole thing, give me a couple hours I have to run some errands.

When I get home I’ll gut the pertinent code and see what you think about the size and such.

It does a lot more than Guest.r’s code that’s why it looks better too trust me :wink:

(tons of options that affect each other)

I’ve worked/altered code in grade before so I’m aware :joy:

1 Like

Here is another with grade, 7504 wp temperature and some contrast

3 Likes

A small update with contrast added and off switches to speedup things if it’s needed.

https://mega.nz/file/e7xESTJJ#RVfrKqFdl34F2M6CjcH1LhxcmCxWZnqVEDRl0sBYpQM

As a bonus, included a modified old guest.r shader with things backported from this shader (and some back to their natural enviroment, like color temperature)

3 Likes

Holy shit that guest revision is a blast from the past.

I can’t remember the last time his shader codebase was that simple.

2 Likes

Yeah really simple but still good looking. I think that comes from 2018, and I removed some things too, like saturation function that wasn’t working properly. That runs 70-75 fps on my old HTC One with an 80 gflops GPU.

That old dog can’t do much now, but it’s slim with stereo speakers and 1080p, used entirely as a RetroArch machine :grin:

2 Likes

A small update, trying to save some brightness for normal monitors

https://mega.nz/file/3vJjnYqL#mEMwDXNE6OE_F6sv_4G82FaGKgUFhNF0kEETuUeVAL8

And a different profile for Guest.r shader to somehow match my Trinitron in scanlines, colors and brightness

5 Likes

Added a new mask on both shaders (CGWG Slot)

https://mega.nz/file/SmJSgDYb#j7TsvtdaovzDcighgGRXCJ1gpgMKcRH0qlt38Zvs_ag

3 Likes