Raspberry Pi friendly CRT shader

Can this be downloaded from the updater? That would be awesome!

It’s in the glsl shaders available via the updater.

Ahh found it. Loading as a preset under the Android Shield TV doesnt seem to work. Looks like a sweet plugin though.

Looks like the Shield ATV wants everything to have the precision declared >.>

Try this version (works on mine, so should work on yours, too): https://github.com/hizzlekizzle/glsl-shaders/blob/master/crt/shaders/crt-pi.glsl

Awesome! Looks great. Anyway to get this in the main repo?

[QUOTE=hunterk;51020]Looks like the Shield ATV wants everything to have the precision declared >.>

Try this version (works on mine, so should work on yours, too): https://github.com/hizzlekizzle/glsl-shaders/blob/master/crt/shaders/crt-pi.glsl[/QUOTE] It’s probably better to specify a default precision rather than have precision qualifiers scattered throughout the code. Does the attached version work on the Shield ATV?

@phin586 You were asking about BVM/PVM style shaders in another thread. Try crt-pi with SHARPER enabled.

It should be in the main repo now. If you use the online updater to fetch the glsl shaders, it should pull that version down as well.

Awesome! Thanks for all of the help!

can someone please upload the rest of updated crt pi shaders? the one that has crt pi curvature in it. Thanks

Just wanted to say thanks for writing this shader! Works great on my Intel NUC, a NUC6CAYS. This shader could also be called “crt-lite” since it runs perfectly on many low-powered platforms.

However, I’ve had some trouble enabling SHARPER because I haven’t been able to figure out how to get the cg2glsl script to run. I think I’m just not skilled enough to figure it out. I’m using Windows 10, downloaded the latest Python release and the CG toolkit. I understand the syntax is something like “py filepath-to-cg2glsl.py old-shader.cg new-shader.glsl” When I try this I keep getting syntax errors, which makes sense because I have no idea what I’m doing :stuck_out_tongue:

I was wondering if you (or anyone) could please list the steps needed to edit the cg shader and convert it to glsl in Windows 10? I tried looking online but found very little information on this. Thanks again to dave_j for this very useful shader :slight_smile:

There’s no Cg involved. It was written in native GLSL.

Hey Hunter! Been a while. Thanks for keeping up the good work :slight_smile:

When I open crt-pi.glslp in Notepad, this is what I get:

shaders = “1” shader0 = “shaders/crt-pi.glsl” filter_linear0 = “true” wrap_mode0 = “clamp_to_border” mipmap_input0 = “false” alias0 = “” float_framebuffer0 = “false” srgb_framebuffer0 = “false”

Which looks radically different from what I see here:

With cg shaders, I could just open the file using Notepad and alter/add/remove settings directly. I’m not sure how to edit glsl shaders using Notepad, or if that’s even possible.

You need to edit the glsl file not the glslp one.

Remove the // from the beginning of the //#define SHARPER line to enable it.

Awesome, thanks! Didn’t realize there were two separate files for each shader. Got it working now and it looks great :slight_smile:

My .glslp is as above, the glsl’s are in the /shaders directory. I’ve activated various shaders in setup and none seem to have any effect (no curvature, no pixel mask etc).

I’m obviously missing something straightforward… is it because they won’t work on an 800x600 display (I’ve got a Picade with the original panel)? A system-wide “enable shaders” setting I’m missing? A log file I can grep to see what’s going on?

M

If you’re not getting any shaders to work, check retroarch is configured to use the GL video driver not the dispmanx one.

800x600 is too low a resolution for crt-pi to work well. It needs about 4x vertical resolution to produce even scan lines without integer scaling and can do even ones at 3x with integer scaling. 600 pixels is not enough for either of these.

Thanks Dave.

In classic internet fashion, shortly after I posted, I got it working. Ish…

It works when I select it in the retroarch menu, but selecting in the setup menu doesn’t apply them. Weird.

I am using the shader with default values on RetroPie on my Pi3. I receive a strange kind of effect on the scanlines. Every sixth line is a little bit thiker than the rest:

The rendering resolution is 1080p@60 while not using Integer Scale. The aspect ratio is set to Core. The Core is lr-snes9x-2010.

Edit: After reading some post before mine it seems I have to use Integer Scale. Have to try this out. Does it make sense to change the rendering resolution and aspect ratio also?

Edit 2: Using Integer Scale solved the problem.

Is the shader working under different video mode, also? While using CEA_720p60 on lr-snes9x-2010 the shader is not working properly.