Mega Bezel Reflection Shader! - Feedback and Updates

Which preset are you using?

I tried both crt guest venom and sm as well as easymode presets. When I turn off the CRT mask to -1 the vertical scanlines look correct. I am on a 1440P monitor as well if that makes a difference

Thank you for the shadow parameter. It just doesn’t work for my needs, though it will be great for people wanting a tiled background. For detailed non-tiled images tho it just washes them out. By the time you turn the shadow down enough it is irrelevant. I ended up just placing my ruler overlay into the image to bullseye where the frame was being generated and added my own drop shadow… only needs to be done once for the vast majority of platforms because they all scale to the same place. The exception the GBA or in my case any aspect ratio I change such as the PSP. Images follow…

1 Like

Some people… myself (until now) included, demand an LCD look for handhelds. With the GBA I am on the fence, although I can always revert to my default shader. With the PSP I think this breaths some life into the platform.

Next, I went in and edited your shadow generating code… eliminated the outside shadow, replaced a variable with a constant and tweaked it, ending up with something that comes close to my PS drop shadow. I am not familiar enough with shader code to get it perfect. Image follows…

2 Likes

So maybe I misunderstood what you wanted, did you want to keep the shadow right around the frame and get rid of the vignette type shadow/darkening coming from the sides and bottom of the screen?

1 Like

Yes. but when i simply went in and eliminated the vignette the shadow was very bottom heavy, probably appropriate given the right art and room lighting one might be using, but not the exact effect I am used to giving my bezel art.

I really don’t want you concerning yourself too much.

I Changed your code in hsm.bezel.slang from this:

	float shadow_mask = //1 * HHLP_QuadraticBezier(smoothstep((0.3 + 0.2 * bottom_top_ratio), 0, distance_outside_frame) * (0.8 + 0.2 * bottom_top_ratio), vec2(1, 0)) +
			radius_fade * top_to_bottom_fade_off_top + 0.5 * side_fade * top_fade * bottom_fade +
			//1 * viewport_vignette +

			0.9 * HHLP_QuadraticBezier(smoothstep(0.52, 0, 0.5 - abs(viewportCoord.x - 0.5)), vec2(1, 0)) +
			0.9 * HHLP_QuadraticBezier(smoothstep(viewportCoord.y > 0.5 ? 0.25 : 0.2, 0, 0.55 - abs(viewportCoord.y - 0.5)), vec2(1, 0));
	shadow_mask = 0.8 * clamp(shadow_mask, 0, 1);

to this:

	float shadow_mask = radius_fade * (0.2 + 0.1 * smoothstep(0.0, 0.4, bottom_top_ratio)) + 0.4 * side_fade * top_fade * bottom_fade +
						

			0.0 * HHLP_QuadraticBezier(smoothstep(0.5, 0, 0.5 - abs(viewportCoord.x - 0.5)), vec2(1, 0)) +
			0.0 * HHLP_QuadraticBezier(smoothstep(viewportCoord.y > 0.5 ? 0.2 : 0.2, 0, 0.5 - abs(viewportCoord.y - 0.0)), vec2(1, 0));
	shadow_mask = 0.9 * clamp(shadow_mask, 0, 1);

and got this…

1 Like

I just hacked it repeatedly until I figured out what did what and then tweaked it. (I don’t really understand the code… I am an artist not a coder) Probably got some things wrong that will adversely affect scaling etc.

I am willing to make these changes manually going forward if maybe you could tweak it for me. :grin:

There is always my ruler bulls-eyeing method if I can’t get it any better.

2 Likes

Yeah I’ll take a look at your changes, hopefully I can adjust the code to get what you’re looking for, because the results you are showing seem like something a number of people would l8ke.

1 Like

Hi, Easymode isn’t able to do vertical scanlines, and SM can do them in some circumstances I think.

I would suggest trying the original shaders with the retroarch scaling set to something similar as what the bezel provides, and see how similar it looks to what is coming out of the bezel shader. If it looks different then there could be a problem with the bezel shader.

1 Like

I can notice some color banding in the reflection part of the bezel when the screen is dark and i have removed the noise:

1943 - The Battle of Midway (Europe)-200316-002628

Although i don’t like the noise, i think the banding looks worse so i kept the previous version since it loads a bit quicker for me. I wish there was a way to remove the noise in that version but oh well, i’ll try again on the next version.

One last thing i noticed is that the shader parameters list looks a bit messier than before. In the previous version the list looked cleaner, you could tell the different “sections” better, now the options seem more scattered and there are underlines in the text of random options. It makes it look more unfinished than before IMO.

I’ll take a look at the banding issue, you see the banding even when game screen is black?

I’ll think about your comment about the parameter names as well since the underlines added are supposed to help it be easier to read.

Some of the parameters which are split between the big section at the beginning and the bezel part later on. Ideally they would be together, but they can’t be because of a technical reason. I’ll see if there might be a way for them to be more cohesive.

3 Likes

Well, hats off to you :smile:. Thank you for checking this out, I will test the shader later, cannot wait! GTU adds a needed effect that blends the colors and makes everything so much better.

3 Likes

The banding appears when there is no picture to reflect. Any reflection will hide it.

2 Likes

Which core do you use for vertical games? I’m trying with fbneo and mame 2003-plus but it keeps the horizontal aspect distorted.

Hi, I’ve been using Mame2016, and it does something to rotate the core image before it gets to the shader, this works well for a lot of games, but doesn’t look good on vector games.

FBNeo and Mame2003 I think both return the image in the official way which is the same way the original hardware did, so sideways…

Guest-Sm shader does handle the rotation, so I think to use that one you turn off the rotation in the core and retroarch, then tweak the settings in the guest-sm to turn on TATE mode. although i think the aspect on the frame is still wacky, so I’ll need to look into why it’s doing that.

In general I think I need to do some magic to rotate the image when it goes through the crt shader with a rotation setting. The weird aspect ratio of the screen is caused by an odd thing that retroarch is doing with the frame buffer when it rotates based on the core, it basically has rotated the frame buffer and is working with it sideways, so the bottom of the bezel which is brighter than the top actually shows up at the right side of the screen instead of the bottom

2 Likes

By he way, its a given that we all appreciate what you are doing here. Im saying this because i realise my posts may seem a bit like a constant critisism. Its only that i want to help make this the ultimate shader :slight_smile:

3 Likes

I’ve been playing with the parameters and I must say the the level of control you’ve built in is unprecedented. With very little effort I managed to change the look of the bezel and screen dramatically. Combined with the fact that the shader draws “over” the background instead of “under” a bezel, this makes creating artwork a piece of cake. If I could combine this bezel and effect with an LCD grid I would never need another shader.

3 Likes

Nice! I’m glad you are finding it easy to work with :slight_smile:

What LCD shaders do you like?

In seeing your examples another thing which which seems like a good idea would be to have an option to add the bezel shading on top of the bezel image, so in this example the bezel could take it’s overall brightness/color from the bezel image, so you could have the bezel be blue with the standard bezel highlights and shadows.

Another thing to mention is that if you turn off the frame (which you may have already tried) the bezel can “cut into” the bezel image and leave you with a sort of carved in look with rounded edges if you want (The frame’s thin inner bevel/highlight will still stay on the inside edge even thought the frame is removed).

Also to let you know, I have a new version coming which implements the shadow around the frame in a simpler/lighter way like you had changed in the shader, because like you mentioned it was having a heavy feel at the bottom.

2 Likes

Color changing for the bezel would be pretty cool.

I use the lcd-grid-v2-gba-color for most of my handhelds. It scales well so looks pretty good on all handhelds. I fear adding any option like that to this would be impossible to chain. Maybe a fork for LCD?

I did try eliminating the frame but it didn’t look as good as minimizing it’s width… looked unnatural. I played with the scan line method, mask width, and scan line brightness and came up with a result that does kind of mimic an LCD to the casual observer.

I agree that the color changing would be great. I never mentioned it because I feared it was impossible to do depending on the method you used to paint the reflection on the bezel. If it is possible maybe an RGB value as the base bezel color would be something to think about.

From an artists perspective it would be another game changer among all the rest you’ve brought us.

I look forward to trying the new version.

1 Like