Mega Bezel Reflection Shader! - Feedback and Updates

Can you try changing to Vulcan or GLCore for the video driver?

For the log, you want to set your Logging - Logging Verbosity - ON - Frontend Logging - 1(Info) - Log to File - Off

This will cause a log window to come up when you launch, and you should see whatever is happening.

Sometimes a change to the shader can make it stop working on one back end

Hello, just want to put out there that I have been trying with newer Nvidia drivers and older Nvidia drivers which are supposed to be more stable. Clean installs. Unfortunately the slowness with Dr. Venom is still there in the latest version, but not in version 2020-04-01. guest-sm works just fine.

@Telmo

Just a shot in the dark…

what does the line

audio_device =

say in your retroarch.cfg?

if it has a number try changing it to…

audio_device = “”

or try

https://github.com/libretro/RetroArch/issues/2761#issuecomment-289105922

to bullseye your audio device. I have heard that it can make a huge difference.

SG-1000

Actually the SG-1000 II because the SG-1000 was too boring.

sg1000

If anyone disagrees and would like me to do one of the original I am willing.

4 Likes

Just because…

The SG-1000

3 Likes

I checked and have audio_device = “”. The weird thing is that the previous version worked just fine with Snes9x. Beats me. I decided on guest sm since it looks awesome, and works super fast with Dreamcast and N64 as well, Dr Venom was still too heavy in older versions for those cores.

I don’t really know how to explain it. I mean how you can sort of adjust the curve itself, not just ‘how curved’ it is. With X+Y its usually just like a static curvature that you can multiply for a greater effect, while Royale gives you some options as to just what the actual curve is. So you can probably get Royale to closer match different screen bezels and things like that. I don’t really know how to explain it with sounding stupid like “you can change the curve of the curve man” lol.

Also just checked on this after a couple months and it’s progressed fantastically. Great job on it.

2 Likes

@Ashlander

What exact part are you referring to as more versatile? Are you just referring to the different curvature modes or something else?

I’m not trying to argue, I’m legitimately curious.

EDIT: @Ashlander Man, that answer didn’t sound dumb, a little stoner-ish for sure, but not dumb. Put a smile on my face, lol.

1 Like

[CURVATURE] Curvature on Long Axis (default 3)

[CURVATURE] Curvature on Short Axis (default 4)

in Parameters… :upside_down_face:

But, the bezel is generated so you don’t have to worry about fitting it.

I think I understand what you’re getting at regarding curvature “options”. With most shaders that support curvature you get a straightforward option of “X” curvature and “Y” curvature values, but - and I’m not a mathematician here - these options result in a “linear” curve… you don’t have any control over the shape/profile of the curve. Royale gives you additional controls to modify the curvature profile… like, for example, moving the control handles of a bezier curve in a vector graphics program like Adobe Illustrator.

But what are these curves supposed to represent in the first place? Well, they’re supposed to give the the viewer the “illusion” of looking at a 3-dimensional CRT tube/screen with perspective (depth). On our modern flatscreen LCD displays, these curves are physically placed upon a flat orthographic plane (since the screen is flat) and the curves exist on the X and Y axes only. There is no actual depth, so you can only simulate depth. On a real CRT television, the tube/screen itself is curved and so the “curves” exist on not only the X and Y axes, but also Z (depth). An advanced shader such as Royale may give you options to adjust the effect of depth/perspective by calculating its maths in 3 dimensions, rather than two, by taking the Z axis into account.

Also, it’s worth bearing in mind that there are 2 primary types of CRT screens out there, and they have different types of curvature: aperture-grille (Trinitron) style CRTs and shadow mask (other/generic) style CRTs. Aperture-grille CRTs use “cylindrical projection” tubes/screens and shadow mask CRTs tend to use “spherical projection” tubes/screens. This will result in much different-looking curves. A “cylindrical projection” screen, in real life, doesn’t actually have any curvature on either the X or Y axis… but it does have curvature on the Z (depth) axis. Think of it as a straight-edged 4:3 rectangular box “projected” onto a curved glass cylinder. The way to “fake” this appearance in a 2D flatscreen shader is to disable curvature on the X (width axis) and add just a bit of curvature on the Y (height) axis… the higher the Y axis curvature value, the deeper perspective/depth you are simulating… but, of course, having additional Z axis controls in an advanced shader like Royale allows you simulate this effect even more accurately by, for example, adjusting the radius of the cylindrical CRT tube.

On shadow mask style CRT with spherical projection, think of the CRT tube/screen as being cut out of a large-radius glass ball/sphere (rather than a cylinder). The greater the spherical radius, the less apparent screen curvature. In the real world, the curvature along the edges of the this type of screen exist on all 3 axes: X (width) Y (height) and Z (depth). Simulating this effect in a shader on a flatscreen monitor, you definitely want to use curvature on at least the X and Y axes (the default option in most shaders). Any advanced shaders that give you more options will allow you to dial in the additional perspective/depth effects.


Long story short, if you are trying to accurately represent a real-world CRT effect on your flatscreen monitor, you are currently more-or-less limited to simulating an aperture-grille Trinitron style cylindrical projection CRT (Trinitrons/PVMs/BVMs - that sort of thing). This means you’ll turn off any curvature on the X axis, and use just a bit of curvature on the Y axis. If you have access to the depth axis in an advanced shader, you can choose to tweak that a bit too.

If you’ve got a bit higher-end monitor, such as a 4K HDR-capable display (you need a lot of resolution and brightness!), you can now also approximate a shadow mask style CRT with… passable (though still highly-compromised)… result, depending on how OCD you are about these sort of things. In this case, use both X and Y curvature in your shader (and additional tweaks if you are using Royale).

And finally, if you don’t care too much about accuracy, or you’ve never owned or seen a CRT TV (hey, there are adults born after 2k these days!)… well, then… there are no “rules”. Do whatever looks good to you (I see TONS of “CRT-style” screenshots with heavy usage of both X and Y curvature, using aperture-grille style masks/scanlines… so what if this combo isn’t something you really see!?).


I realise this was a bit of a deep dive on CRT, but hopefully there’s some useful info to consider. As many other forum goers have commented over the years, ironically it’s much more straightforward to emulate a high-quality/enthusiast/professional grade late 90s-to-early2k model CRT than it is to emulate some off-the-shelf mid-80s-era bargain-bin-grade CRT!

3 Likes

Are you saying the top and bottom should be curved? As isn’t the y axis vertical, and the x axis horizontal?

2 Likes

Im getting the error “failed to apply shader preset”… its a fresh install.

I disabled integer scale I set up my aspect ratio to 16:9.

Really easy, all is under “scaling” settings.

But i cannot make it work… :_

Try the vulkan driver.

1 Like

Did you copy the content into the right place? It should work if you copy the ‘crt’ folder from the HSM pack over the ‘crt’ folder located in ‘shaders/shaders_slang’ directory. You could backup the original ‘crt’ folder if you want. :slightly_smiling_face:

1 Like

I think that’s what he meant, that with a vertically flat Trinitron if you use y Curvature only the top & bottom of the screen curve to give the effect of perspective,and the intersection of the screen & bezel like this

Royal’s Curvature is actually a projection onto 3d primitives, either a sphere or a cylinder.

I’ve managed to extract the projection/curvature from Royale so it can be used by other shaders, and figured out a way that one direction’s Curvature can be adjusted without the other.

There’s still some work to be done to integrate well enough into the bezel shader to release, and and I need to optimize it a bit. It chews some time at the moment, so the simple and cheaper 2D Curvature will continue to be there and possibly the default option.

3 Likes

Ohh, yeah. I was pretty sure that’s what he was talking about, I’ve done that curvature in the x/y curvature mode. I have the code for it somewhere. (As you can’t just use lottes or torrids curvature to do it.)

So you got royales curvature split into an x and y mode instead of just a radius? If so that’s pretty awesome.

Well it’s cool that you got the curvature from Royale ripped, are planning on using the tilt function as well or are you excluding it?

1 Like

Sort of, you will have the main radius then additional x & y controls to increase or reduce curvature in only one direction

I’m going to try to leave it in, but leaving it in means that the frame Ideally needs to be transformed along with the screen, so I’ll see how that goes.

2 Likes

Hey thanks! I got it working.

It looks amazing. Very good.

However, i would like to know if its possible to cut only the top and bottom when using the scale option, and leave the sides for bigger reflections?

Hope you can understand. Thank you

[SCALING] Non-Integer Scale %

Until the top and bottom frame are off-screen.

[BEZEL] Width

To your hearts content.

And others to tweak.

ex.

[REFLECTION] Lateral Outer Fade Position & Distance

3 Likes

That’s exactly what I was trying to get at, thanks. Curve Profile is the term I was looking for.

1 Like