Mega Bezel Reflection Shader! - Feedback and Updates

So I see the Clipping behavior happening at the outer corner which is obviously wrong. Did you adjust any other parameter values? Because the reflection is very bright.

Could you set the last pass (image overlay) to OFF with the parameter and post another screenshot? I’d like to see whatever else is showing up in the reflection under there!

1 Like

OMG Man!!! thank you!!! That’s exactly what I was dreaming of!!

I thought it was impossible (or that no one would consider it too relevant to actually do it)… I was even planning on doing some kind of a carboard bezel/border to place over the screen to play at night lmao :sweat_smile: .

you just made my day, thanks again :smile: :smile: :smile: I’ll try it tonight and post any comment!

Cheers!

Nothing’s changed from the presets.

Sure! But… I think something was fixed up in the newest Radeon driver release, because I’m not seeing either of those issues anymore!

hsm-mega-bezel-reflection-crt-guest-dr-venom.slangp

hsm-mega-bezel-reflection-crt-easymode-halation.slangp

1 Like

OK that’s fantastic, it’s now looking correct!

2 Likes

I just wanted to thank you for this awesome shader. It inspired me to create my own overlays today and I was wondering if you could add the two NTSC passes somewhere in the shader chain, as those are way more accurate than the ones included in emulator cores. Including GTU would be nice as well :smiley:

3 Likes

You should be able to open w/e version of this shaders .slangp file with notepad, copy the text for the two ntsc passes out of the .slangp from crt-guest-dr-venom-composite, and place them at the top of the file.

Then go down the rest of it where it is says “whatever# = something” increase the number of it by two, all the way until the end of the the file and at the top add two to w/e number is at the top.

GTU is a different subject, you can run it before everything as well it’s just I don’t remember off the top of my head what the settings for it are.

Also regarding GTU are you wanting to run all of GTU or just the first two passes(lots of people do this, if they are going to run a CRT shader after it.).

1 Like

I was doing something similar but for some reason some shader doesn’t like it and I get some error and the preset goes to hell. I will keep trying, maybe adding some stock shader in between… Thanks!

1 Like

Which slangp are you using currently?

“hsm-mega-bezel-reflection-crt-guest-dr-venom.slangp” and then trying to add those ntsc steps… no luck :frowning:

1 Like

Try this. If it’s still complaining it may be about shader0 = …(etc.) And shader1 = …(etc.)

shaders = 22

shader0 = ../ntsc/shaders/ntsc-pass1-composite-2phase.slang
filter_linear0 = false
scale_type_x0 = source
scale_type_y0 = source
scale_x0 = 4.0
scale_y0 = 1.0
frame_count_mod0 = 2
float_framebuffer0 = true

shader1 = ../ntsc/shaders/ntsc-pass2-2phase-gamma.slang
filter_linear1 = false
scale_type1 = source
scale_x1 = 0.5
scale_y1 = 1.0 

shader2 = shaders/guest/lut/lut.slang
filter_linear2 = false
scale_type2 = source
scale2 = 1.0

shader3 = shaders/guest/color-profiles.slang
filter_linear3 = false
scale_type3 = source
scale3 = 1.0

shader4 = shaders/guest/d65-d50.slang
filter_linear4 = false
scale_type4 = source
scale4 = 1.0
alias4 = WhitePointPass

shader5 = shaders/hyperspacemadness/hsm-color-adjustment.slang
filter_linear5 = false
srgb_framebuffer5 = true
scale_type_x5 = source
scale_x5 = 1.0
scale_type_y5 = source
scale_y5 = 1.0

shader6 = shaders/guest/afterglow.slang
filter_linear6 = false
scale_type6 = source
scale6 = 1.0
alias6 = AfterglowPass

shader7 = shaders/guest/avg-lum0.slang
filter_linear7 = false
scale_type7 = source
scale7 = 1.0

shader8 = shaders/guest/avg-lum.slang
filter_linear8 = false
scale_type8 = source
scale8 = 1.0
mipmap_input8 = true
alias8 = AvgLumPass

shader9 = shaders/guest/linearize.slang
filter_linear9 = false
scale_type9 = source
scale9 = 1.0
float_framebuffer9 = true
alias9 = LinearizePass

shader10 = shaders/guest/blur_horiz.slang
filter_linear10 = false
scale_type10 = source
scale10 = 1.0
float_framebuffer10 = true

shader11 = shaders/guest/blur_vert.slang
filter_linear11 = false
scale_type11 = source
scale11 = 1.0
float_framebuffer11 = true
alias11 = GlowPass

shader12 = shaders/guest/linearize_scanlines.slang
filter_linear12 = true
scale_type12 = source
scale12 = 1.0
float_framebuffer12 = true

// Guest's Awesome Shader!!!
// Has been slightly altered to use the same scaling as the rest of the shders for the bezel & reflection
shader13 = shaders/hyperspacemadness/crt-guest-dr-venom-with-scaling.slang
filter_linear13 = true
scale_type13 = viewport
scale_x13 = 1.0
scale_y13 = 1.0
float_framebuffer13 = true
alias13 = BR_BlurScanlinesInputPass

// // Add a Bezel Overlay Image
// shader14 =  shaders/hyperspacemadness/hsm-image-bezel.slang
// filter_linear14 = true
// float_framebuffer14 = true
// alias14 = BR_CrtWithBezelPass

// Add generated Bezel
shader14 =  shaders/hyperspacemadness/hsm-bezel-generator.slang
filter_linear14 = true
float_framebuffer14 = true
alias14 = BR_CrtWithBezelPass

// Blur the scanlines so we don't get artifacts when we reduce resolution later 
shader15 = shaders/hyperspacemadness/hsm-blur-scanlines.slang

// Add a color bleed from the edges of the screen to avoid the reflection sampling darkness at the edge of the screen
shader16 = shaders/hyperspacemadness/hsm-mirror-wrap.slang
filter_linear16 = false
scale_type16 = source
alias16 = BR_ReflectionInputPass

// Reduce the resolution to a small static size regardless of final resolution
// Makes the blur have a consistent look and faster at different final resolutions
shader17 = shaders/hyperspacemadness/hsm-reduce-resolution.slang
mipmap_input17 = true
scale_type17 = absolute
scale_x17 = 480
scale_y17 = 270

// Add Blur for the Reflection
shader18 = shaders/hyperspacemadness/hsm-blur-horizontal.slang
filter_linear18 = false
scale_type18 = source
float_framebuffer18 = true

// Add Blur for the Reflection to sample
shader19 = shaders/hyperspacemadness/hsm-blur-vertical.slang
filter_linear19 = false
scale_type19 = source
float_framebuffer19 = true
alias19 = BR_ReflectionBlurredInputPass

// Add Bezel Reflection
shader20 = shaders/hyperspacemadness/hsm-bezel-reflection.slang
filter_linear20 = true
scale_type20 = viewport

// Add the Bezel Overlay, this can be a standard bezel overlay image
shader21 =  shaders/hyperspacemadness/hsm-image-overlay.slang
filter_linear21 = true
float_framebuffer21 = true


textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;ImageLayer1_HorzImage;ImageLayer1_VertImage;ImageLayer2_HorzImage;ImageLayer2_VertImage"
SamplerLUT1 = shaders/guest/lut/sony_trinitron1.png
SamplerLUT1_linear = true 
SamplerLUT2 = shaders/guest/lut/sony_trinitron2.png
SamplerLUT2_linear = true 
SamplerLUT3 = shaders/guest/lut/other1.png
SamplerLUT3_linear = true

ImageLayer1_HorzImage = shaders/hyperspacemadness/textures/_Horizontal_224x9_MultiAspect_Bezel_5040x2880.png
ImageLayer1_VertImage = shaders/hyperspacemadness/textures/_Vertical_224Hx7_MultiAspect_Bezel_5040x2880.png

ImageLayer2_HorzImage = shaders/hyperspacemadness/textures/_Horizontal_224x9_MultiAspect_5040x2880.png
ImageLayer2_VertImage = shaders/hyperspacemadness/textures/_Vertical_224Hx7_MultiAspect_5040x2880.png


parameters = "hmss_mega_screen_scale_on;hmss_screen_aspect_ratio;hmss_scanline_direction;hmss_int_scale_border_min_height;hmss_use_integer_scale;hmss_non_integer_scale;hmss_int_scale_multiple_offset;hmss_curvature_on_long_axis;hmss_curvature_on_short_axis;hmss_rounded_corner_size;hmss_black_edge_height;hbg_bezel_brightness;hbg_corner_highlight;hio_image_overlay_on;hio_luminance;hio_scale_mode;hio_overlay_texture_res_x;hio_overlay_texture_res_y;hio_screen_height_in_texture;hio_scale_offset_x;hio_scale_offset_y;hbr_global_scale;hbr_reflection_amount;hbr_contrast;hbr_cutoff_width;hbr_cutoff_height;hbr_radial_fade_speed;hbr_radial_fade_width;hbr_radial_fade_height;TNTC;brightboost;gsl;h_smart;shadowMask;masksize;vertmask;slotmask;slotwidth;double_slot;gamma_out;"

hmss_mega_screen_scale_on = 1
//hmss_screen_aspect_ratio = 1.333
// hmss_scanline_direction = 0
hmss_use_integer_scale = 1
//hmss_non_integer_scale = 83
hmss_int_scale_border_min_height = 5
//hmss_int_scale_multiple_offset = 0
hmss_curvature_on_long_axis = 2
hmss_curvature_on_short_axis = 3
hmss_rounded_corner_size = 10
hmss_black_edge_height = 1.2

//hbg_bezel_brightness = 10
//hbg_corner_highlight = 30

hbr_global_scale = 1.2
hbr_reflection_amount = 0.9
// hbr_contrast = 1.5
// hbr_cutoff_width = 25
// hbr_cutoff_height = 25
// hbr_radial_fade_speed = 1
// hbr_radial_fade_width = 65
// hbr_radial_fade_height = 76

hio_image_overlay_on = 1
// hio_scale_mode = 0
// hio_luminance = 1.5
hio_overlay_texture_res_x = 5040
hio_overlay_texture_res_y = 2880
hio_screen_height_in_texture = 70.2
// hio_screen_height_in_vertaspect_texture = 73.1
hio_scale_offset_x = 2
hio_scale_offset_y = 2

// TNTC = "3" // LUT Colors
// brightboost = "1.35"
// gsl = "1" //Scanline Type
// h_smart = "0.5"
// shadowMask = "7" //CRT Mask
// masksize = "2" //CRT Mask Size
// vertmask = "0.25" //PVM colors
// slotmask = "1" //Slot Mask Strength
// slotwidth = "2" // Slot Mask Width
// double_slot = "2" // Slot Mask Height 2x1 or 4x1
// gamma_out = "2.4"


Idk, if this actually works lol. I made the preset on mobile via text editor.

1 Like

Thanks! I’m still trying. Unfortunately I obtain the error with your slangp as well.

I’m going to sleep, but could you post what error your actual getting from retroarch?

It’ll make it easier for @HyperspaceMadness or me to try and figure out how to possibly get it working.

That looks great! Would you mind sharing your overlay?

2 Likes

Sure! Here’s the link for NES, SNES, Dreamcast (still not decided on this one) and Genesis: https://drive.google.com/open?id=1k7nb9G-Jr4EZ4uUz-bslXD4HOYdEaHZw

3 Likes

The error I’m returned is “Failed to apply shader preset: reflections-test.slangp”.

Just throwing this out here, but so far the best looking (to me, anyway) composite/ntsc shader I’ve seen is the ntsc pass for the mame_hlsl slang shader.

Two issues with this:

One; as far as I know it’s only available in slang (probably because it won’t work in glsl, lol).

Two; Pretty sure it’s hard-coded into the shader chain, like even if you decoupled it from mame_hlsl you’d still have to hard-code it into w/e CRT shader you’re using.

Number two may be super wrong.

Is that what you labeled the preset as?

Yes, I changed the combination to that name. I found that the 2 pass ntsc shader with s-video gives me dithering as well without making everything super blurry. If I can combine this, this is perfection!

Thanks for the pointer, for the reflection shader preset I am definitely going to look into some de-dithering shaders to add to the chain.

I will likely avoid anything which needs to be in the crt/upscaling pass as this is likely to be too invasive and I would wind up creating my own crt shader instead of re-using existing shaders with a small amount of integration for the Mega Screen Scale. Instead I’ll be looking for ones which work at the core provided resolution and can be placed before the crt/upscaling pass.

Edit: if there is a ntsc shader which includes the crt upscaling which people really like i can make an additional preset which uses this instead of guest-venom

2 Likes

You should still look into MAME’s ntsc pass in slang, if you get a chance. I may be wrong about the hard-coded thing as I’ve only looked over it once and didn’t spend a bunch of time looking at the code, just a quick browse lol.

Off the top of my head, the only really hard-coded (ish) thing about it, is that you need to pull the #pragma settings out of the mame.inc file and put them into the ntsc pass and reconnect everything in the ntsc pass so it will actually run by itself (I’ve done this with the MAME phosphor/afterglow pass, so it should possibly work.)

EDIT: I think only two CRT shaders have built in ntsc modes, crt-sim and mame-hlsl. (Three, if you include GTU as being a CRT shader itself…)

Also I think the ntsc-composite/s-video set (from the ntsc folder), along with gtu are about the only ntsc shaders available, besides the ones built into crt-sim and mame-hlsl (these are separate passes in these shaders, btw.) So not very much choice in this department…

I personally tend to shy away for de-dithering shaders. (Way to many false positives, and just a huge hassle to set up, as not all de-dithering shaders look good on all systems/content.)