Mega Bezel Reflection Shader! - Feedback and Updates

Yes if you do it inside the shader parameters this is going to give you the best results rather than getting sucked down the preset editing rabbit hole.

2 Likes

Thanks for help :+1:

2 Likes

What do you think. I really prefer it without the bilinear effect (blur) for 2d games.

With sharpness H and V set to 0.00

With sharpness H and V set to 1.00

the magic settings

2 Likes

Glad you found what you like :slight_smile: , the pixel’s seem sharp like you wanted

2 Likes

anyway, good work for the shaders HyperspaceMadness i really like them.

:pray:

2 Likes

Thanks, these two were exactly the ones I was looking for! :+1: :smiley:

I was aware of this one, but I’m looking for something different. When you add the grade shader to the stock guest-venom shader there are in total three CRT related gammas:

  1. CRT Gamma (grade)
  2. CRT Gamma Input (guest-venom)
  3. CRT Gamma out (guest-venom)

If I look at HSM mega bezel guest-venom with grade added there are only two CRT related gammas left:

  1. [COLOR CORRECTION GRADE] CRT Gamma
  2. none
  3. [COLOR] CRT Gamma - def 2.3

So in the HSM shader, number 2. CRT Gamma Input from the guest-venom shader has been left out, at least as a configurable parameter.

Since I have this configured in some of my stock guest-venom shader settings I need to know where it’s now.

Since in the stock guest-venom shader number 2 is configured in linearize.slang, I took a peek at your conversion file and noticed it’s alsmost exactly the same file, with instead of the gamma input variable in the code I noticed it’s hardcoded at 2.4 (the default guest-venom).:

FragColor = pow(vec4(texture(Source, vTexCoord).rgb, 1.0), vec4(2.4));

I have no problem with it being hardcoded, I just wanted to confirm with you that this is indeed the place where the “CRT Gamma Input” from the stock guest-venom is configured?

Or even better worded, if I want to change/configure the “missing” “CRT Gamma Input” from the stock guest-venom shader in HSM, where do I need to look? (Note: I don’t mind changing a value in one of the shader files).

2 Likes

Thanks for the explanation :slight_smile:

Yes you are correct that changing the 2.4 would be the same as changing the “CRT Gamma Input” in stock guest-venom

I’ll probably do something like this in the future if it’s necessary:

  1. CRT Gamma (grade)
  2. CRT Gamma Input
  3. CRT Gamma Out

It’s possible that we only need the gamma in grade for the input gamma. In an ideal world I think I would only expose two gammas, input and output.

Trying to sort out gamma always hurts my head :grimacing:

Me too. The whole input output thing throws me off. I think it would make it easier to understand if it were labeled, “Display Gamma” and “Simulated Gamma”. BTW thanks again for your and @Duimon 's hard work :+1:

2 Likes

Hey, sorry I haven’t posted in a while ! Here’s the preset :

Adapt it to your needs. :slight_smile:

1 Like

Thanks, good to know I can safely adjust the value there :slight_smile:

Personally I think this would be best for “power users”.

I agree with your comments though, having three gamma parameters is confusing to say the least.

Dogway commented in his grade shader thread, that when a user wants to solely use his grade gamma adjustment without the guest-venom values “interfering” he advised to just leave the guest-venom values for input and output at default/same values (In his words a “no-op” for the guest-venom gamma, leaving only the grade gamma change).

He has not mentioned in his thread to replace the in or out gamma from guest-venom with his grade CRT gamma, there may be a reason to that, I don’t know.

From the guest-venom readme (in the crt/shaders/guest shader folder) I understand that a number of calculations are done in guest-venom’s “Gamma Input” space. The “Gamma Input” value affects horizontal interpolation, scanlines and how masks are distributed over the spectrum. As such it affects the overal look of these (besides affecting gamma), and may be something some users may want to experiment with.

Also I noticed that the guest-venom “Gamma Input” works opposed to grade’s “CRT gamma”, i.e. raising the guest-venom “Gamma Input” value darkens the image (and vice versa), whereas raising dogway’s grade “CRT Gamma” brightens the image (and vice versa).

Given the above I would be hesistant to replace guest-venom’s “Gamma Input” with dogway’s “CRT Gamma” without consulting them first to confirm this does not inadvertedly change the intention/look of the guest-venom shader.

On a different note, I noticed that [TUBE] Tube Glass Highlight Opacity has a minimal value of 0.01, which still leaves a very small grey “blob” on the screen at this minimal value, noticable on for example Pluge test screen in SNES 240p Test Suite. Is there a reason you don’t have the minimal value at 0.00? As that is the only way (after changing the minimal value in the shader myself) I could really turn off the Glass Highlight.

1 Like

This should be fixed on the next update, it was sort of a hack fix to fix some weird colors coming up on the LCD preset.

Gamma…

Guest’s shader uses two main inputs to do it’s color calculations: The color in linear space which was decoded/removed using the “Gamma Input” value - This is the output of the linearize pass The color with the gamma encoded/added, then applying an additional Gamma of 10 - This is the output of the linearize_scanlines pass

Gamma Out is the gamma adjustment to take it from linear space back to gamma space. So it takes the linear color then “encodes” the Gamma Out in it. This happens as the very last step of the shader.

So basically Gamma Input takes the gamma off and puts it in linear space, and Gamma Output puts the gamma back on at the end of the shader.

Grade gamma is just encoding/adding more gamma correction, and of course this happens before the crt shader.

I remember now the reason that I removed the Gamma Input in the first place was to get a consistent color linearization across all the shaders. Now that we have more parameters it can be added back in as a parameter for all the shaders rather than just Guest-Venom.

Whew… so simple! :wink: :exploding_head:

More fun stuff @duimon and I are cooking up!

5 Likes

Great thanks for looking into this, good to know how this works and that all three gammas have their place.

I said it before I think, but the combination of HSM Bezel + Duimon’s graphics + guest-venom shader + grade really is golden. Exciting to see all the various developments coming together in this holy grail of CRT shading :smiley:

So another question on the bezel reflection (these probably have crossed your mind already in the past…): from which user perspective are the reflections drawn? As far as I can see the perspective for the reflections is as if the user’s eyes are positioned (from normal viewing distance) in the middle of the screen?

Then I wondered if users have their eyes not postioned in the middle but for example more ergonomically their eyes line up with the top of the screen, could this possibly then be configured as a parameter in the shader, by which all bezel reflection angles change accordingly? Something like an “eyes position” parameter, which would allow to configure the viewing position as a percentage position of the horizontal width and height of the real screen and have all reflection angles adjust automatically accordingly.

Thinking wildly of one other feature: it would be to have virtual lights/lamps in the shader 3D space positioned that can be moved around. I.e. the bezel/monitor lighting and shadowing could be made to reflect actual room lighting position, by configuring the virtual lights/lamps position in the shader. (Would be pretty insane feature actually…)

Maybe these already crossed your mind, were put in the bin or already there in some form, just thinking out loud :slight_smile:

1 Like

Hi @rafan thanks for your awesome ideas :slight_smile:

Yeah it’s really great to have everybody’s fantastic work come together to create this solution. :partying_face:

Yeah I think this is a great idea, I have thought some about this, and currently the reflections are really just a continuation of the curvature on the screen with the coordinate mirrored outside the screen area, so it is not acting like a reflection in terms of where the eye is at all.

Originally I did a mapping to reflect straight out from the sides and the top, the problem in going back to something like this is possible discontinuities near the corners :slightly_frowning_face:. So since there’s some interest I’ll probably go back to it at some point to see if I can do something like you suggest, the reflections could end up being a bit better, and of course reflecting in the correct direction for where your eyes are placed would be great.

I think this is a cool idea. It would not really be actual 3d geometry like the metacrt because making it 3d takes away a lot of easy customization we currently have, but maybe it could be a good fake, shifting shadows & adjusting shading on the bezel etc. I’d have to investigate how possible this is. :thinking:

1 Like

Please forgive me, I love the idea of the reflections in this shader but not so much the CRT/Scanlines. Is there a guide on what all these presets do and if there is one already to make super crisp pixels but with the reflections? I tried “Reflections Only” but it still adds curvature to the screen and the pixels look a bit blurry somehow, is something wrong with my installation?

Edit: Things I’ve discovered for those who might want this setting too.

  • CORE RES SAMPLING - Scanline Dir - Setting this to 0.25 seems to work for low res games but super sampled 3D looks terrible, 16 seems to make this better.
  • CORE RES SAMPLING - Opposite Dir - 2 seems good for me, not entirely sure what it should be though but more than this looks worse on 3D games.
  • 2/3D CURVATURE - Setting to 0 removes the image curvature
  • Sharpness - 0.75 seems to be a good compromise, 1 seems to introduce artefacts but not entirely sure.
  • Scanline Strength - Min/Max - Both to 0
2 Likes

Hi there and welcome to the forum!

So maybe

Maybe this post can help you get what you’re after, @lesebio is using the easymode preset :slight_smile:

3 Likes

Sorry if the question has been posted before… anyway I’m a newbie on retroarch. I tried some shaders and it works but when it comes to slang shaders like this one, they won’t show up in retroarch when trying to load it. Is there something I miss ? Thanks for any help.

1 Like

Hey ! So great this shader is working well and is pretty easy to configure. At most. I’m trying to remove the frame but with no luck. Making it transparent leaves a color (black). Any idea of how to configure that ? Thanks a lot for your help and thanks again for this very nice shader.

1 Like

Hi @kozhco welcome to the forum!

:joy:[quote=“kozhco, post:1366, topic:25512”] At most. I’m trying to remove the frame but with no luck. Making it transparent leaves a color (black). Any idea of how to configure that ? [/quote]

To get the frame to disappear you should only have to set the frame opacity to 0 and you should see the background image where the frame was.

If it isn’t working like this, could you post a screenshot? It’s always possible something isn’t working correctly.

OK well I did that before writing and when the frame opacity is set to 0, there some stripes in place. So I guess it’s what you called the background image ? Here’s a screenshot with frame opacity to 0. What I want to achieve is having nothing around the bezel.

2 Likes