HSM Mega Bezel Reflection Shader! - Feedback and Updates

This thread is about the HSM Mega Bezel Reflection shader, so you can tell me what’s working for you and what could be better

The shader is in an in-progress alpha/beta state, and there are still some changes to come including optimization!:slight_smile:

Try playing with the shader parameters to tweak the look, as most things are adjustable for personal taste.

These CRT Shaders currently integrated:

  • Guest-Venom
  • Guest-Sm
  • Easymode
  • LCD Grid V2

The shader runs after the crt shader and does a few things

General scaling stuff:

  • Scale the tube/screen to be the size you want on the monitor, including adjustable integer scale
  • Automatic switching between horizontal and vertical aspect ratio for vertical games
  • Scanline direction automatically driven
  • Horizontal integer scale for use with vertical scanlines
  • Crop the edges of the core image to get rid of ugly bits which were never meant to be seen

Bezel Reflection Stuff:

  • Generates black ring, bezel and frame with shading around the tube area
  • Dynamic mirror blurred reflections on top of the bezel from the crt image
  • Fading out and blurring of the reflected image as it moves away from the screen and towards the corners
  • Sharp reflections in the corners
  • Secondary diffused reflection/glow which can affect farther away from the image on the tube
  • Noise in the reflection & generated bezel
  • Optional bezel image under the reflection
  • Bezel and border images can automatically scale with the tube allowing the images to be used with different tube scale and monitor aspect ratio.

I’ve separated out the scaling into an include file hsm-mega-screen-scale.h which defines user parameters and can be used by the shaders in the chain which need to match scale including:

  • CRT Shader
  • Bezel Scale
  • Scaling of Reflection

Thanks to Guest and Easymode for use of their awesome shaders!

Here’s a link to the package

https://1drv.ms/u/s!AlJgyN_LYasynL5AnfjEGQakBCUgew?e=9md61z

You should to set your video aspect ratio to your monitor resolution and set integer scale to OFF

I also wanted to add a big thanks to @hunterk who helped me with his expertise along the way!

17 Likes

The latest changes to the shader:

  • The default settings in the presets for the reflection have been set to be brighter and smoother
  • Added Opacity and Brightness parameters to the Bezel Overlay shader
  • Screen reflections in bezel images have been removed
  • Static reflections in corners have been toned down
  • Reflection Gamma and Contrast have been adjusted so they are applied before the outer fade, (previously they were applied after the fade and thus multiplied the fade effect)

5 Likes

I’ll try to test this out some tomorrow.

AMD Radeon RX460

Really looking forward to the stuff on your to-do list, really excited for the auto-bezel and the reflection noise, as well as the reflection brightness (feel like that’s a must have.)

I noticed that in the new version the reflection cut at the corners is much more noticeable. You have to reduce the brightness of the reflection a lot to make it smooth enough so it doesn’t look like something is wrong.

OLD

NEW

I also noticed the reflection is much brighter. I feel like the first version was better with the more subtle look. I don’t know if you can restore the same intensity as before, however the default setting values appear to be the same in the menu.

1 Like

Hi @GemaH,

You are right it’s definitely brighter, adjusted in part because it was noted that it was too dark sometimes.

The changes you are seeing are mostly just settings changes I adjusted settings settings to make it brighter, not fade off so fast and also remove the extra contrast which was added, perhaps it’s now too bright :wink:

I feel like this is something that we’ll have to try some different settings out and see what most people like the most for the default, then people can tweak from there.

You should get the original look back by changing a few settings, the things that affect the look most are:

br_brightness br_gamma_adjust br_contrast (this affects the brightness vs darkness of the image within the reflection)

br_fade_speed - Affects how sharp the inner reflection highlight is and how quickly it fades out

br_fade_width & br_fade_width - these affect the overall spread of the reflection, or how wide the fade is, the values will make the outside of the reflection brighter or darker

Also for the corners currently the shader you can only get as close to the corner as you show. I will adjust the shader sometime soon so we can get a better fade/out nearer the corner. But you can adjust how gradual the fade is to the current corner.

You can adjust these to adjust how gradually it gets to the corner br_corner_fade_distance br_corner_fade_speed

What it should look like near the corner, here’s a snapshot of a real life example, and of course we would make it adjustable

In terms of seeing what people generally like, if anyone is interested please play with the parameters and post what you like best

1 Like

From the images @GemaH posted and what image you posted, it looks like the reflection isn’t going as far into the (corners) as it should. I’m not talking about actual corner reflection, just the left, right, up and down side reflection.

In your image the reflection bloom almost goes straight from the bezel corner edge to the top of the screen tapering inward slightly at the end.

Where as the shader image @GemaH posted, the reflection bloom goes in from the actual game corners a little bit before it starts (blooming away from the game image). I feel like it should be closer to the image of the actual TV.

Well it’s not that dramatic, but what I’m describing is visible… extremely visible (to me now…).

These are just my opinions, still planning on testing this today, lol. Looking forward to your progress!

Yup @Syh you are exactly correct :), this is probably the first thing on the TODO list.

Right now the reflection mapping if you want to call it that is using the coordinates from the warped coordinates, and basically what happens is at outside the corners of the screen you get an area of undefined value, and this is what is causing the early end of the reflections in the corners.

What I need to do is use a different mapping which is more consistent and has full coverage for deriving the distance away from the screen, after I do this we can get the reflections to fade all the way to the corners and have good control on how they fade out into the corners.

2 Likes

Ok, with some trial and error i managed to get a very nice result i believe:

2 Likes

I’d love some settings for that!

It looks miles better then you original post.

It’s like a middle ground between the two shots.

I only made changes in the options in this window

2 Likes

Is there any way can we fix the scanlines being uneven when a higher resolution image appears?

Plenty of games in Playstation and Saturn have higher resolution menus or games. PS1 bios also uses higher resolution. In all these instances the scanlines appear uneven. This is true for most CRT shaders but Geom seems to display them correctly. I think it’s something about interlacing, i’m not sure.

So in order for this shader to be used in all systems it needs something similar and maybe a composite filter for correct dithering blend. With these two options added, i thing we will finally have the “perfect” shader that fits all systems.

Also, i don’t think there is a way to automatically detect horizontal and vertical games and apply the desired effect? Having to individually apply the vertical version of the shader in all MAME vertical games individually seems like a huge task. Maybe there is a trick to do this via another way in RetroArch?

About the scanlines, with this shader chain I’m concentrating on the automatic scaling and the bezel reflection and generation being the best it can. I would also like to have a great flexible CRT shader in there that works in many circumstances, but this seems like it may be something that varies a lot based on taste. For the scanlines I’m not sure what I can do here other use a different CRT shader in the chain. I’ll have to take a look at these higher resolution situations and see if it is something that can be helped with the scaling code, or if it is really just the CRT shader.

Composite and de-dithering passes could be interesting to have in the middle of the chain as well, although they would need to have an On/Off parameter put in on them, since it’s not something always desired.

For Horizontal vs Vertical, this is a great idea. I don’t think there is anything in Retroarch to choose a different .slangp to load depending on the core resolution aspect ratio. What might be possible though would be to have the shader check the original resolution coming from the core, then auto switch scanlines & aspect ratio and the bezel used. I think this is a great idea, and I’ll try something out.

1 Like

Yeah, any of these suggestions are just options, not something to be forced.

You could probably do the same as the interlacing check some shaders do, which is to assume anything >400 or so vertical lines must be TATE, though you’ll hit false positives on any interlaced content. That’s fairly easy to toggle out, though, and would only require core presets on the handful of consoles where interlacing was common (e.g., PS1/2, Saturn).

1 Like

Ok thanks, that’s a good idea. I was thinking maybe I could check the ratio of horizontal resolution over vertical to determine if it’s horizontal or vertical.

Do you know if it’s possible if any of the cores outputting interlaced have the option of outputting progressive scan instead?

That is one reason I continue to use the official MAME binary as it handles horizontal and vertical aspect ratios much better, you can have a horizontal and vertical ini file to target and customise visuals for each display output.

Yeah I wish we could have something like that in retroarch. I’ve gone almost 100% retroarch for mame because of the shader support.

Yeah just a shame the run ahead feature isnt supported by MAME :frowning:

Will you be using Guest.r new shader, CRT - Guest - SM ???

I haven’t played with the shader yet, I’m not sure how new it is, but I would probably wait before integrating a new shader until its been around for a little and changes have settled down.

This brings up the issue of creating other versions of people’s shaders where the only difference is the added scaling. This isn’t a great situation because this edited shader won’t get updated automatically when the master one does.

Ideally the actual shader in the repo would be updated to integrate the scaling, and the bezel reflection preset would just use the master shader.

Is there a way to disable or hide the scanlines completely? I don’t plan to use scanlines in high-res games but i would still like to use the reflection bezel with them.