Mega Bezel Reflection Shader! - Feedback and Updates

Mega_Bezel_Logo

Mega Bezel CRT Simulator

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 Mega Bezel project and some of its 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 are also updates periodically which may get a release on Github 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.15.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

  • Do all of the following before loading content

    • Set the Video Driver
      • Set video driver to Vulkan or GLCore if Vulkan is not available
      • It will run in GLCore but seems faster in Vulkan
      • D3D IS NOT RECOMMENDED. If it loads in D3D it has a VERY slow load time
      • Restart Retroarch after changing the video driver
  • Video Scaling

    • 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 and MAME Current
  • Core Setup

    • For FB Neo
      • Go to Quick Menu > Core Options and turn vertical mode to OFF
    • MAME Current
      • Go to Quick Menu > Core Options and set Rotation Mode to internal
    • 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

WHAT DOES EACH PRESET DO?

  • Try this preset to start: Mega_Bezel/Presets/MBZ__3__STD.slangp
  • Presets are named and organized based on capability and performance
  • The most performance heavy presets’ names start with MBZ__0__SMOOTH-ADV and then lighter presets have higher numbers, ending in MBZ__5__POTATO
  • For details see the README here https://github.com/HyperspaceMadness/Mega_Bezel

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

LOADING THE SHADER CRASHES RETROARCH, WHAT’S GOING ON?

  • If loading the shader crashes Retroarch, your core resolution is probably too high and this is maxing out the GPU Memory to avoid this you can try:
    • Using the core’s Native Res
    • Changing to the GLCore Video Driver
    • Using one of the DREZ presets which reduce the resolution in the first pass.

BUG REPORTING:

  • When you report 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.
  • If you have a laptop which has a discrete GPU, make sure it is being used rather than the integrated graphics
  • Please make sure you are using the latest version of the shader
  • To help you we need:
    • What is the Preset filename?
    • Which Core?
    • Core Internal Res, 1x, 2x etc?
  • If the shader not loading or crashing you MUST INCLUDE A LOG for us to help you.
  • How to Generate a Log:
    • Go to Settings
    • Enter Logging
    • Activate Logging Verbosity
    • Adjust Frontend Logging Level to 0 (Debug)
    • Activate Log to File

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.

@p3st has been doing some really creative things with the Mega Bezel and has some great stuff available. He has been working on a Launchbox Big Box theme centered around a crt look.

@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

No blending of dithering

Blended dithering

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

No Smoothing

Smoothed

71 Likes
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
Bezel reflection shader
4K Vertical Overlay Community Contributions
Crt Shaders integer scaling on or off?
TheNamec - Mega Bezel Packs Amiga, Commodore 64, VIC20, CRTgaming soon
Please show off what crt shaders can do!
Shader Request: Smooth Glass borders. See pic for example
Console & Game Themed Bezels
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
CG Shaders gone/not working on v1.9.1
My Realistic Arcade Bezels
RetroArch + Big Box + HSM Bezel Shader = SuperMega64
What Is the Most Accurate CRT TV Shader and Accurate Aspect Ratio?
Handheld Border Shaders
CRT shader for Steam Deck (and possibly low res display)
I made a 4K GBA overlay for retroarch
New CRT shader from Guest + CRT Guest Advanced updates
21:9 border help
Citra Screen Gap Request
B&W shader?
Video Rotation and Screen Orientation
Back-Ups Arcade
Shader scaling - pixel detection
The most accurate CRT experience possible - call to all shader pros
Please show off what crt shaders can do!
[Guide] Play Non-Arcade systems with MAME or MESS
Please show off what crt shaders can do!
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!
Scanlines / Grid Presets question
GCE Vectrex Overlay Misalignment
My Realistic Arcade Bezels
xBR crt effect in Retroarch?
My Realistic Arcade Bezels
Please show off what crt shaders can do!
Universal 4K Vertical Overlay Project
4K Vertical Overlay Community Contributions
4K Vertical Overlay Community Contributions
What is your favorite shader for 480 stuff like Dreamcast?
Hgoda90 - CyberLab DTP Console + PC Overlays
4K Vertical Overlay Community Contributions
Use a border or not for crt-royale for psx at 1440p
MagicHat's OrionsAngel Mega Bezel MAME Arcade Setup
Hgoda90 - OrionsAngel's Overlays w/ Mega Bezel Presets
How to convert an image into an overlay or border shader background
CyberLab Death To Pixels Shader Preset Packs
Akuma22 Mega Bezel Arcade Mame and Systems Presets
P3st´s Overlays for Mega Bezel Shader (Arcade,TV´s ,and more)
Hi, I have a question about shaders
Pressed Apply Changes by mistake
Hgoda90 - Mega Bezel Graphics + Varieties
Color overlays
Scanlines for 3:4 games on a 16:9 LCD screen , anyone?
RetroGames4K's Mega Bezel screen pics, gameplays & custom settings
CyberLab Death To Pixels Shader Preset Packs
P3st´s Overlays for Mega Bezel Shader (Arcade,TV´s ,and more)
CyberLab Death To Pixels Shader Preset Packs
CyberLab Death To Pixels Shader Preset Packs
Please show off what crt shaders can do!
My Realistic Arcade Bezels
Running cores/games at reduced scale
My Realistic Arcade Bezels
Cropping black borders?
80s monochrome green phosphor displays
80s monochrome green phosphor displays
CyberLab Death To Pixels Shader Preset Packs
Anyway to get a shader like New Retro Arcade in Retroarch?
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
CyberLab Death To Pixels Shader Preset Packs
How do I force 16:9 on a 32:9 monitor for retroarch?
TheNamec - Mega Bezel Packs Amiga, Commodore 64, VIC20, CRTgaming soon
New CRT shader from Guest + CRT Guest Advanced updates
TVch34 Overlay
CyberLab Death To Pixels Shader Preset Packs
CyberLab Death To Pixels Shader Preset Packs
Blargg like shader for weak systems?
CyberLab Death To Pixels Shader Preset Packs
CyberLab Death To Pixels Shader Preset Packs
CyberLab Death To Pixels Shader Preset Packs
CyberLab Death To Pixels Shader Preset Packs
Shader for dark-ish tint of gbc screen backgroud
CyberLab Death To Pixels Shader Preset Packs
CyberLab Death To Pixels Shader Preset Packs
Duimon - HSM Mega Bezel Graphics and Presets - Feedback and Updates
Capcom Play System Retroarch Shaders
CyberLab Death To Pixels Shader Preset Packs
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!

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)

13 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

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

4 Likes

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

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

2 Likes

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.