Mega Bezel Reflection Shader! - Feedback and Updates

Mega_Bezel_Logo

This thread is about the Mega Bezel Reflection Shader for Retroarch! Here you can tell me what’s working for you and what could be better.

If you are wondering “What is this thing?” here’s a nice little overview up sharing our ideas around the project and some of the Mega Bezel features: RetroArch – Introducing the Mega Bezel Reflection Shader – Libretro

This shader package is meant for you to experiment with and make your own creations if you like. Try adjusting the shader parameters to change the look, as most things are adjustable for personal taste. The base package is now part of the Libretro repo but there will also be updates coming periodically which may get a pre-release here before they go into the main repo.

!!IMPORTANT!!! Please follow the Installation and Setup instructions below


Intro Animation Can be customized and turned off

MegaBezelStartup

Mega Bezel Night Preset with awesome graphics from @duimon

SEE BOTTOM OF POST FOR MORE EXAMPLES


SHADER FEATURES

  • Auto-Generated Bezel around the tube area
  • Dynamic Reflections on the Bezel
  • Images can be added for background, LEDs, PVMs :wink: etc
  • Easily scale the game screen, including integer scale
  • Crop edges of the the game image
  • Dual screen support for emulated systems like Nintendo 3DS (Emulated by Citra) or Nintendo DS (NDS)
  • And lots more :slight_smile:
  • **Also Runs on Xbox Series S, Xbox Series X and Steam Deck

HERE ARE THE LINKS!

Shader Package Approx. 12 MB

Extra Examples Package


INSTALLING THE BASE MEGA BEZEL PACKAGE

  • You MUST use Retroarch Version 1.11.0 or Later (It will fail to load on earlier versions)
  • If you want to use the default Mega Bezel included with Retroarch:
    • Use Online Updater -> Update Slang Shaders to update the shaders, the shaders will be added here Retroarch/shaders/shaders_slang/bezel/Mega_Bezel
  • If you want to install from a zipped release from the link above:
    • If the shaders/shaders_slang/bezel/Mega_Bezel folder exists delete it
    • Inside the .zip is a Mega_Bezel folder. Copy the Mega_Bezel folder into your Retroarch/shaders/shaders_slang/bezel folder (If the bezel folder isn’t there you can create it)
    • The final path to the Mega bezel should be Retroarch/shaders/shaders_slang/bezel/Mega_Bezel

RETROARCH SETUP

  • Set video driver to Vulkan (Or GLCore if Vulkan is not available)
    • It will run in GLCore but seems faster in Vulkan
    • It runs in D3D11, but it has a much slower load time
  • Restart Retroarch after changing the video driver
  • Open the Settings Menu and Set:
    • User Interface / Show Advanced Settings to ON
    • Video / Scaling / Aspect Ratio to Full
      • This will match your monitor aspect aspect ratio
    • Video / Scaling / Integer Scale to OFF
    • Video / Output / Video Rotation to Normal
    • Core / Allow Rotation to OFFImportant for FB Neo
    • For FB Neo
      • Turn vertical mode OFF in Quick Menu > Core Options if it was previously turned on
    • Do all of this before loading content
  • FB Neo
    • If your game is vertical set the Rotate CRT Tube parameter to 1. If it is now upside down set Flip Core Image Vertical and Horizontal to 1
  • Swanstation (and possibly other 3D cores)
    • Set Quick Menu / Core Options / Enhancement Settings / GPU Renderer to Vulkan or GLCore if Vulkan is not available

LOADING AND SAVING PRESETS

  • Load a preset in the shaders menu.
    • The Mega Bezel shader presets are found in: Retroarch/shaders/shaders_slang/bezel/Mega_Bezel/Presets
  • IMPORTANT!! When saving a preset make sure you have the Simple Presets feature set to ON
    • This will save a preset with a reference to the preset you loaded plus whatever parameter changes you made
    • This keeps your presets loading properly when the shader updates in the future

EDITING PRESETS

  • You can then open this Simple Preset file and add other parameter adjustments or set textures as you see fit. E.G. add the following lines to change the background image:
    • BackgroundImage = "MyImage.jpg"
  • Or change the path indicated on the #reference line to point at a different base preset

INSTALLING ADDITIONAL PRESET/GRAPHIC COLLECTIONS

  • Create a folder named Mega_Bezel_Packs in the root of the shaders folder, the final path of this should be `Retroarch/shaders/Mega_Bezel_Packs
  • Place any of the additional collections inside this folder
  • For example the final path to the examples pack should be Retroarch/shaders/Mega_Bezel_Packs/HSM_Mega_Bezel_Examples

BUG REPORTING:

  • When reporting a bug, it is VERY IMPORTANT to post images of the issue. This helps communicate the issue better & quicker, even if the issue seems simple.
  • Please make sure you are using the latest version of the shader
  • Please include info about your setup
    • Preset, Core, Core Internal Res 1x, 2x etc?, Monitor resolution, GPU
  • If you are having any issues with the shader not loading or crashing please include a log. See the readme for how to get a log
  • If loading the shader crashes Retroarch your core internal res is probably too high. Try native resolution or one of the DREZ presets which reduce the resolution in the first pass.

ALPHA DEVELOPMENT:

  • If you want to follow the raw bleeding edge of development :wink: or want an older version you can take a look at my github repo:

CURRENTLY INTEGRATED CRT SHADERS:

  • Guest-Advanced (GDV) - Official Default of the Mega Bezel!!!
  • Megatron (Requires high brightness display)
  • Easymode
  • LCD Grid V2

SPECIAL THANKS TO MY PARTNERS ON THIS PROJECT:

I want to thank @Duimon who is one of the contributors on this project creating great graphics. His testing, pushing the system and recommending features to improve and simplify has been a great help :star_struck:. He has put in SO MANY hours and attention :exploding_head: to this project which have helped it become what it is now. Thanks @Duimon!!! :smiling_face_with_three_hearts:. Links to Duimon’s work are below in the Resources section.

@TheNamec has also really helped push the shader system and experimented in how to organize and leverage references of shaders as well as make beautiful graphics.


THANKS TO THE SHADER WRITERS!

The Mega Bezel uses a number of shaders written by awesome shader writers from the community:

  • Guest.r (Guest-Advanced crt shader)
  • Hyllian (Super-XBR & Checkerboard DeDither)
  • Sp00kyFox (Scalefx & MDAPT DeDither)
  • EasyMode
  • CGCW (LCD Grid)
  • DariusG (GDV Mini)
  • Dogway (Grade Color Correction)
  • aliaspider (GTU)
  • Trogglemonkey (Royale 3D Curvature)
  • Flyguy (Text Shadertoy)
  • A special thanks to hunterk for porting a number of these and helping me with his expertise along the way!

RESOURCES:

@Duimon: Awesome graphics and presets for the different historical consoles & computers::

@TheNamec: Really amazing graphics for the Commodore & Amiga systems and PVMs:

@soqueroeu: Great pack of console branded TV graphics which are looking awesome.

@Orionsangel has been doing great overlays here for years! He has been using the Mega Bezel for some of his recent work My Realistic Arcade Bezels


SURVEY

Results of the last survey completed Aug 1 2022:

Survey Results - Aug 1 2022

Survey Results - Dec 14 2020


EXAMPLES

Adaptive for different monitor aspects

Glass Preset

Dual Screen

Nintendo DS (NDS) Dual Screen graphics by @duimon

Nintendo 3DS Dual Screen - Horizontal Layout graphics by @duimon

Debug Scaling Info & Downres Core Output

Blend that Waterfall!!! De-Dithering with MDAPT

Contour Smoothing Scale-FX smooths the shapes in SMOOTH-ADV presets

60 Likes
Bezel reflection shader
4K Vertical Overlay Community Contributions
Crt Shaders integer scaling on or off?
Please show off what crt shaders can do!
Shader Request: Smooth Glass borders. See pic for example
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
Console & Game Themed Bezels
CG Shaders gone/not working on v1.9.1
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
RetroArch + Big Box + HSM Bezel Shader = SuperMega64
B&W shader?
Shader scaling - pixel detection
CRT shader for Steam Deck (and possibly low res display)
Video Rotation and Screen Orientation
21:9 border help
Shader for dark-ish tint of gbc screen backgroud
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
What Is the Most Accurate CRT TV Shader and Accurate Aspect Ratio?
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
Capcom Play System Retroarch Shaders
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
The most accurate CRT experience possible - call to all shader pros
TVch34 Overlay
Citra Screen Gap Request
New CRT shader from Guest + CRT Guest Advanced updates
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
New CRT shader from Guest + CRT Guest Advanced updates
TheNamec - Mega Bezel Packs Amiga, Commodore 64, VIC20, CRTgaming soon
CRT Squabblin'
Console & Game Themed Bezels
CG Shaders gone/not working on v1.9.1
Please show off what crt shaders can do!
Please show off what crt shaders can do!
[Guide] Play Non-Arcade systems with MAME or MESS
My Realistic Arcade Bezels
Please show off what crt shaders can do!
TheNamec - Mega Bezel Packs Amiga, Commodore 64, VIC20, CRTgaming soon
Handheld Border Shaders
Please show off what crt shaders can do!
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
Please show off what crt shaders can do!
My Realistic Arcade Bezels
Scanlines / Grid Presets question
GCE Vectrex Overlay Misalignment
TheNamec - Mega Bezel Packs Amiga, Commodore 64, VIC20, CRTgaming soon
My Realistic Arcade Bezels
xBR crt effect in Retroarch?
Running cores/games at reduced scale
My Realistic Arcade Bezels
I made a 4K GBA overlay for retroarch
Please show off what crt shaders can do!
Universal 4K Vertical Overlay Project
What is your favorite shader for 480 stuff like Dreamcast?
4K Vertical Overlay Community Contributions
4K Vertical Overlay Community Contributions
New CRT shader from Guest + CRT Guest Advanced updates
How do I force 16:9 on a 32:9 monitor for retroarch?
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
Anyway to get a shader like New Retro Arcade in Retroarch?
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
80s monochrome green phosphor displays
80s monochrome green phosphor displays
Cropping black borders?
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
Blargg like shader for weak systems?
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
Hgoda90 - Graphic Varieties
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
CyberLab Mega Bezel Death To Pixels Shader Preset Pack
CyberLab Mega Bezel Death To Pixels Shader Preset Pack

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)

11 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.

2 Likes

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

2 Likes

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!

1 Like

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.

3 Likes

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

4 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

3 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.