Good or bad I’ll let you guys take a look at it.
Hi HyperspaceMadness. I just created an account on the Libretro forums to thank you for your work on this amazing, configurable bezel reflections shader. I’m been a very longterm user of RetroArch (despite not being active in the community), and have long wished for a shader along these lines to come along. I’m a professional 3D artist/modeller by trade so I even recreated my own digital 1:1 scale Sega “Blast City” candy cab (in both horizontal and vertical configurations), with bezel material that reflects the screen lighting (in a very basic way compared to yours), to use with RetroArch in VR on my Oculus Rift (maybe I’ll share it one day - it needs some more work). However, in 99% of day-to-day usage, VR isn’t my go-to method of retro gaming for various reasons, and I’ve hoped for something like your Mega Bezel shader to come along so I can set it up as my default shader and use it on my 4k monitor. It’s amazing how bezel reflection, alone, can draw your attention to the centre of the action and make the whole experience much more immersive. Anyhow, I’ve now read every post in this thread and have yet to actually get it set up - so I’m very hyped to go and do that right now! Thanks so much for your work on this!
Great to hear from you @JonnyTenebrous, welcome to the forum and congrats on graduating from a long time lurker ! Also thanks for the positive feedback!
I was also a long time lurker, and only finally joined so I could share the prototype I had started working on. I’m really appreciative that people are enjoying it and giving such great feedback and find value in it the way I do, it’s surprising the dimension that it adds and how it feels much more natural.
Let me know what might be confusing on first setup, this first user feedback is useful because you are looking at it for the first time. If there’s anything you have feedback on or would like to request please do!
It’s funny you mention being a 3d Artist/Modeler because I also have a background in 3D from my previous career as an animator and rigging supervisor :).
I’d love to see your Blast City cabinet! I’m also curious what it’s like to run Retroarch on the Oculus Rift.
Cheers!
Speaking of 3D modeling… I added some LED strip lighting and changed up the materials a bit. Looks more fun but I still think I like the Photoshop magic more.
shaders = "17"
shader0 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-stock-with-mega-screen-scale-bezel-params.slang"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
shader1 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-gtu/hsm-gtu-pass1.slang"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "true"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-gtu/hsm-gtu-pass2.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "true"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "../shaders_slang/stock.slang"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = ""
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
shader4 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-guest-afterglow-with-black-level.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "AfterglowPass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "../shaders_slang/crt/shaders/guest/crt-sm/d65-d50-sm.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "WpPass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "../shaders_slang/crt/shaders/guest/crt-sm/crt-guest-sm-rot0.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "RotPass"
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "source"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "3.000000"
shader7 = "../shaders_slang/crt/shaders/guest/crt-sm/linearize-sm.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "LinPass"
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "source"
scale_x7 = "1.000000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "../shaders_slang/crt/shaders/guest/crt-sm/blur_horiz-sm.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "source"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "../shaders_slang/crt/shaders/guest/crt-sm/blur_vert-sm.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "true"
srgb_framebuffer9 = "false"
scale_type_x9 = "source"
scale_x9 = "1.000000"
scale_type_y9 = "source"
scale_y9 = "1.000000"
shader10 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-crt-guest-sm-with-scaling.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = "BR_CrtPass"
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
shader11 = "../shaders_slang/crt/shaders/hyperspacemadness/linearize.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "true"
alias11 = "BR_MirrorLowResPass"
float_framebuffer11 = "true"
srgb_framebuffer11 = "false"
scale_type_x11 = "absolute"
scale_x11 = "800"
scale_type_y11 = "absolute"
scale_y11 = "600"
shader12 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-blur-outside-screen-horiz.slang"
filter_linear12 = "false"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "true"
srgb_framebuffer12 = "false"
scale_type_x12 = "source"
scale_x12 = "1.000000"
scale_type_y12 = "source"
scale_y12 = "1.000000"
shader13 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-blur-outside-screen-vert.slang"
filter_linear13 = "false"
wrap_mode13 = "clamp_to_border"
mipmap_input13 = "false"
alias13 = "BR_MirrorBlurredPass"
float_framebuffer13 = "true"
srgb_framebuffer13 = "false"
scale_type_x13 = "source"
scale_x13 = "1.000000"
scale_type_y13 = "source"
scale_y13 = "1.000000"
shader14 = "../shaders_slang/blurs/blur9x9.slang"
filter_linear14 = "true"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "true"
alias14 = "BR_MirrorReflectionDiffusedPass"
float_framebuffer14 = "true"
srgb_framebuffer14 = "false"
scale_type_x14 = "absolute"
scale_x14 = "128"
scale_type_y14 = "absolute"
scale_y14 = "128"
shader15 = "../shaders_slang/blurs/blur9x9.slang"
filter_linear15 = "true"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "true"
alias15 = "BR_MirrorFullscreenGlowPass"
float_framebuffer15 = "true"
srgb_framebuffer15 = "false"
scale_type_x15 = "absolute"
scale_x15 = "12"
scale_type_y15 = "absolute"
scale_y15 = "12"
shader16 = "../shaders_slang/crt/shaders/hyperspacemadness/hsm-mega-bezel-reflection.slang"
filter_linear16 = "true"
wrap_mode16 = "clamp_to_border"
mipmap_input16 = "true"
alias16 = ""
float_framebuffer16 = "true"
srgb_framebuffer16 = "false"
scale_type_x16 = "viewport"
scale_x16 = "1.000000"
scale_type_y16 = "viewport"
scale_y16 = "1.000000"
parameters = "hmss_mega_screen_scale_on;hmss_screen_scale_debug;hmss_screen_scale_only;hmss_rotate_crt_image;hmss_aspect_ratio_mode;hmss_screen_aspect_ratio;hmss_integer_scale_mode;hmss_non_integer_scale;hmss_int_scale_multiple_offset;hmss_int_scale_border_min_height;hmss_scanline_direction;hmss_position_offset_x;hmss_position_offset_y;hmss_crop_overscan_top;hmss_crop_overscan_bottom;hmss_crop_overscan_left;hmss_crop_overscan_right;hmss_curvature_on_long_axis;hmss_curvature_on_short_axis;hmss_corner_radius;hmss_screen_edge_sharpness;hmss_tube_black_edge_thickness;hmss_pre_crt_black_level;hmss_pre_crt_gamma;hmss_pre_crt_luminance;hmss_post_crt_gamma;hmss_negative_crop_brightness;hag_afterglow_amount;hag_afterglow_persistence;hag_afterglow_saturation;hmbz_background_image_opacity;hmbz_background_image_brightness;hmbz_background_image_scale_mode;hmbz_background_image_aspect_ratio;hmbz_background_image_tube_height;hmbz_tube_glass_image_opacity;hmbz_tube_edge_shadow;hmbz_bezel_color_hue;hmbz_bezel_color_saturation;hmbz_bezel_color_value;hmbz_bezel_color_blend_with_image;hmbz_bezel_opacity;hmbz_bezel_width;hmbz_bezel_height;hmbz_bezel_inner_curvature_scale;hmbz_bezel_inner_corner_radius_scale;hmbz_bezel_outer_corner_radius_scale;hmbz_bezel_inner_edge_thickness;hmbz_bezel_brightness;hmbz_bezel_highlight;hmbz_bezel_noise;hmbz_bezel_corner_highlight_inner_spread;hmbz_bezel_corner_highlight_outer_spread;hmbz_bezel_corner_highlight_spread_falloff;hmbz_frame_opacity;hmbz_frame_brightness;hmbz_frame_thickness;hmbz_frame_outer_corner_radius;hmbz_frame_inner_edge_thickness;hmbz_frame_pos_y_offset;hmbz_frame_shadow_opacity;hmbz_frame_shadow_width;hmbz_vignette_shadow_opacity;hbl_blur_num_samples;hbl_blur_min;hbl_blur_max;hbr_noise_amount;hbr_noise_samples;hbr_noise_sample_distance;hbr_noise_falloff;hbr_global_amount;hbr_global_gamma_adjust;hbr_inner_edge_reflection;hbr_direct_reflection;hbr_diffused_reflection;hbr_fullscreen_glow;hbr_fullscreen_glow_gamma;hbr_fade_amount;hbr_radial_fade_speed;hbr_radial_fade_width;hbr_radial_fade_height;hbr_lateral_outer_fade_position;hbr_lateral_outer_fade_distance;hbr_corner_fade;hbr_corner_fade_distance;hbr_reflection_mask_mode;compositeConnection;signalResolution;signalResolutionI;signalResolutionQ;tate;fliph;flipv;WP;wp_saturation;GAMMA_INPUT;TAPSH;GLOW_FALLOFF_H;TAPSV;GLOW_FALLOFF_V;bglow;bloom;autobrm;brightboost1;brightboost2;stype;scanline1;scanline2;beam_min;beam_max;sclip;s_beam;h_sharp;cubic;mask;maskmode;maskdark;maskbright;masksize;gamma_out"
hmss_mega_screen_scale_on = "1.000000"
hmss_screen_scale_debug = "0.000000"
hmss_screen_scale_only = "0.000000"
hmss_rotate_crt_image = "0.000000"
hmss_aspect_ratio_mode = "0.000000"
hmss_screen_aspect_ratio = "1.333300"
hmss_integer_scale_mode = "2.000000"
hmss_non_integer_scale = "82.970001"
hmss_int_scale_multiple_offset = "0.000000"
hmss_int_scale_border_min_height = "0.000000"
hmss_scanline_direction = "0.000000"
hmss_position_offset_x = "0.000000"
hmss_position_offset_y = "0.000000"
hmss_crop_overscan_top = "0.000000"
hmss_crop_overscan_bottom = "0.000000"
hmss_crop_overscan_left = "0.000000"
hmss_crop_overscan_right = "0.000000"
hmss_curvature_on_long_axis = "0.000000"
hmss_curvature_on_short_axis = "0.000000"
hmss_corner_radius = "0.000000"
hmss_screen_edge_sharpness = "1.000000"
hmss_tube_black_edge_thickness = "-0.250000"
hmss_pre_crt_black_level = "0.000000"
hmss_pre_crt_gamma = "1.000000"
hmss_pre_crt_luminance = "1.000000"
hmss_post_crt_gamma = "1.000000"
hmss_negative_crop_brightness = "0.000000"
hag_afterglow_amount = "0.070000"
hag_afterglow_persistence = "0.050000"
hag_afterglow_saturation = "0.100000"
hmbz_background_image_opacity = "0.000000"
hmbz_background_image_brightness = "1.000000"
hmbz_background_image_scale_mode = "2.000000"
hmbz_background_image_aspect_ratio = "1.750000"
hmbz_background_image_tube_height = "69.000000"
hmbz_tube_glass_image_opacity = "0.000000"
hmbz_tube_edge_shadow = "0.000000"
hmbz_bezel_color_hue = "0.000000"
hmbz_bezel_color_saturation = "0.000000"
hmbz_bezel_color_value = "0.000000"
hmbz_bezel_color_blend_with_image = "0.000000"
hmbz_bezel_opacity = "0.000000"
hmbz_bezel_width = "-0.099996"
hmbz_bezel_height = "-0.099997"
hmbz_bezel_inner_curvature_scale = "0.000000"
hmbz_bezel_inner_corner_radius_scale = "0.000000"
hmbz_bezel_outer_corner_radius_scale = "0.000000"
hmbz_bezel_inner_edge_thickness = "0.000000"
hmbz_bezel_brightness = "0.000000"
hmbz_bezel_highlight = "2.000000"
hmbz_bezel_noise = "30.000000"
hmbz_bezel_corner_highlight_inner_spread = "100.000000"
hmbz_bezel_corner_highlight_outer_spread = "100.000000"
hmbz_bezel_corner_highlight_spread_falloff = "50.000000"
hmbz_frame_opacity = "0.000000"
hmbz_frame_brightness = "0.000000"
hmbz_frame_thickness = "0.000000"
hmbz_frame_outer_corner_radius = "0.000000"
hmbz_frame_inner_edge_thickness = "0.000000"
hmbz_frame_pos_y_offset = "-0.000000"
hmbz_frame_shadow_opacity = "0.000000"
hmbz_frame_shadow_width = "0.000000"
hmbz_vignette_shadow_opacity = "0.000000"
hbl_blur_num_samples = "4.000000"
hbl_blur_min = "0.000000"
hbl_blur_max = "0.100001"
hbr_noise_amount = "1.000000"
hbr_noise_samples = "12.000000"
hbr_noise_sample_distance = "0.200000"
hbr_noise_falloff = "0.300000"
hbr_global_amount = "1.000000"
hbr_global_gamma_adjust = "1.200000"
hbr_inner_edge_reflection = "0.700000"
hbr_direct_reflection = "1.000000"
hbr_diffused_reflection = "0.500000"
hbr_fullscreen_glow = "75.000000"
hbr_fullscreen_glow_gamma = "3.000000"
hbr_fade_amount = "0.300000"
hbr_radial_fade_speed = "100.000000"
hbr_radial_fade_width = "70.000000"
hbr_radial_fade_height = "100.000000"
hbr_lateral_outer_fade_position = "-18.000000"
hbr_lateral_outer_fade_distance = "20.000000"
hbr_corner_fade = "1.000000"
hbr_corner_fade_distance = "100.000000"
hbr_reflection_mask_mode = "0.000000"
compositeConnection = "0.000000"
signalResolution = "256.000000"
signalResolutionI = "83.000000"
signalResolutionQ = "25.000000"
tate = "0.000000"
fliph = "-1.000000"
flipv = "1.000000"
WP = "0.000000"
wp_saturation = "1.000000"
GAMMA_INPUT = "2.400000"
TAPSH = "5.000000"
GLOW_FALLOFF_H = "0.250000"
TAPSV = "5.000000"
GLOW_FALLOFF_V = "0.250000"
bglow = "0.000000"
bloom = "0.400000"
autobrm = "0.500000"
brightboost1 = "1.400000"
brightboost2 = "1.150000"
stype = "1.000000"
scanline1 = "5.000000"
scanline2 = "7.000000"
beam_min = "1.250000"
beam_max = "1.100000"
sclip = "0.500000"
s_beam = "0.700000"
h_sharp = "3.000000"
cubic = "1.000000"
mask = "0.000000"
maskmode = "1.000000"
maskdark = "1.000000"
maskbright = "0.250000"
masksize = "1.000000"
gamma_out = "2.500000"
textures = "BackgroundImage;BackgroundVertImage;TubeGlassImage;OverlayImage;OverlayVertImage"
BackgroundImage = "../shaders_slang/crt/shaders/hyperspacemadness/textures/BackgroundImage_3840x2160.png"
BackgroundImage_wrap_mode = "clamp_to_border"
BackgroundImage_mipmap = "false"
BackgroundVertImage = "../shaders_slang/crt/shaders/hyperspacemadness/textures/BackgroundImage_3840x2160.png"
BackgroundVertImage_wrap_mode = "clamp_to_border"
BackgroundVertImage_mipmap = "false"
TubeGlassImage = "../shaders_slang/crt/shaders/hyperspacemadness/textures/TubeGlassOverlayImage_3840x2160.png"
TubeGlassImage_wrap_mode = "clamp_to_border"
TubeGlassImage_mipmap = "false"
OverlayImage = "../shaders_slang/crt/shaders/hyperspacemadness/textures/OverlayImage_OverReflection_3840x2160.png"
OverlayImage_wrap_mode = "clamp_to_border"
OverlayImage_mipmap = "false"
OverlayVertImage = "../shaders_slang/crt/shaders/hyperspacemadness/textures/OverlayImage_OverReflection_3840x2160.png"
OverlayVertImage_wrap_mode = "clamp_to_border"
OverlayVertImage_mipmap = "false"
This is my preset if interested
So, I’ve set up Mega Bezel with my first core (SNES9x) and it looks amazing. Truly next-level stuff, imo. My monitor is a 27" 4K LG IPS with HDR400 (this is relevant), and right beside it I’ve got a MiSTer FPGA device running the SNES core hooked up to a 1998 consumer model Sony Trinitron TV (through RGB Scart). I’m using this comparison to calibrate my shader presets, because my intent is to use RetroArch for cores which are not presently existing in FPGA/MiSTer form (PSX/Saturn and later). I’ve dialed in a preset with Mega Bezel using the CRT Guest SM shader that is… I’ll say 95% spot-on to my Trinitron CRT TV, looking at them both at the same same. It’s pretty jaw-dropping, imo. In order to accomplish this, I’ve had to crank my 4k monitor to 100% brightness (400 nits), which is around 3x as bright as my old 1080p monitor… but doing this was required to offset the loss of brightness inherent to turning up the scanline and mask parameters to the point where they looked “close” to a real CRT TV. So, basically, I’m saying that there’s probably no point in me sharing a screenshot/preset because your monitor has to be capable of at least 400nits output, otherwise it will look dim. So far, so good however!
BUT, I’ve noticed a performance-relevant behavior in Mega Bezel that I would like to report. When I originally set up Mega Bezel, I ignored the advice to set my Aspect Ratio to my screen resolution (3840x2160) and just used the Core-Reported Aspect Ratio setting. The only downside was that it limited how wide I could make the bezel/frame. However, it performed great on my aging-model 3.6ghz i7 processor and GTX 1060 gpu. This evening, however, I revisited my preset and decided to try setting the Aspect Ratio to my screen resolution. It looks great… just like you’d expect from the screenshots in this thread. However, doing this made me lose around 10% performance - enough to where I was no longer hitting 60fps consistently with RunAhead enabled etc. In other words, just the act of using Mega Bezel to fill the sides of my screen with background Carbon Fibre texture (or extra-wide bezel/frame - or anything, I should image), was enough to tank my framerate by a significant margin. For the time being, then, I’ve reverted back to using Core-Reported Aspect Ratio and my only loss is that the sides of my monitor remain black for the time being… an acceptable tradeoff for the performance gains, imo. I’m not sure that anything can be done about this… but perhaps I will investigate using an “Overlay” image to fill the sides of my screen in future, rather than taking the hit of using Mega Bezel to populate this empty space… unless there’s a possible optimisation to be found here. Anyhow - just reporting what I’ve encountered!
Good to hear you have it set up, I’d be interested to see an image from your preset, my monitor might do 400 nits, I’m not sure…
About the performance, as we get to the end of adding features I’ll look for more performance optimizations, but you are right that there is a definite difference between running it across the full monitor and running it on a sub-section by using the core aspect ratio or using a custom aspect ratio. If you are using a vertical aspect ratio like ArsInvictus then I think a custom aspect ratio that just uses the area the image needs to appear in could reduce computation quite a bit.
You can definitely use the standard retroarch overlay over top if you like though and I think this should have a negligible performance impact.
Another thing that occurred to me, try updating your graphics drivers, this fixed some slowdown Duimon had.
I downloaded the 2020-04-05 version of the shader, but when I try to load it, RA says ‘failed to apply shader preset’.
I tried making a log, but all RA does is return a blank file.
Core - snes9x RA Version - 1.8.5 Driver: D3D11
I believe you have to use vulkan. Another user had the same issue.
I’ve used D3D11 before in the past with this shader and had no problems
Can you try changing to Vulcan or GLCore for the video driver?
For the log, you want to set your Logging - Logging Verbosity - ON - Frontend Logging - 1(Info) - Log to File - Off
This will cause a log window to come up when you launch, and you should see whatever is happening.
Sometimes a change to the shader can make it stop working on one back end
Hello, just want to put out there that I have been trying with newer Nvidia drivers and older Nvidia drivers which are supposed to be more stable. Clean installs. Unfortunately the slowness with Dr. Venom is still there in the latest version, but not in version 2020-04-01. guest-sm works just fine.
Just a shot in the dark…
what does the line
audio_device =
say in your retroarch.cfg?
if it has a number try changing it to…
audio_device = “”
or try
https://github.com/libretro/RetroArch/issues/2761#issuecomment-289105922
to bullseye your audio device. I have heard that it can make a huge difference.
SG-1000
Actually the SG-1000 II because the SG-1000 was too boring.
If anyone disagrees and would like me to do one of the original I am willing.
I checked and have audio_device = “”. The weird thing is that the previous version worked just fine with Snes9x. Beats me. I decided on guest sm since it looks awesome, and works super fast with Dreamcast and N64 as well, Dr Venom was still too heavy in older versions for those cores.
I don’t really know how to explain it. I mean how you can sort of adjust the curve itself, not just ‘how curved’ it is. With X+Y its usually just like a static curvature that you can multiply for a greater effect, while Royale gives you some options as to just what the actual curve is. So you can probably get Royale to closer match different screen bezels and things like that. I don’t really know how to explain it with sounding stupid like “you can change the curve of the curve man” lol.
Also just checked on this after a couple months and it’s progressed fantastically. Great job on it.
What exact part are you referring to as more versatile? Are you just referring to the different curvature modes or something else?
I’m not trying to argue, I’m legitimately curious.
EDIT: @Ashlander Man, that answer didn’t sound dumb, a little stoner-ish for sure, but not dumb. Put a smile on my face, lol.