Mega Bezel Reflection Shader! - Feedback and Updates

Usually you will need to edit the parameters for your desired look. For blending dithering there are a couple of things that you can do, one is turning on MDAPT or other De-Dithering options in the ADV presets, they are later in the parameter list. You could also use an NTSC preset which will blend the dithering and colors.

Yeah that would be cool :slight_smile: just if you can please credit the graphics creator and a link to this thread in your description.

One thing you can do is add your side graphic as an additional image

For example you could save a new simple preset which references the one you originally loaded, then set one of the images like this:

TopLayerImage = MyTexture.png

2 Likes

Yeah, what I meant is that Retroarch does not have support for this, rather than to say that it’s technically not possible :wink:

It would be cool to have such a thing with a big shader like this :slight_smile:

3 Likes

It is likely that you are not yet aware of ALL the parameters. Many things that affect the graphic elements can be done in the shader with only parameters.

If you are needing something specific, perhaps I can save you some time. I have also been known to do requests. Feel free to contact me via PM if you’d like.

3 Likes

Mega_Bezel_Logo

Mega Bezel is updated to V 0.9.108 2022-04-23 Rev 1

Changes:

  • Fixed cropping in Megatron Presets
  • Fixed path problems in Community_CRT_Variations

HERE ARE THE LINKS!

Shader Package Approx. 15 MB

Extra Examples Package


INSTALLATION INSTRUCTIONS

  • You MUST use Retroarch Version 1.9.8 or Later (It will fail to load on earlier versions)
    • If you have previous versions of the Mega Bezel installed:
      • Delete the old Mega Bezel stuff from shaders/shaders_slang/bezel
    • Inside the .zip is a bezel folder, copy the bezel folder into your Retroarch/shaders/shaders_slang folder
      • The final path to the Mega bezel should be Retroarch/shaders/shaders_slang/bezel/Mega_Bezel
    • Set video driver to Vulcan
      • It will run in GLCore but seems faster in Vulcan
      • Some users have run it successfully in D3D11 but with a very slow load time
      • Restart after changing the video driver
    • Open the Settings Menu and Set:
      • 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
      • User Interface / Show Advanced Settings to ON
      • Core / Allow Rotation to OFFImportant for FB Neo
      • Do this Before loading content
    • Load a preset in the shaders menu, Mega Bezel shader presets are found in:
      • shaders/shaders_slang/bezel/Mega_Bezel/Presets
    • When you save 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 will keep your presets loading properly when the shader updates in the future

BendBombBoom__Dotty-Mask-7__ADV.slangp

BendBombBoom__Slotmask__ADV__NTSC__1080p.slangp

Sonkun__SlotMask-8-16-Bit-PC-1080p__STD-NTSC.slangp

Sonkun__SlotMask-Arcade-32-64-128-Bit-480i-1080p__STD-NTSC.slangp

Nesguy__ApertureGrille-TVL-360__ADV.slangp

Nesguy__ApertureGrille-TVL-540__ADV.slangp

8 Likes

Hola No puedo usar Vulkan (tengo GTS 250) :frowning: Pero les dejo mi Oerlay de Dreamcast NEGRO!

3 Likes

If you are interested in some nice standard overlays for the different systems, @Duimon has some great ones:

1 Like

@HyperspaceMadness

I’m still getting a couple “path too long” errors on a couple of files related to Cyber’s presets.

Also, my presets are looking quite a bit darker than expected there. Not sure if that’s due to the smaller vertical scale being used (tested at 5x /1120px/1200px vertical scale) or if there’s some different color/brightness stuff going on in the bezel shader that I didn’t account for. All of these were edited within guest-dr-venom.

I’m going to tweak the settings within the bezel format you’ve chosen as the default as this is probably what most users will use. An additional preset at 5x scale showing the bezel only on the sides might also be a good option. In my experience there’s a big difference between 4x and 5x scale when it comes to scanlines.

edit: Yikes, the moire. Not sure what to do here. I’m thinking the curvature needs to be removed for these presets. I can also make a new one with the scanlines adjusted so that the moire is undetectable.

4 Likes

Hmm perhaps it’s relative to where Retroarch is installed.

I’ll take a look in the retroarch shader loading code, we may be able to fix it so it doesn’t have this problem.

This is likely, the way to test would be to set the aspect ratio to full to get it to expand to the height of the screen.

Yeah here turning on the integer scaling and adjusting the max scale should give you the integer scale around the size you are looking for

Yeah, you can set the crt curvature scale to 0 which will remove curvature on the crt screen causing the moire but keep the rounded bezel around the screen. Maybe we should do that to these presets.

But the adjustment you mention sounds good too :slight_smile:

2 Likes

You can try my presets in my thread in the meantime. I don’t think the latest Mega Bezel update included my most recent preset updates.

You can try changing your base preset to one of the new Max Integer Scale Presets that @HyperspaceMadness has now included. They seem to be the trick to get maximum screen real estate usage without any weirdness like a bezel on the horizontal sides only.

@HyperspaceMadness chose a default scale of 115% but in my initial testing that left some of the title text at the bottom of the screen in Street Fighter II Turbo Hyper Fighting on SNES cropped off.

A slight adjustment to 104% seemed perfect to me, at least for that game (which was the only one I tested).

That one is a game changer though for all those folks who frequently come saying they like the scanlines but want to disable the bezel for whatever strange or valid reason.

1 Like

On D3D12 the Windows drivers should automatically cache the compiled shaders and reuse the binary if the shader source is the same. Are you not seeing that behaviour? I would have imagined Vulkan by now would have this support too.

To your last point you could certainly do that without a shader being activated whilst it’s compiling but it’s a bit of work - it would just take someone to implement it for all the drivers. As @HyperspaceMadness says it’s all technically possible it’s just a lot of work.

1 Like

It is slightly faster than the first time but not as fast as without the shader. So I suppose what I’m seeing is the benefit of the cached graphics not the cached shader itself. I am indeed using vulkan.

1 Like

When you say ‘cached graphics’ Im not sure there are enough/any textures to be noticeable. There are a few small LUT textures but I’d expect those to load and be converted in under a second. Geometry is all generated on the fly.

However maybe @HyperspaceMadness can confirm whether this is the case for the Mega Bezel?

At the end of the day we know there’s a problem and I suppose we just need to profile it and identify the problem (unless @hyperspacemadness has done this already?). Maybe when I come round to trying this all out myself I’ll take a look.

2 Likes

I see plenty of images around showing a bezel featuring a Commodore 1084S monitor. I still couldn’t find how to use it. I also downloaded the extra examples packages.

I would love to use the default shader, with the 1084S bezel (just the monitor if possible, without extra stuff to the sides).

2 Likes

In the “RESOURCES” section at the top of this thread you will find links to my thread and @TheNamec’s thread. We both have presets that use a 1084S… each of our own making.

The installation instructions can be found on the relative thread. If you have any questions/issues please post in those threads so other users may benefit from the answers.

Once you have the presets working you can load one and save a core, game, or content directory preset. Then the saved preset can be edited, (For your personal use.) and the unwanted elements replaced with a placeholder.

4 Likes

So the caching in referring to is the caching of onscreen graphics from frame to frame when they are not changing.

For caching of graphics between frames, I’m not sure this is done at all. For texture load time, one Mega Bezel preset could easily have 6 4k textures to load.

I haven’t profiled this, but in a shader chain like the Mega Bezel which has a lot of code and a lot of passes if you get the log window to come up, and watch while it’s loading you can see all the time it’s talking to recompile the same shaders as the last time you loaded.

Also if someone is using the Mega Bezel they are 99% not using the D3D driver, as the load time is crazy long, like 5-10 minutes, if it manages to load at all.

It seems likely that we need to add compiled shader caching to the Vulkan & GLCore drivers, so we can do a checksum on the pre-compiled shader to see if it has changed and if not reuse the last compiled shader.

1 Like

What data would you expect to get cached across frames? I suppose more generally what caches are we expecting to help in this situation. It’s highly unlikely any data will survive more than a pass in the GPU caches for instance.

Regardless it’s very strange that even 20 shaders would take more than a second each to compile. Im going to guess something else is going on.

1 Like

There might be a strong correlation between compilation times and coding approaches. On my rig the crt-guest-advanced-ntsc compiles like in 1 second. It contains 15 passes and runs like 950 fps on the test image. crt-royale is a 12 pass shader, runs 1150 fps and compiles like 5 seconds. OTOH the coding approach is different. While guest-advanced is quite linear with if-else-parameter code path logic, royale uses more constants, #defines, #includes and heavy function nesting, a bit scattered in different files too. I guess it’s very optimized for execution, but it takes a while for assembly and register/shader processor usage optimizations.

Also d3d hlsl code is translated from .slang in real time and complex shaders might give some processes a hard time to finish with compiling.

2 Likes

I don’t know I doubt very much coding style is going to dent compilation perf that much - certainly not to the degree we’re seeing here. If you look at a UE4 or UE5 shader they take in tens of files 1000s of lines of code and are a huge rat’s nest of #defines etc and d3d compiler will just smash through them regardless.

I’m guessing it’s your last point: the slang conversion that is the source of the issues. But then until someone has profiled it who knows, you could well be right on coding style.

2 Likes

Yeah, I’m not suggesting that things should be cached across frames automatically, I was just explaining that the Mega Bezel does “caching” of graphic elements so they do not have to be regenerated every frame, for example all of the image elements behind screen are rendered once, and then in the next frame if no parameter values change then the pass will just output the result of the last frame.

Some presets in the Mega Bezel have up to 40 passes, so one second a piece would still add up to 40 seconds :frowning:

Although there still may be something else going on

In guessing it may be the slang conversion as well

2 Likes

Yeah but the vast majority of those shaders are super simple right - it still doesn’t add to me.

2 Likes