Raspberry Pi friendly CRT shader

Dave j

Is there a chance we can get a version of both the vertical curvate and curvate with settings to add rounded corners to the shaders?

This would fit perfectly with John.Merrit Arcade and Tv overlays.

I don’t want to speak for dave j, but he’s already said it’s pushing the RPi’s GPU to the limits as it is, so nothing else can be added without sacrificing other aspects of the shader.

Oh i did not think this was something that had to do with gpu resources because it’s just rounding off the corners.

Actually, crt-pi is optimized to reach 60 fps in 1080p on all RPi models ; I guess it took the author quite a lot of time to handcraft it and ensure it runs at full speed in all use cases. As the RPi 3 has a slighly overclocked GPU, I guess minor improvements could be made but it would mean having to maintain several versions of the shader.

If it could be done maybe this could be a extra setting in crt-pi-curvate and crti-picurvate-vertical?

The Pi3’s overclocked GPU just means it can run the shader with curvature enabled at closer to full speed. Adding rounded corners to the shader would make even that slow. The best way to get rounded corners on a Pi is to use an overlay to mask out the corners of the screen.

Thank you for explaining this to me. I have to set the overlay to 90-95% opacity to get the desired round effect then.

[I][B]Hello there are other shaders similar to crt-pi, or an updated version?

I was looking for something similar to the Analog Shader Pack Version 3 Knowing that raspberry has no power to affect how Analog Shader Pack But maybe there is something other than crt-pi.

Thank you![/B][/I]

I really have the feeling crt-pi is the best that can be achieved with the Pi GPU :slight_smile:

[I][B]OK thanks!

I think then that you can not do better on Raspberry …[/B][/I]

Imho there’s no need for any better crt-shader. In my case it looks nearly exactly the same as my old consoles connected to my old CRT via RGB cable.

Dave J.

There are quite alot of Vector based games for both Mame/Mess and Vectrex.

Is it possible and would you consider making a Pi friendly Vector based shader?

Ps have a look here what John Merrit created http://libretro.com/forums/showthread.php?t=5085&p=50265&viewfull=1#post50265

Edit: followup separate thread http://libretro.com/forums/showthread.php?t=7414

[QUOTE=Rion;50306]Dave J. There are quite alot of Vector based games for both Mame/Mess and Vectrex.

Is it possible and would you consider making a Pi friendly Vector based shader? [/QUOTE] It’s not clear what you’d want from a vector based shader. If it’s just applying overlays by a shader, there’s little point. If it’s upscaling a low resolution image to make the vector lines look better, that’s not the sort of thing the Pi’s GPU would be good at and there are better solutions for that in any case.

Have you seen the How to make vector arcade games look their best thread on the retropie forum?

Hi again.

Yes i have read that thread and sadly it’s only for AdvanceMAME 1.4 and that is not a libretro core so no overlay support or shader support.

Maybe what I’m asking for is not possible using the pi with a shader?

What I’m looking for is more up the alley what mame does with HLSL.

I know Vector games did not have scanlines and shadowmasks were only present on color vector games, and should not be used on monochrome vector games.

Maybe i can mimic some of the effect using crt-pi-curvate by using custom setting inside the shader?

Do you have any advice what to change by using Mame’s HLSL Information from here http://docs.mamedev.org/advanced/hlsl.html#vector-games

[QUOTE=Rion;50319] Maybe what I’m asking for is not possible using the pi with a shader?

What I’m looking for is more up the alley what mame does with HLSL.

I know Vector games did not have scanlines and shadowmasks were only present on color vector games, and should not be used on monochrome vector games.

Maybe i can mimic some of the effect using crt-pi-curvate by using custom setting inside the shader?[/quote] You can turn scanlines off (put // at the start of the #define SCANLINES line in one of the the crt-pi____.glsl files).

A word of warning though: The memory bandwidth (how quickly it can read and write memory) on the Pi is very limited and crt-pi upscaling a typical source screen (say 256x224) for a HD screen (to 1440x1080) uses so much of it it can cause problems when running complicated games. Having a larger source screen, which you would want for vector games to make the lines look good, is very likely to be too much for the system to cope with. The first example image from that retropie thread is probably big enough to cause problems and it doesn’t even look very good.

Do you have any advice what to change by using Mame’s HLSL Information from here http://docs.mamedev.org/advanced/hlsl.html#vector-games

I don’t have any experience of that so can’t give any advice.

I don’t think the Pi is fast enough to do what you want with the software that is available now. If somebody were to port the hardware accelerated vector drawing from AdvanceMAME into a libretro core, and preferably add screen curvature to that, that will be a different matter but for now, it’s not practical.

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?