Mega Bezel Reflection Shader! - Feedback and Updates

Nah, i mean the circles that look like rings in a tree stump.

1 Like

Hey! I have started a thread of my own for the graphics I am creating for this shader.

Links to the files and updates will be confined to that thread.


Nice! Feel free to cross link when you have cool updates (although I’m going to follow it myself anyway)


Hi, the moire artifacts you’re seeing could be because of a couple of issues, the latest release has some degradation of the screen image which will be fixed in the next update.

At that resolution I wouldn’t expect a lot of moire.

The base cause of the moire artifact is the curvature, if you set the curvature to 0 the moire should go away

1 Like

lol. Will do once I figure out how.

1 Like

Think you just copy the URL for the thread and paste it here, and copy this threads URL and paste it in your thread.

May be talking about something else but that’s how you link on here as far as I know.

Like so

And if you know which post number it is you can add it at the end of the URL with /(whatever#) and it’ll show that post in the box along with linking directly to it.

Like so:

1 Like

yer it comes and goes as i play with the integer scale to increase screen size. when i increase screen size the rings show, when decrease size they dissappear again.

1 Like

Which preset are you using? You could try the royale preset as royale handles the moire problem with curvature better than most.

Also in general moire artifacts are less of a problem when you are at an integer scale and using higher resolutions.

The effect you are seeing could be the CRT shader you are using rather than anything specific about the Mega Bezel, because the Mega Bezel uses already existing great CRT shaders which people really like rather than coming up with it’s own.

Edit for Clarity:

To test this:

  • Find what the resolution is for the portion of the screen displaying the tube by turning on the [SCREEN SCALE] Screen Scale Debug parameter which will show the resolution onscreen.
  • Set as a custom aspect resolution in the retroarch video settings
  • Load the standard shader, without the mega bezel, e.g. crt-guest-dr-venom.slangp

If the effect still appears then this is directly to do with the CRT shader and not something that can be fixed within the Mega Bezel.

1 Like

Hey there,

for some setups I like to have just a trinitron mask, without scanlines. I noticed that using easymode-halation allows to set “Scanline Type” to 3, which means there are no scanlines at all.

I then took a look into guest-dr-venom, where only scanline types from 0 to 2 only exist. So I “tweaked” the shader a little bit to allow scanline type 3. Now if you want to have an additional option to use the guest-dr-venom shader without scanlines, just do the following:

Open file “shaders\shaders_slang\crt\shaders\HyperspaceMadness\”

Replace the line containg this:

#pragma parameter gsl "Scanline Type" 0.0 0.0 2.0 1.0


#pragma parameter gsl "Scanline Type" 0.0 0.0 3.0 1.0

And then replace:

if (gsl == 2.0) { w1 = sw2(f1,cref1,shape1); w2 = sw2(f2,cref2,shape2);}


if (gsl == 2.0) { w1 = sw2(f1,cref1,shape1); w2 = sw2(f2,cref2,shape2);} else
    { w1 = vec3(f2); w2 = vec3(f1);}

That’s it. Now you can choose Scanline Type 3 whenever you don’t want to have scanlines.

Here’s an example with disabled scanlines:

@HyperspaceMadness: maybe you would like to consider implementing this small change into your master repo? It doesn’t do any harm (at least I guess), because it doesn’t need any additional parameter. It just adds an additional option. And if it’s part of “master” I wouldn’t have to apply these changes everytime there is a new version :yum:

But maybe there is a reason why Scanline Type 3 doesn’t exist by default?

I think you can do it with the last interlacing mode, and turning the interlacing trigger resolution down.

Cool nonetheless though.

1 Like

Oh, well :joy:

I happened to disable the interlace parameters in this shader because I didn’t know what they are good for :upside_down_face:

I needed “space” for some extra parameters, because I added your vignette function into this. Btw.: I made your vignette function customizable with 4 parameters and also added 2 different functions for 2 completely different kinds of leveling.

Oh, and I also added the light bulb reflection from the mame shader (you can see it on the screenshot) after you showed me how to disconnect shaders and integrate them. I even tweaked this one, so I can now set the exact x/y position of the light reflection on the screen. You opened a door for me, thx once again :+1:

1 Like

I’m glad I could be of help, and help open the door for you to start tinkering with shader code.

Screenshots looking nice btw.

1 Like

Yes this seems reasonable, we should also what @guest.r thinks about this and if he wants to add this to the standard guest-venom.

I’d enjoy seeing the code for the the vignette you guys made, I’m not happy with the vignette which is in there right now (taken directly from the mame shader)

I always enjoy that light bulb shader, it always makes me smile. It would be fun to put in, but I don’t think we can spare the number of parameters.

How do you find trying to put dirt/scratches on top of the screen with the image layering options available?

Also I’m thinking of renaming the OverlayImage to TopLayerImage to remove any confusion about retroarch overlays, what does everybody think about that?


Here’s the link to a set of shaders.

It needs some explanation, though.

I experienced severe problems with the most recent shader presets by HSM. It must have something to do with the intregration of the GTU passes and/or with resolution/scaling changes. When I use my modified venom-shader, it looks really ugly starting from HSM version April, 26th.

So as I “want to have it all” I did this: I created a set of all necessary shaders with HSM from 20th of April. I put them all in a seperate folder, called it “my_shaders” and put it in the top “shaders” directory. I created my own shader preset and modified all included links. Every neede shader and #include is below “my_shader”



So now I can decide whether to use “bleeding edge” HSM shader or my customized shader.

About my customization: There are 4 “tweaks”:

  1. I integrated vignette into venom with 2 different gradients. As parameters are rare, I choose to do a little trick: If you set the Vignette Strength to a value BELOW zero, it uses another leveling function than if it is set to ABOVE zero. So I didn’t need an additional parameter :grin:
  2. I integrated light reflection and added some parameters
  3. I tweaked color-mangler, so the number of parameters (18 !!!) is reduced to only 1. This one parameter is just to choose a predefined color setup. Of course I will add more and more predefined color setup as I need them … btw. color-mangler is now part of my modified HSM shader preset
  4. And there’s another mame shader which became part of the preset: phosphor. Here I also reduced to number of parameters to 1 by integrating predefined phophor setups.

Now for my problem with the most recent version of HSM: the functions still work, but the resolution seems to be wrong, so transitions aren’t smooth anymore. Maybe we can find the reason, maybe with HSM’s help (he seems to be interested in what we are doing right now, I think :smile:)

Here’s the link:

1 Like

Oh. It wasn’t my purpose to write my last post in public. I thought I was in a private conversation with @Syh :roll_eyes:

Well, nvm. Now everyone can read it. There’s no secrets, so enjoy everybody. Maybe it’s useful for one or another :sweat_smile:

1 Like

Now I’m confused. Did I just PM you or is my answer in public conversation??

1 Like

It’s public, lol. Not that it really matters, lol. The private message has RE: at the beginning of the title.

1 Like

@HyperspaceMadness: Sorry, last time I spam this conversation, I promise :v:

I feel like a noob right now, because I’m confused witrh PM and public. @HyperspaceMadness: I sent you a PM some minutes ago, but I’m not quite sure that I did it correctly. Did you receive it? I can’t find the message I’ve sent anymore … :thinking:


The Mega Bezel is Updated to V2020-05-08-0


  • Fixed the crushing of bit depth which was causing the cut out effect and image degradation
  • Did another reshuffle of the passes in the presets, reorganized to remove a couple of passes which were after the upscaling and now all extra stock passes are before any upscaling happens so this should hopefully be faster. I get 150 FPS at 3840x2160 on a RTX2060
  • Returned the bezel inner edge width control
  • Some code cleanup
  • You will need to update your presets

Thank you! I have been refreshing this page quite often… I’m glad to tell you that slowness went away for my GTX 1060 max q. I can now run Dr Venom full speed in 4k again with these speedups :smiley: