diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__EASYMODE.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__EASYMODE.slangp
index a54586d..3bda831 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__EASYMODE.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__EASYMODE.slangp
@@ -1,4 +1,4 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,181 +54,184 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/easymode/hsm-crt-easymode-blur_horiz.slang
-filter_linear33 = false
-srgb_framebuffer33 = true
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/easymode/hsm-crt-easymode-blur_vert.slang
+shader34 = ../../shaders/easymode/hsm-crt-easymode-blur_horiz.slang
filter_linear34 = false
srgb_framebuffer34 = true
-shader35 = ../../shaders/easymode/hsm-crt-easymode-threshold.slang
+shader35 = ../../shaders/easymode/hsm-crt-easymode-blur_vert.slang
filter_linear35 = false
srgb_framebuffer35 = true
-// Easymode's Shader!
-shader36 = ../../shaders/easymode/hsm-crt-easymode-halation.slang
-filter_linear36 = true
-scale_type36 = viewport
-float_framebuffer36 = true
+shader36 = ../../shaders/easymode/hsm-crt-easymode-threshold.slang
+filter_linear36 = false
+srgb_framebuffer36 = true
-shader37 = ../../shaders/base/post-crt-prep-glass.slang
-alias37 = "MBZ_PostCRTPass"
+// Easymode's Shader!
+shader37 = ../../shaders/easymode/hsm-crt-easymode-halation.slang
+filter_linear37 = true
+scale_type37 = viewport
+float_framebuffer37 = true
+
+shader38 = ../../shaders/base/post-crt-prep-glass.slang
+alias38 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader38 = ../../shaders/base/linearize-crt.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-// scale_x38 = 480
-// scale_y38 = 270
-// scale_x38 = 960
-// scale_y38 = 540
-scale_x38 = 800
-scale_y38 = 600
-alias38 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader39 = ../../shaders/base/linearize-crt.slang
mipmap_input39 = true
filter_linear39 = true
+scale_type39 = absolute
+// scale_x39 = 480
+// scale_y39 = 270
+// scale_x39 = 960
+// scale_y39 = 540
+scale_x39 = 800
+scale_y39 = 600
+alias39 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader40 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input40 = true
+filter_linear40 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader40 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear40 = true
-alias40 = "BR_MirrorBlurredPass"
+shader41 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear41 = true
+alias41 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input41 = true
-filter_linear41 = true
-scale_type41 = absolute
-scale_x41 = 128
-scale_y41 = 128
-alias41 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input42 = true
filter_linear42 = true
scale_type42 = absolute
-scale_x42 = 12
-scale_y42 = 12
-alias42 = "BR_MirrorFullscreenGlowPass"
+scale_x42 = 128
+scale_y42 = 128
+alias42 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input43 = true
+filter_linear43 = true
+scale_type43 = absolute
+scale_x43 = 12
+scale_y43 = 12
+alias43 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader43 = ../../shaders/base/reflection-glass.slang
-scale_type43 = viewport
-alias43 = "BR_CRTAndReflectionPass"
+shader44 = ../../shaders/base/reflection-glass.slang
+scale_type44 = viewport
+alias44 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -290,6 +293,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -363,4 +370,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp
index b71e9d2..7db800e 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp
@@ -1,4 +1,4 @@
-shaders = 42
+shaders = 43
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,173 +54,176 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
-scale_type34 = viewport
-scale_x34 = 1.0
-scale_y34 = 1.0
-filter_linear34 = true
+shader34 = ../../shaders/base/delinearize.slang
+
+shader35 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
+scale_type35 = viewport
+scale_x35 = 1.0
+scale_y35 = 1.0
+filter_linear35 = true
g_sat = 0.15
-shader35 = ../../shaders/base/post-crt-prep-glass.slang
-alias35 = "MBZ_PostCRTPass"
+shader36 = ../../shaders/base/post-crt-prep-glass.slang
+alias36 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader36 = ../../shaders/base/linearize-crt.slang
-mipmap_input36 = true
-filter_linear36 = true
-scale_type36 = absolute
-// scale_x36 = 480
-// scale_y36 = 270
-// scale_x36 = 960
-// scale_y36 = 540
-scale_x36 = 800
-scale_y36 = 600
-alias36 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader37 = ../../shaders/base/linearize-crt.slang
mipmap_input37 = true
filter_linear37 = true
+scale_type37 = absolute
+// scale_x37 = 480
+// scale_y37 = 270
+// scale_x37 = 960
+// scale_y37 = 540
+scale_x37 = 800
+scale_y37 = 600
+alias37 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input38 = true
+filter_linear38 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear38 = true
-alias38 = "BR_MirrorBlurredPass"
+shader39 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear39 = true
+alias39 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input39 = true
-filter_linear39 = true
-scale_type39 = absolute
-scale_x39 = 128
-scale_y39 = 128
-alias39 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input40 = true
filter_linear40 = true
scale_type40 = absolute
-scale_x40 = 12
-scale_y40 = 12
-alias40 = "BR_MirrorFullscreenGlowPass"
+scale_x40 = 128
+scale_y40 = 128
+alias40 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input41 = true
+filter_linear41 = true
+scale_type41 = absolute
+scale_x41 = 12
+scale_y41 = 12
+alias41 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader41 = ../../shaders/base/reflection-glass.slang
-scale_type41 = viewport
-alias41 = "BR_CRTAndReflectionPass"
+shader42 = ../../shaders/base/reflection-glass.slang
+scale_type42 = viewport
+alias42 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -282,6 +285,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -352,4 +359,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-NTSC.slangp
index a1a9ea3..9533ebb 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 49
+shaders = 50
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,231 +54,234 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
-shader23 = ../../shaders/base/stock.slang
-alias23 = "PreCRTPass"
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
-shader24 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear24 = true
-scale_type24 = source
-scale24 = 1.0
-alias24 = "AfterglowPass"
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
-shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear25 = true
scale_type25 = source
-mipmap_input25 = true
scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader26 = ../../shaders/dogway/hsm-grade.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
-shader27 = ../../shaders/base/stock.slang
-alias27 = "PrePass0"
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
-shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear28 = false
-float_framebuffer28 = true
-scale_type_x28 = source
-scale_type_y28 = source
-scale_x28 = 4.0
-scale_y28 = 1.0
-frame_count_mod28 = 2
-alias28 = NPass1
-
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
float_framebuffer29 = true
-filter_linear29 = true
-scale_type29 = source
-scale_x29 = 0.5
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
+scale_x30 = 0.5
scale_y30 = 1.0
-shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-shader32 = ../../shaders/base/stock.slang
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-alias32 = "PrePass"
-mipmap_input32 = true
-shader33 = ../../shaders/guest/hsm-avg-lum.slang
+shader33 = ../../shaders/base/stock.slang
filter_linear33 = true
scale_type33 = source
-scale33 = 1.0
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
mipmap_input33 = true
-alias33 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear34 = true
scale_type34 = source
scale34 = 1.0
-float_framebuffer34 = true
-alias34 = "LinearizePass"
+mipmap_input34 = true
+alias34 = "AvgLumPass"
-shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear35 = true
-scale_type_x35 = viewport
-scale_x35 = 1.0
-scale_type_y35 = source
-scale_y35 = 1.0
+scale_type35 = source
+scale35 = 1.0
float_framebuffer35 = true
-alias35 = Pass1
+alias35 = "LinearizePass"
-shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear36 = true
-scale_type_x36 = absolute
-scale_x36 = 640.0
+scale_type_x36 = viewport
+scale_x36 = 1.0
scale_type_y36 = source
-scale_y36 = 1.0
+scale_y36 = 1.0
float_framebuffer36 = true
+alias36 = Pass1
-shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear37 = true
scale_type_x37 = absolute
scale_x37 = 640.0
-scale_type_y37 = absolute
-scale_y37 = 480.0
+scale_type_y37 = source
+scale_y37 = 1.0
float_framebuffer37 = true
-alias37 = GlowPass
-shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 640.0
scale_type_y38 = absolute
-scale_y38 = 480.0
+scale_y38 = 480.0
float_framebuffer38 = true
+alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear39 = true
scale_type_x39 = absolute
scale_x39 = 640.0
scale_type_y39 = absolute
-scale_y39 = 480.0
+scale_y39 = 480.0
float_framebuffer39 = true
-alias39 = BloomPass
-shader40 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear40 = true
+scale_type_x40 = absolute
+scale_x40 = 640.0
+scale_type_y40 = absolute
+scale_y40 = 480.0
float_framebuffer40 = true
-scale_type40 = viewport
-scale_x40 = 1.0
-scale_y40 = 1.0
+alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-deconvergence.slang
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear41 = true
+float_framebuffer41 = true
scale_type41 = viewport
scale_x41 = 1.0
scale_y41 = 1.0
-shader42 = ../../shaders/base/post-crt-prep-glass.slang
-alias42 = "MBZ_PostCRTPass"
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-glass.slang
+alias43 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader43 = ../../shaders/base/linearize-crt.slang
-mipmap_input43 = true
-filter_linear43 = true
-scale_type43 = absolute
-// scale_x43 = 480
-// scale_y43 = 270
-// scale_x43 = 960
-// scale_y43 = 540
-scale_x43 = 800
-scale_y43 = 600
-alias43 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader44 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader44 = ../../shaders/base/linearize-crt.slang
mipmap_input44 = true
filter_linear44 = true
+scale_type44 = absolute
+// scale_x44 = 480
+// scale_y44 = 270
+// scale_x44 = 960
+// scale_y44 = 540
+scale_x44 = 800
+scale_y44 = 600
+alias44 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input45 = true
+filter_linear45 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader45 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear45 = true
-alias45 = "BR_MirrorBlurredPass"
+shader46 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear46 = true
+alias46 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input46 = true
-filter_linear46 = true
-scale_type46 = absolute
-scale_x46 = 128
-scale_y46 = 128
-alias46 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input47 = true
filter_linear47 = true
scale_type47 = absolute
-scale_x47 = 12
-scale_y47 = 12
-alias47 = "BR_MirrorFullscreenGlowPass"
+scale_x47 = 128
+scale_y47 = 128
+alias47 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input48 = true
+filter_linear48 = true
+scale_type48 = absolute
+scale_x48 = 12
+scale_y48 = 12
+alias48 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader48 = ../../shaders/base/reflection-glass.slang
-scale_type48 = viewport
-alias48 = "BR_CRTAndReflectionPass"
+shader49 = ../../shaders/base/reflection-glass.slang
+scale_type49 = viewport
+alias49 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -340,6 +343,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -410,6 +417,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// NTSC Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp
index 09a9a3d..434fcc9 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 46
+shaders = 47
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,210 +54,213 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear33 = true
-scale_type_x33 = absolute
-scale_x33 = 800.0
-scale_type_y33 = source
-scale_y33 = 1.0
+scale_type33 = source
+scale33 = 1.0
float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear34 = true
scale_type_x34 = absolute
scale_x34 = 800.0
-scale_type_y34 = absolute
-scale_y34 = 600.0
+scale_type_y34 = source
+scale_y34 = 1.0
float_framebuffer34 = true
-alias34 = GlowPass
-shader35 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear35 = true
scale_type_x35 = absolute
scale_x35 = 800.0
scale_type_y35 = absolute
-scale_y35 = 600.0
+scale_y35 = 600.0
float_framebuffer35 = true
+alias35 = GlowPass
-shader36 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear36 = true
-scale_type_x36 = source
-scale_x36 = 1.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type_x36 = absolute
+scale_x36 = 800.0
+scale_type_y36 = absolute
+scale_y36 = 600.0
float_framebuffer36 = true
-alias36 = BloomPass
-shader37 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear37 = true
-float_framebuffer37 = true
-scale_type37 = viewport
+scale_type_x37 = source
scale_x37 = 1.0
+scale_type_y37 = source
scale_y37 = 1.0
+float_framebuffer37 = true
+alias37 = BloomPass
-shader38 = ../../shaders/guest/hsm-deconvergence.slang
+shader38 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear38 = true
+float_framebuffer38 = true
scale_type38 = viewport
scale_x38 = 1.0
scale_y38 = 1.0
-shader39 = ../../shaders/base/post-crt-prep-glass.slang
-alias39 = "MBZ_PostCRTPass"
+shader39 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear39 = true
+scale_type39 = viewport
+scale_x39 = 1.0
+scale_y39 = 1.0
+
+shader40 = ../../shaders/base/post-crt-prep-glass.slang
+alias40 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader40 = ../../shaders/base/linearize-crt.slang
-mipmap_input40 = true
-filter_linear40 = true
-scale_type40 = absolute
-// scale_x40 = 480
-// scale_y40 = 270
-// scale_x40 = 960
-// scale_y40 = 540
-scale_x40 = 800
-scale_y40 = 600
-alias40 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader41 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader41 = ../../shaders/base/linearize-crt.slang
mipmap_input41 = true
filter_linear41 = true
+scale_type41 = absolute
+// scale_x41 = 480
+// scale_y41 = 270
+// scale_x41 = 960
+// scale_y41 = 540
+scale_x41 = 800
+scale_y41 = 600
+alias41 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader42 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input42 = true
+filter_linear42 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader42 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear42 = true
-alias42 = "BR_MirrorBlurredPass"
+shader43 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear43 = true
+alias43 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input43 = true
-filter_linear43 = true
-scale_type43 = absolute
-scale_x43 = 128
-scale_y43 = 128
-alias43 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input44 = true
filter_linear44 = true
scale_type44 = absolute
-scale_x44 = 12
-scale_y44 = 12
-alias44 = "BR_MirrorFullscreenGlowPass"
+scale_x44 = 128
+scale_y44 = 128
+alias44 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader45 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input45 = true
+filter_linear45 = true
+scale_type45 = absolute
+scale_x45 = 12
+scale_y45 = 12
+alias45 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader45 = ../../shaders/base/reflection-glass.slang
-scale_type45 = viewport
-alias45 = "BR_CRTAndReflectionPass"
+shader46 = ../../shaders/base/reflection-glass.slang
+scale_type46 = viewport
+alias46 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -319,6 +322,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -389,4 +396,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__LCD-GRID.slangp
index afbe345..7360bb4 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__LCD-GRID.slangp
@@ -1,4 +1,4 @@
-shaders = 42
+shaders = 43
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,170 +54,173 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear34 = "false"
-scale_type34 = "viewport"
-scale34 = "1.0"
+shader34 = ../../shaders/base/delinearize.slang
-shader35 = ../../shaders/base/post-crt-prep-glass.slang
-alias35 = "MBZ_PostCRTPass"
+shader35 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear35 = "false"
+scale_type35 = "viewport"
+scale35 = "1.0"
+
+shader36 = ../../shaders/base/post-crt-prep-glass.slang
+alias36 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader36 = ../../shaders/base/linearize-crt.slang
-mipmap_input36 = true
-filter_linear36 = true
-scale_type36 = absolute
-// scale_x36 = 480
-// scale_y36 = 270
-// scale_x36 = 960
-// scale_y36 = 540
-scale_x36 = 800
-scale_y36 = 600
-alias36 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader37 = ../../shaders/base/linearize-crt.slang
mipmap_input37 = true
filter_linear37 = true
+scale_type37 = absolute
+// scale_x37 = 480
+// scale_y37 = 270
+// scale_x37 = 960
+// scale_y37 = 540
+scale_x37 = 800
+scale_y37 = 600
+alias37 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input38 = true
+filter_linear38 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear38 = true
-alias38 = "BR_MirrorBlurredPass"
+shader39 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear39 = true
+alias39 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input39 = true
-filter_linear39 = true
-scale_type39 = absolute
-scale_x39 = 128
-scale_y39 = 128
-alias39 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input40 = true
filter_linear40 = true
scale_type40 = absolute
-scale_x40 = 12
-scale_y40 = 12
-alias40 = "BR_MirrorFullscreenGlowPass"
+scale_x40 = 128
+scale_y40 = 128
+alias40 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input41 = true
+filter_linear41 = true
+scale_type41 = absolute
+scale_x41 = 12
+scale_y41 = 12
+alias41 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader41 = ../../shaders/base/reflection-glass.slang
-scale_type41 = viewport
-alias41 = "BR_CRTAndReflectionPass"
+shader42 = ../../shaders/base/reflection-glass.slang
+scale_type42 = viewport
+alias42 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -279,6 +282,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -349,4 +356,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON-NTSC.slangp
index 67cc730..5e13f38 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 45
+shaders = 46
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,202 +54,207 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
-shader23 = ../../shaders/base/stock.slang
-alias23 = "PreCRTPass"
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
-shader24 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear24 = true
-scale_type24 = source
-scale24 = 1.0
-alias24 = "AfterglowPass"
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
-shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear25 = true
scale_type25 = source
-mipmap_input25 = true
scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader26 = ../../shaders/dogway/hsm-grade.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
-shader27 = ../../shaders/base/stock.slang
-alias27 = "PrePass0"
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
-shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear28 = false
-float_framebuffer28 = true
-scale_type_x28 = source
-scale_type_y28 = source
-scale_x28 = 4.0
-scale_y28 = 1.0
-frame_count_mod28 = 2
-alias28 = NPass1
-
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
float_framebuffer29 = true
-filter_linear29 = true
-scale_type29 = source
-scale_x29 = 0.5
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
+scale_x30 = 0.5
scale_y30 = 1.0
-shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-shader32 = ../../shaders/base/stock.slang
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-alias32 = "PrePass"
-mipmap_input32 = true
-shader33 = ../../shaders/guest/hsm-avg-lum.slang
+shader33 = ../../shaders/base/stock.slang
filter_linear33 = true
scale_type33 = source
-scale33 = 1.0
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
mipmap_input33 = true
-alias33 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear34 = true
scale_type34 = source
scale34 = 1.0
-float_framebuffer34 = true
-alias34 = "LinearizePass"
+mipmap_input34 = true
+alias34 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear35 = true
+scale_type35 = source
+scale35 = 1.0
+float_framebuffer35 = true
+alias35 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader35 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear35 = "false"
-scale_type35 = "source"
-scale35 = "1.0"
-wrap_mode35 = "clamp_to_border"
-mipmap_input35 = "false"
-alias35 = "SourceSDR"
-
-shader36 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader36 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear36 = "false"
scale_type36 = "source"
scale36 = "1.0"
wrap_mode36 = "clamp_to_border"
mipmap_input36 = "false"
-alias36 = "SourceHDR"
+alias36 = "SourceSDR"
+float_framebuffer36 = "true"
-shader37 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader37 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear37 = "false"
+scale_type37 = "source"
+scale37 = "1.0"
wrap_mode37 = "clamp_to_border"
mipmap_input37 = "false"
-alias37 = ""
-float_framebuffer37 = "false"
-srgb_framebuffer37 = "false"
-scale_type37 = "viewport"
+alias37 = "SourceHDR"
+float_framebuffer37 = "true"
-shader38 = ../../shaders/base/post-crt-prep-glass.slang
-alias38 = "MBZ_PostCRTPass"
+shader38 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear38 = "false"
+wrap_mode38 = "clamp_to_border"
+mipmap_input38 = "false"
+alias38 = ""
+float_framebuffer38 = "false"
+srgb_framebuffer38 = "false"
+scale_type38 = "viewport"
+
+shader39 = ../../shaders/base/post-crt-prep-glass.slang
+alias39 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader39 = ../../shaders/base/linearize-crt.slang
-mipmap_input39 = true
-filter_linear39 = true
-scale_type39 = absolute
-// scale_x39 = 480
-// scale_y39 = 270
-// scale_x39 = 960
-// scale_y39 = 540
-scale_x39 = 800
-scale_y39 = 600
-alias39 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader40 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader40 = ../../shaders/base/linearize-crt.slang
mipmap_input40 = true
filter_linear40 = true
+scale_type40 = absolute
+// scale_x40 = 480
+// scale_y40 = 270
+// scale_x40 = 960
+// scale_y40 = 540
+scale_x40 = 800
+scale_y40 = 600
+alias40 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader41 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input41 = true
+filter_linear41 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader41 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear41 = true
-alias41 = "BR_MirrorBlurredPass"
+shader42 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear42 = true
+alias42 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input42 = true
-filter_linear42 = true
-scale_type42 = absolute
-scale_x42 = 128
-scale_y42 = 128
-alias42 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input43 = true
filter_linear43 = true
scale_type43 = absolute
-scale_x43 = 12
-scale_y43 = 12
-alias43 = "BR_MirrorFullscreenGlowPass"
+scale_x43 = 128
+scale_y43 = 128
+alias43 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input44 = true
+filter_linear44 = true
+scale_type44 = absolute
+scale_x44 = 12
+scale_y44 = 12
+alias44 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader44 = ../../shaders/base/reflection-glass.slang
-scale_type44 = viewport
-alias44 = "BR_CRTAndReflectionPass"
+shader45 = ../../shaders/base/reflection-glass.slang
+scale_type45 = viewport
+alias45 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -311,6 +316,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -381,6 +390,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// Sony Megatron Color Monitor
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON.slangp
index b5b2170..7f56a65 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON.slangp
@@ -1,4 +1,4 @@
-shaders = 43
+shaders = 44
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,190 +54,195 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader33 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear33 = "false"
-scale_type33 = "source"
-scale33 = "1.0"
-wrap_mode33 = "clamp_to_border"
-mipmap_input33 = "false"
-alias33 = "SourceSDR"
-
-shader34 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader34 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear34 = "false"
scale_type34 = "source"
scale34 = "1.0"
wrap_mode34 = "clamp_to_border"
mipmap_input34 = "false"
-alias34 = "SourceHDR"
+alias34 = "SourceSDR"
+float_framebuffer34 = "true"
-shader35 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader35 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear35 = "false"
+scale_type35 = "source"
+scale35 = "1.0"
wrap_mode35 = "clamp_to_border"
mipmap_input35 = "false"
-alias35 = ""
-float_framebuffer35 = "false"
-srgb_framebuffer35 = "false"
-scale_type35 = "viewport"
+alias35 = "SourceHDR"
+float_framebuffer35 = "true"
-shader36 = ../../shaders/base/post-crt-prep-glass.slang
-alias36 = "MBZ_PostCRTPass"
+shader36 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear36 = "false"
+wrap_mode36 = "clamp_to_border"
+mipmap_input36 = "false"
+alias36 = ""
+float_framebuffer36 = "false"
+srgb_framebuffer36 = "false"
+scale_type36 = "viewport"
+
+shader37 = ../../shaders/base/post-crt-prep-glass.slang
+alias37 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader37 = ../../shaders/base/linearize-crt.slang
-mipmap_input37 = true
-filter_linear37 = true
-scale_type37 = absolute
-// scale_x37 = 480
-// scale_y37 = 270
-// scale_x37 = 960
-// scale_y37 = 540
-scale_x37 = 800
-scale_y37 = 600
-alias37 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader38 = ../../shaders/base/linearize-crt.slang
mipmap_input38 = true
filter_linear38 = true
+scale_type38 = absolute
+// scale_x38 = 480
+// scale_y38 = 270
+// scale_x38 = 960
+// scale_y38 = 540
+scale_x38 = 800
+scale_y38 = 600
+alias38 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input39 = true
+filter_linear39 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear39 = true
-alias39 = "BR_MirrorBlurredPass"
+shader40 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear40 = true
+alias40 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input40 = true
-filter_linear40 = true
-scale_type40 = absolute
-scale_x40 = 128
-scale_y40 = 128
-alias40 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input41 = true
filter_linear41 = true
scale_type41 = absolute
-scale_x41 = 12
-scale_y41 = 12
-alias41 = "BR_MirrorFullscreenGlowPass"
+scale_x41 = 128
+scale_y41 = 128
+alias41 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input42 = true
+filter_linear42 = true
+scale_type42 = absolute
+scale_x42 = 12
+scale_y42 = 12
+alias42 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader42 = ../../shaders/base/reflection-glass.slang
-scale_type42 = viewport
-alias42 = "BR_CRTAndReflectionPass"
+shader43 = ../../shaders/base/reflection-glass.slang
+scale_type43 = viewport
+alias43 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -299,6 +304,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -369,6 +378,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// Sony Megatron Color Monitor
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV-NTSC.slangp
index 1d3a3f1..9b54b77 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 46
+shaders = 47
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,197 +54,200 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
-shader23 = ../../shaders/base/stock.slang
-alias23 = "PreCRTPass"
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
-shader24 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear24 = true
-scale_type24 = source
-scale24 = 1.0
-alias24 = "AfterglowPass"
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
-shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear25 = true
scale_type25 = source
-mipmap_input25 = true
scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader26 = ../../shaders/dogway/hsm-grade.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
-shader27 = ../../shaders/base/stock.slang
-alias27 = "PrePass0"
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
-shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear28 = false
-float_framebuffer28 = true
-scale_type_x28 = source
-scale_type_y28 = source
-scale_x28 = 4.0
-scale_y28 = 1.0
-frame_count_mod28 = 2
-alias28 = NPass1
-
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
float_framebuffer29 = true
-filter_linear29 = true
-scale_type29 = source
-scale_x29 = 0.5
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
+scale_x30 = 0.5
scale_y30 = 1.0
-shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-shader32 = ../../shaders/base/stock.slang
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-alias32 = "PrePass"
-mipmap_input32 = true
-shader33 = ../../shaders/guest/hsm-avg-lum.slang
+shader33 = ../../shaders/base/stock.slang
filter_linear33 = true
scale_type33 = source
-scale33 = 1.0
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
mipmap_input33 = true
-alias33 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear34 = true
scale_type34 = source
scale34 = 1.0
-float_framebuffer34 = true
-alias34 = "LinearizePass"
+mipmap_input34 = true
+alias34 = "AvgLumPass"
-shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear35 = true
-scale_type_x35 = viewport
-scale_x35 = 1.0
-scale_type_y35 = source
-scale_y35 = 1.0
+scale_type35 = source
+scale35 = 1.0
float_framebuffer35 = true
-alias35 = Pass1
+alias35 = "LinearizePass"
-shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear36 = true
-scale_type_x36 = absolute
-scale_x36 = 640.0
+scale_type_x36 = viewport
+scale_x36 = 1.0
scale_type_y36 = source
-scale_y36 = 1.0
+scale_y36 = 1.0
float_framebuffer36 = true
+alias36 = Pass1
-shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear37 = true
scale_type_x37 = absolute
scale_x37 = 640.0
-scale_type_y37 = absolute
-scale_y37 = 480.0
+scale_type_y37 = source
+scale_y37 = 1.0
float_framebuffer37 = true
-alias37 = GlowPass
-shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 640.0
scale_type_y38 = absolute
-scale_y38 = 480.0
+scale_y38 = 480.0
float_framebuffer38 = true
+alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear39 = true
scale_type_x39 = absolute
scale_x39 = 640.0
scale_type_y39 = absolute
-scale_y39 = 480.0
+scale_y39 = 480.0
float_framebuffer39 = true
-alias39 = BloomPass
-shader40 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear40 = true
+scale_type_x40 = absolute
+scale_x40 = 640.0
+scale_type_y40 = absolute
+scale_y40 = 480.0
float_framebuffer40 = true
-scale_type40 = viewport
-scale_x40 = 1.0
-scale_y40 = 1.0
+alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-deconvergence.slang
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang
filter_linear41 = true
+float_framebuffer41 = true
scale_type41 = viewport
scale_x41 = 1.0
scale_y41 = 1.0
-shader42 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias42 = "MBZ_PostCRTPass"
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias43 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader43 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear43 = true
-scale_type43 = viewport
-float_framebuffer43 = true
-alias43 = "BR_LayersUnderCRTPass"
-
-shader44 = ../../shaders/base/bezel-images-over-crt.slang
+shader44 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear44 = true
scale_type44 = viewport
float_framebuffer44 = true
-alias44 = "BR_LayersOverCRTPass"
+alias44 = "BR_LayersUnderCRTPass"
+
+shader45 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear45 = true
+scale_type45 = viewport
+float_framebuffer45 = true
+alias45 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader45 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type45 = viewport
-alias45 = "CombinePass"
+shader46 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type46 = viewport
+alias46 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -306,6 +309,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -340,6 +347,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// NTSC Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV.slangp
index 9654a0f..4389a60 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 43
+shaders = 44
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,176 +54,179 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear33 = true
-scale_type_x33 = absolute
-scale_x33 = 800.0
-scale_type_y33 = source
-scale_y33 = 1.0
+scale_type33 = source
+scale33 = 1.0
float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear34 = true
scale_type_x34 = absolute
scale_x34 = 800.0
-scale_type_y34 = absolute
-scale_y34 = 600.0
+scale_type_y34 = source
+scale_y34 = 1.0
float_framebuffer34 = true
-alias34 = GlowPass
-shader35 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear35 = true
scale_type_x35 = absolute
scale_x35 = 800.0
scale_type_y35 = absolute
-scale_y35 = 600.0
+scale_y35 = 600.0
float_framebuffer35 = true
+alias35 = GlowPass
-shader36 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear36 = true
-scale_type_x36 = source
-scale_x36 = 1.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type_x36 = absolute
+scale_x36 = 800.0
+scale_type_y36 = absolute
+scale_y36 = 600.0
float_framebuffer36 = true
-alias36 = BloomPass
-shader37 = ../../shaders/guest/hsm-crt-guest-advanced-no-reflect.slang
+shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear37 = true
-float_framebuffer37 = true
-scale_type37 = viewport
+scale_type_x37 = source
scale_x37 = 1.0
+scale_type_y37 = source
scale_y37 = 1.0
+float_framebuffer37 = true
+alias37 = BloomPass
-shader38 = ../../shaders/guest/hsm-deconvergence-no-reflect.slang
+shader38 = ../../shaders/guest/hsm-crt-guest-advanced-no-reflect.slang
filter_linear38 = true
+float_framebuffer38 = true
scale_type38 = viewport
scale_x38 = 1.0
scale_y38 = 1.0
-shader39 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias39 = "MBZ_PostCRTPass"
+shader39 = ../../shaders/guest/hsm-deconvergence-no-reflect.slang
+filter_linear39 = true
+scale_type39 = viewport
+scale_x39 = 1.0
+scale_y39 = 1.0
+
+shader40 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias40 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader40 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear40 = true
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_LayersUnderCRTPass"
-
-shader41 = ../../shaders/base/bezel-images-over-crt.slang
+shader41 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear41 = true
scale_type41 = viewport
float_framebuffer41 = true
-alias41 = "BR_LayersOverCRTPass"
+alias41 = "BR_LayersUnderCRTPass"
+
+shader42 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear42 = true
+scale_type42 = viewport
+float_framebuffer42 = true
+alias42 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader42 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type42 = viewport
-alias42 = "CombinePass"
+shader43 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type43 = viewport
+alias43 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -285,6 +288,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -319,4 +326,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON-NTSC.slangp
index cca4994..eb38aef 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 42
+shaders = 43
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,168 +54,173 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
-shader23 = ../../shaders/base/stock.slang
-alias23 = "PreCRTPass"
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
-shader24 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear24 = true
-scale_type24 = source
-scale24 = 1.0
-alias24 = "AfterglowPass"
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
-shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear25 = true
scale_type25 = source
-mipmap_input25 = true
scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader26 = ../../shaders/dogway/hsm-grade.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
-shader27 = ../../shaders/base/stock.slang
-alias27 = "PrePass0"
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
-shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear28 = false
-float_framebuffer28 = true
-scale_type_x28 = source
-scale_type_y28 = source
-scale_x28 = 4.0
-scale_y28 = 1.0
-frame_count_mod28 = 2
-alias28 = NPass1
-
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
float_framebuffer29 = true
-filter_linear29 = true
-scale_type29 = source
-scale_x29 = 0.5
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
+scale_x30 = 0.5
scale_y30 = 1.0
-shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-shader32 = ../../shaders/base/stock.slang
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-alias32 = "PrePass"
-mipmap_input32 = true
-shader33 = ../../shaders/guest/hsm-avg-lum.slang
+shader33 = ../../shaders/base/stock.slang
filter_linear33 = true
scale_type33 = source
-scale33 = 1.0
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
mipmap_input33 = true
-alias33 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear34 = true
scale_type34 = source
scale34 = 1.0
-float_framebuffer34 = true
-alias34 = "LinearizePass"
+mipmap_input34 = true
+alias34 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear35 = true
+scale_type35 = source
+scale35 = 1.0
+float_framebuffer35 = true
+alias35 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader35 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear35 = "false"
-scale_type35 = "source"
-scale35 = "1.0"
-wrap_mode35 = "clamp_to_border"
-mipmap_input35 = "false"
-alias35 = "SourceSDR"
-
-shader36 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader36 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear36 = "false"
scale_type36 = "source"
scale36 = "1.0"
wrap_mode36 = "clamp_to_border"
mipmap_input36 = "false"
-alias36 = "SourceHDR"
+alias36 = "SourceSDR"
+float_framebuffer36 = "true"
-shader37 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+shader37 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear37 = "false"
+scale_type37 = "source"
+scale37 = "1.0"
wrap_mode37 = "clamp_to_border"
mipmap_input37 = "false"
-alias37 = ""
-float_framebuffer37 = "false"
-srgb_framebuffer37 = "false"
-scale_type37 = "viewport"
+alias37 = "SourceHDR"
+float_framebuffer37 = "true"
-shader38 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias38 = "MBZ_PostCRTPass"
+shader38 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+filter_linear38 = "false"
+wrap_mode38 = "clamp_to_border"
+mipmap_input38 = "false"
+alias38 = ""
+float_framebuffer38 = "false"
+srgb_framebuffer38 = "false"
+scale_type38 = "viewport"
+
+shader39 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias39 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader39 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear39 = true
-scale_type39 = viewport
-float_framebuffer39 = true
-alias39 = "BR_LayersUnderCRTPass"
-
-shader40 = ../../shaders/base/bezel-images-over-crt.slang
+shader40 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear40 = true
scale_type40 = viewport
float_framebuffer40 = true
-alias40 = "BR_LayersOverCRTPass"
+alias40 = "BR_LayersUnderCRTPass"
+
+shader41 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear41 = true
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader41 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type41 = viewport
-alias41 = "CombinePass"
+shader42 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type42 = viewport
+alias42 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -277,6 +282,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -311,6 +320,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// Sony Megatron Color Monitor
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON.slangp
index 8c433f1..f8c4b71 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON.slangp
@@ -1,4 +1,4 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,156 +54,161 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader33 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear33 = "false"
-scale_type33 = "source"
-scale33 = "1.0"
-wrap_mode33 = "clamp_to_border"
-mipmap_input33 = "false"
-alias33 = "SourceSDR"
-
-shader34 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader34 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear34 = "false"
scale_type34 = "source"
scale34 = "1.0"
wrap_mode34 = "clamp_to_border"
mipmap_input34 = "false"
-alias34 = "SourceHDR"
+alias34 = "SourceSDR"
+float_framebuffer34 = "true"
-shader35 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+shader35 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear35 = "false"
+scale_type35 = "source"
+scale35 = "1.0"
wrap_mode35 = "clamp_to_border"
mipmap_input35 = "false"
-alias35 = ""
-float_framebuffer35 = "false"
-srgb_framebuffer35 = "false"
-scale_type35 = "viewport"
+alias35 = "SourceHDR"
+float_framebuffer35 = "true"
-shader36 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias36 = "MBZ_PostCRTPass"
+shader36 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+filter_linear36 = "false"
+wrap_mode36 = "clamp_to_border"
+mipmap_input36 = "false"
+alias36 = ""
+float_framebuffer36 = "false"
+srgb_framebuffer36 = "false"
+scale_type36 = "viewport"
+
+shader37 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias37 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader37 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear37 = true
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_LayersUnderCRTPass"
-
-shader38 = ../../shaders/base/bezel-images-over-crt.slang
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear38 = true
scale_type38 = viewport
float_framebuffer38 = true
-alias38 = "BR_LayersOverCRTPass"
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader39 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type39 = viewport
-alias39 = "CombinePass"
+shader40 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -265,6 +270,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -299,6 +308,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// Sony Megatron Color Monitor
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV-NTSC.slangp
index 1c244b4..8d3a61a 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 52
+shaders = 53
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,251 +54,254 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
-shader23 = ../../shaders/base/stock.slang
-alias23 = "PreCRTPass"
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
-shader24 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear24 = true
-scale_type24 = source
-scale24 = 1.0
-alias24 = "AfterglowPass"
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
-shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear25 = true
scale_type25 = source
-mipmap_input25 = true
scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader26 = ../../shaders/dogway/hsm-grade.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
-shader27 = ../../shaders/base/stock.slang
-alias27 = "PrePass0"
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
-shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear28 = false
-float_framebuffer28 = true
-scale_type_x28 = source
-scale_type_y28 = source
-scale_x28 = 4.0
-scale_y28 = 1.0
-frame_count_mod28 = 2
-alias28 = NPass1
-
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
float_framebuffer29 = true
-filter_linear29 = true
-scale_type29 = source
-scale_x29 = 0.5
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
+scale_x30 = 0.5
scale_y30 = 1.0
-shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-shader32 = ../../shaders/base/stock.slang
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-alias32 = "PrePass"
-mipmap_input32 = true
-shader33 = ../../shaders/guest/hsm-avg-lum.slang
+shader33 = ../../shaders/base/stock.slang
filter_linear33 = true
scale_type33 = source
-scale33 = 1.0
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
mipmap_input33 = true
-alias33 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear34 = true
scale_type34 = source
scale34 = 1.0
-float_framebuffer34 = true
-alias34 = "LinearizePass"
+mipmap_input34 = true
+alias34 = "AvgLumPass"
-shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear35 = true
-scale_type_x35 = viewport
-scale_x35 = 1.0
-scale_type_y35 = source
-scale_y35 = 1.0
+scale_type35 = source
+scale35 = 1.0
float_framebuffer35 = true
-alias35 = Pass1
+alias35 = "LinearizePass"
-shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear36 = true
-scale_type_x36 = absolute
-scale_x36 = 640.0
+scale_type_x36 = viewport
+scale_x36 = 1.0
scale_type_y36 = source
-scale_y36 = 1.0
+scale_y36 = 1.0
float_framebuffer36 = true
+alias36 = Pass1
-shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear37 = true
scale_type_x37 = absolute
scale_x37 = 640.0
-scale_type_y37 = absolute
-scale_y37 = 480.0
+scale_type_y37 = source
+scale_y37 = 1.0
float_framebuffer37 = true
-alias37 = GlowPass
-shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 640.0
scale_type_y38 = absolute
-scale_y38 = 480.0
+scale_y38 = 480.0
float_framebuffer38 = true
+alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear39 = true
scale_type_x39 = absolute
scale_x39 = 640.0
scale_type_y39 = absolute
-scale_y39 = 480.0
+scale_y39 = 480.0
float_framebuffer39 = true
-alias39 = BloomPass
-shader40 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear40 = true
+scale_type_x40 = absolute
+scale_x40 = 640.0
+scale_type_y40 = absolute
+scale_y40 = 480.0
float_framebuffer40 = true
-scale_type40 = viewport
-scale_x40 = 1.0
-scale_y40 = 1.0
+alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-deconvergence.slang
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear41 = true
+float_framebuffer41 = true
scale_type41 = viewport
scale_x41 = 1.0
scale_y41 = 1.0
-shader42 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias42 = "MBZ_PostCRTPass"
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias43 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader43 = ../../shaders/base/linearize-crt.slang
-mipmap_input43 = true
-filter_linear43 = true
-scale_type43 = absolute
-// scale_x43 = 480
-// scale_y43 = 270
-// scale_x43 = 960
-// scale_y43 = 540
-scale_x43 = 800
-scale_y43 = 600
-alias43 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader44 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader44 = ../../shaders/base/linearize-crt.slang
mipmap_input44 = true
filter_linear44 = true
+scale_type44 = absolute
+// scale_x44 = 480
+// scale_y44 = 270
+// scale_x44 = 960
+// scale_y44 = 540
+scale_x44 = 800
+scale_y44 = 600
+alias44 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input45 = true
+filter_linear45 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader45 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear45 = true
-alias45 = "BR_MirrorBlurredPass"
+shader46 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear46 = true
+alias46 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input46 = true
-filter_linear46 = true
-scale_type46 = absolute
-scale_x46 = 128
-scale_y46 = 128
-alias46 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input47 = true
filter_linear47 = true
scale_type47 = absolute
-scale_x47 = 12
-scale_y47 = 12
-alias47 = "BR_MirrorFullscreenGlowPass"
+scale_x47 = 128
+scale_y47 = 128
+alias47 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input48 = true
+filter_linear48 = true
+scale_type48 = absolute
+scale_x48 = 12
+scale_y48 = 12
+alias48 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader48 = ../../shaders/base/reflection.slang
-scale_type48 = viewport
-float_framebuffer48 = true
-alias48 = "BR_CRTAndReflectionPass"
+shader49 = ../../shaders/base/reflection.slang
+scale_type49 = viewport
+float_framebuffer49 = true
+alias49 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader49 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear49 = true
-scale_type49 = viewport
-float_framebuffer49 = true
-alias49 = "BR_LayersUnderCRTPass"
-
-shader50 = ../../shaders/base/bezel-images-over-crt.slang
+shader50 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear50 = true
scale_type50 = viewport
float_framebuffer50 = true
-alias50 = "BR_LayersOverCRTPass"
+alias50 = "BR_LayersUnderCRTPass"
+
+shader51 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear51 = true
+scale_type51 = viewport
+float_framebuffer51 = true
+alias51 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader51 = ../../shaders/base/combine-passes.slang
-scale_type51 = viewport
-alias51 = "CombinePass"
+shader52 = ../../shaders/base/combine-passes.slang
+scale_type52 = viewport
+alias52 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -360,6 +363,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -394,6 +401,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// NTSC Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp
index 1f46163..178ae01 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 49
+shaders = 50
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,230 +54,233 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear33 = true
-scale_type_x33 = absolute
-scale_x33 = 800.0
-scale_type_y33 = source
-scale_y33 = 1.0
+scale_type33 = source
+scale33 = 1.0
float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear34 = true
scale_type_x34 = absolute
scale_x34 = 800.0
-scale_type_y34 = absolute
-scale_y34 = 600.0
+scale_type_y34 = source
+scale_y34 = 1.0
float_framebuffer34 = true
-alias34 = GlowPass
-shader35 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear35 = true
scale_type_x35 = absolute
scale_x35 = 800.0
scale_type_y35 = absolute
-scale_y35 = 600.0
+scale_y35 = 600.0
float_framebuffer35 = true
+alias35 = GlowPass
-shader36 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear36 = true
-scale_type_x36 = source
-scale_x36 = 1.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type_x36 = absolute
+scale_x36 = 800.0
+scale_type_y36 = absolute
+scale_y36 = 600.0
float_framebuffer36 = true
-alias36 = BloomPass
-shader37 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear37 = true
-float_framebuffer37 = true
-scale_type37 = viewport
+scale_type_x37 = source
scale_x37 = 1.0
+scale_type_y37 = source
scale_y37 = 1.0
+float_framebuffer37 = true
+alias37 = BloomPass
-shader38 = ../../shaders/guest/hsm-deconvergence.slang
+shader38 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear38 = true
+float_framebuffer38 = true
scale_type38 = viewport
scale_x38 = 1.0
scale_y38 = 1.0
-shader39 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias39 = "MBZ_PostCRTPass"
+shader39 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear39 = true
+scale_type39 = viewport
+scale_x39 = 1.0
+scale_y39 = 1.0
+
+shader40 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias40 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader40 = ../../shaders/base/linearize-crt.slang
-mipmap_input40 = true
-filter_linear40 = true
-scale_type40 = absolute
-// scale_x40 = 480
-// scale_y40 = 270
-// scale_x40 = 960
-// scale_y40 = 540
-scale_x40 = 800
-scale_y40 = 600
-alias40 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader41 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader41 = ../../shaders/base/linearize-crt.slang
mipmap_input41 = true
filter_linear41 = true
+scale_type41 = absolute
+// scale_x41 = 480
+// scale_y41 = 270
+// scale_x41 = 960
+// scale_y41 = 540
+scale_x41 = 800
+scale_y41 = 600
+alias41 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader42 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input42 = true
+filter_linear42 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader42 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear42 = true
-alias42 = "BR_MirrorBlurredPass"
+shader43 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear43 = true
+alias43 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input43 = true
-filter_linear43 = true
-scale_type43 = absolute
-scale_x43 = 128
-scale_y43 = 128
-alias43 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input44 = true
filter_linear44 = true
scale_type44 = absolute
-scale_x44 = 12
-scale_y44 = 12
-alias44 = "BR_MirrorFullscreenGlowPass"
+scale_x44 = 128
+scale_y44 = 128
+alias44 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader45 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input45 = true
+filter_linear45 = true
+scale_type45 = absolute
+scale_x45 = 12
+scale_y45 = 12
+alias45 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader45 = ../../shaders/base/reflection.slang
-scale_type45 = viewport
-float_framebuffer45 = true
-alias45 = "BR_CRTAndReflectionPass"
+shader46 = ../../shaders/base/reflection.slang
+scale_type46 = viewport
+float_framebuffer46 = true
+alias46 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader46 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear46 = true
-scale_type46 = viewport
-float_framebuffer46 = true
-alias46 = "BR_LayersUnderCRTPass"
-
-shader47 = ../../shaders/base/bezel-images-over-crt.slang
+shader47 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear47 = true
scale_type47 = viewport
float_framebuffer47 = true
-alias47 = "BR_LayersOverCRTPass"
+alias47 = "BR_LayersUnderCRTPass"
+
+shader48 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear48 = true
+scale_type48 = viewport
+float_framebuffer48 = true
+alias48 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader48 = ../../shaders/base/combine-passes.slang
-scale_type48 = viewport
-alias48 = "CombinePass"
+shader49 = ../../shaders/base/combine-passes.slang
+scale_type49 = viewport
+alias49 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -339,6 +342,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -373,4 +380,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__LCD-GRID.slangp
index 5dac191..13ab11f 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__LCD-GRID.slangp
@@ -1,4 +1,4 @@
-shaders = 45
+shaders = 46
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,190 +54,193 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
-shader33 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
-shader34 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear34 = "false"
-scale_type34 = "viewport"
-scale34 = "1.0"
+shader34 = ../../shaders/base/delinearize.slang
-shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias35 = "MBZ_PostCRTPass"
+shader35 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear35 = "false"
+scale_type35 = "viewport"
+scale35 = "1.0"
+
+shader36 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias36 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader36 = ../../shaders/base/linearize-crt.slang
-mipmap_input36 = true
-filter_linear36 = true
-scale_type36 = absolute
-// scale_x36 = 480
-// scale_y36 = 270
-// scale_x36 = 960
-// scale_y36 = 540
-scale_x36 = 800
-scale_y36 = 600
-alias36 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader37 = ../../shaders/base/linearize-crt.slang
mipmap_input37 = true
filter_linear37 = true
+scale_type37 = absolute
+// scale_x37 = 480
+// scale_y37 = 270
+// scale_x37 = 960
+// scale_y37 = 540
+scale_x37 = 800
+scale_y37 = 600
+alias37 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input38 = true
+filter_linear38 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear38 = true
-alias38 = "BR_MirrorBlurredPass"
+shader39 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear39 = true
+alias39 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input39 = true
-filter_linear39 = true
-scale_type39 = absolute
-scale_x39 = 128
-scale_y39 = 128
-alias39 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input40 = true
filter_linear40 = true
scale_type40 = absolute
-scale_x40 = 12
-scale_y40 = 12
-alias40 = "BR_MirrorFullscreenGlowPass"
+scale_x40 = 128
+scale_y40 = 128
+alias40 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input41 = true
+filter_linear41 = true
+scale_type41 = absolute
+scale_x41 = 12
+scale_y41 = 12
+alias41 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader41 = ../../shaders/base/reflection.slang
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_CRTAndReflectionPass"
+shader42 = ../../shaders/base/reflection.slang
+scale_type42 = viewport
+float_framebuffer42 = true
+alias42 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader42 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear42 = true
-scale_type42 = viewport
-float_framebuffer42 = true
-alias42 = "BR_LayersUnderCRTPass"
-
-shader43 = ../../shaders/base/bezel-images-over-crt.slang
+shader43 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear43 = true
scale_type43 = viewport
float_framebuffer43 = true
-alias43 = "BR_LayersOverCRTPass"
+alias43 = "BR_LayersUnderCRTPass"
+
+shader44 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear44 = true
+scale_type44 = viewport
+float_framebuffer44 = true
+alias44 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader44 = ../../shaders/base/combine-passes.slang
-scale_type44 = viewport
-alias44 = "CombinePass"
+shader45 = ../../shaders/base/combine-passes.slang
+scale_type45 = viewport
+alias45 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -299,6 +302,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -333,4 +340,6 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON-NTSC.slangp
index 2707985..47d24b0 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 48
+shaders = 49
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,222 +54,227 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
-shader23 = ../../shaders/base/stock.slang
-alias23 = "PreCRTPass"
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
-shader24 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear24 = true
-scale_type24 = source
-scale24 = 1.0
-alias24 = "AfterglowPass"
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
-shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear25 = true
scale_type25 = source
-mipmap_input25 = true
scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader26 = ../../shaders/dogway/hsm-grade.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
-shader27 = ../../shaders/base/stock.slang
-alias27 = "PrePass0"
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
-shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear28 = false
-float_framebuffer28 = true
-scale_type_x28 = source
-scale_type_y28 = source
-scale_x28 = 4.0
-scale_y28 = 1.0
-frame_count_mod28 = 2
-alias28 = NPass1
-
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
float_framebuffer29 = true
-filter_linear29 = true
-scale_type29 = source
-scale_x29 = 0.5
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
+scale_x30 = 0.5
scale_y30 = 1.0
-shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-shader32 = ../../shaders/base/stock.slang
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-alias32 = "PrePass"
-mipmap_input32 = true
-shader33 = ../../shaders/guest/hsm-avg-lum.slang
+shader33 = ../../shaders/base/stock.slang
filter_linear33 = true
scale_type33 = source
-scale33 = 1.0
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
mipmap_input33 = true
-alias33 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear34 = true
scale_type34 = source
scale34 = 1.0
-float_framebuffer34 = true
-alias34 = "LinearizePass"
+mipmap_input34 = true
+alias34 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear35 = true
+scale_type35 = source
+scale35 = 1.0
+float_framebuffer35 = true
+alias35 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader35 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear35 = "false"
-scale_type35 = "source"
-scale35 = "1.0"
-wrap_mode35 = "clamp_to_border"
-mipmap_input35 = "false"
-alias35 = "SourceSDR"
-
-shader36 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader36 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear36 = "false"
scale_type36 = "source"
scale36 = "1.0"
wrap_mode36 = "clamp_to_border"
mipmap_input36 = "false"
-alias36 = "SourceHDR"
+alias36 = "SourceSDR"
+float_framebuffer36 = "true"
-shader37 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader37 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear37 = "false"
+scale_type37 = "source"
+scale37 = "1.0"
wrap_mode37 = "clamp_to_border"
mipmap_input37 = "false"
-alias37 = ""
-float_framebuffer37 = "false"
-srgb_framebuffer37 = "false"
-scale_type37 = "viewport"
+alias37 = "SourceHDR"
+float_framebuffer37 = "true"
-shader38 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias38 = "MBZ_PostCRTPass"
+shader38 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear38 = "false"
+wrap_mode38 = "clamp_to_border"
+mipmap_input38 = "false"
+alias38 = ""
+float_framebuffer38 = "false"
+srgb_framebuffer38 = "false"
+scale_type38 = "viewport"
+
+shader39 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias39 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader39 = ../../shaders/base/linearize-crt.slang
-mipmap_input39 = true
-filter_linear39 = true
-scale_type39 = absolute
-// scale_x39 = 480
-// scale_y39 = 270
-// scale_x39 = 960
-// scale_y39 = 540
-scale_x39 = 800
-scale_y39 = 600
-alias39 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader40 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader40 = ../../shaders/base/linearize-crt.slang
mipmap_input40 = true
filter_linear40 = true
+scale_type40 = absolute
+// scale_x40 = 480
+// scale_y40 = 270
+// scale_x40 = 960
+// scale_y40 = 540
+scale_x40 = 800
+scale_y40 = 600
+alias40 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader41 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input41 = true
+filter_linear41 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader41 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear41 = true
-alias41 = "BR_MirrorBlurredPass"
+shader42 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear42 = true
+alias42 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input42 = true
-filter_linear42 = true
-scale_type42 = absolute
-scale_x42 = 128
-scale_y42 = 128
-alias42 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input43 = true
filter_linear43 = true
scale_type43 = absolute
-scale_x43 = 12
-scale_y43 = 12
-alias43 = "BR_MirrorFullscreenGlowPass"
+scale_x43 = 128
+scale_y43 = 128
+alias43 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input44 = true
+filter_linear44 = true
+scale_type44 = absolute
+scale_x44 = 12
+scale_y44 = 12
+alias44 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader44 = ../../shaders/base/reflection.slang
-scale_type44 = viewport
-float_framebuffer44 = true
-alias44 = "BR_CRTAndReflectionPass"
+shader45 = ../../shaders/base/reflection.slang
+scale_type45 = viewport
+float_framebuffer45 = true
+alias45 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader45 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear45 = true
-scale_type45 = viewport
-float_framebuffer45 = true
-alias45 = "BR_LayersUnderCRTPass"
-
-shader46 = ../../shaders/base/bezel-images-over-crt.slang
+shader46 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear46 = true
scale_type46 = viewport
float_framebuffer46 = true
-alias46 = "BR_LayersOverCRTPass"
+alias46 = "BR_LayersUnderCRTPass"
+
+shader47 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear47 = true
+scale_type47 = viewport
+float_framebuffer47 = true
+alias47 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader47 = ../../shaders/base/combine-passes.slang
-scale_type47 = viewport
-alias47 = "CombinePass"
+shader48 = ../../shaders/base/combine-passes.slang
+scale_type48 = viewport
+alias48 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -331,6 +336,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -365,6 +374,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// Sony Megatron Color Monitor
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON.slangp
index 7a0653a..a03b055 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON.slangp
@@ -1,4 +1,4 @@
-shaders = 46
+shaders = 47
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,210 +54,215 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = refpass
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear18 = false
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
-alias18 = scalefx_pass0
+shader18 = ../../shaders/base/stock.slang
+alias18 = refpass
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
-float_framebuffer12 = true
+float_framebuffer19 = true
+alias19 = scalefx_pass0
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
+float_framebuffer12 = true
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear22 = false
scale_type22 = source
-scale22 = 3
+scale22 = 1.0
+
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear23 = false
+scale_type23 = source
+scale23 = 3
// GTU TV Processing
-shader23 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type23 = source
-scale23 = 1.0
-float_framebuffer23 = true
-
-shader24 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x24 = source
-scale_x24 = 1.0
-scale_type_y24 = source
-scale_y24 = 1.0
-filter_linear24 = false
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
float_framebuffer24 = true
-shader25 = ../../shaders/base/stock.slang
-alias25 = "PreCRTPass"
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
-shader26 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear26 = true
-scale_type26 = source
-scale26 = 1.0
-alias26 = "AfterglowPass"
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
-shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear27 = true
scale_type27 = source
-mipmap_input27 = true
scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader28 = ../../shaders/dogway/hsm-grade.slang
-filter_linear28 = true
-scale_type28 = source
-scale28 = 1.0
-
-shader29 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader29 = ../../shaders/dogway/hsm-grade.slang
filter_linear29 = true
scale_type29 = source
-scale_x29 = 1.0
-scale_y29 = 1.0
+scale29 = 1.0
-shader30 = ../../shaders/base/stock.slang
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear30 = true
scale_type30 = source
scale_x30 = 1.0
scale_y30 = 1.0
-alias30 = "PrePass"
-mipmap_input30 = true
-shader31 = ../../shaders/guest/hsm-avg-lum.slang
+shader31 = ../../shaders/base/stock.slang
filter_linear31 = true
scale_type31 = source
-scale31 = 1.0
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
mipmap_input31 = true
-alias31 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader32 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear32 = true
scale_type32 = source
scale32 = 1.0
-float_framebuffer32 = true
-alias32 = "LinearizePass"
+mipmap_input32 = true
+alias32 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader33 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear33 = "false"
-scale_type33 = "source"
-scale33 = "1.0"
-wrap_mode33 = "clamp_to_border"
-mipmap_input33 = "false"
-alias33 = "SourceSDR"
-
-shader34 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader34 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear34 = "false"
scale_type34 = "source"
scale34 = "1.0"
wrap_mode34 = "clamp_to_border"
mipmap_input34 = "false"
-alias34 = "SourceHDR"
+alias34 = "SourceSDR"
+float_framebuffer34 = "true"
-shader35 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader35 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear35 = "false"
+scale_type35 = "source"
+scale35 = "1.0"
wrap_mode35 = "clamp_to_border"
mipmap_input35 = "false"
-alias35 = ""
-float_framebuffer35 = "false"
-srgb_framebuffer35 = "false"
-scale_type35 = "viewport"
+alias35 = "SourceHDR"
+float_framebuffer35 = "true"
-shader36 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias36 = "MBZ_PostCRTPass"
+shader36 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear36 = "false"
+wrap_mode36 = "clamp_to_border"
+mipmap_input36 = "false"
+alias36 = ""
+float_framebuffer36 = "false"
+srgb_framebuffer36 = "false"
+scale_type36 = "viewport"
+
+shader37 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias37 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader37 = ../../shaders/base/linearize-crt.slang
-mipmap_input37 = true
-filter_linear37 = true
-scale_type37 = absolute
-// scale_x37 = 480
-// scale_y37 = 270
-// scale_x37 = 960
-// scale_y37 = 540
-scale_x37 = 800
-scale_y37 = 600
-alias37 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader38 = ../../shaders/base/linearize-crt.slang
mipmap_input38 = true
filter_linear38 = true
+scale_type38 = absolute
+// scale_x38 = 480
+// scale_y38 = 270
+// scale_x38 = 960
+// scale_y38 = 540
+scale_x38 = 800
+scale_y38 = 600
+alias38 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input39 = true
+filter_linear39 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear39 = true
-alias39 = "BR_MirrorBlurredPass"
+shader40 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear40 = true
+alias40 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input40 = true
-filter_linear40 = true
-scale_type40 = absolute
-scale_x40 = 128
-scale_y40 = 128
-alias40 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input41 = true
filter_linear41 = true
scale_type41 = absolute
-scale_x41 = 12
-scale_y41 = 12
-alias41 = "BR_MirrorFullscreenGlowPass"
+scale_x41 = 128
+scale_y41 = 128
+alias41 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input42 = true
+filter_linear42 = true
+scale_type42 = absolute
+scale_x42 = 12
+scale_y42 = 12
+alias42 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader42 = ../../shaders/base/reflection.slang
-scale_type42 = viewport
-float_framebuffer42 = true
-alias42 = "BR_CRTAndReflectionPass"
+shader43 = ../../shaders/base/reflection.slang
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader43 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear43 = true
-scale_type43 = viewport
-float_framebuffer43 = true
-alias43 = "BR_LayersUnderCRTPass"
-
-shader44 = ../../shaders/base/bezel-images-over-crt.slang
+shader44 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear44 = true
scale_type44 = viewport
float_framebuffer44 = true
-alias44 = "BR_LayersOverCRTPass"
+alias44 = "BR_LayersUnderCRTPass"
+
+shader45 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear45 = true
+scale_type45 = viewport
+float_framebuffer45 = true
+alias45 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader45 = ../../shaders/base/combine-passes.slang
-scale_type45 = viewport
-alias45 = "CombinePass"
+shader46 = ../../shaders/base/combine-passes.slang
+scale_type46 = viewport
+alias46 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -319,6 +324,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -353,6 +362,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// Sony Megatron Color Monitor
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-RESHADE-FX__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-RESHADE-FX__GDV.slangp
index d086bac..45df61a 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-RESHADE-FX__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-RESHADE-FX__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 52
+shaders = 53
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,279 +54,282 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = "../../../../reshade/shaders/bloom/BloomPass0.slang"
-filter_linear19 = "true"
-wrap_mode19 = "clamp_to_border"
-mipmap_input19 = "false"
-alias19 = "SamplerBloom1"
-float_framebuffer19 = "true"
-srgb_framebuffer19 = "false"
-scale_type_x19 = "source"
-scale_x19 = "4.000000"
-scale_type_y19 = "source"
-scale_y19 = "4.000000"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = "../../../../reshade/shaders/bloom/BloomPass1.slang"
+shader20 = "../../../../reshade/shaders/bloom/BloomPass0.slang"
filter_linear20 = "true"
wrap_mode20 = "clamp_to_border"
mipmap_input20 = "false"
-alias20 = "SamplerBloom2"
+alias20 = "SamplerBloom1"
float_framebuffer20 = "true"
srgb_framebuffer20 = "false"
+scale_type_x20 = "source"
+scale_x20 = "4.000000"
+scale_type_y20 = "source"
+scale_y20 = "4.000000"
-shader21 = "../../../../reshade/shaders/bloom/BloomPass2.slang"
+shader21 = "../../../../reshade/shaders/bloom/BloomPass1.slang"
filter_linear21 = "true"
wrap_mode21 = "clamp_to_border"
mipmap_input21 = "false"
-alias21 = "SamplerBloom3"
+alias21 = "SamplerBloom2"
float_framebuffer21 = "true"
srgb_framebuffer21 = "false"
-shader22 = "../../../../reshade/shaders/bloom/BloomPass3.slang"
+shader22 = "../../../../reshade/shaders/bloom/BloomPass2.slang"
filter_linear22 = "true"
wrap_mode22 = "clamp_to_border"
mipmap_input22 = "false"
-alias22 = "SamplerBloom4"
+alias22 = "SamplerBloom3"
float_framebuffer22 = "true"
srgb_framebuffer22 = "false"
-shader23 = "../../../../reshade/shaders/bloom/BloomPass4.slang"
+shader23 = "../../../../reshade/shaders/bloom/BloomPass3.slang"
filter_linear23 = "true"
wrap_mode23 = "clamp_to_border"
mipmap_input23 = "false"
-alias23 = "SamplerBloom5"
+alias23 = "SamplerBloom4"
float_framebuffer23 = "true"
srgb_framebuffer23 = "false"
-shader24 = "../../../../reshade/shaders/bloom/LensFlarePass0.slang"
+shader24 = "../../../../reshade/shaders/bloom/BloomPass4.slang"
filter_linear24 = "true"
wrap_mode24 = "clamp_to_border"
mipmap_input24 = "false"
-alias24 = "LensFlare1"
+alias24 = "SamplerBloom5"
float_framebuffer24 = "true"
srgb_framebuffer24 = "false"
-shader25 = "../../../../reshade/shaders/bloom/LensFlarePass1.slang"
+shader25 = "../../../../reshade/shaders/bloom/LensFlarePass0.slang"
filter_linear25 = "true"
wrap_mode25 = "clamp_to_border"
mipmap_input25 = "false"
-alias25 = "LensFlare2"
+alias25 = "LensFlare1"
float_framebuffer25 = "true"
srgb_framebuffer25 = "false"
-shader26 = "../../../../reshade/shaders/bloom/LensFlarePass2.slang"
+shader26 = "../../../../reshade/shaders/bloom/LensFlarePass1.slang"
filter_linear26 = "true"
wrap_mode26 = "clamp_to_border"
mipmap_input26 = "false"
-alias26 = "LensFlare3"
+alias26 = "LensFlare2"
float_framebuffer26 = "true"
srgb_framebuffer26 = "false"
-shader27 = "../../../../reshade/shaders/bloom/LightingCombine.slang"
+shader27 = "../../../../reshade/shaders/bloom/LensFlarePass2.slang"
filter_linear27 = "true"
wrap_mode27 = "clamp_to_border"
mipmap_input27 = "false"
-alias27 = ""
-float_framebuffer27 = "false"
+alias27 = "LensFlare3"
+float_framebuffer27 = "true"
srgb_framebuffer27 = "false"
-scale_type_x27 = "source"
-scale_x27 = "0.250000"
-scale_type_y27 = "source"
-scale_y27 = "0.250000"
-shader28 = ../../shaders/base/stock.slang
-alias28 = "PreCRTPass"
+shader28 = "../../../../reshade/shaders/bloom/LightingCombine.slang"
+filter_linear28 = "true"
+wrap_mode28 = "clamp_to_border"
+mipmap_input28 = "false"
+alias28 = ""
+float_framebuffer28 = "false"
+srgb_framebuffer28 = "false"
+scale_type_x28 = "source"
+scale_x28 = "0.250000"
+scale_type_y28 = "source"
+scale_y28 = "0.250000"
-shader29 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear29 = true
-scale_type29 = source
-scale29 = 1.0
-alias29 = "AfterglowPass"
+shader29 = ../../shaders/base/stock.slang
+alias29 = "PreCRTPass"
-shader30 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader30 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear30 = true
scale_type30 = source
-mipmap_input30 = true
scale30 = 1.0
+alias30 = "AfterglowPass"
+
+shader31 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear31 = true
+scale_type31 = source
+mipmap_input31 = true
+scale31 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader31 = ../../shaders/dogway/hsm-grade.slang
-filter_linear31 = true
-scale_type31 = source
-scale31 = 1.0
-
-shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader32 = ../../shaders/dogway/hsm-grade.slang
filter_linear32 = true
scale_type32 = source
-scale_x32 = 1.0
-scale_y32 = 1.0
+scale32 = 1.0
-shader33 = ../../shaders/base/stock.slang
+shader33 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear33 = true
scale_type33 = source
scale_x33 = 1.0
scale_y33 = 1.0
-alias33 = "PrePass"
-mipmap_input33 = true
-shader34 = ../../shaders/guest/hsm-avg-lum.slang
+shader34 = ../../shaders/base/stock.slang
filter_linear34 = true
scale_type34 = source
-scale34 = 1.0
+scale_x34 = 1.0
+scale_y34 = 1.0
+alias34 = "PrePass"
mipmap_input34 = true
-alias34 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader35 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear35 = true
scale_type35 = source
scale35 = 1.0
-float_framebuffer35 = true
-alias35 = "LinearizePass"
+mipmap_input35 = true
+alias35 = "AvgLumPass"
-shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader36 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear36 = true
-scale_type_x36 = absolute
-scale_x36 = 800.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type36 = source
+scale36 = 1.0
float_framebuffer36 = true
+alias36 = "LinearizePass"
-shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear37 = true
scale_type_x37 = absolute
scale_x37 = 800.0
-scale_type_y37 = absolute
-scale_y37 = 600.0
+scale_type_y37 = source
+scale_y37 = 1.0
float_framebuffer37 = true
-alias37 = GlowPass
-shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 800.0
scale_type_y38 = absolute
-scale_y38 = 600.0
+scale_y38 = 600.0
float_framebuffer38 = true
+alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear39 = true
-scale_type_x39 = source
-scale_x39 = 1.0
-scale_type_y39 = source
-scale_y39 = 1.0
+scale_type_x39 = absolute
+scale_x39 = 800.0
+scale_type_y39 = absolute
+scale_y39 = 600.0
float_framebuffer39 = true
-alias39 = BloomPass
-shader40 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear40 = true
-float_framebuffer40 = true
-scale_type40 = viewport
+scale_type_x40 = source
scale_x40 = 1.0
+scale_type_y40 = source
scale_y40 = 1.0
+float_framebuffer40 = true
+alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-deconvergence.slang
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear41 = true
+float_framebuffer41 = true
scale_type41 = viewport
scale_x41 = 1.0
scale_y41 = 1.0
-shader42 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias42 = "MBZ_PostCRTPass"
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias43 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader43 = ../../shaders/base/linearize-crt.slang
-mipmap_input43 = true
-filter_linear43 = true
-scale_type43 = absolute
-// scale_x43 = 480
-// scale_y43 = 270
-// scale_x43 = 960
-// scale_y43 = 540
-scale_x43 = 800
-scale_y43 = 600
-alias43 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader44 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader44 = ../../shaders/base/linearize-crt.slang
mipmap_input44 = true
filter_linear44 = true
+scale_type44 = absolute
+// scale_x44 = 480
+// scale_y44 = 270
+// scale_x44 = 960
+// scale_y44 = 540
+scale_x44 = 800
+scale_y44 = 600
+alias44 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input45 = true
+filter_linear45 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader45 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear45 = true
-alias45 = "BR_MirrorBlurredPass"
+shader46 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear46 = true
+alias46 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input46 = true
-filter_linear46 = true
-scale_type46 = absolute
-scale_x46 = 128
-scale_y46 = 128
-alias46 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input47 = true
filter_linear47 = true
scale_type47 = absolute
-scale_x47 = 12
-scale_y47 = 12
-alias47 = "BR_MirrorFullscreenGlowPass"
+scale_x47 = 128
+scale_y47 = 128
+alias47 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input48 = true
+filter_linear48 = true
+scale_type48 = absolute
+scale_x48 = 12
+scale_y48 = 12
+alias48 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader48 = ../../shaders/base/reflection.slang
-scale_type48 = viewport
-float_framebuffer48 = true
-alias48 = "BR_CRTAndReflectionPass"
+shader49 = ../../shaders/base/reflection.slang
+scale_type49 = viewport
+float_framebuffer49 = true
+alias49 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader49 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear49 = true
-scale_type49 = viewport
-float_framebuffer49 = true
-alias49 = "BR_LayersUnderCRTPass"
-
-shader50 = ../../shaders/base/bezel-images-over-crt.slang
+shader50 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear50 = true
scale_type50 = viewport
float_framebuffer50 = true
-alias50 = "BR_LayersOverCRTPass"
+alias50 = "BR_LayersUnderCRTPass"
+
+shader51 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear51 = true
+scale_type51 = viewport
+float_framebuffer51 = true
+alias51 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader51 = ../../shaders/base/combine-passes.slang
-scale_type51 = viewport
-alias51 = "CombinePass"
+shader52 = ../../shaders/base/combine-passes.slang
+scale_type52 = viewport
+alias52 = "CombinePass"
// Define textures to be used by the different passes
-textures = "Dirt;Sprite;SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "Dirt;Sprite;SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
Dirt = ../../../../reshade/shaders/bloom/LensDB.png
Dirt_wrap_mode = "clamp_to_border"
@@ -396,6 +399,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..c6e758a
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,455 @@
+shaders = 53
+
+shader0 = ../../shaders/base/add-params-all.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-all-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-adv.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
+
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader18 = ../../shaders/base/stock.slang
+// filter_linear18 = "false"
+// wrap_mode18 = "clamp_to_border"
+// mipmap_input18 = "false"
+// float_framebuffer18 = "false"
+// srgb_framebuffer18 = "true"
+alias18 = XbrSource
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "2.000000"
+scale_type_y20 = "source"
+scale_y20 = "2.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear22 = "false"
+wrap_mode22 = "clamp_to_border"
+mipmap_input22 = "false"
+alias22 = ""
+float_framebuffer22 = "false"
+srgb_framebuffer22 = "true"
+scale_type_x22 = "source"
+scale_x22 = "1.000000"
+scale_type_y22 = "source"
+scale_y22 = "1.000000"
+
+shader23 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear23 = false
+scale_type_x23 = source
+scale_x23 = 1
+scale_type_y23 = source
+scale_y23 = 0.5
+wrap_mode23 = "clamp_to_edge"
+
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
+
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear25 = true
+scale_type25 = source
+scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
+
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
+float_framebuffer29 = true
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
+scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
+
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 0.5
+scale_y30 = 1.0
+
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear32 = true
+scale_type32 = source
+scale_x32 = 1.0
+scale_y32 = 1.0
+
+shader33 = ../../shaders/base/stock.slang
+filter_linear33 = true
+scale_type33 = source
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
+mipmap_input33 = true
+
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear34 = true
+scale_type34 = source
+scale34 = 1.0
+mipmap_input34 = true
+alias34 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear35 = true
+scale_type35 = source
+scale35 = 1.0
+float_framebuffer35 = true
+alias35 = "LinearizePass"
+
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear36 = true
+scale_type_x36 = viewport
+scale_x36 = 1.0
+scale_type_y36 = source
+scale_y36 = 1.0
+float_framebuffer36 = true
+alias36 = Pass1
+
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear37 = true
+scale_type_x37 = absolute
+scale_x37 = 640.0
+scale_type_y37 = source
+scale_y37 = 1.0
+float_framebuffer37 = true
+
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear38 = true
+scale_type_x38 = absolute
+scale_x38 = 640.0
+scale_type_y38 = absolute
+scale_y38 = 480.0
+float_framebuffer38 = true
+alias38 = GlowPass
+
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear39 = true
+scale_type_x39 = absolute
+scale_x39 = 640.0
+scale_type_y39 = absolute
+scale_y39 = 480.0
+float_framebuffer39 = true
+
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear40 = true
+scale_type_x40 = absolute
+scale_x40 = 640.0
+scale_type_y40 = absolute
+scale_y40 = 480.0
+float_framebuffer40 = true
+alias40 = BloomPass
+
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+filter_linear41 = true
+float_framebuffer41 = true
+scale_type41 = viewport
+scale_x41 = 1.0
+scale_y41 = 1.0
+
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias43 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader44 = ../../shaders/base/linearize-crt.slang
+mipmap_input44 = true
+filter_linear44 = true
+scale_type44 = absolute
+// scale_x44 = 480
+// scale_y44 = 270
+// scale_x44 = 960
+// scale_y44 = 540
+scale_x44 = 800
+scale_y44 = 600
+alias44 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input45 = true
+filter_linear45 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader46 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear46 = true
+alias46 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input47 = true
+filter_linear47 = true
+scale_type47 = absolute
+scale_x47 = 128
+scale_y47 = 128
+alias47 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input48 = true
+filter_linear48 = true
+scale_type48 = absolute
+scale_x48 = 12
+scale_y48 = 12
+alias48 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader49 = ../../shaders/base/reflection.slang
+scale_type49 = viewport
+float_framebuffer49 = true
+alias49 = "BR_CRTAndReflectionPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader50 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear50 = true
+scale_type50 = viewport
+float_framebuffer50 = true
+alias50 = "BR_LayersUnderCRTPass"
+
+shader51 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear51 = true
+scale_type51 = viewport
+float_framebuffer51 = true
+alias51 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader52 = ../../shaders/base/combine-passes.slang
+scale_type52 = viewport
+alias52 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..b04f5b9
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-SUPER-XBR__GDV.slangp
@@ -0,0 +1,430 @@
+shaders = 50
+
+shader0 = ../../shaders/base/add-params-all.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-all-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-adv.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
+
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader18 = ../../shaders/base/stock.slang
+// filter_linear18 = "false"
+// wrap_mode18 = "clamp_to_border"
+// mipmap_input18 = "false"
+// float_framebuffer18 = "false"
+// srgb_framebuffer18 = "true"
+alias18 = XbrSource
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "2.000000"
+scale_type_y20 = "source"
+scale_y20 = "2.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear22 = "false"
+wrap_mode22 = "clamp_to_border"
+mipmap_input22 = "false"
+alias22 = ""
+float_framebuffer22 = "false"
+srgb_framebuffer22 = "true"
+scale_type_x22 = "source"
+scale_x22 = "1.000000"
+scale_type_y22 = "source"
+scale_y22 = "1.000000"
+
+shader23 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear23 = false
+scale_type_x23 = source
+scale_x23 = 1
+scale_type_y23 = source
+scale_y23 = 0.5
+wrap_mode23 = "clamp_to_edge"
+
+// GTU TV Processing
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
+float_framebuffer24 = true
+
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
+
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
+
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader29 = ../../shaders/dogway/hsm-grade.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 1.0
+scale_y30 = 1.0
+
+shader31 = ../../shaders/base/stock.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
+mipmap_input31 = true
+
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear32 = true
+scale_type32 = source
+scale32 = 1.0
+mipmap_input32 = true
+alias32 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
+
+shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear34 = true
+scale_type_x34 = absolute
+scale_x34 = 800.0
+scale_type_y34 = source
+scale_y34 = 1.0
+float_framebuffer34 = true
+
+shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear35 = true
+scale_type_x35 = absolute
+scale_x35 = 800.0
+scale_type_y35 = absolute
+scale_y35 = 600.0
+float_framebuffer35 = true
+alias35 = GlowPass
+
+shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear36 = true
+scale_type_x36 = absolute
+scale_x36 = 800.0
+scale_type_y36 = absolute
+scale_y36 = 600.0
+float_framebuffer36 = true
+
+shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear37 = true
+scale_type_x37 = source
+scale_x37 = 1.0
+scale_type_y37 = source
+scale_y37 = 1.0
+float_framebuffer37 = true
+alias37 = BloomPass
+
+shader38 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+filter_linear38 = true
+float_framebuffer38 = true
+scale_type38 = viewport
+scale_x38 = 1.0
+scale_y38 = 1.0
+
+shader39 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear39 = true
+scale_type39 = viewport
+scale_x39 = 1.0
+scale_y39 = 1.0
+
+shader40 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias40 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader41 = ../../shaders/base/linearize-crt.slang
+mipmap_input41 = true
+filter_linear41 = true
+scale_type41 = absolute
+// scale_x41 = 480
+// scale_y41 = 270
+// scale_x41 = 960
+// scale_y41 = 540
+scale_x41 = 800
+scale_y41 = 600
+alias41 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader42 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input42 = true
+filter_linear42 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader43 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear43 = true
+alias43 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input44 = true
+filter_linear44 = true
+scale_type44 = absolute
+scale_x44 = 128
+scale_y44 = 128
+alias44 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader45 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input45 = true
+filter_linear45 = true
+scale_type45 = absolute
+scale_x45 = 12
+scale_y45 = 12
+alias45 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader46 = ../../shaders/base/reflection.slang
+scale_type46 = viewport
+float_framebuffer46 = true
+alias46 = "BR_CRTAndReflectionPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader47 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear47 = true
+scale_type47 = viewport
+float_framebuffer47 = true
+alias47 = "BR_LayersUnderCRTPass"
+
+shader48 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear48 = true
+scale_type48 = viewport
+float_framebuffer48 = true
+alias48 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader49 = ../../shaders/base/combine-passes.slang
+scale_type49 = viewport
+alias49 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__EASYMODE.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__EASYMODE.slangp
index bc18c33..2f2ad6a 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__EASYMODE.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__EASYMODE.slangp
@@ -1,4 +1,4 @@
-shaders = 41
+shaders = 42
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,170 +54,173 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/easymode/hsm-crt-easymode-blur_horiz.slang
-filter_linear27 = false
-srgb_framebuffer27 = true
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/easymode/hsm-crt-easymode-blur_vert.slang
+shader28 = ../../shaders/easymode/hsm-crt-easymode-blur_horiz.slang
filter_linear28 = false
srgb_framebuffer28 = true
-shader29 = ../../shaders/easymode/hsm-crt-easymode-threshold.slang
+shader29 = ../../shaders/easymode/hsm-crt-easymode-blur_vert.slang
filter_linear29 = false
srgb_framebuffer29 = true
-// Easymode's Shader!
-shader30 = ../../shaders/easymode/hsm-crt-easymode-halation.slang
-filter_linear30 = true
-scale_type30 = viewport
-float_framebuffer30 = true
+shader30 = ../../shaders/easymode/hsm-crt-easymode-threshold.slang
+filter_linear30 = false
+srgb_framebuffer30 = true
-shader31 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias31 = "MBZ_PostCRTPass"
+// Easymode's Shader!
+shader31 = ../../shaders/easymode/hsm-crt-easymode-halation.slang
+filter_linear31 = true
+scale_type31 = viewport
+float_framebuffer31 = true
+
+shader32 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias32 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader32 = ../../shaders/base/linearize-crt.slang
-mipmap_input32 = true
-filter_linear32 = true
-scale_type32 = absolute
-// scale_x32 = 480
-// scale_y32 = 270
-// scale_x32 = 960
-// scale_y32 = 540
-scale_x32 = 800
-scale_y32 = 600
-alias32 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader33 = ../../shaders/base/linearize-crt.slang
mipmap_input33 = true
filter_linear33 = true
+scale_type33 = absolute
+// scale_x33 = 480
+// scale_y33 = 270
+// scale_x33 = 960
+// scale_y33 = 540
+scale_x33 = 800
+scale_y33 = 600
+alias33 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader34 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input34 = true
+filter_linear34 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader34 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear34 = true
-alias34 = "BR_MirrorBlurredPass"
+shader35 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear35 = true
+alias35 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-scale_x35 = 128
-scale_y35 = 128
-alias35 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input36 = true
filter_linear36 = true
scale_type36 = absolute
-scale_x36 = 12
-scale_y36 = 12
-alias36 = "BR_MirrorFullscreenGlowPass"
+scale_x36 = 128
+scale_y36 = 128
+alias36 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input37 = true
+filter_linear37 = true
+scale_type37 = absolute
+scale_x37 = 12
+scale_y37 = 12
+alias37 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader37 = ../../shaders/base/reflection.slang
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_CRTAndReflectionPass"
+shader38 = ../../shaders/base/reflection.slang
+scale_type38 = viewport
+float_framebuffer38 = true
+alias38 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader38 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear38 = true
-scale_type38 = viewport
-float_framebuffer38 = true
-alias38 = "BR_LayersUnderCRTPass"
-
-shader39 = ../../shaders/base/bezel-images-over-crt.slang
+shader39 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear39 = true
scale_type39 = viewport
float_framebuffer39 = true
-alias39 = "BR_LayersOverCRTPass"
+alias39 = "BR_LayersUnderCRTPass"
+
+shader40 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear40 = true
+scale_type40 = viewport
+float_framebuffer40 = true
+alias40 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader40 = ../../shaders/base/combine-passes.slang
-scale_type40 = viewport
-alias40 = "CombinePass"
+shader41 = ../../shaders/base/combine-passes.slang
+scale_type41 = viewport
+alias41 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -279,6 +282,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp
index 49f6c1d..050e6ed 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 41
+shaders = 42
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,174 +54,177 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
-shader29 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+float_framebuffer29 = true
+alias29 = "LinearizePass"
-shader30 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
-scale_type30 = viewport
-scale_x30 = 1.0
-scale_y30 = 1.0
-filter_linear30 = true
+shader30 = ../../shaders/base/delinearize.slang
+
+shader31 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
+scale_type31 = viewport
+scale_x31 = 1.0
+scale_y31 = 1.0
+filter_linear31 = true
g_sat = 0.15
-shader31 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias31 = "MBZ_PostCRTPass"
+shader32 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias32 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader32 = ../../shaders/base/linearize-crt.slang
-mipmap_input32 = true
-filter_linear32 = true
-scale_type32 = absolute
-// scale_x32 = 480
-// scale_y32 = 270
-// scale_x32 = 960
-// scale_y32 = 540
-scale_x32 = 800
-scale_y32 = 600
-alias32 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader33 = ../../shaders/base/linearize-crt.slang
mipmap_input33 = true
filter_linear33 = true
+scale_type33 = absolute
+// scale_x33 = 480
+// scale_y33 = 270
+// scale_x33 = 960
+// scale_y33 = 540
+scale_x33 = 800
+scale_y33 = 600
+alias33 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader34 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input34 = true
+filter_linear34 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader34 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear34 = true
-alias34 = "BR_MirrorBlurredPass"
+shader35 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear35 = true
+alias35 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-scale_x35 = 128
-scale_y35 = 128
-alias35 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input36 = true
filter_linear36 = true
scale_type36 = absolute
-scale_x36 = 12
-scale_y36 = 12
-alias36 = "BR_MirrorFullscreenGlowPass"
+scale_x36 = 128
+scale_y36 = 128
+alias36 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input37 = true
+filter_linear37 = true
+scale_type37 = absolute
+scale_x37 = 12
+scale_y37 = 12
+alias37 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader37 = ../../shaders/base/reflection.slang
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_CRTAndReflectionPass"
+shader38 = ../../shaders/base/reflection.slang
+scale_type38 = viewport
+float_framebuffer38 = true
+alias38 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader38 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear38 = true
-scale_type38 = viewport
-float_framebuffer38 = true
-alias38 = "BR_LayersUnderCRTPass"
-
-shader39 = ../../shaders/base/bezel-images-over-crt.slang
+shader39 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear39 = true
scale_type39 = viewport
float_framebuffer39 = true
-alias39 = "BR_LayersOverCRTPass"
+alias39 = "BR_LayersUnderCRTPass"
+
+shader40 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear40 = true
+scale_type40 = viewport
+float_framebuffer40 = true
+alias40 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader40 = ../../shaders/base/combine-passes.slang
-scale_type40 = viewport
-alias40 = "CombinePass"
+shader41 = ../../shaders/base/combine-passes.slang
+scale_type41 = viewport
+alias41 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -283,6 +286,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI.slangp
index 3167ba6..8bed660 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI.slangp
@@ -1,4 +1,4 @@
-shaders = 39
+shaders = 40
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,162 +54,165 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
-scale_type28 = viewport
-scale_x28 = 1.0
-scale_y28 = 1.0
-filter_linear28 = true
+shader28 = ../../shaders/base/delinearize.slang
+
+shader29 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
+scale_type29 = viewport
+scale_x29 = 1.0
+scale_y29 = 1.0
+filter_linear29 = true
g_sat = 0.15
-shader29 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias29 = "MBZ_PostCRTPass"
+shader30 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias30 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader30 = ../../shaders/base/linearize-crt.slang
-mipmap_input30 = true
-filter_linear30 = true
-scale_type30 = absolute
-// scale_x30 = 480
-// scale_y30 = 270
-// scale_x30 = 960
-// scale_y30 = 540
-scale_x30 = 800
-scale_y30 = 600
-alias30 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader31 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader31 = ../../shaders/base/linearize-crt.slang
mipmap_input31 = true
filter_linear31 = true
+scale_type31 = absolute
+// scale_x31 = 480
+// scale_y31 = 270
+// scale_x31 = 960
+// scale_y31 = 540
+scale_x31 = 800
+scale_y31 = 600
+alias31 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input32 = true
+filter_linear32 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear32 = true
-alias32 = "BR_MirrorBlurredPass"
+shader33 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear33 = true
+alias33 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader33 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input33 = true
-filter_linear33 = true
-scale_type33 = absolute
-scale_x33 = 128
-scale_y33 = 128
-alias33 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input34 = true
filter_linear34 = true
scale_type34 = absolute
-scale_x34 = 12
-scale_y34 = 12
-alias34 = "BR_MirrorFullscreenGlowPass"
+scale_x34 = 128
+scale_y34 = 128
+alias34 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input35 = true
+filter_linear35 = true
+scale_type35 = absolute
+scale_x35 = 12
+scale_y35 = 12
+alias35 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader35 = ../../shaders/base/reflection.slang
-scale_type35 = viewport
-float_framebuffer35 = true
-alias35 = "BR_CRTAndReflectionPass"
+shader36 = ../../shaders/base/reflection.slang
+scale_type36 = viewport
+float_framebuffer36 = true
+alias36 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader36 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear36 = true
-scale_type36 = viewport
-float_framebuffer36 = true
-alias36 = "BR_LayersUnderCRTPass"
-
-shader37 = ../../shaders/base/bezel-images-over-crt.slang
+shader37 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear37 = true
scale_type37 = viewport
float_framebuffer37 = true
-alias37 = "BR_LayersOverCRTPass"
+alias37 = "BR_LayersUnderCRTPass"
+
+shader38 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear38 = true
+scale_type38 = viewport
+float_framebuffer38 = true
+alias38 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader38 = ../../shaders/base/combine-passes.slang
-scale_type38 = viewport
-alias38 = "CombinePass"
+shader39 = ../../shaders/base/combine-passes.slang
+scale_type39 = viewport
+alias39 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -271,6 +274,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-NTSC.slangp
index 9bc88e0..3db88d7 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 46
+shaders = 47
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,220 +54,223 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
-shader29 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear29 = true
-scale_type_x29 = viewport
-scale_x29 = 1.0
-scale_type_y29 = source
-scale_y29 = 1.0
+scale_type29 = source
+scale29 = 1.0
float_framebuffer29 = true
-alias29 = Pass1
+alias29 = "LinearizePass"
-shader30 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader30 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear30 = true
-scale_type_x30 = absolute
-scale_x30 = 640.0
+scale_type_x30 = viewport
+scale_x30 = 1.0
scale_type_y30 = source
-scale_y30 = 1.0
+scale_y30 = 1.0
float_framebuffer30 = true
+alias30 = Pass1
-shader31 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear31 = true
scale_type_x31 = absolute
scale_x31 = 640.0
-scale_type_y31 = absolute
-scale_y31 = 480.0
+scale_type_y31 = source
+scale_y31 = 1.0
float_framebuffer31 = true
-alias31 = GlowPass
-shader32 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear32 = true
scale_type_x32 = absolute
scale_x32 = 640.0
scale_type_y32 = absolute
-scale_y32 = 480.0
+scale_y32 = 480.0
float_framebuffer32 = true
+alias32 = GlowPass
-shader33 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear33 = true
scale_type_x33 = absolute
scale_x33 = 640.0
scale_type_y33 = absolute
-scale_y33 = 480.0
+scale_y33 = 480.0
float_framebuffer33 = true
-alias33 = BloomPass
-shader34 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear34 = true
+scale_type_x34 = absolute
+scale_x34 = 640.0
+scale_type_y34 = absolute
+scale_y34 = 480.0
float_framebuffer34 = true
-scale_type34 = viewport
-scale_x34 = 1.0
-scale_y34 = 1.0
+alias34 = BloomPass
-shader35 = ../../shaders/guest/hsm-deconvergence.slang
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear35 = true
+float_framebuffer35 = true
scale_type35 = viewport
scale_x35 = 1.0
scale_y35 = 1.0
-shader36 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias36 = "MBZ_PostCRTPass"
+shader36 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear36 = true
+scale_type36 = viewport
+scale_x36 = 1.0
+scale_y36 = 1.0
+
+shader37 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias37 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader37 = ../../shaders/base/linearize-crt.slang
-mipmap_input37 = true
-filter_linear37 = true
-scale_type37 = absolute
-// scale_x37 = 480
-// scale_y37 = 270
-// scale_x37 = 960
-// scale_y37 = 540
-scale_x37 = 800
-scale_y37 = 600
-alias37 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader38 = ../../shaders/base/linearize-crt.slang
mipmap_input38 = true
filter_linear38 = true
+scale_type38 = absolute
+// scale_x38 = 480
+// scale_y38 = 270
+// scale_x38 = 960
+// scale_y38 = 540
+scale_x38 = 800
+scale_y38 = 600
+alias38 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input39 = true
+filter_linear39 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear39 = true
-alias39 = "BR_MirrorBlurredPass"
+shader40 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear40 = true
+alias40 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input40 = true
-filter_linear40 = true
-scale_type40 = absolute
-scale_x40 = 128
-scale_y40 = 128
-alias40 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input41 = true
filter_linear41 = true
scale_type41 = absolute
-scale_x41 = 12
-scale_y41 = 12
-alias41 = "BR_MirrorFullscreenGlowPass"
+scale_x41 = 128
+scale_y41 = 128
+alias41 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input42 = true
+filter_linear42 = true
+scale_type42 = absolute
+scale_x42 = 12
+scale_y42 = 12
+alias42 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader42 = ../../shaders/base/reflection.slang
-scale_type42 = viewport
-float_framebuffer42 = true
-alias42 = "BR_CRTAndReflectionPass"
+shader43 = ../../shaders/base/reflection.slang
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader43 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear43 = true
-scale_type43 = viewport
-float_framebuffer43 = true
-alias43 = "BR_LayersUnderCRTPass"
-
-shader44 = ../../shaders/base/bezel-images-over-crt.slang
+shader44 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear44 = true
scale_type44 = viewport
float_framebuffer44 = true
-alias44 = "BR_LayersOverCRTPass"
+alias44 = "BR_LayersUnderCRTPass"
+
+shader45 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear45 = true
+scale_type45 = viewport
+float_framebuffer45 = true
+alias45 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader45 = ../../shaders/base/combine-passes.slang
-scale_type45 = viewport
-alias45 = "CombinePass"
+shader46 = ../../shaders/base/combine-passes.slang
+scale_type46 = viewport
+alias46 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -329,6 +332,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV.slangp
index 564e262..51fac52 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 43
+shaders = 44
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,199 +54,202 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear27 = true
-scale_type_x27 = absolute
-scale_x27 = 800.0
-scale_type_y27 = source
-scale_y27 = 1.0
+scale_type27 = source
+scale27 = 1.0
float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear28 = true
scale_type_x28 = absolute
scale_x28 = 800.0
-scale_type_y28 = absolute
-scale_y28 = 600.0
+scale_type_y28 = source
+scale_y28 = 1.0
float_framebuffer28 = true
-alias28 = GlowPass
-shader29 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_y29 = 600.0
float_framebuffer29 = true
+alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear30 = true
-scale_type_x30 = source
-scale_x30 = 1.0
-scale_type_y30 = source
-scale_y30 = 1.0
+scale_type_x30 = absolute
+scale_x30 = 800.0
+scale_type_y30 = absolute
+scale_y30 = 600.0
float_framebuffer30 = true
-alias30 = BloomPass
-shader31 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear31 = true
-float_framebuffer31 = true
-scale_type31 = viewport
+scale_type_x31 = source
scale_x31 = 1.0
+scale_type_y31 = source
scale_y31 = 1.0
+float_framebuffer31 = true
+alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-deconvergence.slang
+shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear32 = true
+float_framebuffer32 = true
scale_type32 = viewport
scale_x32 = 1.0
scale_y32 = 1.0
-shader33 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias33 = "MBZ_PostCRTPass"
+shader33 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear33 = true
+scale_type33 = viewport
+scale_x33 = 1.0
+scale_y33 = 1.0
+
+shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias34 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader34 = ../../shaders/base/linearize-crt.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-// scale_x34 = 480
-// scale_y34 = 270
-// scale_x34 = 960
-// scale_y34 = 540
-scale_x34 = 800
-scale_y34 = 600
-alias34 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader35 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader35 = ../../shaders/base/linearize-crt.slang
mipmap_input35 = true
filter_linear35 = true
+scale_type35 = absolute
+// scale_x35 = 480
+// scale_y35 = 270
+// scale_x35 = 960
+// scale_y35 = 540
+scale_x35 = 800
+scale_y35 = 600
+alias35 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input36 = true
+filter_linear36 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear36 = true
-alias36 = "BR_MirrorBlurredPass"
+shader37 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear37 = true
+alias37 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input37 = true
-filter_linear37 = true
-scale_type37 = absolute
-scale_x37 = 128
-scale_y37 = 128
-alias37 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input38 = true
filter_linear38 = true
scale_type38 = absolute
-scale_x38 = 12
-scale_y38 = 12
-alias38 = "BR_MirrorFullscreenGlowPass"
+scale_x38 = 128
+scale_y38 = 128
+alias38 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input39 = true
+filter_linear39 = true
+scale_type39 = absolute
+scale_x39 = 12
+scale_y39 = 12
+alias39 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader39 = ../../shaders/base/reflection.slang
-scale_type39 = viewport
-float_framebuffer39 = true
-alias39 = "BR_CRTAndReflectionPass"
+shader40 = ../../shaders/base/reflection.slang
+scale_type40 = viewport
+float_framebuffer40 = true
+alias40 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader40 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear40 = true
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_LayersUnderCRTPass"
-
-shader41 = ../../shaders/base/bezel-images-over-crt.slang
+shader41 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear41 = true
scale_type41 = viewport
float_framebuffer41 = true
-alias41 = "BR_LayersOverCRTPass"
+alias41 = "BR_LayersUnderCRTPass"
+
+shader42 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear42 = true
+scale_type42 = viewport
+float_framebuffer42 = true
+alias42 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader42 = ../../shaders/base/combine-passes.slang
-scale_type42 = viewport
-alias42 = "CombinePass"
+shader43 = ../../shaders/base/combine-passes.slang
+scale_type43 = viewport
+alias43 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -308,6 +311,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__LCD-GRID.slangp
index f15ce02..385386f 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__LCD-GRID.slangp
@@ -1,4 +1,4 @@
-shaders = 39
+shaders = 40
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,159 +54,162 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear28 = "false"
-scale_type28 = "viewport"
-scale28 = "1.0"
+shader28 = ../../shaders/base/delinearize.slang
-shader29 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias29 = "MBZ_PostCRTPass"
+shader29 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear29 = "false"
+scale_type29 = "viewport"
+scale29 = "1.0"
+
+shader30 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias30 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader30 = ../../shaders/base/linearize-crt.slang
-mipmap_input30 = true
-filter_linear30 = true
-scale_type30 = absolute
-// scale_x30 = 480
-// scale_y30 = 270
-// scale_x30 = 960
-// scale_y30 = 540
-scale_x30 = 800
-scale_y30 = 600
-alias30 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader31 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader31 = ../../shaders/base/linearize-crt.slang
mipmap_input31 = true
filter_linear31 = true
+scale_type31 = absolute
+// scale_x31 = 480
+// scale_y31 = 270
+// scale_x31 = 960
+// scale_y31 = 540
+scale_x31 = 800
+scale_y31 = 600
+alias31 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input32 = true
+filter_linear32 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear32 = true
-alias32 = "BR_MirrorBlurredPass"
+shader33 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear33 = true
+alias33 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader33 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input33 = true
-filter_linear33 = true
-scale_type33 = absolute
-scale_x33 = 128
-scale_y33 = 128
-alias33 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input34 = true
filter_linear34 = true
scale_type34 = absolute
-scale_x34 = 12
-scale_y34 = 12
-alias34 = "BR_MirrorFullscreenGlowPass"
+scale_x34 = 128
+scale_y34 = 128
+alias34 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input35 = true
+filter_linear35 = true
+scale_type35 = absolute
+scale_x35 = 12
+scale_y35 = 12
+alias35 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader35 = ../../shaders/base/reflection.slang
-scale_type35 = viewport
-float_framebuffer35 = true
-alias35 = "BR_CRTAndReflectionPass"
+shader36 = ../../shaders/base/reflection.slang
+scale_type36 = viewport
+float_framebuffer36 = true
+alias36 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader36 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear36 = true
-scale_type36 = viewport
-float_framebuffer36 = true
-alias36 = "BR_LayersUnderCRTPass"
-
-shader37 = ../../shaders/base/bezel-images-over-crt.slang
+shader37 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear37 = true
scale_type37 = viewport
float_framebuffer37 = true
-alias37 = "BR_LayersOverCRTPass"
+alias37 = "BR_LayersUnderCRTPass"
+
+shader38 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear38 = true
+scale_type38 = viewport
+float_framebuffer38 = true
+alias38 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader38 = ../../shaders/base/combine-passes.slang
-scale_type38 = viewport
-alias38 = "CombinePass"
+shader39 = ../../shaders/base/combine-passes.slang
+scale_type39 = viewport
+alias39 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -268,6 +271,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON-NTSC.slangp
index 1ee3f11..e5cd610 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 42
+shaders = 43
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,191 +54,196 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+float_framebuffer29 = true
+alias29 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader29 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear29 = "false"
-scale_type29 = "source"
-scale29 = "1.0"
-wrap_mode29 = "clamp_to_border"
-mipmap_input29 = "false"
-alias29 = "SourceSDR"
-
-shader30 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader30 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear30 = "false"
scale_type30 = "source"
scale30 = "1.0"
wrap_mode30 = "clamp_to_border"
mipmap_input30 = "false"
-alias30 = "SourceHDR"
+alias30 = "SourceSDR"
+float_framebuffer30 = "true"
-shader31 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader31 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear31 = "false"
+scale_type31 = "source"
+scale31 = "1.0"
wrap_mode31 = "clamp_to_border"
mipmap_input31 = "false"
-alias31 = ""
-float_framebuffer31 = "false"
-srgb_framebuffer31 = "false"
-scale_type31 = "viewport"
+alias31 = "SourceHDR"
+float_framebuffer31 = "true"
-shader32 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias32 = "MBZ_PostCRTPass"
+shader32 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear32 = "false"
+wrap_mode32 = "clamp_to_border"
+mipmap_input32 = "false"
+alias32 = ""
+float_framebuffer32 = "false"
+srgb_framebuffer32 = "false"
+scale_type32 = "viewport"
+
+shader33 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias33 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader33 = ../../shaders/base/linearize-crt.slang
-mipmap_input33 = true
-filter_linear33 = true
-scale_type33 = absolute
-// scale_x33 = 480
-// scale_y33 = 270
-// scale_x33 = 960
-// scale_y33 = 540
-scale_x33 = 800
-scale_y33 = 600
-alias33 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader34 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader34 = ../../shaders/base/linearize-crt.slang
mipmap_input34 = true
filter_linear34 = true
+scale_type34 = absolute
+// scale_x34 = 480
+// scale_y34 = 270
+// scale_x34 = 960
+// scale_y34 = 540
+scale_x34 = 800
+scale_y34 = 600
+alias34 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader35 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input35 = true
+filter_linear35 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader35 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear35 = true
-alias35 = "BR_MirrorBlurredPass"
+shader36 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear36 = true
+alias36 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input36 = true
-filter_linear36 = true
-scale_type36 = absolute
-scale_x36 = 128
-scale_y36 = 128
-alias36 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input37 = true
filter_linear37 = true
scale_type37 = absolute
-scale_x37 = 12
-scale_y37 = 12
-alias37 = "BR_MirrorFullscreenGlowPass"
+scale_x37 = 128
+scale_y37 = 128
+alias37 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input38 = true
+filter_linear38 = true
+scale_type38 = absolute
+scale_x38 = 12
+scale_y38 = 12
+alias38 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader38 = ../../shaders/base/reflection.slang
-scale_type38 = viewport
-float_framebuffer38 = true
-alias38 = "BR_CRTAndReflectionPass"
+shader39 = ../../shaders/base/reflection.slang
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader39 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear39 = true
-scale_type39 = viewport
-float_framebuffer39 = true
-alias39 = "BR_LayersUnderCRTPass"
-
-shader40 = ../../shaders/base/bezel-images-over-crt.slang
+shader40 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear40 = true
scale_type40 = viewport
float_framebuffer40 = true
-alias40 = "BR_LayersOverCRTPass"
+alias40 = "BR_LayersUnderCRTPass"
+
+shader41 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear41 = true
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader41 = ../../shaders/base/combine-passes.slang
-scale_type41 = viewport
-alias41 = "CombinePass"
+shader42 = ../../shaders/base/combine-passes.slang
+scale_type42 = viewport
+alias42 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -300,6 +305,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON.slangp
index 07e66f3..341731e 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON.slangp
@@ -1,4 +1,4 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,179 +54,184 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader27 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear27 = "false"
-scale_type27 = "source"
-scale27 = "1.0"
-wrap_mode27 = "clamp_to_border"
-mipmap_input27 = "false"
-alias27 = "SourceSDR"
-
-shader28 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader28 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear28 = "false"
scale_type28 = "source"
scale28 = "1.0"
wrap_mode28 = "clamp_to_border"
mipmap_input28 = "false"
-alias28 = "SourceHDR"
+alias28 = "SourceSDR"
+float_framebuffer28 = "true"
-shader29 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader29 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear29 = "false"
+scale_type29 = "source"
+scale29 = "1.0"
wrap_mode29 = "clamp_to_border"
mipmap_input29 = "false"
-alias29 = ""
-float_framebuffer29 = "false"
-srgb_framebuffer29 = "false"
-scale_type29 = "viewport"
+alias29 = "SourceHDR"
+float_framebuffer29 = "true"
-shader30 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias30 = "MBZ_PostCRTPass"
+shader30 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear30 = "false"
+wrap_mode30 = "clamp_to_border"
+mipmap_input30 = "false"
+alias30 = ""
+float_framebuffer30 = "false"
+srgb_framebuffer30 = "false"
+scale_type30 = "viewport"
+
+shader31 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias31 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader31 = ../../shaders/base/linearize-crt.slang
-mipmap_input31 = true
-filter_linear31 = true
-scale_type31 = absolute
-// scale_x31 = 480
-// scale_y31 = 270
-// scale_x31 = 960
-// scale_y31 = 540
-scale_x31 = 800
-scale_y31 = 600
-alias31 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader32 = ../../shaders/base/linearize-crt.slang
mipmap_input32 = true
filter_linear32 = true
+scale_type32 = absolute
+// scale_x32 = 480
+// scale_y32 = 270
+// scale_x32 = 960
+// scale_y32 = 540
+scale_x32 = 800
+scale_y32 = 600
+alias32 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input33 = true
+filter_linear33 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear33 = true
-alias33 = "BR_MirrorBlurredPass"
+shader34 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear34 = true
+alias34 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-scale_x34 = 128
-scale_y34 = 128
-alias34 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input35 = true
filter_linear35 = true
scale_type35 = absolute
-scale_x35 = 12
-scale_y35 = 12
-alias35 = "BR_MirrorFullscreenGlowPass"
+scale_x35 = 128
+scale_y35 = 128
+alias35 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input36 = true
+filter_linear36 = true
+scale_type36 = absolute
+scale_x36 = 12
+scale_y36 = 12
+alias36 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader36 = ../../shaders/base/reflection.slang
-scale_type36 = viewport
-float_framebuffer36 = true
-alias36 = "BR_CRTAndReflectionPass"
+shader37 = ../../shaders/base/reflection.slang
+scale_type37 = viewport
+float_framebuffer37 = true
+alias37 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader37 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear37 = true
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_LayersUnderCRTPass"
-
-shader38 = ../../shaders/base/bezel-images-over-crt.slang
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear38 = true
scale_type38 = viewport
float_framebuffer38 = true
-alias38 = "BR_LayersOverCRTPass"
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader39 = ../../shaders/base/combine-passes.slang
-scale_type39 = viewport
-alias39 = "CombinePass"
+shader40 = ../../shaders/base/combine-passes.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -288,6 +293,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-RESHADE-FX__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-RESHADE-FX__GDV.slangp
index f0a9c77..8741f3a 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-RESHADE-FX__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-RESHADE-FX__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 49
+shaders = 50
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,259 +54,262 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = "../../../../reshade/shaders/bloom/BloomPass0.slang"
-filter_linear19 = "true"
-wrap_mode19 = "clamp_to_border"
-mipmap_input19 = "false"
-alias19 = "SamplerBloom1"
-float_framebuffer19 = "true"
-srgb_framebuffer19 = "false"
-scale_type_x19 = "source"
-scale_x19 = "4.000000"
-scale_type_y19 = "source"
-scale_y19 = "4.000000"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = "../../../../reshade/shaders/bloom/BloomPass1.slang"
+shader20 = "../../../../reshade/shaders/bloom/BloomPass0.slang"
filter_linear20 = "true"
wrap_mode20 = "clamp_to_border"
mipmap_input20 = "false"
-alias20 = "SamplerBloom2"
+alias20 = "SamplerBloom1"
float_framebuffer20 = "true"
srgb_framebuffer20 = "false"
+scale_type_x20 = "source"
+scale_x20 = "4.000000"
+scale_type_y20 = "source"
+scale_y20 = "4.000000"
-shader21 = "../../../../reshade/shaders/bloom/BloomPass2.slang"
+shader21 = "../../../../reshade/shaders/bloom/BloomPass1.slang"
filter_linear21 = "true"
wrap_mode21 = "clamp_to_border"
mipmap_input21 = "false"
-alias21 = "SamplerBloom3"
+alias21 = "SamplerBloom2"
float_framebuffer21 = "true"
srgb_framebuffer21 = "false"
-shader22 = "../../../../reshade/shaders/bloom/BloomPass3.slang"
+shader22 = "../../../../reshade/shaders/bloom/BloomPass2.slang"
filter_linear22 = "true"
wrap_mode22 = "clamp_to_border"
mipmap_input22 = "false"
-alias22 = "SamplerBloom4"
+alias22 = "SamplerBloom3"
float_framebuffer22 = "true"
srgb_framebuffer22 = "false"
-shader23 = "../../../../reshade/shaders/bloom/BloomPass4.slang"
+shader23 = "../../../../reshade/shaders/bloom/BloomPass3.slang"
filter_linear23 = "true"
wrap_mode23 = "clamp_to_border"
mipmap_input23 = "false"
-alias23 = "SamplerBloom5"
+alias23 = "SamplerBloom4"
float_framebuffer23 = "true"
srgb_framebuffer23 = "false"
-shader24 = "../../../../reshade/shaders/bloom/LensFlarePass0.slang"
+shader24 = "../../../../reshade/shaders/bloom/BloomPass4.slang"
filter_linear24 = "true"
wrap_mode24 = "clamp_to_border"
mipmap_input24 = "false"
-alias24 = "LensFlare1"
+alias24 = "SamplerBloom5"
float_framebuffer24 = "true"
srgb_framebuffer24 = "false"
-shader25 = "../../../../reshade/shaders/bloom/LensFlarePass1.slang"
+shader25 = "../../../../reshade/shaders/bloom/LensFlarePass0.slang"
filter_linear25 = "true"
wrap_mode25 = "clamp_to_border"
mipmap_input25 = "false"
-alias25 = "LensFlare2"
+alias25 = "LensFlare1"
float_framebuffer25 = "true"
srgb_framebuffer25 = "false"
-shader26 = "../../../../reshade/shaders/bloom/LensFlarePass2.slang"
+shader26 = "../../../../reshade/shaders/bloom/LensFlarePass1.slang"
filter_linear26 = "true"
wrap_mode26 = "clamp_to_border"
mipmap_input26 = "false"
-alias26 = "LensFlare3"
+alias26 = "LensFlare2"
float_framebuffer26 = "true"
srgb_framebuffer26 = "false"
-shader27 = "../../../../reshade/shaders/bloom/LightingCombine.slang"
+shader27 = "../../../../reshade/shaders/bloom/LensFlarePass2.slang"
filter_linear27 = "true"
wrap_mode27 = "clamp_to_border"
mipmap_input27 = "false"
-alias27 = ""
-float_framebuffer27 = "false"
+alias27 = "LensFlare3"
+float_framebuffer27 = "true"
srgb_framebuffer27 = "false"
-scale_type_x27 = "source"
-scale_x27 = "0.250000"
-scale_type_y27 = "source"
-scale_y27 = "0.250000"
-shader28 = ../../shaders/base/stock.slang
-alias28 = "PreCRTPass"
+shader28 = "../../../../reshade/shaders/bloom/LightingCombine.slang"
+filter_linear28 = "true"
+wrap_mode28 = "clamp_to_border"
+mipmap_input28 = "false"
+alias28 = ""
+float_framebuffer28 = "false"
+srgb_framebuffer28 = "false"
+scale_type_x28 = "source"
+scale_x28 = "0.250000"
+scale_type_y28 = "source"
+scale_y28 = "0.250000"
-shader29 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear29 = true
-scale_type29 = source
-scale29 = 1.0
-alias29 = "AfterglowPass"
+shader29 = ../../shaders/base/stock.slang
+alias29 = "PreCRTPass"
-shader30 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader30 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear30 = true
scale_type30 = source
-mipmap_input30 = true
scale30 = 1.0
+alias30 = "AfterglowPass"
+
+shader31 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear31 = true
+scale_type31 = source
+mipmap_input31 = true
+scale31 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader31 = ../../shaders/dogway/hsm-grade.slang
-filter_linear31 = true
-scale_type31 = source
-scale31 = 1.0
-
-shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader32 = ../../shaders/dogway/hsm-grade.slang
filter_linear32 = true
scale_type32 = source
-scale_x32 = 1.0
-scale_y32 = 1.0
+scale32 = 1.0
-shader33 = ../../shaders/base/stock.slang
+shader33 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear33 = true
scale_type33 = source
scale_x33 = 1.0
scale_y33 = 1.0
-alias33 = "PrePass"
-mipmap_input33 = true
-shader34 = ../../shaders/guest/hsm-avg-lum.slang
+shader34 = ../../shaders/base/stock.slang
filter_linear34 = true
scale_type34 = source
-scale34 = 1.0
+scale_x34 = 1.0
+scale_y34 = 1.0
+alias34 = "PrePass"
mipmap_input34 = true
-alias34 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader35 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear35 = true
scale_type35 = source
scale35 = 1.0
-float_framebuffer35 = true
-alias35 = "LinearizePass"
+mipmap_input35 = true
+alias35 = "AvgLumPass"
-shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader36 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear36 = true
-scale_type_x36 = absolute
-scale_x36 = 800.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type36 = source
+scale36 = 1.0
float_framebuffer36 = true
+alias36 = "LinearizePass"
-shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear37 = true
scale_type_x37 = absolute
scale_x37 = 800.0
-scale_type_y37 = absolute
-scale_y37 = 600.0
+scale_type_y37 = source
+scale_y37 = 1.0
float_framebuffer37 = true
-alias37 = GlowPass
-shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 800.0
scale_type_y38 = absolute
-scale_y38 = 600.0
+scale_y38 = 600.0
float_framebuffer38 = true
+alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear39 = true
-scale_type_x39 = source
-scale_x39 = 1.0
-scale_type_y39 = source
-scale_y39 = 1.0
+scale_type_x39 = absolute
+scale_x39 = 800.0
+scale_type_y39 = absolute
+scale_y39 = 600.0
float_framebuffer39 = true
-alias39 = BloomPass
-shader40 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear40 = true
-float_framebuffer40 = true
-scale_type40 = viewport
+scale_type_x40 = source
scale_x40 = 1.0
+scale_type_y40 = source
scale_y40 = 1.0
+float_framebuffer40 = true
+alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-deconvergence.slang
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear41 = true
+float_framebuffer41 = true
scale_type41 = viewport
scale_x41 = 1.0
scale_y41 = 1.0
-shader42 = ../../shaders/base/post-crt-prep-glass.slang
-alias42 = "MBZ_PostCRTPass"
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-glass.slang
+alias43 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader43 = ../../shaders/base/linearize-crt.slang
-mipmap_input43 = true
-filter_linear43 = true
-scale_type43 = absolute
-// scale_x43 = 480
-// scale_y43 = 270
-// scale_x43 = 960
-// scale_y43 = 540
-scale_x43 = 800
-scale_y43 = 600
-alias43 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader44 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader44 = ../../shaders/base/linearize-crt.slang
mipmap_input44 = true
filter_linear44 = true
+scale_type44 = absolute
+// scale_x44 = 480
+// scale_y44 = 270
+// scale_x44 = 960
+// scale_y44 = 540
+scale_x44 = 800
+scale_y44 = 600
+alias44 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input45 = true
+filter_linear45 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader45 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear45 = true
-alias45 = "BR_MirrorBlurredPass"
+shader46 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear46 = true
+alias46 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input46 = true
-filter_linear46 = true
-scale_type46 = absolute
-scale_x46 = 128
-scale_y46 = 128
-alias46 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input47 = true
filter_linear47 = true
scale_type47 = absolute
-scale_x47 = 12
-scale_y47 = 12
-alias47 = "BR_MirrorFullscreenGlowPass"
+scale_x47 = 128
+scale_y47 = 128
+alias47 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input48 = true
+filter_linear48 = true
+scale_type48 = absolute
+scale_x48 = 12
+scale_y48 = 12
+alias48 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader48 = ../../shaders/base/reflection-glass.slang
-scale_type48 = viewport
-alias48 = "BR_CRTAndReflectionPass"
+shader49 = ../../shaders/base/reflection-glass.slang
+scale_type49 = viewport
+alias49 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "Dirt;Sprite;SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "Dirt;Sprite;SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
Dirt = ../../../../reshade/shaders/bloom/LensDB.png
Dirt_wrap_mode = "clamp_to_border"
@@ -376,6 +379,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..c50b179
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,471 @@
+shaders = 50
+
+shader0 = ../../shaders/base/add-params-glass.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-screen-scale-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-adv-glass.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
+
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader18 = ../../shaders/base/stock.slang
+// filter_linear18 = "false"
+// wrap_mode18 = "clamp_to_border"
+// mipmap_input18 = "false"
+// float_framebuffer18 = "false"
+// srgb_framebuffer18 = "true"
+alias18 = XbrSource
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "2.000000"
+scale_type_y20 = "source"
+scale_y20 = "2.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear22 = "false"
+wrap_mode22 = "clamp_to_border"
+mipmap_input22 = "false"
+alias22 = ""
+float_framebuffer22 = "false"
+srgb_framebuffer22 = "true"
+scale_type_x22 = "source"
+scale_x22 = "1.000000"
+scale_type_y22 = "source"
+scale_y22 = "1.000000"
+
+shader23 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear23 = false
+scale_type_x23 = source
+scale_x23 = 1
+scale_type_y23 = source
+scale_y23 = 0.5
+wrap_mode23 = "clamp_to_edge"
+
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
+
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear25 = true
+scale_type25 = source
+scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
+
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
+float_framebuffer29 = true
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
+scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
+
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 0.5
+scale_y30 = 1.0
+
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear32 = true
+scale_type32 = source
+scale_x32 = 1.0
+scale_y32 = 1.0
+
+shader33 = ../../shaders/base/stock.slang
+filter_linear33 = true
+scale_type33 = source
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
+mipmap_input33 = true
+
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear34 = true
+scale_type34 = source
+scale34 = 1.0
+mipmap_input34 = true
+alias34 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear35 = true
+scale_type35 = source
+scale35 = 1.0
+float_framebuffer35 = true
+alias35 = "LinearizePass"
+
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear36 = true
+scale_type_x36 = viewport
+scale_x36 = 1.0
+scale_type_y36 = source
+scale_y36 = 1.0
+float_framebuffer36 = true
+alias36 = Pass1
+
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear37 = true
+scale_type_x37 = absolute
+scale_x37 = 640.0
+scale_type_y37 = source
+scale_y37 = 1.0
+float_framebuffer37 = true
+
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear38 = true
+scale_type_x38 = absolute
+scale_x38 = 640.0
+scale_type_y38 = absolute
+scale_y38 = 480.0
+float_framebuffer38 = true
+alias38 = GlowPass
+
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear39 = true
+scale_type_x39 = absolute
+scale_x39 = 640.0
+scale_type_y39 = absolute
+scale_y39 = 480.0
+float_framebuffer39 = true
+
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear40 = true
+scale_type_x40 = absolute
+scale_x40 = 640.0
+scale_type_y40 = absolute
+scale_y40 = 480.0
+float_framebuffer40 = true
+alias40 = BloomPass
+
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+filter_linear41 = true
+float_framebuffer41 = true
+scale_type41 = viewport
+scale_x41 = 1.0
+scale_y41 = 1.0
+
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-glass.slang
+alias43 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader44 = ../../shaders/base/linearize-crt.slang
+mipmap_input44 = true
+filter_linear44 = true
+scale_type44 = absolute
+// scale_x44 = 480
+// scale_y44 = 270
+// scale_x44 = 960
+// scale_y44 = 540
+scale_x44 = 800
+scale_y44 = 600
+alias44 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input45 = true
+filter_linear45 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader46 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear46 = true
+alias46 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input47 = true
+filter_linear47 = true
+scale_type47 = absolute
+scale_x47 = 128
+scale_y47 = 128
+alias47 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input48 = true
+filter_linear48 = true
+scale_type48 = absolute
+scale_x48 = 12
+scale_y48 = 12
+alias48 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader49 = ../../shaders/base/reflection-glass.slang
+scale_type49 = viewport
+alias49 = "BR_CRTAndReflectionPass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/TopLayerImageGradient_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// Parameters
+HSM_TUBE_BLACK_EDGE_SHARPNESS = "90.0000"
+HSM_TUBE_BLACK_EDGE_THICKNESS = -7
+HSM_BG_OPACITY = "1.000000"
+HSM_GLASS_BORDER_ON = "1.000000"
+HSM_BZL_WIDTH = 3000
+HSM_BZL_HEIGHT = 3000
+HSM_BZL_INNER_EDGE_THICKNESS = 350
+HSM_BZL_INNER_EDGE_SHARPNESS = 30
+HSM_BZL_INNER_CORNER_RADIUS_SCALE = "100.000000"
+HSM_BZL_INNER_EDGE_SHADOW = "0.000000"
+HSM_FRM_OPACITY = "100.000000"
+HSM_REFLECT_GLOBAL_AMOUNT = "35.00000"
+HSM_REFLECT_GLOBAL_GAMMA_ADJUST = "0.900000"
+HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = "60.0000"
+HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = "40.0000"
+HSM_REFLECT_FULLSCREEN_GLOW = "30.000000"
+HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = "1.500000"
+HSM_REFLECT_FADE_AMOUNT = "20.0000"
+HSM_REFLECT_RADIAL_FADE_WIDTH = "500.000000"
+HSM_REFLECT_RADIAL_FADE_HEIGHT = "300.000000"
+HSM_REFLECT_LATERAL_OUTER_FADE_POSITION = "500.000000"
+HSM_REFLECT_CORNER_FADE = "0.000000"
+HSM_REFLECT_BLUR_MIN = "30.0000"
+HSM_REFLECT_BLUR_MAX = "60.0000"
+HSM_REFLECT_NOISE_AMOUNT = "100.000000"
+HSM_REFLECT_NOISE_SAMPLES = "4.000000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_BG_BRIGHTNESS = "0.000000"
+HSM_SCREEN_VIGNETTE_STRENGTH = "20.000000"
+HSM_SCREEN_VIGNETTE_POWER = "4.000000"
+HSM_SCREEN_VIGNETTE_IN_REFLECTION = "0.000000"
+
+g_vignette = "0.0"
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..a9888ba
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-SUPER-XBR__GDV.slangp
@@ -0,0 +1,446 @@
+shaders = 47
+
+shader0 = ../../shaders/base/add-params-glass.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-screen-scale-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-adv-glass.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
+
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader18 = ../../shaders/base/stock.slang
+// filter_linear18 = "false"
+// wrap_mode18 = "clamp_to_border"
+// mipmap_input18 = "false"
+// float_framebuffer18 = "false"
+// srgb_framebuffer18 = "true"
+alias18 = XbrSource
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "2.000000"
+scale_type_y20 = "source"
+scale_y20 = "2.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear22 = "false"
+wrap_mode22 = "clamp_to_border"
+mipmap_input22 = "false"
+alias22 = ""
+float_framebuffer22 = "false"
+srgb_framebuffer22 = "true"
+scale_type_x22 = "source"
+scale_x22 = "1.000000"
+scale_type_y22 = "source"
+scale_y22 = "1.000000"
+
+shader23 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear23 = false
+scale_type_x23 = source
+scale_x23 = 1
+scale_type_y23 = source
+scale_y23 = 0.5
+wrap_mode23 = "clamp_to_edge"
+
+// GTU TV Processing
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
+float_framebuffer24 = true
+
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
+
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
+
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader29 = ../../shaders/dogway/hsm-grade.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 1.0
+scale_y30 = 1.0
+
+shader31 = ../../shaders/base/stock.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
+mipmap_input31 = true
+
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear32 = true
+scale_type32 = source
+scale32 = 1.0
+mipmap_input32 = true
+alias32 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
+
+shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear34 = true
+scale_type_x34 = absolute
+scale_x34 = 800.0
+scale_type_y34 = source
+scale_y34 = 1.0
+float_framebuffer34 = true
+
+shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear35 = true
+scale_type_x35 = absolute
+scale_x35 = 800.0
+scale_type_y35 = absolute
+scale_y35 = 600.0
+float_framebuffer35 = true
+alias35 = GlowPass
+
+shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear36 = true
+scale_type_x36 = absolute
+scale_x36 = 800.0
+scale_type_y36 = absolute
+scale_y36 = 600.0
+float_framebuffer36 = true
+
+shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear37 = true
+scale_type_x37 = source
+scale_x37 = 1.0
+scale_type_y37 = source
+scale_y37 = 1.0
+float_framebuffer37 = true
+alias37 = BloomPass
+
+shader38 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+filter_linear38 = true
+float_framebuffer38 = true
+scale_type38 = viewport
+scale_x38 = 1.0
+scale_y38 = 1.0
+
+shader39 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear39 = true
+scale_type39 = viewport
+scale_x39 = 1.0
+scale_y39 = 1.0
+
+shader40 = ../../shaders/base/post-crt-prep-glass.slang
+alias40 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader41 = ../../shaders/base/linearize-crt.slang
+mipmap_input41 = true
+filter_linear41 = true
+scale_type41 = absolute
+// scale_x41 = 480
+// scale_y41 = 270
+// scale_x41 = 960
+// scale_y41 = 540
+scale_x41 = 800
+scale_y41 = 600
+alias41 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader42 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input42 = true
+filter_linear42 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader43 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear43 = true
+alias43 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input44 = true
+filter_linear44 = true
+scale_type44 = absolute
+scale_x44 = 128
+scale_y44 = 128
+alias44 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader45 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input45 = true
+filter_linear45 = true
+scale_type45 = absolute
+scale_x45 = 12
+scale_y45 = 12
+alias45 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader46 = ../../shaders/base/reflection-glass.slang
+scale_type46 = viewport
+alias46 = "BR_CRTAndReflectionPass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/TopLayerImageGradient_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// Parameters
+HSM_TUBE_BLACK_EDGE_SHARPNESS = "90.0000"
+HSM_TUBE_BLACK_EDGE_THICKNESS = -7
+HSM_BG_OPACITY = "1.000000"
+HSM_GLASS_BORDER_ON = "1.000000"
+HSM_BZL_WIDTH = 3000
+HSM_BZL_HEIGHT = 3000
+HSM_BZL_INNER_EDGE_THICKNESS = 350
+HSM_BZL_INNER_EDGE_SHARPNESS = 30
+HSM_BZL_INNER_CORNER_RADIUS_SCALE = "100.000000"
+HSM_BZL_INNER_EDGE_SHADOW = "0.000000"
+HSM_FRM_OPACITY = "100.000000"
+HSM_REFLECT_GLOBAL_AMOUNT = "35.00000"
+HSM_REFLECT_GLOBAL_GAMMA_ADJUST = "0.900000"
+HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = "60.0000"
+HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = "40.0000"
+HSM_REFLECT_FULLSCREEN_GLOW = "30.000000"
+HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = "1.500000"
+HSM_REFLECT_FADE_AMOUNT = "20.0000"
+HSM_REFLECT_RADIAL_FADE_WIDTH = "500.000000"
+HSM_REFLECT_RADIAL_FADE_HEIGHT = "300.000000"
+HSM_REFLECT_LATERAL_OUTER_FADE_POSITION = "500.000000"
+HSM_REFLECT_CORNER_FADE = "0.000000"
+HSM_REFLECT_BLUR_MIN = "30.0000"
+HSM_REFLECT_BLUR_MAX = "60.0000"
+HSM_REFLECT_NOISE_AMOUNT = "100.000000"
+HSM_REFLECT_NOISE_SAMPLES = "4.000000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_BG_BRIGHTNESS = "0.000000"
+HSM_SCREEN_VIGNETTE_STRENGTH = "20.000000"
+HSM_SCREEN_VIGNETTE_POWER = "4.000000"
+HSM_SCREEN_VIGNETTE_IN_REFLECTION = "0.000000"
+
+g_vignette = "0.0"
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__EASYMODE.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__EASYMODE.slangp
index 959a82d..014dda6 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__EASYMODE.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__EASYMODE.slangp
@@ -1,4 +1,4 @@
-shaders = 38
+shaders = 39
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,150 +54,153 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/easymode/hsm-crt-easymode-blur_horiz.slang
-filter_linear27 = false
-srgb_framebuffer27 = true
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/easymode/hsm-crt-easymode-blur_vert.slang
+shader28 = ../../shaders/easymode/hsm-crt-easymode-blur_horiz.slang
filter_linear28 = false
srgb_framebuffer28 = true
-shader29 = ../../shaders/easymode/hsm-crt-easymode-threshold.slang
+shader29 = ../../shaders/easymode/hsm-crt-easymode-blur_vert.slang
filter_linear29 = false
srgb_framebuffer29 = true
-// Easymode's Shader!
-shader30 = ../../shaders/easymode/hsm-crt-easymode-halation.slang
-filter_linear30 = true
-scale_type30 = viewport
-float_framebuffer30 = true
+shader30 = ../../shaders/easymode/hsm-crt-easymode-threshold.slang
+filter_linear30 = false
+srgb_framebuffer30 = true
-shader31 = ../../shaders/base/post-crt-prep-glass.slang
-alias31 = "MBZ_PostCRTPass"
+// Easymode's Shader!
+shader31 = ../../shaders/easymode/hsm-crt-easymode-halation.slang
+filter_linear31 = true
+scale_type31 = viewport
+float_framebuffer31 = true
+
+shader32 = ../../shaders/base/post-crt-prep-glass.slang
+alias32 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader32 = ../../shaders/base/linearize-crt.slang
-mipmap_input32 = true
-filter_linear32 = true
-scale_type32 = absolute
-// scale_x32 = 480
-// scale_y32 = 270
-// scale_x32 = 960
-// scale_y32 = 540
-scale_x32 = 800
-scale_y32 = 600
-alias32 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader33 = ../../shaders/base/linearize-crt.slang
mipmap_input33 = true
filter_linear33 = true
+scale_type33 = absolute
+// scale_x33 = 480
+// scale_y33 = 270
+// scale_x33 = 960
+// scale_y33 = 540
+scale_x33 = 800
+scale_y33 = 600
+alias33 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader34 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input34 = true
+filter_linear34 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader34 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear34 = true
-alias34 = "BR_MirrorBlurredPass"
+shader35 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear35 = true
+alias35 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-scale_x35 = 128
-scale_y35 = 128
-alias35 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input36 = true
filter_linear36 = true
scale_type36 = absolute
-scale_x36 = 12
-scale_y36 = 12
-alias36 = "BR_MirrorFullscreenGlowPass"
+scale_x36 = 128
+scale_y36 = 128
+alias36 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input37 = true
+filter_linear37 = true
+scale_type37 = absolute
+scale_x37 = 12
+scale_y37 = 12
+alias37 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader37 = ../../shaders/base/reflection-glass.slang
-scale_type37 = viewport
-alias37 = "BR_CRTAndReflectionPass"
+shader38 = ../../shaders/base/reflection-glass.slang
+scale_type38 = viewport
+alias38 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -259,6 +262,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp
index 3d68b7c..4c921e1 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 38
+shaders = 39
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,154 +54,157 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
-shader29 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+float_framebuffer29 = true
+alias29 = "LinearizePass"
-shader30 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
-scale_type30 = viewport
-scale_x30 = 1.0
-scale_y30 = 1.0
-filter_linear30 = true
+shader30 = ../../shaders/base/delinearize.slang
+
+shader31 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
+scale_type31 = viewport
+scale_x31 = 1.0
+scale_y31 = 1.0
+filter_linear31 = true
g_sat = 0.15
-shader31 = ../../shaders/base/post-crt-prep-glass.slang
-alias31 = "MBZ_PostCRTPass"
+shader32 = ../../shaders/base/post-crt-prep-glass.slang
+alias32 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader32 = ../../shaders/base/linearize-crt.slang
-mipmap_input32 = true
-filter_linear32 = true
-scale_type32 = absolute
-// scale_x32 = 480
-// scale_y32 = 270
-// scale_x32 = 960
-// scale_y32 = 540
-scale_x32 = 800
-scale_y32 = 600
-alias32 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader33 = ../../shaders/base/linearize-crt.slang
mipmap_input33 = true
filter_linear33 = true
+scale_type33 = absolute
+// scale_x33 = 480
+// scale_y33 = 270
+// scale_x33 = 960
+// scale_y33 = 540
+scale_x33 = 800
+scale_y33 = 600
+alias33 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader34 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input34 = true
+filter_linear34 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader34 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear34 = true
-alias34 = "BR_MirrorBlurredPass"
+shader35 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear35 = true
+alias35 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-scale_x35 = 128
-scale_y35 = 128
-alias35 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input36 = true
filter_linear36 = true
scale_type36 = absolute
-scale_x36 = 12
-scale_y36 = 12
-alias36 = "BR_MirrorFullscreenGlowPass"
+scale_x36 = 128
+scale_y36 = 128
+alias36 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input37 = true
+filter_linear37 = true
+scale_type37 = absolute
+scale_x37 = 12
+scale_y37 = 12
+alias37 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader37 = ../../shaders/base/reflection-glass.slang
-scale_type37 = viewport
-alias37 = "BR_CRTAndReflectionPass"
+shader38 = ../../shaders/base/reflection-glass.slang
+scale_type38 = viewport
+alias38 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -263,6 +266,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp
index 5bdb8c6..d922cf5 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp
@@ -1,4 +1,4 @@
-shaders = 36
+shaders = 37
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,142 +54,145 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
-scale_type28 = viewport
-scale_x28 = 1.0
-scale_y28 = 1.0
-filter_linear28 = true
+shader28 = ../../shaders/base/delinearize.slang
+
+shader29 = ../../shaders/guest/hsm-crt-dariusg-gdv-mini.slang
+scale_type29 = viewport
+scale_x29 = 1.0
+scale_y29 = 1.0
+filter_linear29 = true
g_sat = 0.15
-shader29 = ../../shaders/base/post-crt-prep-glass.slang
-alias29 = "MBZ_PostCRTPass"
+shader30 = ../../shaders/base/post-crt-prep-glass.slang
+alias30 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader30 = ../../shaders/base/linearize-crt.slang
-mipmap_input30 = true
-filter_linear30 = true
-scale_type30 = absolute
-// scale_x30 = 480
-// scale_y30 = 270
-// scale_x30 = 960
-// scale_y30 = 540
-scale_x30 = 800
-scale_y30 = 600
-alias30 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader31 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader31 = ../../shaders/base/linearize-crt.slang
mipmap_input31 = true
filter_linear31 = true
+scale_type31 = absolute
+// scale_x31 = 480
+// scale_y31 = 270
+// scale_x31 = 960
+// scale_y31 = 540
+scale_x31 = 800
+scale_y31 = 600
+alias31 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input32 = true
+filter_linear32 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear32 = true
-alias32 = "BR_MirrorBlurredPass"
+shader33 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear33 = true
+alias33 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader33 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input33 = true
-filter_linear33 = true
-scale_type33 = absolute
-scale_x33 = 128
-scale_y33 = 128
-alias33 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input34 = true
filter_linear34 = true
scale_type34 = absolute
-scale_x34 = 12
-scale_y34 = 12
-alias34 = "BR_MirrorFullscreenGlowPass"
+scale_x34 = 128
+scale_y34 = 128
+alias34 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input35 = true
+filter_linear35 = true
+scale_type35 = absolute
+scale_x35 = 12
+scale_y35 = 12
+alias35 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader35 = ../../shaders/base/reflection-glass.slang
-scale_type35 = viewport
-alias35 = "BR_CRTAndReflectionPass"
+shader36 = ../../shaders/base/reflection-glass.slang
+scale_type36 = viewport
+alias36 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -251,6 +254,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-NTSC.slangp
index d4478ed..5d074d7 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 43
+shaders = 44
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,200 +54,203 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
-shader29 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear29 = true
-scale_type_x29 = viewport
-scale_x29 = 1.0
-scale_type_y29 = source
-scale_y29 = 1.0
+scale_type29 = source
+scale29 = 1.0
float_framebuffer29 = true
-alias29 = Pass1
+alias29 = "LinearizePass"
-shader30 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader30 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear30 = true
-scale_type_x30 = absolute
-scale_x30 = 640.0
+scale_type_x30 = viewport
+scale_x30 = 1.0
scale_type_y30 = source
-scale_y30 = 1.0
+scale_y30 = 1.0
float_framebuffer30 = true
+alias30 = Pass1
-shader31 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear31 = true
scale_type_x31 = absolute
scale_x31 = 640.0
-scale_type_y31 = absolute
-scale_y31 = 480.0
+scale_type_y31 = source
+scale_y31 = 1.0
float_framebuffer31 = true
-alias31 = GlowPass
-shader32 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear32 = true
scale_type_x32 = absolute
scale_x32 = 640.0
scale_type_y32 = absolute
-scale_y32 = 480.0
+scale_y32 = 480.0
float_framebuffer32 = true
+alias32 = GlowPass
-shader33 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear33 = true
scale_type_x33 = absolute
scale_x33 = 640.0
scale_type_y33 = absolute
-scale_y33 = 480.0
+scale_y33 = 480.0
float_framebuffer33 = true
-alias33 = BloomPass
-shader34 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear34 = true
+scale_type_x34 = absolute
+scale_x34 = 640.0
+scale_type_y34 = absolute
+scale_y34 = 480.0
float_framebuffer34 = true
-scale_type34 = viewport
-scale_x34 = 1.0
-scale_y34 = 1.0
+alias34 = BloomPass
-shader35 = ../../shaders/guest/hsm-deconvergence.slang
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear35 = true
+float_framebuffer35 = true
scale_type35 = viewport
scale_x35 = 1.0
scale_y35 = 1.0
-shader36 = ../../shaders/base/post-crt-prep-glass.slang
-alias36 = "MBZ_PostCRTPass"
+shader36 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear36 = true
+scale_type36 = viewport
+scale_x36 = 1.0
+scale_y36 = 1.0
+
+shader37 = ../../shaders/base/post-crt-prep-glass.slang
+alias37 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader37 = ../../shaders/base/linearize-crt.slang
-mipmap_input37 = true
-filter_linear37 = true
-scale_type37 = absolute
-// scale_x37 = 480
-// scale_y37 = 270
-// scale_x37 = 960
-// scale_y37 = 540
-scale_x37 = 800
-scale_y37 = 600
-alias37 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader38 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader38 = ../../shaders/base/linearize-crt.slang
mipmap_input38 = true
filter_linear38 = true
+scale_type38 = absolute
+// scale_x38 = 480
+// scale_y38 = 270
+// scale_x38 = 960
+// scale_y38 = 540
+scale_x38 = 800
+scale_y38 = 600
+alias38 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input39 = true
+filter_linear39 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear39 = true
-alias39 = "BR_MirrorBlurredPass"
+shader40 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear40 = true
+alias40 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input40 = true
-filter_linear40 = true
-scale_type40 = absolute
-scale_x40 = 128
-scale_y40 = 128
-alias40 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input41 = true
filter_linear41 = true
scale_type41 = absolute
-scale_x41 = 12
-scale_y41 = 12
-alias41 = "BR_MirrorFullscreenGlowPass"
+scale_x41 = 128
+scale_y41 = 128
+alias41 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input42 = true
+filter_linear42 = true
+scale_type42 = absolute
+scale_x42 = 12
+scale_y42 = 12
+alias42 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader42 = ../../shaders/base/reflection-glass.slang
-scale_type42 = viewport
-alias42 = "BR_CRTAndReflectionPass"
+shader43 = ../../shaders/base/reflection-glass.slang
+scale_type43 = viewport
+alias43 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -309,6 +312,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp
index 25e6169..7388455 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,179 +54,182 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear27 = true
-scale_type_x27 = absolute
-scale_x27 = 800.0
-scale_type_y27 = source
-scale_y27 = 1.0
+scale_type27 = source
+scale27 = 1.0
float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear28 = true
scale_type_x28 = absolute
scale_x28 = 800.0
-scale_type_y28 = absolute
-scale_y28 = 600.0
+scale_type_y28 = source
+scale_y28 = 1.0
float_framebuffer28 = true
-alias28 = GlowPass
-shader29 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_y29 = 600.0
float_framebuffer29 = true
+alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear30 = true
-scale_type_x30 = source
-scale_x30 = 1.0
-scale_type_y30 = source
-scale_y30 = 1.0
+scale_type_x30 = absolute
+scale_x30 = 800.0
+scale_type_y30 = absolute
+scale_y30 = 600.0
float_framebuffer30 = true
-alias30 = BloomPass
-shader31 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear31 = true
-float_framebuffer31 = true
-scale_type31 = viewport
+scale_type_x31 = source
scale_x31 = 1.0
+scale_type_y31 = source
scale_y31 = 1.0
+float_framebuffer31 = true
+alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-deconvergence.slang
+shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear32 = true
+float_framebuffer32 = true
scale_type32 = viewport
scale_x32 = 1.0
scale_y32 = 1.0
-shader33 = ../../shaders/base/post-crt-prep-glass.slang
-alias33 = "MBZ_PostCRTPass"
+shader33 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear33 = true
+scale_type33 = viewport
+scale_x33 = 1.0
+scale_y33 = 1.0
+
+shader34 = ../../shaders/base/post-crt-prep-glass.slang
+alias34 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader34 = ../../shaders/base/linearize-crt.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-// scale_x34 = 480
-// scale_y34 = 270
-// scale_x34 = 960
-// scale_y34 = 540
-scale_x34 = 800
-scale_y34 = 600
-alias34 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader35 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader35 = ../../shaders/base/linearize-crt.slang
mipmap_input35 = true
filter_linear35 = true
+scale_type35 = absolute
+// scale_x35 = 480
+// scale_y35 = 270
+// scale_x35 = 960
+// scale_y35 = 540
+scale_x35 = 800
+scale_y35 = 600
+alias35 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input36 = true
+filter_linear36 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear36 = true
-alias36 = "BR_MirrorBlurredPass"
+shader37 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear37 = true
+alias37 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input37 = true
-filter_linear37 = true
-scale_type37 = absolute
-scale_x37 = 128
-scale_y37 = 128
-alias37 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input38 = true
filter_linear38 = true
scale_type38 = absolute
-scale_x38 = 12
-scale_y38 = 12
-alias38 = "BR_MirrorFullscreenGlowPass"
+scale_x38 = 128
+scale_y38 = 128
+alias38 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input39 = true
+filter_linear39 = true
+scale_type39 = absolute
+scale_x39 = 12
+scale_y39 = 12
+alias39 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader39 = ../../shaders/base/reflection-glass.slang
-scale_type39 = viewport
-alias39 = "BR_CRTAndReflectionPass"
+shader40 = ../../shaders/base/reflection-glass.slang
+scale_type40 = viewport
+alias40 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -288,6 +291,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__LCD-GRID.slangp
index a648d9e..760053b 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__LCD-GRID.slangp
@@ -1,4 +1,4 @@
-shaders = 36
+shaders = 37
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,139 +54,142 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear28 = "false"
-scale_type28 = "viewport"
-scale28 = "1.0"
+shader28 = ../../shaders/base/delinearize.slang
-shader29 = ../../shaders/base/post-crt-prep-glass.slang
-alias29 = "MBZ_PostCRTPass"
+shader29 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear29 = "false"
+scale_type29 = "viewport"
+scale29 = "1.0"
+
+shader30 = ../../shaders/base/post-crt-prep-glass.slang
+alias30 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader30 = ../../shaders/base/linearize-crt.slang
-mipmap_input30 = true
-filter_linear30 = true
-scale_type30 = absolute
-// scale_x30 = 480
-// scale_y30 = 270
-// scale_x30 = 960
-// scale_y30 = 540
-scale_x30 = 800
-scale_y30 = 600
-alias30 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader31 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader31 = ../../shaders/base/linearize-crt.slang
mipmap_input31 = true
filter_linear31 = true
+scale_type31 = absolute
+// scale_x31 = 480
+// scale_y31 = 270
+// scale_x31 = 960
+// scale_y31 = 540
+scale_x31 = 800
+scale_y31 = 600
+alias31 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input32 = true
+filter_linear32 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear32 = true
-alias32 = "BR_MirrorBlurredPass"
+shader33 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear33 = true
+alias33 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader33 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input33 = true
-filter_linear33 = true
-scale_type33 = absolute
-scale_x33 = 128
-scale_y33 = 128
-alias33 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input34 = true
filter_linear34 = true
scale_type34 = absolute
-scale_x34 = 12
-scale_y34 = 12
-alias34 = "BR_MirrorFullscreenGlowPass"
+scale_x34 = 128
+scale_y34 = 128
+alias34 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input35 = true
+filter_linear35 = true
+scale_type35 = absolute
+scale_x35 = 12
+scale_y35 = 12
+alias35 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader35 = ../../shaders/base/reflection-glass.slang
-scale_type35 = viewport
-alias35 = "BR_CRTAndReflectionPass"
+shader36 = ../../shaders/base/reflection-glass.slang
+scale_type36 = viewport
+alias36 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -248,6 +251,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON-NTSC.slangp
index 3620b37..ec7f008 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 39
+shaders = 40
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,171 +54,176 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+float_framebuffer29 = true
+alias29 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader29 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear29 = "false"
-scale_type29 = "source"
-scale29 = "1.0"
-wrap_mode29 = "clamp_to_border"
-mipmap_input29 = "false"
-alias29 = "SourceSDR"
-
-shader30 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader30 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear30 = "false"
scale_type30 = "source"
scale30 = "1.0"
wrap_mode30 = "clamp_to_border"
mipmap_input30 = "false"
-alias30 = "SourceHDR"
+alias30 = "SourceSDR"
+float_framebuffer30 = "true"
-shader31 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader31 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear31 = "false"
+scale_type31 = "source"
+scale31 = "1.0"
wrap_mode31 = "clamp_to_border"
mipmap_input31 = "false"
-alias31 = ""
-float_framebuffer31 = "false"
-srgb_framebuffer31 = "false"
-scale_type31 = "viewport"
+alias31 = "SourceHDR"
+float_framebuffer31 = "true"
-shader32 = ../../shaders/base/post-crt-prep-glass.slang
-alias32 = "MBZ_PostCRTPass"
+shader32 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear32 = "false"
+wrap_mode32 = "clamp_to_border"
+mipmap_input32 = "false"
+alias32 = ""
+float_framebuffer32 = "false"
+srgb_framebuffer32 = "false"
+scale_type32 = "viewport"
+
+shader33 = ../../shaders/base/post-crt-prep-glass.slang
+alias33 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader33 = ../../shaders/base/linearize-crt.slang
-mipmap_input33 = true
-filter_linear33 = true
-scale_type33 = absolute
-// scale_x33 = 480
-// scale_y33 = 270
-// scale_x33 = 960
-// scale_y33 = 540
-scale_x33 = 800
-scale_y33 = 600
-alias33 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader34 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader34 = ../../shaders/base/linearize-crt.slang
mipmap_input34 = true
filter_linear34 = true
+scale_type34 = absolute
+// scale_x34 = 480
+// scale_y34 = 270
+// scale_x34 = 960
+// scale_y34 = 540
+scale_x34 = 800
+scale_y34 = 600
+alias34 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader35 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input35 = true
+filter_linear35 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader35 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear35 = true
-alias35 = "BR_MirrorBlurredPass"
+shader36 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear36 = true
+alias36 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input36 = true
-filter_linear36 = true
-scale_type36 = absolute
-scale_x36 = 128
-scale_y36 = 128
-alias36 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader37 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input37 = true
filter_linear37 = true
scale_type37 = absolute
-scale_x37 = 12
-scale_y37 = 12
-alias37 = "BR_MirrorFullscreenGlowPass"
+scale_x37 = 128
+scale_y37 = 128
+alias37 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input38 = true
+filter_linear38 = true
+scale_type38 = absolute
+scale_x38 = 12
+scale_y38 = 12
+alias38 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader38 = ../../shaders/base/reflection-glass.slang
-scale_type38 = viewport
-alias38 = "BR_CRTAndReflectionPass"
+shader39 = ../../shaders/base/reflection-glass.slang
+scale_type39 = viewport
+alias39 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -280,6 +285,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON.slangp
index 847a9fd..666e9c0 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON.slangp
@@ -1,4 +1,4 @@
-shaders = 37
+shaders = 38
shader0 = ../../shaders/base/add-params-glass.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,159 +54,164 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader27 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear27 = "false"
-scale_type27 = "source"
-scale27 = "1.0"
-wrap_mode27 = "clamp_to_border"
-mipmap_input27 = "false"
-alias27 = "SourceSDR"
-
-shader28 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader28 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear28 = "false"
scale_type28 = "source"
scale28 = "1.0"
wrap_mode28 = "clamp_to_border"
mipmap_input28 = "false"
-alias28 = "SourceHDR"
+alias28 = "SourceSDR"
+float_framebuffer28 = "true"
-shader29 = "../../shaders/megatron/crt-sony-megatron.slang"
+shader29 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear29 = "false"
+scale_type29 = "source"
+scale29 = "1.0"
wrap_mode29 = "clamp_to_border"
mipmap_input29 = "false"
-alias29 = ""
-float_framebuffer29 = "false"
-srgb_framebuffer29 = "false"
-scale_type29 = "viewport"
+alias29 = "SourceHDR"
+float_framebuffer29 = "true"
-shader30 = ../../shaders/base/post-crt-prep-glass.slang
-alias30 = "MBZ_PostCRTPass"
+shader30 = "../../shaders/megatron/crt-sony-megatron.slang"
+filter_linear30 = "false"
+wrap_mode30 = "clamp_to_border"
+mipmap_input30 = "false"
+alias30 = ""
+float_framebuffer30 = "false"
+srgb_framebuffer30 = "false"
+scale_type30 = "viewport"
+
+shader31 = ../../shaders/base/post-crt-prep-glass.slang
+alias31 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader31 = ../../shaders/base/linearize-crt.slang
-mipmap_input31 = true
-filter_linear31 = true
-scale_type31 = absolute
-// scale_x31 = 480
-// scale_y31 = 270
-// scale_x31 = 960
-// scale_y31 = 540
-scale_x31 = 800
-scale_y31 = 600
-alias31 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader32 = ../../shaders/base/linearize-crt.slang
mipmap_input32 = true
filter_linear32 = true
+scale_type32 = absolute
+// scale_x32 = 480
+// scale_y32 = 270
+// scale_x32 = 960
+// scale_y32 = 540
+scale_x32 = 800
+scale_y32 = 600
+alias32 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input33 = true
+filter_linear33 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear33 = true
-alias33 = "BR_MirrorBlurredPass"
+shader34 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear34 = true
+alias34 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-scale_x34 = 128
-scale_y34 = 128
-alias34 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input35 = true
filter_linear35 = true
scale_type35 = absolute
-scale_x35 = 12
-scale_y35 = 12
-alias35 = "BR_MirrorFullscreenGlowPass"
+scale_x35 = 128
+scale_y35 = 128
+alias35 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input36 = true
+filter_linear36 = true
+scale_type36 = absolute
+scale_x36 = 12
+scale_y36 = 12
+alias36 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader36 = ../../shaders/base/reflection-glass.slang
-scale_type36 = viewport
-alias36 = "BR_CRTAndReflectionPass"
+shader37 = ../../shaders/base/reflection-glass.slang
+scale_type37 = viewport
+alias37 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -268,6 +273,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..58f5ef2
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,401 @@
+shaders = 47
+
+shader0 = ../../shaders/base/add-params-no-reflect.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-no-reflect-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-adv-no-reflect.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
+
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader18 = ../../shaders/base/stock.slang
+// filter_linear18 = "false"
+// wrap_mode18 = "clamp_to_border"
+// mipmap_input18 = "false"
+// float_framebuffer18 = "false"
+// srgb_framebuffer18 = "true"
+alias18 = XbrSource
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "2.000000"
+scale_type_y20 = "source"
+scale_y20 = "2.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear22 = "false"
+wrap_mode22 = "clamp_to_border"
+mipmap_input22 = "false"
+alias22 = ""
+float_framebuffer22 = "false"
+srgb_framebuffer22 = "true"
+scale_type_x22 = "source"
+scale_x22 = "1.000000"
+scale_type_y22 = "source"
+scale_y22 = "1.000000"
+
+shader23 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear23 = false
+scale_type_x23 = source
+scale_x23 = 1
+scale_type_y23 = source
+scale_y23 = 0.5
+wrap_mode23 = "clamp_to_edge"
+
+shader24 = ../../shaders/base/stock.slang
+alias24 = "PreCRTPass"
+
+shader25 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear25 = true
+scale_type25 = source
+scale25 = 1.0
+alias25 = "AfterglowPass"
+
+shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear26 = true
+scale_type26 = source
+mipmap_input26 = true
+scale26 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader27 = ../../shaders/dogway/hsm-grade.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+
+shader28 = ../../shaders/base/stock.slang
+alias28 = "PrePass0"
+
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear29 = false
+float_framebuffer29 = true
+scale_type_x29 = source
+scale_type_y29 = source
+scale_x29 = 4.0
+scale_y29 = 1.0
+frame_count_mod29 = 2
+alias29 = NPass1
+
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer30 = true
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 0.5
+scale_y30 = 1.0
+
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+
+shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear32 = true
+scale_type32 = source
+scale_x32 = 1.0
+scale_y32 = 1.0
+
+shader33 = ../../shaders/base/stock.slang
+filter_linear33 = true
+scale_type33 = source
+scale_x33 = 1.0
+scale_y33 = 1.0
+alias33 = "PrePass"
+mipmap_input33 = true
+
+shader34 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear34 = true
+scale_type34 = source
+scale34 = 1.0
+mipmap_input34 = true
+alias34 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear35 = true
+scale_type35 = source
+scale35 = 1.0
+float_framebuffer35 = true
+alias35 = "LinearizePass"
+
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear36 = true
+scale_type_x36 = viewport
+scale_x36 = 1.0
+scale_type_y36 = source
+scale_y36 = 1.0
+float_framebuffer36 = true
+alias36 = Pass1
+
+shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear37 = true
+scale_type_x37 = absolute
+scale_x37 = 640.0
+scale_type_y37 = source
+scale_y37 = 1.0
+float_framebuffer37 = true
+
+shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear38 = true
+scale_type_x38 = absolute
+scale_x38 = 640.0
+scale_type_y38 = absolute
+scale_y38 = 480.0
+float_framebuffer38 = true
+alias38 = GlowPass
+
+shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear39 = true
+scale_type_x39 = absolute
+scale_x39 = 640.0
+scale_type_y39 = absolute
+scale_y39 = 480.0
+float_framebuffer39 = true
+
+shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear40 = true
+scale_type_x40 = absolute
+scale_x40 = 640.0
+scale_type_y40 = absolute
+scale_y40 = 480.0
+float_framebuffer40 = true
+alias40 = BloomPass
+
+shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang
+filter_linear41 = true
+float_framebuffer41 = true
+scale_type41 = viewport
+scale_x41 = 1.0
+scale_y41 = 1.0
+
+shader42 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear42 = true
+scale_type42 = viewport
+scale_x42 = 1.0
+scale_y42 = 1.0
+
+shader43 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias43 = "MBZ_PostCRTPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader44 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear44 = true
+scale_type44 = viewport
+float_framebuffer44 = true
+alias44 = "BR_LayersUnderCRTPass"
+
+shader45 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear45 = true
+scale_type45 = viewport
+float_framebuffer45 = true
+alias45 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader46 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type46 = viewport
+alias46 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..d0b6d32
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT-SUPER-XBR__GDV.slangp
@@ -0,0 +1,376 @@
+shaders = 44
+
+shader0 = ../../shaders/base/add-params-no-reflect.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-no-reflect-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-adv-no-reflect.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
+
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader18 = ../../shaders/base/stock.slang
+// filter_linear18 = "false"
+// wrap_mode18 = "clamp_to_border"
+// mipmap_input18 = "false"
+// float_framebuffer18 = "false"
+// srgb_framebuffer18 = "true"
+alias18 = XbrSource
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "2.000000"
+scale_type_y20 = "source"
+scale_y20 = "2.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear22 = "false"
+wrap_mode22 = "clamp_to_border"
+mipmap_input22 = "false"
+alias22 = ""
+float_framebuffer22 = "false"
+srgb_framebuffer22 = "true"
+scale_type_x22 = "source"
+scale_x22 = "1.000000"
+scale_type_y22 = "source"
+scale_y22 = "1.000000"
+
+shader23 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear23 = false
+scale_type_x23 = source
+scale_x23 = 1
+scale_type_y23 = source
+scale_y23 = 0.5
+wrap_mode23 = "clamp_to_edge"
+
+// GTU TV Processing
+shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type24 = source
+scale24 = 1.0
+float_framebuffer24 = true
+
+shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x25 = source
+scale_x25 = 1.0
+scale_type_y25 = source
+scale_y25 = 1.0
+filter_linear25 = false
+float_framebuffer25 = true
+
+shader26 = ../../shaders/base/stock.slang
+alias26 = "PreCRTPass"
+
+shader27 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+alias27 = "AfterglowPass"
+
+shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear28 = true
+scale_type28 = source
+mipmap_input28 = true
+scale28 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader29 = ../../shaders/dogway/hsm-grade.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+
+shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 1.0
+scale_y30 = 1.0
+
+shader31 = ../../shaders/base/stock.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+alias31 = "PrePass"
+mipmap_input31 = true
+
+shader32 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear32 = true
+scale_type32 = source
+scale32 = 1.0
+mipmap_input32 = true
+alias32 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+float_framebuffer33 = true
+alias33 = "LinearizePass"
+
+shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear34 = true
+scale_type_x34 = absolute
+scale_x34 = 800.0
+scale_type_y34 = source
+scale_y34 = 1.0
+float_framebuffer34 = true
+
+shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear35 = true
+scale_type_x35 = absolute
+scale_x35 = 800.0
+scale_type_y35 = absolute
+scale_y35 = 600.0
+float_framebuffer35 = true
+alias35 = GlowPass
+
+shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear36 = true
+scale_type_x36 = absolute
+scale_x36 = 800.0
+scale_type_y36 = absolute
+scale_y36 = 600.0
+float_framebuffer36 = true
+
+shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear37 = true
+scale_type_x37 = source
+scale_x37 = 1.0
+scale_type_y37 = source
+scale_y37 = 1.0
+float_framebuffer37 = true
+alias37 = BloomPass
+
+shader38 = ../../shaders/guest/hsm-crt-guest-advanced-no-reflect.slang
+filter_linear38 = true
+float_framebuffer38 = true
+scale_type38 = viewport
+scale_x38 = 1.0
+scale_y38 = 1.0
+
+shader39 = ../../shaders/guest/hsm-deconvergence-no-reflect.slang
+filter_linear39 = true
+scale_type39 = viewport
+scale_x39 = 1.0
+scale_y39 = 1.0
+
+shader40 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias40 = "MBZ_PostCRTPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader41 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear41 = true
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_LayersUnderCRTPass"
+
+shader42 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear42 = true
+scale_type42 = viewport
+float_framebuffer42 = true
+alias42 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader43 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type43 = viewport
+alias43 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV-NTSC.slangp
index ebee71c..429e8bd 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,166 +54,169 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
-shader29 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear29 = true
-scale_type_x29 = viewport
-scale_x29 = 1.0
-scale_type_y29 = source
-scale_y29 = 1.0
+scale_type29 = source
+scale29 = 1.0
float_framebuffer29 = true
-alias29 = Pass1
+alias29 = "LinearizePass"
-shader30 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader30 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear30 = true
-scale_type_x30 = absolute
-scale_x30 = 640.0
+scale_type_x30 = viewport
+scale_x30 = 1.0
scale_type_y30 = source
-scale_y30 = 1.0
+scale_y30 = 1.0
float_framebuffer30 = true
+alias30 = Pass1
-shader31 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear31 = true
scale_type_x31 = absolute
scale_x31 = 640.0
-scale_type_y31 = absolute
-scale_y31 = 480.0
+scale_type_y31 = source
+scale_y31 = 1.0
float_framebuffer31 = true
-alias31 = GlowPass
-shader32 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear32 = true
scale_type_x32 = absolute
scale_x32 = 640.0
scale_type_y32 = absolute
-scale_y32 = 480.0
+scale_y32 = 480.0
float_framebuffer32 = true
+alias32 = GlowPass
-shader33 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear33 = true
scale_type_x33 = absolute
scale_x33 = 640.0
scale_type_y33 = absolute
-scale_y33 = 480.0
+scale_y33 = 480.0
float_framebuffer33 = true
-alias33 = BloomPass
-shader34 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang
+shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear34 = true
+scale_type_x34 = absolute
+scale_x34 = 640.0
+scale_type_y34 = absolute
+scale_y34 = 480.0
float_framebuffer34 = true
-scale_type34 = viewport
-scale_x34 = 1.0
-scale_y34 = 1.0
+alias34 = BloomPass
-shader35 = ../../shaders/guest/hsm-deconvergence.slang
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang
filter_linear35 = true
+float_framebuffer35 = true
scale_type35 = viewport
scale_x35 = 1.0
scale_y35 = 1.0
-shader36 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias36 = "MBZ_PostCRTPass"
+shader36 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear36 = true
+scale_type36 = viewport
+scale_x36 = 1.0
+scale_y36 = 1.0
+
+shader37 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias37 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader37 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear37 = true
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_LayersUnderCRTPass"
-
-shader38 = ../../shaders/base/bezel-images-over-crt.slang
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear38 = true
scale_type38 = viewport
float_framebuffer38 = true
-alias38 = "BR_LayersOverCRTPass"
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader39 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type39 = viewport
-alias39 = "CombinePass"
+shader40 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -275,6 +278,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp
index df58f87..7aa4f0b 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp
@@ -1,4 +1,4 @@
-shaders = 37
+shaders = 38
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,145 +54,148 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
-shader27 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear27 = true
-scale_type_x27 = absolute
-scale_x27 = 800.0
-scale_type_y27 = source
-scale_y27 = 1.0
+scale_type27 = source
+scale27 = 1.0
float_framebuffer27 = true
+alias27 = "LinearizePass"
-shader28 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear28 = true
scale_type_x28 = absolute
scale_x28 = 800.0
-scale_type_y28 = absolute
-scale_y28 = 600.0
+scale_type_y28 = source
+scale_y28 = 1.0
float_framebuffer28 = true
-alias28 = GlowPass
-shader29 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_y29 = 600.0
float_framebuffer29 = true
+alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear30 = true
-scale_type_x30 = source
-scale_x30 = 1.0
-scale_type_y30 = source
-scale_y30 = 1.0
+scale_type_x30 = absolute
+scale_x30 = 800.0
+scale_type_y30 = absolute
+scale_y30 = 600.0
float_framebuffer30 = true
-alias30 = BloomPass
-shader31 = ../../shaders/guest/hsm-crt-guest-advanced-no-reflect.slang
+shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear31 = true
-float_framebuffer31 = true
-scale_type31 = viewport
+scale_type_x31 = source
scale_x31 = 1.0
+scale_type_y31 = source
scale_y31 = 1.0
+float_framebuffer31 = true
+alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-deconvergence-no-reflect.slang
+shader32 = ../../shaders/guest/hsm-crt-guest-advanced-no-reflect.slang
filter_linear32 = true
+float_framebuffer32 = true
scale_type32 = viewport
scale_x32 = 1.0
scale_y32 = 1.0
-shader33 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias33 = "MBZ_PostCRTPass"
+shader33 = ../../shaders/guest/hsm-deconvergence-no-reflect.slang
+filter_linear33 = true
+scale_type33 = viewport
+scale_x33 = 1.0
+scale_y33 = 1.0
+
+shader34 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias34 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader34 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear34 = true
-scale_type34 = viewport
-float_framebuffer34 = true
-alias34 = "BR_LayersUnderCRTPass"
-
-shader35 = ../../shaders/base/bezel-images-over-crt.slang
+shader35 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear35 = true
scale_type35 = viewport
float_framebuffer35 = true
-alias35 = "BR_LayersOverCRTPass"
+alias35 = "BR_LayersUnderCRTPass"
+
+shader36 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear36 = true
+scale_type36 = viewport
+float_framebuffer36 = true
+alias36 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader36 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type36 = viewport
-alias36 = "CombinePass"
+shader37 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type37 = viewport
+alias37 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -254,6 +257,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON-NTSC.slangp
index 21af2b0..880b189 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON-NTSC.slangp
@@ -1,4 +1,4 @@
-shaders = 36
+shaders = 37
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,137 +54,142 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader17 = ../../shaders/base/stock.slang
-alias17 = "PreCRTPass"
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear18 = true
-scale_type18 = source
-scale18 = 1.0
-alias18 = "AfterglowPass"
+shader18 = ../../shaders/base/stock.slang
+alias18 = "PreCRTPass"
-shader19 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader19 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear19 = true
scale_type19 = source
-mipmap_input19 = true
scale19 = 1.0
+alias19 = "AfterglowPass"
+
+shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear20 = true
+scale_type20 = source
+mipmap_input20 = true
+scale20 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader20 = ../../shaders/dogway/hsm-grade.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
+shader21 = ../../shaders/dogway/hsm-grade.slang
+filter_linear21 = true
+scale_type21 = source
+scale21 = 1.0
-shader21 = ../../shaders/base/stock.slang
-alias21 = "PrePass0"
+shader22 = ../../shaders/base/stock.slang
+alias22 = "PrePass0"
-shader22 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear22 = false
-float_framebuffer22 = true
-scale_type_x22 = source
-scale_type_y22 = source
-scale_x22 = 4.0
-scale_y22 = 1.0
-frame_count_mod22 = 2
-alias22 = NPass1
-
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear23 = false
float_framebuffer23 = true
-filter_linear23 = true
-scale_type23 = source
-scale_x23 = 0.5
+scale_type_x23 = source
+scale_type_y23 = source
+scale_x23 = 4.0
scale_y23 = 1.0
+frame_count_mod23 = 2
+alias23 = NPass1
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer24 = true
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
+scale_x24 = 0.5
scale_y24 = 1.0
-shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-shader26 = ../../shaders/base/stock.slang
+shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-alias26 = "PrePass"
-mipmap_input26 = true
-shader27 = ../../shaders/guest/hsm-avg-lum.slang
+shader27 = ../../shaders/base/stock.slang
filter_linear27 = true
scale_type27 = source
-scale27 = 1.0
+scale_x27 = 1.0
+scale_y27 = 1.0
+alias27 = "PrePass"
mipmap_input27 = true
-alias27 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader28 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
-float_framebuffer28 = true
-alias28 = "LinearizePass"
+mipmap_input28 = true
+alias28 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+float_framebuffer29 = true
+alias29 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader29 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear29 = "false"
-scale_type29 = "source"
-scale29 = "1.0"
-wrap_mode29 = "clamp_to_border"
-mipmap_input29 = "false"
-alias29 = "SourceSDR"
-
-shader30 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader30 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear30 = "false"
scale_type30 = "source"
scale30 = "1.0"
wrap_mode30 = "clamp_to_border"
mipmap_input30 = "false"
-alias30 = "SourceHDR"
+alias30 = "SourceSDR"
+float_framebuffer30 = "true"
-shader31 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+shader31 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear31 = "false"
+scale_type31 = "source"
+scale31 = "1.0"
wrap_mode31 = "clamp_to_border"
mipmap_input31 = "false"
-alias31 = ""
-float_framebuffer31 = "false"
-srgb_framebuffer31 = "false"
-scale_type31 = "viewport"
+alias31 = "SourceHDR"
+float_framebuffer31 = "true"
-shader32 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias32 = "MBZ_PostCRTPass"
+shader32 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+filter_linear32 = "false"
+wrap_mode32 = "clamp_to_border"
+mipmap_input32 = "false"
+alias32 = ""
+float_framebuffer32 = "false"
+srgb_framebuffer32 = "false"
+scale_type32 = "viewport"
+
+shader33 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias33 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader33 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear33 = true
-scale_type33 = viewport
-float_framebuffer33 = true
-alias33 = "BR_LayersUnderCRTPass"
-
-shader34 = ../../shaders/base/bezel-images-over-crt.slang
+shader34 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear34 = true
scale_type34 = viewport
float_framebuffer34 = true
-alias34 = "BR_LayersOverCRTPass"
+alias34 = "BR_LayersUnderCRTPass"
+
+shader35 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear35 = true
+scale_type35 = viewport
+float_framebuffer35 = true
+alias35 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader35 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type35 = viewport
-alias35 = "CombinePass"
+shader36 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type36 = viewport
+alias36 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -246,6 +251,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON.slangp
index ba365cb..602371d 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON.slangp
@@ -1,4 +1,4 @@
-shaders = 34
+shaders = 35
shader0 = ../../shaders/base/add-params-no-reflect.slang
alias0 = "CorePass"
@@ -40,7 +40,7 @@ scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"
-shader6 = ../../shaders/base/linearize.slang
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma
shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -54,125 +54,130 @@ shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader15 = ../../shaders/base/delinearize.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader16 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader17 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type17 = source
-scale17 = 1.0
-float_framebuffer17 = true
+shader17 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader18 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x18 = source
-scale_x18 = 1.0
-scale_type_y18 = source
-scale_y18 = 1.0
-filter_linear18 = false
+// GTU TV Processing
+shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type18 = source
+scale18 = 1.0
float_framebuffer18 = true
-shader19 = ../../shaders/base/stock.slang
-alias19 = "PreCRTPass"
+shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x19 = source
+scale_x19 = 1.0
+scale_type_y19 = source
+scale_y19 = 1.0
+filter_linear19 = false
+float_framebuffer19 = true
-shader20 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear20 = true
-scale_type20 = source
-scale20 = 1.0
-alias20 = "AfterglowPass"
+shader20 = ../../shaders/base/stock.slang
+alias20 = "PreCRTPass"
-shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader21 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear21 = true
scale_type21 = source
-mipmap_input21 = true
scale21 = 1.0
+alias21 = "AfterglowPass"
+
+shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear22 = true
+scale_type22 = source
+mipmap_input22 = true
+scale22 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader22 = ../../shaders/dogway/hsm-grade.slang
-filter_linear22 = true
-scale_type22 = source
-scale22 = 1.0
-
-shader23 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader23 = ../../shaders/dogway/hsm-grade.slang
filter_linear23 = true
scale_type23 = source
-scale_x23 = 1.0
-scale_y23 = 1.0
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
+shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0
-alias24 = "PrePass"
-mipmap_input24 = true
-shader25 = ../../shaders/guest/hsm-avg-lum.slang
+shader25 = ../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
-scale25 = 1.0
+scale_x25 = 1.0
+scale_y25 = 1.0
+alias25 = "PrePass"
mipmap_input25 = true
-alias25 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader26 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader26 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
-float_framebuffer26 = true
-alias26 = "LinearizePass"
+mipmap_input26 = true
+alias26 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear27 = true
+scale_type27 = source
+scale27 = 1.0
+float_framebuffer27 = true
+alias27 = "LinearizePass"
feedback_pass = "0"
// Sony Megatron Colour Video Monitor by Major Pain The Cactus
-shader27 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
-filter_linear27 = "false"
-scale_type27 = "source"
-scale27 = "1.0"
-wrap_mode27 = "clamp_to_border"
-mipmap_input27 = "false"
-alias27 = "SourceSDR"
-
-shader28 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
+shader28 = "../../shaders/megatron/crt-sony-megatron-source-pass.slang"
filter_linear28 = "false"
scale_type28 = "source"
scale28 = "1.0"
wrap_mode28 = "clamp_to_border"
mipmap_input28 = "false"
-alias28 = "SourceHDR"
+alias28 = "SourceSDR"
+float_framebuffer28 = "true"
-shader29 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+shader29 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear29 = "false"
+scale_type29 = "source"
+scale29 = "1.0"
wrap_mode29 = "clamp_to_border"
mipmap_input29 = "false"
-alias29 = ""
-float_framebuffer29 = "false"
-srgb_framebuffer29 = "false"
-scale_type29 = "viewport"
+alias29 = "SourceHDR"
+float_framebuffer29 = "true"
-shader30 = ../../shaders/base/post-crt-prep-no-reflect.slang
-alias30 = "MBZ_PostCRTPass"
+shader30 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
+filter_linear30 = "false"
+wrap_mode30 = "clamp_to_border"
+mipmap_input30 = "false"
+alias30 = ""
+float_framebuffer30 = "false"
+srgb_framebuffer30 = "false"
+scale_type30 = "viewport"
+
+shader31 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias31 = "MBZ_PostCRTPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader31 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear31 = true
-scale_type31 = viewport
-float_framebuffer31 = true
-alias31 = "BR_LayersUnderCRTPass"
-
-shader32 = ../../shaders/base/bezel-images-over-crt.slang
+shader32 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear32 = true
scale_type32 = viewport
float_framebuffer32 = true
-alias32 = "BR_LayersOverCRTPass"
+alias32 = "BR_LayersUnderCRTPass"
+
+shader33 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear33 = true
+scale_type33 = viewport
+float_framebuffer33 = true
+alias33 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader33 = ../../shaders/base/combine-passes-no-reflect.slang
-scale_type33 = viewport
-alias33 = "CombinePass"
+shader34 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type34 = viewport
+alias34 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -234,6 +239,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..91e17be
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,469 @@
+shaders = 49
+
+shader0 = ../../shaders/base/add-params-glass.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-screen-scale-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-std-glass.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader17 = ../../shaders/base/stock.slang
+// filter_linear17 = "false"
+// wrap_mode17 = "clamp_to_border"
+// mipmap_input17 = "false"
+// float_framebuffer17 = "false"
+// srgb_framebuffer17 = "true"
+alias17 = XbrSource
+
+shader18 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear18 = "false"
+wrap_mode18 = "clamp_to_border"
+mipmap_input18 = "false"
+float_framebuffer18 = "false"
+srgb_framebuffer18 = "true"
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+alias19 = ""
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+scale_type_x19 = "source"
+scale_x19 = "2.000000"
+scale_type_y19 = "source"
+scale_y19 = "2.000000"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "1.000000"
+scale_type_y20 = "source"
+scale_y20 = "1.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear22 = false
+scale_type_x22 = source
+scale_x22 = 1
+scale_type_y22 = source
+scale_y22 = 0.5
+wrap_mode22 = "clamp_to_edge"
+
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PreCRTPass"
+
+shader24 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear24 = true
+scale_type24 = source
+scale24 = 1.0
+alias24 = "AfterglowPass"
+
+shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear25 = true
+scale_type25 = source
+mipmap_input25 = true
+scale25 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader26 = ../../shaders/dogway/hsm-grade.slang
+filter_linear26 = true
+scale_type26 = source
+scale26 = 1.0
+
+shader27 = ../../shaders/base/stock.slang
+alias27 = "PrePass0"
+
+shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear28 = false
+float_framebuffer28 = true
+scale_type_x28 = source
+scale_type_y28 = source
+scale_x28 = 4.0
+scale_y28 = 1.0
+frame_count_mod28 = 2
+alias28 = NPass1
+
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer29 = true
+filter_linear29 = true
+scale_type29 = source
+scale_x29 = 0.5
+scale_y29 = 1.0
+
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 1.0
+scale_y30 = 1.0
+
+shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+
+shader32 = ../../shaders/base/stock.slang
+filter_linear32 = true
+scale_type32 = source
+scale_x32 = 1.0
+scale_y32 = 1.0
+alias32 = "PrePass"
+mipmap_input32 = true
+
+shader33 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+mipmap_input33 = true
+alias33 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear34 = true
+scale_type34 = source
+scale34 = 1.0
+float_framebuffer34 = true
+alias34 = "LinearizePass"
+
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear35 = true
+scale_type_x35 = viewport
+scale_x35 = 1.0
+scale_type_y35 = source
+scale_y35 = 1.0
+float_framebuffer35 = true
+alias35 = Pass1
+
+shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear36 = true
+scale_type_x36 = absolute
+scale_x36 = 640.0
+scale_type_y36 = source
+scale_y36 = 1.0
+float_framebuffer36 = true
+
+shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear37 = true
+scale_type_x37 = absolute
+scale_x37 = 640.0
+scale_type_y37 = absolute
+scale_y37 = 480.0
+float_framebuffer37 = true
+alias37 = GlowPass
+
+shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear38 = true
+scale_type_x38 = absolute
+scale_x38 = 640.0
+scale_type_y38 = absolute
+scale_y38 = 480.0
+float_framebuffer38 = true
+
+shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear39 = true
+scale_type_x39 = absolute
+scale_x39 = 640.0
+scale_type_y39 = absolute
+scale_y39 = 480.0
+float_framebuffer39 = true
+alias39 = BloomPass
+
+shader40 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+filter_linear40 = true
+float_framebuffer40 = true
+scale_type40 = viewport
+scale_x40 = 1.0
+scale_y40 = 1.0
+
+shader41 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear41 = true
+scale_type41 = viewport
+scale_x41 = 1.0
+scale_y41 = 1.0
+
+shader42 = ../../shaders/base/post-crt-prep-glass.slang
+alias42 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader43 = ../../shaders/base/linearize-crt.slang
+mipmap_input43 = true
+filter_linear43 = true
+scale_type43 = absolute
+// scale_x43 = 480
+// scale_y43 = 270
+// scale_x43 = 960
+// scale_y43 = 540
+scale_x43 = 800
+scale_y43 = 600
+alias43 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader44 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input44 = true
+filter_linear44 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader45 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear45 = true
+alias45 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input46 = true
+filter_linear46 = true
+scale_type46 = absolute
+scale_x46 = 128
+scale_y46 = 128
+alias46 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input47 = true
+filter_linear47 = true
+scale_type47 = absolute
+scale_x47 = 12
+scale_y47 = 12
+alias47 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader48 = ../../shaders/base/reflection-glass.slang
+scale_type48 = viewport
+alias48 = "BR_CRTAndReflectionPass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/TopLayerImageGradient_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// Parameters
+HSM_TUBE_BLACK_EDGE_SHARPNESS = "90.0000"
+HSM_TUBE_BLACK_EDGE_THICKNESS = -7
+HSM_BG_OPACITY = "1.000000"
+HSM_GLASS_BORDER_ON = "1.000000"
+HSM_BZL_WIDTH = 3000
+HSM_BZL_HEIGHT = 3000
+HSM_BZL_INNER_EDGE_THICKNESS = 350
+HSM_BZL_INNER_EDGE_SHARPNESS = 30
+HSM_BZL_INNER_CORNER_RADIUS_SCALE = "100.000000"
+HSM_BZL_INNER_EDGE_SHADOW = "0.000000"
+HSM_FRM_OPACITY = "100.000000"
+HSM_REFLECT_GLOBAL_AMOUNT = "35.00000"
+HSM_REFLECT_GLOBAL_GAMMA_ADJUST = "0.900000"
+HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = "60.0000"
+HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = "40.0000"
+HSM_REFLECT_FULLSCREEN_GLOW = "30.000000"
+HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = "1.500000"
+HSM_REFLECT_FADE_AMOUNT = "20.0000"
+HSM_REFLECT_RADIAL_FADE_WIDTH = "500.000000"
+HSM_REFLECT_RADIAL_FADE_HEIGHT = "300.000000"
+HSM_REFLECT_LATERAL_OUTER_FADE_POSITION = "500.000000"
+HSM_REFLECT_CORNER_FADE = "0.000000"
+HSM_REFLECT_BLUR_MIN = "30.0000"
+HSM_REFLECT_BLUR_MAX = "60.0000"
+HSM_REFLECT_NOISE_AMOUNT = "100.000000"
+HSM_REFLECT_NOISE_SAMPLES = "4.000000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_BG_BRIGHTNESS = "0.000000"
+HSM_SCREEN_VIGNETTE_STRENGTH = "20.000000"
+HSM_SCREEN_VIGNETTE_POWER = "4.000000"
+HSM_SCREEN_VIGNETTE_IN_REFLECTION = "0.000000"
+
+g_vignette = "0.0"
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..e7a8307
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS-SUPER-XBR__GDV.slangp
@@ -0,0 +1,430 @@
+shaders = 44
+
+shader0 = ../../shaders/base/add-params-glass.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-screen-scale-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-std-glass.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader17 = ../../shaders/base/stock.slang
+// filter_linear17 = "false"
+// wrap_mode17 = "clamp_to_border"
+// mipmap_input17 = "false"
+// float_framebuffer17 = "false"
+// srgb_framebuffer17 = "true"
+alias17 = XbrSource
+
+shader18 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear18 = "false"
+wrap_mode18 = "clamp_to_border"
+mipmap_input18 = "false"
+float_framebuffer18 = "false"
+srgb_framebuffer18 = "true"
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+alias19 = ""
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+scale_type_x19 = "source"
+scale_x19 = "2.000000"
+scale_type_y19 = "source"
+scale_y19 = "2.000000"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "1.000000"
+scale_type_y20 = "source"
+scale_y20 = "1.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear22 = false
+scale_type_x22 = source
+scale_x22 = 1
+scale_type_y22 = source
+scale_y22 = 0.5
+wrap_mode22 = "clamp_to_edge"
+
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PreCRTPass"
+
+shader24 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear24 = true
+scale_type24 = source
+scale24 = 1.0
+alias24 = "AfterglowPass"
+
+shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear25 = true
+scale_type25 = source
+mipmap_input25 = true
+scale25 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader26 = ../../shaders/dogway/hsm-grade.slang
+filter_linear26 = true
+scale_type26 = source
+scale26 = 1.0
+
+shader27 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear27 = true
+scale_type27 = source
+scale_x27 = 1.0
+scale_y27 = 1.0
+
+shader28 = ../../shaders/base/stock.slang
+filter_linear28 = true
+scale_type28 = source
+scale_x28 = 1.0
+scale_y28 = 1.0
+alias28 = "PrePass"
+mipmap_input28 = true
+
+shader29 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+mipmap_input29 = true
+alias29 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader30 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear30 = true
+scale_type30 = source
+scale30 = 1.0
+float_framebuffer30 = true
+alias30 = "LinearizePass"
+
+shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear31 = true
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = source
+scale_y31 = 1.0
+float_framebuffer31 = true
+
+shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear32 = true
+scale_type_x32 = absolute
+scale_x32 = 800.0
+scale_type_y32 = absolute
+scale_y32 = 600.0
+float_framebuffer32 = true
+alias32 = GlowPass
+
+shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear33 = true
+scale_type_x33 = absolute
+scale_x33 = 800.0
+scale_type_y33 = absolute
+scale_y33 = 600.0
+float_framebuffer33 = true
+
+shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear34 = true
+scale_type_x34 = source
+scale_x34 = 1.0
+scale_type_y34 = source
+scale_y34 = 1.0
+float_framebuffer34 = true
+alias34 = BloomPass
+
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+filter_linear35 = true
+float_framebuffer35 = true
+scale_type35 = viewport
+scale_x35 = 1.0
+scale_y35 = 1.0
+
+shader36 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear36 = true
+scale_type36 = viewport
+scale_x36 = 1.0
+scale_y36 = 1.0
+
+shader37 = ../../shaders/base/post-crt-prep-glass.slang
+alias37 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader38 = ../../shaders/base/linearize-crt.slang
+mipmap_input38 = true
+filter_linear38 = true
+scale_type38 = absolute
+// scale_x38 = 480
+// scale_y38 = 270
+// scale_x38 = 960
+// scale_y38 = 540
+scale_x38 = 800
+scale_y38 = 600
+alias38 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input39 = true
+filter_linear39 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader40 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear40 = true
+alias40 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input41 = true
+filter_linear41 = true
+scale_type41 = absolute
+scale_x41 = 128
+scale_y41 = 128
+alias41 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input42 = true
+filter_linear42 = true
+scale_type42 = absolute
+scale_x42 = 12
+scale_y42 = 12
+alias42 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader43 = ../../shaders/base/reflection-glass.slang
+scale_type43 = viewport
+alias43 = "BR_CRTAndReflectionPass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/TopLayerImageGradient_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/Placeholder_Transparent_16x16.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// Parameters
+HSM_TUBE_BLACK_EDGE_SHARPNESS = "90.0000"
+HSM_TUBE_BLACK_EDGE_THICKNESS = -7
+HSM_BG_OPACITY = "1.000000"
+HSM_GLASS_BORDER_ON = "1.000000"
+HSM_BZL_WIDTH = 3000
+HSM_BZL_HEIGHT = 3000
+HSM_BZL_INNER_EDGE_THICKNESS = 350
+HSM_BZL_INNER_EDGE_SHARPNESS = 30
+HSM_BZL_INNER_CORNER_RADIUS_SCALE = "100.000000"
+HSM_BZL_INNER_EDGE_SHADOW = "0.000000"
+HSM_FRM_OPACITY = "100.000000"
+HSM_REFLECT_GLOBAL_AMOUNT = "35.00000"
+HSM_REFLECT_GLOBAL_GAMMA_ADJUST = "0.900000"
+HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = "60.0000"
+HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = "40.0000"
+HSM_REFLECT_FULLSCREEN_GLOW = "30.000000"
+HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = "1.500000"
+HSM_REFLECT_FADE_AMOUNT = "20.0000"
+HSM_REFLECT_RADIAL_FADE_WIDTH = "500.000000"
+HSM_REFLECT_RADIAL_FADE_HEIGHT = "300.000000"
+HSM_REFLECT_LATERAL_OUTER_FADE_POSITION = "500.000000"
+HSM_REFLECT_CORNER_FADE = "0.000000"
+HSM_REFLECT_BLUR_MIN = "30.0000"
+HSM_REFLECT_BLUR_MAX = "60.0000"
+HSM_REFLECT_NOISE_AMOUNT = "100.000000"
+HSM_REFLECT_NOISE_SAMPLES = "4.000000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
+HSM_BG_BRIGHTNESS = "0.000000"
+HSM_SCREEN_VIGNETTE_STRENGTH = "20.000000"
+HSM_SCREEN_VIGNETTE_POWER = "4.000000"
+HSM_SCREEN_VIGNETTE_IN_REFLECTION = "0.000000"
+
+g_vignette = "0.0"
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp
index da577fa..01690f1 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp
@@ -183,7 +183,7 @@ shader26 = ../../shaders/base/reflection-glass.slang
scale_type26 = viewport
alias26 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -245,6 +245,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp
index 696e027..f7d8177 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp
@@ -157,7 +157,7 @@ shader22 = ../../shaders/base/reflection-glass.slang
scale_type22 = viewport
alias22 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -219,6 +219,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-NTSC.slangp
index cccb097..b80f004 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-NTSC.slangp
@@ -229,7 +229,7 @@ shader31 = ../../shaders/base/reflection-glass.slang
scale_type31 = viewport
alias31 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -291,6 +291,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV.slangp
index 26bd548..4abca3e 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV.slangp
@@ -194,7 +194,7 @@ shader26 = ../../shaders/base/reflection-glass.slang
scale_type26 = viewport
alias26 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -256,6 +256,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__LCD-GRID.slangp
index 10c9053..4e1ff4d 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__LCD-GRID.slangp
@@ -154,7 +154,7 @@ shader22 = ../../shaders/base/reflection-glass.slang
scale_type22 = viewport
alias22 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -216,6 +216,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON-NTSC.slangp
index 6d4569c..41c9bd6 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON-NTSC.slangp
@@ -126,6 +126,7 @@ scale18 = "1.0"
wrap_mode18 = "clamp_to_border"
mipmap_input18 = "false"
alias18 = "SourceSDR"
+float_framebuffer18 = "true"
shader19 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear19 = "false"
@@ -134,6 +135,7 @@ scale19 = "1.0"
wrap_mode19 = "clamp_to_border"
mipmap_input19 = "false"
alias19 = "SourceHDR"
+float_framebuffer19 = "true"
shader20 = "../../shaders/megatron/crt-sony-megatron.slang"
filter_linear20 = "false"
@@ -200,7 +202,7 @@ shader27 = ../../shaders/base/reflection-glass.slang
scale_type27 = viewport
alias27 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -262,6 +264,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON.slangp
index 1a09a34..72379bf 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON.slangp
@@ -100,6 +100,7 @@ scale14 = "1.0"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = "SourceSDR"
+float_framebuffer14 = "true"
shader15 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear15 = "false"
@@ -108,6 +109,7 @@ scale15 = "1.0"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = "SourceHDR"
+float_framebuffer15 = "true"
shader16 = "../../shaders/megatron/crt-sony-megatron.slang"
filter_linear16 = "false"
@@ -174,7 +176,7 @@ shader23 = ../../shaders/base/reflection-glass.slang
scale_type23 = viewport
alias23 = "BR_CRTAndReflectionPass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -236,6 +238,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..7febf51
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,465 @@
+shaders = 35
+
+shader0 = ../../shaders/base/add-params-all.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-all-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-std.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/base/stock.slang
+alias6 = "PreCRTPass"
+
+shader7 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear7 = true
+scale_type7 = source
+scale7 = 1.0
+alias7 = "AfterglowPass"
+
+shader8 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear8 = true
+scale_type8 = source
+mipmap_input8 = true
+scale8 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader9 = ../../shaders/dogway/hsm-grade.slang
+filter_linear9 = true
+scale_type9 = source
+scale9 = 1.0
+
+shader10 = ../../shaders/base/stock.slang
+alias10 = "PrePass0"
+
+shader11 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear11 = false
+float_framebuffer11 = true
+scale_type_x11 = source
+scale_type_y11 = source
+scale_x11 = 4.0
+scale_y11 = 1.0
+frame_count_mod11 = 2
+alias11 = NPass1
+
+shader12 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer12 = true
+filter_linear12 = true
+scale_type12 = source
+scale_x12 = 0.5
+scale_y12 = 1.0
+
+shader13 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear13 = true
+scale_type13 = source
+scale_x13 = 1.0
+scale_y13 = 1.0
+
+shader14 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear14 = true
+scale_type14 = source
+scale_x14 = 1.0
+scale_y14 = 1.0
+
+shader15 = ../../shaders/base/stock.slang
+filter_linear15 = true
+scale_type15 = source
+scale_x15 = 1.0
+scale_y15 = 1.0
+alias15 = "PrePass"
+mipmap_input15 = true
+
+shader16 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear16 = true
+scale_type16 = source
+scale16 = 1.0
+mipmap_input16 = true
+alias16 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader17 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear17 = true
+scale_type17 = source
+scale17 = 1.0
+float_framebuffer17 = true
+alias17 = "LinearizePass"
+
+shader18 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear18 = true
+scale_type_x18 = viewport
+scale_x18 = 1.0
+scale_type_y18 = source
+scale_y18 = 1.0
+float_framebuffer18 = true
+alias18 = Pass1
+
+shader19 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear19 = true
+scale_type_x19 = absolute
+scale_x19 = 640.0
+scale_type_y19 = source
+scale_y19 = 1.0
+float_framebuffer19 = true
+
+shader20 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear20 = true
+scale_type_x20 = absolute
+scale_x20 = 640.0
+scale_type_y20 = absolute
+scale_y20 = 480.0
+float_framebuffer20 = true
+alias20 = GlowPass
+
+shader21 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear21 = true
+scale_type_x21 = absolute
+scale_x21 = 640.0
+scale_type_y21 = absolute
+scale_y21 = 480.0
+float_framebuffer21 = true
+
+shader22 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear22 = true
+scale_type_x22 = absolute
+scale_x22 = 640.0
+scale_type_y22 = absolute
+scale_y22 = 480.0
+float_framebuffer22 = true
+alias22 = BloomPass
+
+shader23 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+filter_linear23 = true
+float_framebuffer23 = true
+scale_type23 = viewport
+scale_x23 = 1.0
+scale_y23 = 1.0
+
+shader24 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear24 = true
+scale_type24 = viewport
+scale_x24 = 1.0
+scale_y24 = 1.0
+
+shader25 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias25 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader26 = ../../shaders/base/linearize-crt.slang
+mipmap_input26 = true
+filter_linear26 = true
+scale_type26 = absolute
+// scale_x26 = 480
+// scale_y26 = 270
+// scale_x26 = 960
+// scale_y26 = 540
+scale_x26 = 800
+scale_y26 = 600
+alias26 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader27 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input27 = true
+filter_linear27 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader28 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear28 = true
+alias28 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader29 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input29 = true
+filter_linear29 = true
+scale_type29 = absolute
+scale_x29 = 128
+scale_y29 = 128
+alias29 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader30 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input30 = true
+filter_linear30 = true
+scale_type30 = absolute
+scale_x30 = 12
+scale_y30 = 12
+alias30 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader31 = ../../shaders/base/reflection.slang
+scale_type31 = viewport
+float_framebuffer31 = true
+alias31 = "BR_CRTAndReflectionPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader32 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear32 = true
+scale_type32 = viewport
+float_framebuffer32 = true
+alias32 = "BR_LayersUnderCRTPass"
+
+shader33 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear33 = true
+scale_type33 = viewport
+float_framebuffer33 = true
+alias33 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader34 = ../../shaders/base/combine-passes.slang
+scale_type34 = viewport
+alias34 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..bf78972
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-SUPER-XBR__GDV.slangp
@@ -0,0 +1,395 @@
+shaders = 36
+
+shader0 = ../../shaders/base/add-params-all.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-all-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-std.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/base/stock.slang
+alias6 = "PreCRTPass"
+
+shader7 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear7 = true
+scale_type7 = source
+scale7 = 1.0
+alias7 = "AfterglowPass"
+
+shader8 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear8 = true
+scale_type8 = source
+mipmap_input8 = true
+scale8 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader9 = ../../shaders/dogway/hsm-grade.slang
+filter_linear9 = true
+scale_type9 = source
+scale9 = 1.0
+
+shader10 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear10 = true
+scale_type10 = source
+scale_x10 = 1.0
+scale_y10 = 1.0
+
+shader11 = ../../shaders/base/stock.slang
+// filter_linear11 = "false"
+// wrap_mode11 = "clamp_to_border"
+// mipmap_input11 = "false"
+// float_framebuffer11 = "false"
+// srgb_framebuffer11 = "true"
+alias11 = XbrSource
+
+shader12 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear12 = "false"
+wrap_mode12 = "clamp_to_border"
+mipmap_input12 = "false"
+float_framebuffer12 = "false"
+srgb_framebuffer12 = "true"
+
+shader13 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear13 = "false"
+wrap_mode13 = "clamp_to_border"
+mipmap_input13 = "false"
+alias13 = ""
+float_framebuffer13 = "false"
+srgb_framebuffer13 = "true"
+scale_type_x13 = "source"
+scale_x13 = "2.000000"
+scale_type_y13 = "source"
+scale_y13 = "2.000000"
+
+shader14 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear14 = "false"
+wrap_mode14 = "clamp_to_border"
+mipmap_input14 = "false"
+alias14 = ""
+float_framebuffer14 = "false"
+srgb_framebuffer14 = "true"
+scale_type_x14 = "source"
+scale_x14 = "1.000000"
+scale_type_y14 = "source"
+scale_y14 = "1.000000"
+
+shader15 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear15 = "false"
+wrap_mode15 = "clamp_to_border"
+mipmap_input15 = "false"
+alias15 = ""
+float_framebuffer15 = "false"
+srgb_framebuffer15 = "true"
+scale_type_x15 = "source"
+scale_x15 = "1.000000"
+scale_type_y15 = "source"
+scale_y15 = "1.000000"
+
+shader16 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear16 = false
+scale_type_x16 = source
+scale_x16 = 1
+scale_type_y16 = source
+scale_y16 = 0.5
+wrap_mode16 = "clamp_to_edge"
+
+shader17 = ../../shaders/base/stock.slang
+filter_linear17 = true
+scale_type17 = source
+scale_x17 = 1.0
+scale_y17 = 1.0
+alias17 = "PrePass"
+mipmap_input17 = true
+
+shader18 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear18 = true
+scale_type18 = source
+scale18 = 1.0
+mipmap_input18 = true
+alias18 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader19 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear19 = true
+scale_type19 = source
+scale19 = 1.0
+float_framebuffer19 = true
+alias19 = "LinearizePass"
+
+shader20 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear20 = true
+scale_type_x20 = absolute
+scale_x20 = 800.0
+scale_type_y20 = source
+scale_y20 = 1.0
+float_framebuffer20 = true
+
+shader21 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear21 = true
+scale_type_x21 = absolute
+scale_x21 = 800.0
+scale_type_y21 = absolute
+scale_y21 = 600.0
+float_framebuffer21 = true
+alias21 = GlowPass
+
+shader22 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear22 = true
+scale_type_x22 = absolute
+scale_x22 = 800.0
+scale_type_y22 = absolute
+scale_y22 = 600.0
+float_framebuffer22 = true
+
+shader23 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear23 = true
+scale_type_x23 = source
+scale_x23 = 1.0
+scale_type_y23 = source
+scale_y23 = 1.0
+float_framebuffer23 = true
+alias23 = BloomPass
+
+shader24 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+filter_linear24 = true
+float_framebuffer24 = true
+scale_type24 = viewport
+scale_x24 = 1.0
+scale_y24 = 1.0
+
+shader25 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear25 = true
+scale_type25 = viewport
+scale_x25 = 1.0
+scale_y25 = 1.0
+
+shader26 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias26 = "MBZ_PostCRTPass"
+
+// Reduce Resolution ----------------------------------------------------------------
+// Reduce the resolution to a small static size regardless of final resolution
+// Allows consistent look and faster at different final resolutions for blur
+// Mipmap option allows downscaling without artifacts
+shader27 = ../../shaders/base/linearize-crt.slang
+mipmap_input27 = true
+filter_linear27 = true
+scale_type27 = absolute
+// scale_x27 = 480
+// scale_y27 = 270
+// scale_x27 = 960
+// scale_y27 = 540
+scale_x27 = 800
+scale_y27 = 600
+alias27 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader28 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input28 = true
+filter_linear28 = true
+
+// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
+shader29 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear29 = true
+alias29 = "BR_MirrorBlurredPass"
+
+// Reduce resolution ----------------------------------------------------------------
+// Reduced to a very small amount so we can create a blur which will create a glow from the screen
+// Mipmap option allows smoother downscaling
+shader30 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input30 = true
+filter_linear30 = true
+scale_type30 = absolute
+scale_x30 = 128
+scale_y30 = 128
+alias30 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader31 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input31 = true
+filter_linear31 = true
+scale_type31 = absolute
+scale_x31 = 12
+scale_y31 = 12
+alias31 = "BR_MirrorFullscreenGlowPass"
+
+// Bezel Reflection ----------------------------------------------------------------
+shader32 = ../../shaders/base/reflection.slang
+scale_type32 = viewport
+float_framebuffer32 = true
+alias32 = "BR_CRTAndReflectionPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader33 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear33 = true
+scale_type33 = viewport
+float_framebuffer33 = true
+alias33 = "BR_LayersUnderCRTPass"
+
+shader34 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear34 = true
+scale_type34 = viewport
+float_framebuffer34 = true
+alias34 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader35 = ../../shaders/base/combine-passes.slang
+scale_type35 = viewport
+alias35 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__EASYMODE.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__EASYMODE.slangp
index c08b0f3..2864078 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__EASYMODE.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__EASYMODE.slangp
@@ -185,7 +185,7 @@ shader27 = ../../shaders/base/combine-passes.slang
scale_type27 = viewport
alias27 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -247,6 +247,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp
index 121fde8..0785058 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp
@@ -203,7 +203,7 @@ shader29 = ../../shaders/base/combine-passes.slang
scale_type29 = viewport
alias29 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -265,6 +265,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI.slangp
index 5a1b4cb..f95fc99 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI.slangp
@@ -177,7 +177,7 @@ shader25 = ../../shaders/base/combine-passes.slang
scale_type25 = viewport
alias25 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -239,6 +239,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-NTSC.slangp
index 2653d1f..5e940e9 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-NTSC.slangp
@@ -249,7 +249,7 @@ shader34 = ../../shaders/base/combine-passes.slang
scale_type34 = viewport
alias34 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -311,6 +311,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -335,7 +339,7 @@ TopLayerImage_mipmap = 1
// HSM_ASPECT_RATIO_MODE = 6
// HSM_CURVATURE_MODE = 0
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -397,6 +401,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV.slangp
index 8d76c78..9b11dc8 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV.slangp
@@ -214,7 +214,7 @@ shader29 = ../../shaders/base/combine-passes.slang
scale_type29 = viewport
alias29 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -276,6 +276,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp
index abbb785..bfe6760 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp
@@ -174,7 +174,7 @@ shader25 = ../../shaders/base/combine-passes.slang
scale_type25 = viewport
alias25 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -236,6 +236,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON-NTSC.slangp
index 5e860d1..83ff8d4 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON-NTSC.slangp
@@ -126,6 +126,7 @@ scale18 = "1.0"
wrap_mode18 = "clamp_to_border"
mipmap_input18 = "false"
alias18 = "SourceSDR"
+float_framebuffer18 = "true"
shader19 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear19 = "false"
@@ -134,6 +135,7 @@ scale19 = "1.0"
wrap_mode19 = "clamp_to_border"
mipmap_input19 = "false"
alias19 = "SourceHDR"
+float_framebuffer19 = "true"
shader20 = "../../shaders/megatron/crt-sony-megatron.slang"
filter_linear20 = "false"
@@ -220,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -282,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON.slangp
index ad3d440..8c76f88 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON.slangp
@@ -100,6 +100,7 @@ scale14 = "1.0"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = "SourceSDR"
+float_framebuffer14 = "true"
shader15 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear15 = "false"
@@ -108,6 +109,7 @@ scale15 = "1.0"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = "SourceHDR"
+float_framebuffer15 = "true"
shader16 = "../../shaders/megatron/crt-sony-megatron.slang"
filter_linear16 = "false"
@@ -194,7 +196,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -256,6 +258,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..82ce79d
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,399 @@
+shaders = 46
+
+shader0 = ../../shaders/base/add-params-no-reflect.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-no-reflect-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-std-no-reflect.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader17 = ../../shaders/base/stock.slang
+// filter_linear17 = "false"
+// wrap_mode17 = "clamp_to_border"
+// mipmap_input17 = "false"
+// float_framebuffer17 = "false"
+// srgb_framebuffer17 = "true"
+alias17 = XbrSource
+
+shader18 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear18 = "false"
+wrap_mode18 = "clamp_to_border"
+mipmap_input18 = "false"
+float_framebuffer18 = "false"
+srgb_framebuffer18 = "true"
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+alias19 = ""
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+scale_type_x19 = "source"
+scale_x19 = "2.000000"
+scale_type_y19 = "source"
+scale_y19 = "2.000000"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "1.000000"
+scale_type_y20 = "source"
+scale_y20 = "1.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear22 = false
+scale_type_x22 = source
+scale_x22 = 1
+scale_type_y22 = source
+scale_y22 = 0.5
+wrap_mode22 = "clamp_to_edge"
+
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PreCRTPass"
+
+shader24 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear24 = true
+scale_type24 = source
+scale24 = 1.0
+alias24 = "AfterglowPass"
+
+shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear25 = true
+scale_type25 = source
+mipmap_input25 = true
+scale25 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader26 = ../../shaders/dogway/hsm-grade.slang
+filter_linear26 = true
+scale_type26 = source
+scale26 = 1.0
+
+shader27 = ../../shaders/base/stock.slang
+alias27 = "PrePass0"
+
+shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear28 = false
+float_framebuffer28 = true
+scale_type_x28 = source
+scale_type_y28 = source
+scale_x28 = 4.0
+scale_y28 = 1.0
+frame_count_mod28 = 2
+alias28 = NPass1
+
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer29 = true
+filter_linear29 = true
+scale_type29 = source
+scale_x29 = 0.5
+scale_y29 = 1.0
+
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 1.0
+scale_y30 = 1.0
+
+shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+
+shader32 = ../../shaders/base/stock.slang
+filter_linear32 = true
+scale_type32 = source
+scale_x32 = 1.0
+scale_y32 = 1.0
+alias32 = "PrePass"
+mipmap_input32 = true
+
+shader33 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+mipmap_input33 = true
+alias33 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear34 = true
+scale_type34 = source
+scale34 = 1.0
+float_framebuffer34 = true
+alias34 = "LinearizePass"
+
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear35 = true
+scale_type_x35 = viewport
+scale_x35 = 1.0
+scale_type_y35 = source
+scale_y35 = 1.0
+float_framebuffer35 = true
+alias35 = Pass1
+
+shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear36 = true
+scale_type_x36 = absolute
+scale_x36 = 640.0
+scale_type_y36 = source
+scale_y36 = 1.0
+float_framebuffer36 = true
+
+shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear37 = true
+scale_type_x37 = absolute
+scale_x37 = 640.0
+scale_type_y37 = absolute
+scale_y37 = 480.0
+float_framebuffer37 = true
+alias37 = GlowPass
+
+shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear38 = true
+scale_type_x38 = absolute
+scale_x38 = 640.0
+scale_type_y38 = absolute
+scale_y38 = 480.0
+float_framebuffer38 = true
+
+shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear39 = true
+scale_type_x39 = absolute
+scale_x39 = 640.0
+scale_type_y39 = absolute
+scale_y39 = 480.0
+float_framebuffer39 = true
+alias39 = BloomPass
+
+shader40 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang
+filter_linear40 = true
+float_framebuffer40 = true
+scale_type40 = viewport
+scale_x40 = 1.0
+scale_y40 = 1.0
+
+shader41 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear41 = true
+scale_type41 = viewport
+scale_x41 = 1.0
+scale_y41 = 1.0
+
+shader42 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias42 = "MBZ_PostCRTPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader43 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersUnderCRTPass"
+
+shader44 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear44 = true
+scale_type44 = viewport
+float_framebuffer44 = true
+alias44 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader45 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type45 = viewport
+alias45 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..24923cb
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT-SUPER-XBR__GDV.slangp
@@ -0,0 +1,360 @@
+shaders = 41
+
+shader0 = ../../shaders/base/add-params-no-reflect.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-no-reflect-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-std-no-reflect.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader17 = ../../shaders/base/stock.slang
+// filter_linear17 = "false"
+// wrap_mode17 = "clamp_to_border"
+// mipmap_input17 = "false"
+// float_framebuffer17 = "false"
+// srgb_framebuffer17 = "true"
+alias17 = XbrSource
+
+shader18 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear18 = "false"
+wrap_mode18 = "clamp_to_border"
+mipmap_input18 = "false"
+float_framebuffer18 = "false"
+srgb_framebuffer18 = "true"
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+alias19 = ""
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+scale_type_x19 = "source"
+scale_x19 = "2.000000"
+scale_type_y19 = "source"
+scale_y19 = "2.000000"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "1.000000"
+scale_type_y20 = "source"
+scale_y20 = "1.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear22 = false
+scale_type_x22 = source
+scale_x22 = 1
+scale_type_y22 = source
+scale_y22 = 0.5
+wrap_mode22 = "clamp_to_edge"
+
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PreCRTPass"
+
+shader24 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear24 = true
+scale_type24 = source
+scale24 = 1.0
+alias24 = "AfterglowPass"
+
+shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear25 = true
+scale_type25 = source
+mipmap_input25 = true
+scale25 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader26 = ../../shaders/dogway/hsm-grade.slang
+filter_linear26 = true
+scale_type26 = source
+scale26 = 1.0
+
+shader27 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear27 = true
+scale_type27 = source
+scale_x27 = 1.0
+scale_y27 = 1.0
+
+shader28 = ../../shaders/base/stock.slang
+filter_linear28 = true
+scale_type28 = source
+scale_x28 = 1.0
+scale_y28 = 1.0
+alias28 = "PrePass"
+mipmap_input28 = true
+
+shader29 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+mipmap_input29 = true
+alias29 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader30 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear30 = true
+scale_type30 = source
+scale30 = 1.0
+float_framebuffer30 = true
+alias30 = "LinearizePass"
+
+shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear31 = true
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = source
+scale_y31 = 1.0
+float_framebuffer31 = true
+
+shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear32 = true
+scale_type_x32 = absolute
+scale_x32 = 800.0
+scale_type_y32 = absolute
+scale_y32 = 600.0
+float_framebuffer32 = true
+alias32 = GlowPass
+
+shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear33 = true
+scale_type_x33 = absolute
+scale_x33 = 800.0
+scale_type_y33 = absolute
+scale_y33 = 600.0
+float_framebuffer33 = true
+
+shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear34 = true
+scale_type_x34 = source
+scale_x34 = 1.0
+scale_type_y34 = source
+scale_y34 = 1.0
+float_framebuffer34 = true
+alias34 = BloomPass
+
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-no-reflect.slang
+filter_linear35 = true
+float_framebuffer35 = true
+scale_type35 = viewport
+scale_x35 = 1.0
+scale_y35 = 1.0
+
+shader36 = ../../shaders/guest/hsm-deconvergence-no-reflect.slang
+filter_linear36 = true
+scale_type36 = viewport
+scale_x36 = 1.0
+scale_y36 = 1.0
+
+shader37 = ../../shaders/base/post-crt-prep-no-reflect.slang
+alias37 = "MBZ_PostCRTPass"
+
+// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
+
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
+filter_linear38 = true
+scale_type38 = viewport
+float_framebuffer38 = true
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
+
+// Combine Passes ----------------------------------------------------------------
+shader40 = ../../shaders/base/combine-passes-no-reflect.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
+IntroImage_linear = true
+IntroImage_mipmap = 1
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
+TubeDiffuseImage_linear = true
+TubeDiffuseImage_mipmap = 1
+
+TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
+TubeColoredGelImage_linear = true
+TubeColoredGelImage_mipmap = 1
+
+TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
+TubeShadowImage_linear = true
+TubeShadowImage_mipmap = 1
+
+TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
+TubeStaticReflectionImage_linear = true
+TubeStaticReflectionImage_mipmap = 1
+
+ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
+ReflectionMaskImage_linear = true
+ReflectionMaskImage_mipmap = 1
+
+FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
+FrameTextureImage_linear = true
+FrameTextureImage_mipmap = 1
+
+BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+CabinetGlassImage_linear = true
+CabinetGlassImage_mipmap = 1
+
+DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceImage_linear = true
+DeviceImage_mipmap = 1
+
+DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceVertImage_linear = true
+DeviceVertImage_mipmap = 1
+
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
+DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DecalImage_linear = true
+DecalImage_mipmap = 1
+
+NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
+NightLightingImage_linear = true
+NightLightingImage_mipmap = 1
+
+NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
+NightLighting2Image_linear = true
+NightLighting2Image_mipmap = 1
+
+LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+LEDImage_linear = true
+LEDImage_mipmap = 1
+
+TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+TopLayerImage_linear = true
+TopLayerImage_mipmap = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__EASYMODE.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__EASYMODE.slangp
index 13fb3fa..640d287 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__EASYMODE.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__EASYMODE.slangp
@@ -131,7 +131,7 @@ shader21 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type21 = viewport
alias21 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -193,6 +193,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp
index d526a01..5344af9 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp
@@ -149,7 +149,7 @@ shader23 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type23 = viewport
alias23 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -211,6 +211,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp
index a9e7220..f761296 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp
@@ -123,7 +123,7 @@ shader19 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type19 = viewport
alias19 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -185,6 +185,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-NTSC.slangp
index d8c7956..4e24c3b 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-NTSC.slangp
@@ -195,7 +195,7 @@ shader28 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type28 = viewport
alias28 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -257,6 +257,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp
index c95b1e1..907d1c8 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp
@@ -160,7 +160,7 @@ shader23 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type23 = viewport
alias23 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -222,6 +222,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp
index eed1449..6dc977d 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp
@@ -120,7 +120,7 @@ shader19 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type19 = viewport
alias19 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -182,6 +182,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON-NTSC.slangp
index e0c4186..a2db065 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON-NTSC.slangp
@@ -126,6 +126,7 @@ scale18 = "1.0"
wrap_mode18 = "clamp_to_border"
mipmap_input18 = "false"
alias18 = "SourceSDR"
+float_framebuffer18 = "true"
shader19 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear19 = "false"
@@ -134,6 +135,7 @@ scale19 = "1.0"
wrap_mode19 = "clamp_to_border"
mipmap_input19 = "false"
alias19 = "SourceHDR"
+float_framebuffer19 = "true"
shader20 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
filter_linear20 = "false"
@@ -166,7 +168,7 @@ shader24 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type24 = viewport
alias24 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -228,6 +230,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON.slangp
index affc752..f3ea1fc 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON.slangp
@@ -100,6 +100,7 @@ scale14 = "1.0"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = "SourceSDR"
+float_framebuffer14 = "true"
shader15 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear15 = "false"
@@ -108,6 +109,7 @@ scale15 = "1.0"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = "SourceHDR"
+float_framebuffer15 = "true"
shader16 = "../../shaders/megatron/crt-sony-megatron-no-reflect.slang"
filter_linear16 = "false"
@@ -140,7 +142,7 @@ shader20 = ../../shaders/base/combine-passes-no-reflect.slang
scale_type20 = viewport
alias20 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -202,6 +204,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO-SUPER-XBR__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO-SUPER-XBR__GDV-NTSC.slangp
new file mode 100644
index 0000000..6caf130
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO-SUPER-XBR__GDV-NTSC.slangp
@@ -0,0 +1,319 @@
+shaders = 43
+
+shader0 = ../../shaders/base/add-params-potato.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-screen-scale-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-potato.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro-potato.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader17 = ../../shaders/base/stock.slang
+// filter_linear17 = "false"
+// wrap_mode17 = "clamp_to_border"
+// mipmap_input17 = "false"
+// float_framebuffer17 = "false"
+// srgb_framebuffer17 = "true"
+alias17 = XbrSource
+
+shader18 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear18 = "false"
+wrap_mode18 = "clamp_to_border"
+mipmap_input18 = "false"
+float_framebuffer18 = "false"
+srgb_framebuffer18 = "true"
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+alias19 = ""
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+scale_type_x19 = "source"
+scale_x19 = "2.000000"
+scale_type_y19 = "source"
+scale_y19 = "2.000000"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "1.000000"
+scale_type_y20 = "source"
+scale_y20 = "1.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear22 = false
+scale_type_x22 = source
+scale_x22 = 1
+scale_type_y22 = source
+scale_y22 = 0.5
+wrap_mode22 = "clamp_to_edge"
+
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PreCRTPass"
+
+shader24 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear24 = true
+scale_type24 = source
+scale24 = 1.0
+alias24 = "AfterglowPass"
+
+shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear25 = true
+scale_type25 = source
+mipmap_input25 = true
+scale25 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader26 = ../../shaders/dogway/hsm-grade.slang
+filter_linear26 = true
+scale_type26 = source
+scale26 = 1.0
+
+shader27 = ../../shaders/base/stock.slang
+alias27 = "PrePass0"
+
+shader28 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear28 = false
+float_framebuffer28 = true
+scale_type_x28 = source
+scale_type_y28 = source
+scale_x28 = 4.0
+scale_y28 = 1.0
+frame_count_mod28 = 2
+alias28 = NPass1
+
+shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer29 = true
+filter_linear29 = true
+scale_type29 = source
+scale_x29 = 0.5
+scale_y29 = 1.0
+
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+filter_linear30 = true
+scale_type30 = source
+scale_x30 = 1.0
+scale_y30 = 1.0
+
+shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear31 = true
+scale_type31 = source
+scale_x31 = 1.0
+scale_y31 = 1.0
+
+shader32 = ../../shaders/base/stock.slang
+filter_linear32 = true
+scale_type32 = source
+scale_x32 = 1.0
+scale_y32 = 1.0
+alias32 = "PrePass"
+mipmap_input32 = true
+
+shader33 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear33 = true
+scale_type33 = source
+scale33 = 1.0
+mipmap_input33 = true
+alias33 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear34 = true
+scale_type34 = source
+scale34 = 1.0
+float_framebuffer34 = true
+alias34 = "LinearizePass"
+
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+filter_linear35 = true
+scale_type_x35 = viewport
+scale_x35 = 1.0
+scale_type_y35 = source
+scale_y35 = 1.0
+float_framebuffer35 = true
+alias35 = Pass1
+
+shader36 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear36 = true
+scale_type_x36 = absolute
+scale_x36 = 640.0
+scale_type_y36 = source
+scale_y36 = 1.0
+float_framebuffer36 = true
+
+shader37 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear37 = true
+scale_type_x37 = absolute
+scale_x37 = 640.0
+scale_type_y37 = absolute
+scale_y37 = 480.0
+float_framebuffer37 = true
+alias37 = GlowPass
+
+shader38 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear38 = true
+scale_type_x38 = absolute
+scale_x38 = 640.0
+scale_type_y38 = absolute
+scale_y38 = 480.0
+float_framebuffer38 = true
+
+shader39 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear39 = true
+scale_type_x39 = absolute
+scale_x39 = 640.0
+scale_type_y39 = absolute
+scale_y39 = 480.0
+float_framebuffer39 = true
+alias39 = BloomPass
+
+shader40 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-potato.slang
+filter_linear40 = true
+float_framebuffer40 = true
+scale_type40 = viewport
+scale_x40 = 1.0
+scale_y40 = 1.0
+
+shader41 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear41 = true
+scale_type41 = viewport
+scale_x41 = 1.0
+scale_y41 = 1.0
+
+shader42 = ../../shaders/base/post-crt-prep-potato.slang
+alias42 = "MBZ_PostCRTPass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+BackgroundImage = ../../shaders/textures/Baked_Frame_Carbonfiber_Background.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Baked_Frame_Carbonfiber_Background_Vert.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+// Parameters
+HSM_ASPECT_RATIO_MODE = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// NTSC Parameters
+GAMMA_INPUT = 2.0
+gamma_out = 1.95
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO-SUPER-XBR__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO-SUPER-XBR__GDV.slangp
new file mode 100644
index 0000000..5d3e2bf
--- /dev/null
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO-SUPER-XBR__GDV.slangp
@@ -0,0 +1,280 @@
+shaders = 38
+
+shader0 = ../../shaders/base/add-params-potato.slang
+alias0 = "CorePass"
+
+shader1 = ../../shaders/base/stock.slang
+filter_linear1 = false
+srgb_framebuffer1 = true
+scale_type1 = source
+scale_x1 = 1
+scale_y1 = 1
+alias1 = "DerezedPass"
+
+shader2 = ../../shaders/base/add-negative-crop-area.slang
+filter_linear2 = false
+mipmap_input2 = false
+srgb_framebuffer2 = true
+scale_type2 = source
+scale_x2 = 1
+scale_y2 = 1
+alias2 = "NegativeCropAddedPass"
+
+shader3 = ../../shaders/base/cache-info-screen-scale-params.slang
+filter_linear3 = false
+scale_type3 = source
+scale3 = 1.0
+alias3 = "InfoCachePass"
+
+shader4 = ../../shaders/base/text-potato.slang
+filter_linear4 = false
+float_framebuffer4 = true
+scale_type4 = source
+scale4 = 1.0
+alias4 = "TextPass"
+
+shader5 = ../../shaders/base/intro-potato.slang
+filter_linear5 = false
+float_framebuffer5 = true
+scale_type5 = source
+scale5 = 1.0
+alias5 = "IntroPass"
+
+shader6 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
+alias6 = LinearGamma
+
+shader7 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+alias9 = "PreMdaptPass"
+
+// De-Dithering - Mdapt
+shader10 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
+shader11 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
+shader12 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
+shader13 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
+shader14 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
+
+shader15 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
+
+shader16 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
+
+shader17 = ../../shaders/base/stock.slang
+// filter_linear17 = "false"
+// wrap_mode17 = "clamp_to_border"
+// mipmap_input17 = "false"
+// float_framebuffer17 = "false"
+// srgb_framebuffer17 = "true"
+alias17 = XbrSource
+
+shader18 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
+filter_linear18 = "false"
+wrap_mode18 = "clamp_to_border"
+mipmap_input18 = "false"
+float_framebuffer18 = "false"
+srgb_framebuffer18 = "true"
+
+shader19 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
+filter_linear19 = "false"
+wrap_mode19 = "clamp_to_border"
+mipmap_input19 = "false"
+alias19 = ""
+float_framebuffer19 = "false"
+srgb_framebuffer19 = "true"
+scale_type_x19 = "source"
+scale_x19 = "2.000000"
+scale_type_y19 = "source"
+scale_y19 = "2.000000"
+
+shader20 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
+filter_linear20 = "false"
+wrap_mode20 = "clamp_to_border"
+mipmap_input20 = "false"
+alias20 = ""
+float_framebuffer20 = "false"
+srgb_framebuffer20 = "true"
+scale_type_x20 = "source"
+scale_x20 = "1.000000"
+scale_type_y20 = "source"
+scale_y20 = "1.000000"
+
+shader21 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
+filter_linear21 = "false"
+wrap_mode21 = "clamp_to_border"
+mipmap_input21 = "false"
+alias21 = ""
+float_framebuffer21 = "false"
+srgb_framebuffer21 = "true"
+scale_type_x21 = "source"
+scale_x21 = "1.000000"
+scale_type_y21 = "source"
+scale_y21 = "1.000000"
+
+shader22 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
+filter_linear22 = false
+scale_type_x22 = source
+scale_x22 = 1
+scale_type_y22 = source
+scale_y22 = 0.5
+wrap_mode22 = "clamp_to_edge"
+
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PreCRTPass"
+
+shader24 = ../../shaders/guest/hsm-afterglow0.slang
+filter_linear24 = true
+scale_type24 = source
+scale24 = 1.0
+alias24 = "AfterglowPass"
+
+shader25 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear25 = true
+scale_type25 = source
+mipmap_input25 = true
+scale25 = 1.0
+
+// Color Correction with Dogway's awesome Grade shader
+// Grade is after Afterglow so that brightening the black level does not break the afterglow
+shader26 = ../../shaders/dogway/hsm-grade.slang
+filter_linear26 = true
+scale_type26 = source
+scale26 = 1.0
+
+shader27 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+filter_linear27 = true
+scale_type27 = source
+scale_x27 = 1.0
+scale_y27 = 1.0
+
+shader28 = ../../shaders/base/stock.slang
+filter_linear28 = true
+scale_type28 = source
+scale_x28 = 1.0
+scale_y28 = 1.0
+alias28 = "PrePass"
+mipmap_input28 = true
+
+shader29 = ../../shaders/guest/hsm-avg-lum.slang
+filter_linear29 = true
+scale_type29 = source
+scale29 = 1.0
+mipmap_input29 = true
+alias29 = "AvgLumPass"
+
+// Pass referenced by subsequent blurring passes and crt pass
+shader30 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear30 = true
+scale_type30 = source
+scale30 = 1.0
+float_framebuffer30 = true
+alias30 = "LinearizePass"
+
+shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+filter_linear31 = true
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = source
+scale_y31 = 1.0
+float_framebuffer31 = true
+
+shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
+filter_linear32 = true
+scale_type_x32 = absolute
+scale_x32 = 800.0
+scale_type_y32 = absolute
+scale_y32 = 600.0
+float_framebuffer32 = true
+alias32 = GlowPass
+
+shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
+filter_linear33 = true
+scale_type_x33 = absolute
+scale_x33 = 800.0
+scale_type_y33 = absolute
+scale_y33 = 600.0
+float_framebuffer33 = true
+
+shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
+filter_linear34 = true
+scale_type_x34 = source
+scale_x34 = 1.0
+scale_type_y34 = source
+scale_y34 = 1.0
+float_framebuffer34 = true
+alias34 = BloomPass
+
+shader35 = ../../shaders/guest/hsm-crt-guest-advanced-potato.slang
+filter_linear35 = true
+float_framebuffer35 = true
+scale_type35 = viewport
+scale_x35 = 1.0
+scale_y35 = 1.0
+
+shader36 = ../../shaders/guest/hsm-deconvergence-potato.slang
+filter_linear36 = true
+scale_type36 = viewport
+scale_x36 = 1.0
+scale_y36 = 1.0
+
+shader37 = ../../shaders/base/post-crt-prep-potato.slang
+alias37 = "MBZ_PostCRTPass"
+// Define textures to be used by the different passes
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage"
+
+SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
+SamplerLUT1_linear = true
+SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
+SamplerLUT2_linear = true
+SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
+SamplerLUT3_linear = true
+SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
+SamplerLUT4_linear = true
+
+ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+ScreenPlacementImage_linear = false
+
+BackgroundImage = ../../shaders/textures/Baked_Frame_Carbonfiber_Background.png
+BackgroundImage_linear = true
+BackgroundImage_mipmap = 1
+
+BackgroundVertImage = ../../shaders/textures/Baked_Frame_Carbonfiber_Background_Vert.png
+BackgroundVertImage_linear = true
+BackgroundVertImage_mipmap = 1
+
+// Parameters
+HSM_ASPECT_RATIO_MODE = 1
+
+// Use for matching vanilla GDV-Advanced
+// HSM_ASPECT_RATIO_MODE = 6
+// HSM_CURVATURE_MODE = 0
+
+// SMOOTH-ADV
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
+
+HSM_DEDITHER_MODE = 3
+
+SHARPSMOOTHER_ON = 1
+max_w = 0.05
+min_w = 0
+smoot = 0.4
+lumad = 0.5
+mtric = 0.3
+
+SUPERXBR_ON = 1
+
+ntsc_scale = 0.55
+
+SHARPEN = 0
+
+HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 300
+HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
+HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
+HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+
+gamma_c = 0.9
+gsl = -1
+scanline1 = 3
+shadowMask = 3
+maskDark = 0.4
+maskLight = 1.2
+mask_gamma = 4
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON-NTSC.slangp
index f24f254..6397d6d 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON-NTSC.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON-NTSC.slangp
@@ -126,6 +126,7 @@ scale18 = "1.0"
wrap_mode18 = "clamp_to_border"
mipmap_input18 = "false"
alias18 = "SourceSDR"
+float_framebuffer18 = "true"
shader19 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear19 = "false"
@@ -134,6 +135,7 @@ scale19 = "1.0"
wrap_mode19 = "clamp_to_border"
mipmap_input19 = "false"
alias19 = "SourceHDR"
+float_framebuffer19 = "true"
shader20 = "../../shaders/megatron/crt-sony-megatron-potato.slang"
filter_linear20 = "false"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON.slangp
index 1a9d36b..6448326 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON.slangp
@@ -100,6 +100,7 @@ scale14 = "1.0"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = "SourceSDR"
+float_framebuffer14 = "true"
shader15 = "../../shaders/megatron/crt-sony-megatron-hdr-pass.slang"
filter_linear15 = "false"
@@ -108,6 +109,7 @@ scale15 = "1.0"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = "SourceHDR"
+float_framebuffer15 = "true"
shader16 = "../../shaders/megatron/crt-sony-megatron-potato.slang"
filter_linear16 = "false"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-d-series-AV-36D501-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-d-series-AV-36D501-sdr.slangp
index 28d00fa..3d99308 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-d-series-AV-36D501-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-d-series-AV-36D501-sdr.slangp
@@ -5,8 +5,6 @@ hcrt_paper_white_nits = "700.000000"
hcrt_brightness = "0.200000"
hcrt_contrast = "0.000000"
hcrt_saturation = "0.000000"
-hcrt_gamma_in = "1.720000"
-hcrt_expand_gamut = "1.000000"
hcrt_red_scanline_min = "0.2000000"
hcrt_red_scanline_max = "1.050000"
hcrt_red_scanline_attack = "0.300000"
@@ -21,4 +19,4 @@ hcrt_red_beam_attack = "1.000000"
hcrt_green_beam_sharpness = "1.600000"
hcrt_green_beam_attack = "1.000000"
hcrt_blue_beam_sharpness = "1.600000"
-hcrt_blue_beam_attack = "1.000000"
\ No newline at end of file
+hcrt_blue_beam_attack = "1.000000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-professional-TM-H1950CG-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-professional-TM-H1950CG-sdr.slangp
index 1f6c95b..958f1fa 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-professional-TM-H1950CG-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-professional-TM-H1950CG-sdr.slangp
@@ -3,7 +3,6 @@
hcrt_paper_white_nits = "700.000000"
hcrt_crt_screen_type = "1.000000"
hcrt_crt_resolution = "2.000000"
-hcrt_expand_gamut = "1.000000"
hcrt_red_vertical_convergence = "0.000000"
hcrt_green_vertical_convergence = "0.040000"
hcrt_blue_vertical_convergence = "0.000000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sammy-atomiswave-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sammy-atomiswave-sdr.slangp
index e62d990..c0f86fe 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sammy-atomiswave-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sammy-atomiswave-sdr.slangp
@@ -1,9 +1,10 @@
#reference "shaders/crt-sony-megatron-sdr.slangp"
hcrt_crt_screen_type = "2.000000"
-hcrt_paper_white_nits = "600.000000"
+hcrt_colour_system = "3.000000"
hcrt_contrast = "0.000000"
-hcrt_expand_gamut = "1.000000"
+hcrt_brightness = "0.050000"
+hcrt_saturation = "0.450000"
hcrt_red_scanline_min = "0.8900000"
hcrt_red_scanline_max = "1.000000"
hcrt_red_scanline_attack = "0.300000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sega-virtua-fighter-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sega-virtua-fighter-sdr.slangp
index 2185b45..c29f31b 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sega-virtua-fighter-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sega-virtua-fighter-sdr.slangp
@@ -2,7 +2,6 @@
hcrt_crt_screen_type = "2.000000"
hcrt_paper_white_nits = "200.000000"
-hcrt_expand_gamut = "1.000000"
hcrt_red_vertical_convergence = "0.200000"
hcrt_green_vertical_convergence = "0.200000"
hcrt_blue_vertical_convergence = "-0.230000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-1910-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-1910-sdr.slangp
index 84cdbe1..9697126 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-1910-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-1910-sdr.slangp
@@ -2,10 +2,8 @@
hcrt_crt_resolution = "0.000000"
hcrt_colour_system = "3.000000"
-hcrt_expand_gamut = "1.000000"
hcrt_brightness = "0.150000"
hcrt_saturation = "0.100000"
-hcrt_gamma_in = "2.270000"
hcrt_red_vertical_convergence = "0.000000"
hcrt_green_vertical_convergence = "-0.150000"
hcrt_blue_vertical_convergence = "0.000000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-20L4-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-20L4-sdr.slangp
index 9ef527d..ae5a926 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-20L4-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-20L4-sdr.slangp
@@ -2,7 +2,6 @@
hcrt_brightness = "0.150000"
hcrt_colour_system = "3.000000"
-hcrt_expand_gamut = "1.000000"
hcrt_crt_resolution = "1.000000"
hcrt_red_vertical_convergence = "0.100000"
hcrt_green_vertical_convergence = "0.000000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-2730-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-2730-sdr.slangp
index c2cca52..35c2dd7 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-2730-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-2730-sdr.slangp
@@ -1,9 +1,7 @@
#reference "shaders/crt-sony-megatron-sdr.slangp"
-hcrt_brightness = "0.150000"
hcrt_brightness = "0.150000"
hcrt_colour_system = "3.000000"
-hcrt_expand_gamut = "1.000000"
hcrt_red_vertical_convergence = "-0.140000"
hcrt_green_vertical_convergence = "0.000000"
hcrt_blue_vertical_convergence = "0.000000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-viewsonic-A90f+-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-viewsonic-A90f+-sdr.slangp
index 8f0af96..17fabf2 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-viewsonic-A90f+-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-viewsonic-A90f+-sdr.slangp
@@ -17,4 +17,4 @@ hcrt_red_beam_attack = "0.5000000"
hcrt_green_beam_sharpness = "1.200000"
hcrt_green_beam_attack = "0.500000"
hcrt_blue_beam_sharpness = "1.200000"
-hcrt_blue_beam_attack = "0.500000"
\ No newline at end of file
+hcrt_blue_beam_attack = "0.500000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-sdr.slangp
index f1239ad..891ce74 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-sdr.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-sdr.slangp
@@ -29,4 +29,4 @@ DONT USE THIS PRESET DIRECTLY - Use any of the others in this directory
#reference "../../../MBZ__3__STD__MEGATRON.slangp"
hcrt_hdr = "0.000000"
-hcrt_gamma_in = "2.020000"
+hcrt_gamma_in = "2.000000"
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-240p.slangp
index 150191e..4617ff0 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-240p.slangp
@@ -1,9 +1,9 @@
-shaders = 53
+shaders = 54
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,251 +62,254 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader18 = ../../shaders/base/stock.slang
-alias18 = refpass
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear19 = false
-scale_type19 = source
-scale19 = 1.0
-float_framebuffer19 = true
-alias19 = scalefx_pass0
+shader19 = ../../shaders/base/stock.slang
+alias19 = refpass
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
-float_framebuffer12 = true
+float_framebuffer20 = true
+alias20 = scalefx_pass0
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
+float_framebuffer12 = true
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear22 = false
scale_type22 = source
scale22 = 1.0
-shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear23 = false
scale_type23 = source
-scale23 = 3
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
-alias24 = "PreCRTPass"
+shader24 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear24 = false
+scale_type24 = source
+scale24 = 3
-shader25 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear25 = true
-scale_type25 = source
-scale25 = 1.0
-alias25 = "AfterglowPass"
+shader25 = ../../shaders/base/stock.slang
+alias25 = "PreCRTPass"
-shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader26 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear26 = true
scale_type26 = source
-mipmap_input26 = true
scale26 = 1.0
+alias26 = "AfterglowPass"
+
+shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear27 = true
+scale_type27 = source
+mipmap_input27 = true
+scale27 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader27 = ../../shaders/dogway/hsm-grade.slang
-filter_linear27 = true
-scale_type27 = source
-scale27 = 1.0
+shader28 = ../../shaders/dogway/hsm-grade.slang
+filter_linear28 = true
+scale_type28 = source
+scale28 = 1.0
-shader28 = ../../shaders/base/stock.slang
-alias28 = "PrePass0"
+shader29 = ../../shaders/base/stock.slang
+alias29 = "PrePass0"
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear29 = false
-float_framebuffer29 = true
-scale_type_x29 = source
-scale_type_y29 = source
-scale_x29 = 4.0
-scale_y29 = 1.0
-frame_count_mod29 = 2
-alias29 = NPass1
-
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear30 = false
float_framebuffer30 = true
-filter_linear30 = true
-scale_type30 = source
-scale_x30 = 0.5
+scale_type_x30 = source
+scale_type_y30 = source
+scale_x30 = 4.0
scale_y30 = 1.0
+frame_count_mod30 = 2
+alias30 = NPass1
-shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer31 = true
filter_linear31 = true
scale_type31 = source
-scale_x31 = 1.0
+scale_x31 = 0.5
scale_y31 = 1.0
-shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader32 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-shader33 = ../../shaders/base/stock.slang
+shader33 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear33 = true
scale_type33 = source
scale_x33 = 1.0
scale_y33 = 1.0
-alias33 = "PrePass"
-mipmap_input33 = true
-shader34 = ../../shaders/guest/hsm-avg-lum.slang
+shader34 = ../../shaders/base/stock.slang
filter_linear34 = true
scale_type34 = source
-scale34 = 1.0
+scale_x34 = 1.0
+scale_y34 = 1.0
+alias34 = "PrePass"
mipmap_input34 = true
-alias34 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader35 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear35 = true
scale_type35 = source
scale35 = 1.0
-float_framebuffer35 = true
-alias35 = "LinearizePass"
+mipmap_input35 = true
+alias35 = "AvgLumPass"
-shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader36 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear36 = true
-scale_type_x36 = viewport
-scale_x36 = 1.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type36 = source
+scale36 = 1.0
float_framebuffer36 = true
-alias36 = Pass1
+alias36 = "LinearizePass"
-shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader37 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear37 = true
-scale_type_x37 = absolute
-scale_x37 = 640.0
+scale_type_x37 = viewport
+scale_x37 = 1.0
scale_type_y37 = source
-scale_y37 = 1.0
+scale_y37 = 1.0
float_framebuffer37 = true
+alias37 = Pass1
-shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader38 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 640.0
-scale_type_y38 = absolute
-scale_y38 = 480.0
+scale_type_y38 = source
+scale_y38 = 1.0
float_framebuffer38 = true
-alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader39 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear39 = true
scale_type_x39 = absolute
scale_x39 = 640.0
scale_type_y39 = absolute
-scale_y39 = 480.0
+scale_y39 = 480.0
float_framebuffer39 = true
+alias39 = GlowPass
-shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader40 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear40 = true
scale_type_x40 = absolute
scale_x40 = 640.0
scale_type_y40 = absolute
-scale_y40 = 480.0
+scale_y40 = 480.0
float_framebuffer40 = true
-alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader41 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear41 = true
+scale_type_x41 = absolute
+scale_x41 = 640.0
+scale_type_y41 = absolute
+scale_y41 = 480.0
float_framebuffer41 = true
-scale_type41 = viewport
-scale_x41 = 1.0
-scale_y41 = 1.0
+alias41 = BloomPass
-shader42 = ../../shaders/guest/hsm-deconvergence.slang
+shader42 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear42 = true
+float_framebuffer42 = true
scale_type42 = viewport
scale_x42 = 1.0
scale_y42 = 1.0
-shader43 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias43 = "MBZ_PostCRTPass"
+shader43 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear43 = true
+scale_type43 = viewport
+scale_x43 = 1.0
+scale_y43 = 1.0
+
+shader44 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias44 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader44 = ../../shaders/base/linearize-crt.slang
-mipmap_input44 = true
-filter_linear44 = true
-scale_type44 = absolute
-// scale_x44 = 480
-// scale_y44 = 270
-// scale_x44 = 960
-// scale_y44 = 540
-scale_x44 = 800
-scale_y44 = 600
-alias44 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader45 = ../../shaders/base/linearize-crt.slang
mipmap_input45 = true
filter_linear45 = true
+scale_type45 = absolute
+// scale_x45 = 480
+// scale_y45 = 270
+// scale_x45 = 960
+// scale_y45 = 540
+scale_x45 = 800
+scale_y45 = 600
+alias45 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader46 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input46 = true
+filter_linear46 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader46 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear46 = true
-alias46 = "BR_MirrorBlurredPass"
+shader47 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear47 = true
+alias47 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input47 = true
-filter_linear47 = true
-scale_type47 = absolute
-scale_x47 = 128
-scale_y47 = 128
-alias47 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input48 = true
filter_linear48 = true
scale_type48 = absolute
-scale_x48 = 12
-scale_y48 = 12
-alias48 = "BR_MirrorFullscreenGlowPass"
+scale_x48 = 128
+scale_y48 = 128
+alias48 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader49 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input49 = true
+filter_linear49 = true
+scale_type49 = absolute
+scale_x49 = 12
+scale_y49 = 12
+alias49 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader49 = ../../shaders/base/reflection.slang
-scale_type49 = viewport
-float_framebuffer49 = true
-alias49 = "BR_CRTAndReflectionPass"
+shader50 = ../../shaders/base/reflection.slang
+scale_type50 = viewport
+float_framebuffer50 = true
+alias50 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader50 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear50 = true
-scale_type50 = viewport
-float_framebuffer50 = true
-alias50 = "BR_LayersUnderCRTPass"
-
-shader51 = ../../shaders/base/bezel-images-over-crt.slang
+shader51 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear51 = true
scale_type51 = viewport
float_framebuffer51 = true
-alias51 = "BR_LayersOverCRTPass"
+alias51 = "BR_LayersUnderCRTPass"
+
+shader52 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear52 = true
+scale_type52 = viewport
+float_framebuffer52 = true
+alias52 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader52 = ../../shaders/base/combine-passes.slang
-scale_type52 = viewport
-alias52 = "CombinePass"
+shader53 = ../../shaders/base/combine-passes.slang
+scale_type53 = viewport
+alias53 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -368,6 +371,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -402,6 +409,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// NTSC Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-480p.slangp
index e07cca8..011f61a 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV-NTSC__DREZ-480p.slangp
@@ -1,9 +1,9 @@
-shaders = 53
+shaders = 54
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,251 +62,254 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader18 = ../../shaders/base/stock.slang
-alias18 = refpass
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear19 = false
-scale_type19 = source
-scale19 = 1.0
-float_framebuffer19 = true
-alias19 = scalefx_pass0
+shader19 = ../../shaders/base/stock.slang
+alias19 = refpass
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
-float_framebuffer12 = true
+float_framebuffer20 = true
+alias20 = scalefx_pass0
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
+float_framebuffer12 = true
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear22 = false
scale_type22 = source
scale22 = 1.0
-shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear23 = false
scale_type23 = source
-scale23 = 3
+scale23 = 1.0
-shader24 = ../../shaders/base/stock.slang
-alias24 = "PreCRTPass"
+shader24 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear24 = false
+scale_type24 = source
+scale24 = 3
-shader25 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear25 = true
-scale_type25 = source
-scale25 = 1.0
-alias25 = "AfterglowPass"
+shader25 = ../../shaders/base/stock.slang
+alias25 = "PreCRTPass"
-shader26 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader26 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear26 = true
scale_type26 = source
-mipmap_input26 = true
scale26 = 1.0
+alias26 = "AfterglowPass"
+
+shader27 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear27 = true
+scale_type27 = source
+mipmap_input27 = true
+scale27 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader27 = ../../shaders/dogway/hsm-grade.slang
-filter_linear27 = true
-scale_type27 = source
-scale27 = 1.0
+shader28 = ../../shaders/dogway/hsm-grade.slang
+filter_linear28 = true
+scale_type28 = source
+scale28 = 1.0
-shader28 = ../../shaders/base/stock.slang
-alias28 = "PrePass0"
+shader29 = ../../shaders/base/stock.slang
+alias29 = "PrePass0"
-shader29 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear29 = false
-float_framebuffer29 = true
-scale_type_x29 = source
-scale_type_y29 = source
-scale_x29 = 4.0
-scale_y29 = 1.0
-frame_count_mod29 = 2
-alias29 = NPass1
-
-shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader30 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear30 = false
float_framebuffer30 = true
-filter_linear30 = true
-scale_type30 = source
-scale_x30 = 0.5
+scale_type_x30 = source
+scale_type_y30 = source
+scale_x30 = 4.0
scale_y30 = 1.0
+frame_count_mod30 = 2
+alias30 = NPass1
-shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader31 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer31 = true
filter_linear31 = true
scale_type31 = source
-scale_x31 = 1.0
+scale_x31 = 0.5
scale_y31 = 1.0
-shader32 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader32 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear32 = true
scale_type32 = source
scale_x32 = 1.0
scale_y32 = 1.0
-shader33 = ../../shaders/base/stock.slang
+shader33 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear33 = true
scale_type33 = source
scale_x33 = 1.0
scale_y33 = 1.0
-alias33 = "PrePass"
-mipmap_input33 = true
-shader34 = ../../shaders/guest/hsm-avg-lum.slang
+shader34 = ../../shaders/base/stock.slang
filter_linear34 = true
scale_type34 = source
-scale34 = 1.0
+scale_x34 = 1.0
+scale_y34 = 1.0
+alias34 = "PrePass"
mipmap_input34 = true
-alias34 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader35 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader35 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear35 = true
scale_type35 = source
scale35 = 1.0
-float_framebuffer35 = true
-alias35 = "LinearizePass"
+mipmap_input35 = true
+alias35 = "AvgLumPass"
-shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader36 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear36 = true
-scale_type_x36 = viewport
-scale_x36 = 1.0
-scale_type_y36 = source
-scale_y36 = 1.0
+scale_type36 = source
+scale36 = 1.0
float_framebuffer36 = true
-alias36 = Pass1
+alias36 = "LinearizePass"
-shader37 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader37 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear37 = true
-scale_type_x37 = absolute
-scale_x37 = 640.0
+scale_type_x37 = viewport
+scale_x37 = 1.0
scale_type_y37 = source
-scale_y37 = 1.0
+scale_y37 = 1.0
float_framebuffer37 = true
+alias37 = Pass1
-shader38 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader38 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear38 = true
scale_type_x38 = absolute
scale_x38 = 640.0
-scale_type_y38 = absolute
-scale_y38 = 480.0
+scale_type_y38 = source
+scale_y38 = 1.0
float_framebuffer38 = true
-alias38 = GlowPass
-shader39 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader39 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear39 = true
scale_type_x39 = absolute
scale_x39 = 640.0
scale_type_y39 = absolute
-scale_y39 = 480.0
+scale_y39 = 480.0
float_framebuffer39 = true
+alias39 = GlowPass
-shader40 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader40 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear40 = true
scale_type_x40 = absolute
scale_x40 = 640.0
scale_type_y40 = absolute
-scale_y40 = 480.0
+scale_y40 = 480.0
float_framebuffer40 = true
-alias40 = BloomPass
-shader41 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader41 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear41 = true
+scale_type_x41 = absolute
+scale_x41 = 640.0
+scale_type_y41 = absolute
+scale_y41 = 480.0
float_framebuffer41 = true
-scale_type41 = viewport
-scale_x41 = 1.0
-scale_y41 = 1.0
+alias41 = BloomPass
-shader42 = ../../shaders/guest/hsm-deconvergence.slang
+shader42 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear42 = true
+float_framebuffer42 = true
scale_type42 = viewport
scale_x42 = 1.0
scale_y42 = 1.0
-shader43 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias43 = "MBZ_PostCRTPass"
+shader43 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear43 = true
+scale_type43 = viewport
+scale_x43 = 1.0
+scale_y43 = 1.0
+
+shader44 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias44 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader44 = ../../shaders/base/linearize-crt.slang
-mipmap_input44 = true
-filter_linear44 = true
-scale_type44 = absolute
-// scale_x44 = 480
-// scale_y44 = 270
-// scale_x44 = 960
-// scale_y44 = 540
-scale_x44 = 800
-scale_y44 = 600
-alias44 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader45 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader45 = ../../shaders/base/linearize-crt.slang
mipmap_input45 = true
filter_linear45 = true
+scale_type45 = absolute
+// scale_x45 = 480
+// scale_y45 = 270
+// scale_x45 = 960
+// scale_y45 = 540
+scale_x45 = 800
+scale_y45 = 600
+alias45 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader46 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input46 = true
+filter_linear46 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader46 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear46 = true
-alias46 = "BR_MirrorBlurredPass"
+shader47 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear47 = true
+alias47 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader47 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input47 = true
-filter_linear47 = true
-scale_type47 = absolute
-scale_x47 = 128
-scale_y47 = 128
-alias47 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader48 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input48 = true
filter_linear48 = true
scale_type48 = absolute
-scale_x48 = 12
-scale_y48 = 12
-alias48 = "BR_MirrorFullscreenGlowPass"
+scale_x48 = 128
+scale_y48 = 128
+alias48 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader49 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input49 = true
+filter_linear49 = true
+scale_type49 = absolute
+scale_x49 = 12
+scale_y49 = 12
+alias49 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader49 = ../../shaders/base/reflection.slang
-scale_type49 = viewport
-float_framebuffer49 = true
-alias49 = "BR_CRTAndReflectionPass"
+shader50 = ../../shaders/base/reflection.slang
+scale_type50 = viewport
+float_framebuffer50 = true
+alias50 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader50 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear50 = true
-scale_type50 = viewport
-float_framebuffer50 = true
-alias50 = "BR_LayersUnderCRTPass"
-
-shader51 = ../../shaders/base/bezel-images-over-crt.slang
+shader51 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear51 = true
scale_type51 = viewport
float_framebuffer51 = true
-alias51 = "BR_LayersOverCRTPass"
+alias51 = "BR_LayersUnderCRTPass"
+
+shader52 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear52 = true
+scale_type52 = viewport
+float_framebuffer52 = true
+alias52 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader52 = ../../shaders/base/combine-passes.slang
-scale_type52 = viewport
-alias52 = "CombinePass"
+shader53 = ../../shaders/base/combine-passes.slang
+scale_type53 = viewport
+alias53 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -368,6 +371,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -402,6 +409,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// NTSC Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-3DS-400x480.slangp
index cc3a87b..06d0c20 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-3DS-400x480.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-3DS-400x480.slangp
@@ -1,9 +1,9 @@
-shaders = 50
+shaders = 51
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 400
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 400
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,230 +62,233 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader18 = ../../shaders/base/stock.slang
-alias18 = refpass
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear19 = false
-scale_type19 = source
-scale19 = 1.0
-float_framebuffer19 = true
-alias19 = scalefx_pass0
+shader19 = ../../shaders/base/stock.slang
+alias19 = refpass
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
-float_framebuffer12 = true
+float_framebuffer20 = true
+alias20 = scalefx_pass0
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
+float_framebuffer12 = true
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear22 = false
scale_type22 = source
scale22 = 1.0
-shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear23 = false
scale_type23 = source
-scale23 = 3
+scale23 = 1.0
+
+shader24 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear24 = false
+scale_type24 = source
+scale24 = 3
// GTU TV Processing
-shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type24 = source
-scale24 = 1.0
-float_framebuffer24 = true
-
-shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x25 = source
-scale_x25 = 1.0
-scale_type_y25 = source
-scale_y25 = 1.0
-filter_linear25 = false
+shader25 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type25 = source
+scale25 = 1.0
float_framebuffer25 = true
-shader26 = ../../shaders/base/stock.slang
-alias26 = "PreCRTPass"
+shader26 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x26 = source
+scale_x26 = 1.0
+scale_type_y26 = source
+scale_y26 = 1.0
+filter_linear26 = false
+float_framebuffer26 = true
-shader27 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear27 = true
-scale_type27 = source
-scale27 = 1.0
-alias27 = "AfterglowPass"
+shader27 = ../../shaders/base/stock.slang
+alias27 = "PreCRTPass"
-shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader28 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear28 = true
scale_type28 = source
-mipmap_input28 = true
scale28 = 1.0
+alias28 = "AfterglowPass"
+
+shader29 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear29 = true
+scale_type29 = source
+mipmap_input29 = true
+scale29 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader29 = ../../shaders/dogway/hsm-grade.slang
-filter_linear29 = true
-scale_type29 = source
-scale29 = 1.0
-
-shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader30 = ../../shaders/dogway/hsm-grade.slang
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
-scale_y30 = 1.0
+scale30 = 1.0
-shader31 = ../../shaders/base/stock.slang
+shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-alias31 = "PrePass"
-mipmap_input31 = true
-shader32 = ../../shaders/guest/hsm-avg-lum.slang
+shader32 = ../../shaders/base/stock.slang
filter_linear32 = true
scale_type32 = source
-scale32 = 1.0
+scale_x32 = 1.0
+scale_y32 = 1.0
+alias32 = "PrePass"
mipmap_input32 = true
-alias32 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader33 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear33 = true
scale_type33 = source
scale33 = 1.0
-float_framebuffer33 = true
-alias33 = "LinearizePass"
+mipmap_input33 = true
+alias33 = "AvgLumPass"
-shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear34 = true
-scale_type_x34 = absolute
-scale_x34 = 800.0
-scale_type_y34 = source
-scale_y34 = 1.0
+scale_type34 = source
+scale34 = 1.0
float_framebuffer34 = true
+alias34 = "LinearizePass"
-shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader35 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear35 = true
scale_type_x35 = absolute
scale_x35 = 800.0
-scale_type_y35 = absolute
-scale_y35 = 600.0
+scale_type_y35 = source
+scale_y35 = 1.0
float_framebuffer35 = true
-alias35 = GlowPass
-shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader36 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear36 = true
scale_type_x36 = absolute
scale_x36 = 800.0
scale_type_y36 = absolute
-scale_y36 = 600.0
+scale_y36 = 600.0
float_framebuffer36 = true
+alias36 = GlowPass
-shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader37 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear37 = true
-scale_type_x37 = source
-scale_x37 = 1.0
-scale_type_y37 = source
-scale_y37 = 1.0
+scale_type_x37 = absolute
+scale_x37 = 800.0
+scale_type_y37 = absolute
+scale_y37 = 600.0
float_framebuffer37 = true
-alias37 = BloomPass
-shader38 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader38 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear38 = true
-float_framebuffer38 = true
-scale_type38 = viewport
+scale_type_x38 = source
scale_x38 = 1.0
+scale_type_y38 = source
scale_y38 = 1.0
+float_framebuffer38 = true
+alias38 = BloomPass
-shader39 = ../../shaders/guest/hsm-deconvergence.slang
+shader39 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear39 = true
+float_framebuffer39 = true
scale_type39 = viewport
scale_x39 = 1.0
scale_y39 = 1.0
-shader40 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias40 = "MBZ_PostCRTPass"
+shader40 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear40 = true
+scale_type40 = viewport
+scale_x40 = 1.0
+scale_y40 = 1.0
+
+shader41 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias41 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader41 = ../../shaders/base/linearize-crt.slang
-mipmap_input41 = true
-filter_linear41 = true
-scale_type41 = absolute
-// scale_x41 = 480
-// scale_y41 = 270
-// scale_x41 = 960
-// scale_y41 = 540
-scale_x41 = 800
-scale_y41 = 600
-alias41 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader42 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader42 = ../../shaders/base/linearize-crt.slang
mipmap_input42 = true
filter_linear42 = true
+scale_type42 = absolute
+// scale_x42 = 480
+// scale_y42 = 270
+// scale_x42 = 960
+// scale_y42 = 540
+scale_x42 = 800
+scale_y42 = 600
+alias42 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader43 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input43 = true
+filter_linear43 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader43 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear43 = true
-alias43 = "BR_MirrorBlurredPass"
+shader44 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear44 = true
+alias44 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input44 = true
-filter_linear44 = true
-scale_type44 = absolute
-scale_x44 = 128
-scale_y44 = 128
-alias44 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader45 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input45 = true
filter_linear45 = true
scale_type45 = absolute
-scale_x45 = 12
-scale_y45 = 12
-alias45 = "BR_MirrorFullscreenGlowPass"
+scale_x45 = 128
+scale_y45 = 128
+alias45 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input46 = true
+filter_linear46 = true
+scale_type46 = absolute
+scale_x46 = 12
+scale_y46 = 12
+alias46 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader46 = ../../shaders/base/reflection.slang
-scale_type46 = viewport
-float_framebuffer46 = true
-alias46 = "BR_CRTAndReflectionPass"
+shader47 = ../../shaders/base/reflection.slang
+scale_type47 = viewport
+float_framebuffer47 = true
+alias47 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader47 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear47 = true
-scale_type47 = viewport
-float_framebuffer47 = true
-alias47 = "BR_LayersUnderCRTPass"
-
-shader48 = ../../shaders/base/bezel-images-over-crt.slang
+shader48 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear48 = true
scale_type48 = viewport
float_framebuffer48 = true
-alias48 = "BR_LayersOverCRTPass"
+alias48 = "BR_LayersUnderCRTPass"
+
+shader49 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear49 = true
+scale_type49 = viewport
+float_framebuffer49 = true
+alias49 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader49 = ../../shaders/base/combine-passes.slang
-scale_type49 = viewport
-alias49 = "CombinePass"
+shader50 = ../../shaders/base/combine-passes.slang
+scale_type50 = viewport
+alias50 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -347,6 +350,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -381,6 +388,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// 3DS Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-480p.slangp
index 1e07910..a73d64e 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__GDV__DREZ-480p.slangp
@@ -1,9 +1,9 @@
-shaders = 50
+shaders = 51
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,230 +62,233 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader18 = ../../shaders/base/stock.slang
-alias18 = refpass
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
-filter_linear19 = false
-scale_type19 = source
-scale19 = 1.0
-float_framebuffer19 = true
-alias19 = scalefx_pass0
+shader19 = ../../shaders/base/stock.slang
+alias19 = refpass
-shader20 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
+shader20 = ../../shaders/scalefx/hsm-scalefx-pass0.slang
filter_linear20 = false
scale_type20 = source
scale20 = 1.0
-float_framebuffer12 = true
+float_framebuffer20 = true
+alias20 = scalefx_pass0
-shader21 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
+shader21 = ../../shaders/scalefx/hsm-scalefx-pass1.slang
filter_linear21 = false
scale_type21 = source
scale21 = 1.0
+float_framebuffer12 = true
-shader22 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
+shader22 = ../../shaders/scalefx/hsm-scalefx-pass2.slang
filter_linear22 = false
scale_type22 = source
scale22 = 1.0
-shader23 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+shader23 = ../../shaders/scalefx/hsm-scalefx-pass3.slang
filter_linear23 = false
scale_type23 = source
-scale23 = 3
+scale23 = 1.0
+
+shader24 = ../../shaders/scalefx/hsm-scalefx-pass4.slang
+filter_linear24 = false
+scale_type24 = source
+scale24 = 3
// GTU TV Processing
-shader24 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type24 = source
-scale24 = 1.0
-float_framebuffer24 = true
-
-shader25 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x25 = source
-scale_x25 = 1.0
-scale_type_y25 = source
-scale_y25 = 1.0
-filter_linear25 = false
+shader25 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type25 = source
+scale25 = 1.0
float_framebuffer25 = true
-shader26 = ../../shaders/base/stock.slang
-alias26 = "PreCRTPass"
+shader26 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x26 = source
+scale_x26 = 1.0
+scale_type_y26 = source
+scale_y26 = 1.0
+filter_linear26 = false
+float_framebuffer26 = true
-shader27 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear27 = true
-scale_type27 = source
-scale27 = 1.0
-alias27 = "AfterglowPass"
+shader27 = ../../shaders/base/stock.slang
+alias27 = "PreCRTPass"
-shader28 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader28 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear28 = true
scale_type28 = source
-mipmap_input28 = true
scale28 = 1.0
+alias28 = "AfterglowPass"
+
+shader29 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear29 = true
+scale_type29 = source
+mipmap_input29 = true
+scale29 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader29 = ../../shaders/dogway/hsm-grade.slang
-filter_linear29 = true
-scale_type29 = source
-scale29 = 1.0
-
-shader30 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader30 = ../../shaders/dogway/hsm-grade.slang
filter_linear30 = true
scale_type30 = source
-scale_x30 = 1.0
-scale_y30 = 1.0
+scale30 = 1.0
-shader31 = ../../shaders/base/stock.slang
+shader31 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear31 = true
scale_type31 = source
scale_x31 = 1.0
scale_y31 = 1.0
-alias31 = "PrePass"
-mipmap_input31 = true
-shader32 = ../../shaders/guest/hsm-avg-lum.slang
+shader32 = ../../shaders/base/stock.slang
filter_linear32 = true
scale_type32 = source
-scale32 = 1.0
+scale_x32 = 1.0
+scale_y32 = 1.0
+alias32 = "PrePass"
mipmap_input32 = true
-alias32 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader33 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader33 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear33 = true
scale_type33 = source
scale33 = 1.0
-float_framebuffer33 = true
-alias33 = "LinearizePass"
+mipmap_input33 = true
+alias33 = "AvgLumPass"
-shader34 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader34 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear34 = true
-scale_type_x34 = absolute
-scale_x34 = 800.0
-scale_type_y34 = source
-scale_y34 = 1.0
+scale_type34 = source
+scale34 = 1.0
float_framebuffer34 = true
+alias34 = "LinearizePass"
-shader35 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader35 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear35 = true
scale_type_x35 = absolute
scale_x35 = 800.0
-scale_type_y35 = absolute
-scale_y35 = 600.0
+scale_type_y35 = source
+scale_y35 = 1.0
float_framebuffer35 = true
-alias35 = GlowPass
-shader36 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader36 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear36 = true
scale_type_x36 = absolute
scale_x36 = 800.0
scale_type_y36 = absolute
-scale_y36 = 600.0
+scale_y36 = 600.0
float_framebuffer36 = true
+alias36 = GlowPass
-shader37 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader37 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear37 = true
-scale_type_x37 = source
-scale_x37 = 1.0
-scale_type_y37 = source
-scale_y37 = 1.0
+scale_type_x37 = absolute
+scale_x37 = 800.0
+scale_type_y37 = absolute
+scale_y37 = 600.0
float_framebuffer37 = true
-alias37 = BloomPass
-shader38 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader38 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear38 = true
-float_framebuffer38 = true
-scale_type38 = viewport
+scale_type_x38 = source
scale_x38 = 1.0
+scale_type_y38 = source
scale_y38 = 1.0
+float_framebuffer38 = true
+alias38 = BloomPass
-shader39 = ../../shaders/guest/hsm-deconvergence.slang
+shader39 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear39 = true
+float_framebuffer39 = true
scale_type39 = viewport
scale_x39 = 1.0
scale_y39 = 1.0
-shader40 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias40 = "MBZ_PostCRTPass"
+shader40 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear40 = true
+scale_type40 = viewport
+scale_x40 = 1.0
+scale_y40 = 1.0
+
+shader41 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias41 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader41 = ../../shaders/base/linearize-crt.slang
-mipmap_input41 = true
-filter_linear41 = true
-scale_type41 = absolute
-// scale_x41 = 480
-// scale_y41 = 270
-// scale_x41 = 960
-// scale_y41 = 540
-scale_x41 = 800
-scale_y41 = 600
-alias41 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader42 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader42 = ../../shaders/base/linearize-crt.slang
mipmap_input42 = true
filter_linear42 = true
+scale_type42 = absolute
+// scale_x42 = 480
+// scale_y42 = 270
+// scale_x42 = 960
+// scale_y42 = 540
+scale_x42 = 800
+scale_y42 = 600
+alias42 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader43 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input43 = true
+filter_linear43 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader43 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear43 = true
-alias43 = "BR_MirrorBlurredPass"
+shader44 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear44 = true
+alias44 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader44 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input44 = true
-filter_linear44 = true
-scale_type44 = absolute
-scale_x44 = 128
-scale_y44 = 128
-alias44 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader45 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input45 = true
filter_linear45 = true
scale_type45 = absolute
-scale_x45 = 12
-scale_y45 = 12
-alias45 = "BR_MirrorFullscreenGlowPass"
+scale_x45 = 128
+scale_y45 = 128
+alias45 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader46 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input46 = true
+filter_linear46 = true
+scale_type46 = absolute
+scale_x46 = 12
+scale_y46 = 12
+alias46 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader46 = ../../shaders/base/reflection.slang
-scale_type46 = viewport
-float_framebuffer46 = true
-alias46 = "BR_CRTAndReflectionPass"
+shader47 = ../../shaders/base/reflection.slang
+scale_type47 = viewport
+float_framebuffer47 = true
+alias47 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader47 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear47 = true
-scale_type47 = viewport
-float_framebuffer47 = true
-alias47 = "BR_LayersUnderCRTPass"
-
-shader48 = ../../shaders/base/bezel-images-over-crt.slang
+shader48 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear48 = true
scale_type48 = viewport
float_framebuffer48 = true
-alias48 = "BR_LayersOverCRTPass"
+alias48 = "BR_LayersUnderCRTPass"
+
+shader49 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear49 = true
+scale_type49 = viewport
+float_framebuffer49 = true
+alias49 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader49 = ../../shaders/base/combine-passes.slang
-scale_type49 = viewport
-alias49 = "CombinePass"
+shader50 = ../../shaders/base/combine-passes.slang
+scale_type50 = viewport
+alias50 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -347,6 +350,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
@@ -381,6 +388,8 @@ HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 125
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0
+ntsc_scale = 0.4
+
shadowMask = 3
// DREZ Parameters
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-240p.slangp
index 2e67e1b..aea4a49 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-240p.slangp
@@ -1,9 +1,9 @@
-shaders = 47
+shaders = 48
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,220 +62,223 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader18 = ../../shaders/base/stock.slang
-alias18 = "PreCRTPass"
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear19 = true
-scale_type19 = source
-scale19 = 1.0
-alias19 = "AfterglowPass"
+shader19 = ../../shaders/base/stock.slang
+alias19 = "PreCRTPass"
-shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader20 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear20 = true
scale_type20 = source
-mipmap_input20 = true
scale20 = 1.0
+alias20 = "AfterglowPass"
+
+shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear21 = true
+scale_type21 = source
+mipmap_input21 = true
+scale21 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader21 = ../../shaders/dogway/hsm-grade.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
+shader22 = ../../shaders/dogway/hsm-grade.slang
+filter_linear22 = true
+scale_type22 = source
+scale22 = 1.0
-shader22 = ../../shaders/base/stock.slang
-alias22 = "PrePass0"
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PrePass0"
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear23 = false
-float_framebuffer23 = true
-scale_type_x23 = source
-scale_type_y23 = source
-scale_x23 = 4.0
-scale_y23 = 1.0
-frame_count_mod23 = 2
-alias23 = NPass1
-
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear24 = false
float_framebuffer24 = true
-filter_linear24 = true
-scale_type24 = source
-scale_x24 = 0.5
+scale_type_x24 = source
+scale_type_y24 = source
+scale_x24 = 4.0
scale_y24 = 1.0
+frame_count_mod24 = 2
+alias24 = NPass1
-shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer25 = true
filter_linear25 = true
scale_type25 = source
-scale_x25 = 1.0
+scale_x25 = 0.5
scale_y25 = 1.0
-shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader26 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-shader27 = ../../shaders/base/stock.slang
+shader27 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear27 = true
scale_type27 = source
scale_x27 = 1.0
scale_y27 = 1.0
-alias27 = "PrePass"
-mipmap_input27 = true
-shader28 = ../../shaders/guest/hsm-avg-lum.slang
+shader28 = ../../shaders/base/stock.slang
filter_linear28 = true
scale_type28 = source
-scale28 = 1.0
+scale_x28 = 1.0
+scale_y28 = 1.0
+alias28 = "PrePass"
mipmap_input28 = true
-alias28 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader29 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear29 = true
scale_type29 = source
scale29 = 1.0
-float_framebuffer29 = true
-alias29 = "LinearizePass"
+mipmap_input29 = true
+alias29 = "AvgLumPass"
-shader30 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader30 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear30 = true
-scale_type_x30 = viewport
-scale_x30 = 1.0
-scale_type_y30 = source
-scale_y30 = 1.0
+scale_type30 = source
+scale30 = 1.0
float_framebuffer30 = true
-alias30 = Pass1
+alias30 = "LinearizePass"
-shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader31 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear31 = true
-scale_type_x31 = absolute
-scale_x31 = 640.0
+scale_type_x31 = viewport
+scale_x31 = 1.0
scale_type_y31 = source
-scale_y31 = 1.0
+scale_y31 = 1.0
float_framebuffer31 = true
+alias31 = Pass1
-shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader32 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear32 = true
scale_type_x32 = absolute
scale_x32 = 640.0
-scale_type_y32 = absolute
-scale_y32 = 480.0
+scale_type_y32 = source
+scale_y32 = 1.0
float_framebuffer32 = true
-alias32 = GlowPass
-shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader33 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear33 = true
scale_type_x33 = absolute
scale_x33 = 640.0
scale_type_y33 = absolute
-scale_y33 = 480.0
+scale_y33 = 480.0
float_framebuffer33 = true
+alias33 = GlowPass
-shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader34 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear34 = true
scale_type_x34 = absolute
scale_x34 = 640.0
scale_type_y34 = absolute
-scale_y34 = 480.0
+scale_y34 = 480.0
float_framebuffer34 = true
-alias34 = BloomPass
-shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader35 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear35 = true
+scale_type_x35 = absolute
+scale_x35 = 640.0
+scale_type_y35 = absolute
+scale_y35 = 480.0
float_framebuffer35 = true
-scale_type35 = viewport
-scale_x35 = 1.0
-scale_y35 = 1.0
+alias35 = BloomPass
-shader36 = ../../shaders/guest/hsm-deconvergence.slang
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear36 = true
+float_framebuffer36 = true
scale_type36 = viewport
scale_x36 = 1.0
scale_y36 = 1.0
-shader37 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias37 = "MBZ_PostCRTPass"
+shader37 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear37 = true
+scale_type37 = viewport
+scale_x37 = 1.0
+scale_y37 = 1.0
+
+shader38 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias38 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader38 = ../../shaders/base/linearize-crt.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-// scale_x38 = 480
-// scale_y38 = 270
-// scale_x38 = 960
-// scale_y38 = 540
-scale_x38 = 800
-scale_y38 = 600
-alias38 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader39 = ../../shaders/base/linearize-crt.slang
mipmap_input39 = true
filter_linear39 = true
+scale_type39 = absolute
+// scale_x39 = 480
+// scale_y39 = 270
+// scale_x39 = 960
+// scale_y39 = 540
+scale_x39 = 800
+scale_y39 = 600
+alias39 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader40 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input40 = true
+filter_linear40 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader40 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear40 = true
-alias40 = "BR_MirrorBlurredPass"
+shader41 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear41 = true
+alias41 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input41 = true
-filter_linear41 = true
-scale_type41 = absolute
-scale_x41 = 128
-scale_y41 = 128
-alias41 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input42 = true
filter_linear42 = true
scale_type42 = absolute
-scale_x42 = 12
-scale_y42 = 12
-alias42 = "BR_MirrorFullscreenGlowPass"
+scale_x42 = 128
+scale_y42 = 128
+alias42 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input43 = true
+filter_linear43 = true
+scale_type43 = absolute
+scale_x43 = 12
+scale_y43 = 12
+alias43 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader43 = ../../shaders/base/reflection.slang
-scale_type43 = viewport
-float_framebuffer43 = true
-alias43 = "BR_CRTAndReflectionPass"
+shader44 = ../../shaders/base/reflection.slang
+scale_type44 = viewport
+float_framebuffer44 = true
+alias44 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader44 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear44 = true
-scale_type44 = viewport
-float_framebuffer44 = true
-alias44 = "BR_LayersUnderCRTPass"
-
-shader45 = ../../shaders/base/bezel-images-over-crt.slang
+shader45 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear45 = true
scale_type45 = viewport
float_framebuffer45 = true
-alias45 = "BR_LayersOverCRTPass"
+alias45 = "BR_LayersUnderCRTPass"
+
+shader46 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear46 = true
+scale_type46 = viewport
+float_framebuffer46 = true
+alias46 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader46 = ../../shaders/base/combine-passes.slang
-scale_type46 = viewport
-alias46 = "CombinePass"
+shader47 = ../../shaders/base/combine-passes.slang
+scale_type47 = viewport
+alias47 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -337,6 +340,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-480p.slangp
index af6536b..ea351e5 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV-NTSC__DREZ-480p.slangp
@@ -1,9 +1,9 @@
-shaders = 47
+shaders = 48
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,220 +62,223 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-shader18 = ../../shaders/base/stock.slang
-alias18 = "PreCRTPass"
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear19 = true
-scale_type19 = source
-scale19 = 1.0
-alias19 = "AfterglowPass"
+shader19 = ../../shaders/base/stock.slang
+alias19 = "PreCRTPass"
-shader20 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader20 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear20 = true
scale_type20 = source
-mipmap_input20 = true
scale20 = 1.0
+alias20 = "AfterglowPass"
+
+shader21 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear21 = true
+scale_type21 = source
+mipmap_input21 = true
+scale21 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader21 = ../../shaders/dogway/hsm-grade.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
+shader22 = ../../shaders/dogway/hsm-grade.slang
+filter_linear22 = true
+scale_type22 = source
+scale22 = 1.0
-shader22 = ../../shaders/base/stock.slang
-alias22 = "PrePass0"
+shader23 = ../../shaders/base/stock.slang
+alias23 = "PrePass0"
-shader23 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
-filter_linear23 = false
-float_framebuffer23 = true
-scale_type_x23 = source
-scale_type_y23 = source
-scale_x23 = 4.0
-scale_y23 = 1.0
-frame_count_mod23 = 2
-alias23 = NPass1
-
-shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+shader24 = ../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
+filter_linear24 = false
float_framebuffer24 = true
-filter_linear24 = true
-scale_type24 = source
-scale_x24 = 0.5
+scale_type_x24 = source
+scale_type_y24 = source
+scale_x24 = 4.0
scale_y24 = 1.0
+frame_count_mod24 = 2
+alias24 = NPass1
-shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
+shader25 = ../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
+float_framebuffer25 = true
filter_linear25 = true
scale_type25 = source
-scale_x25 = 1.0
+scale_x25 = 0.5
scale_y25 = 1.0
-shader26 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader26 = ../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
-shader27 = ../../shaders/base/stock.slang
+shader27 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear27 = true
scale_type27 = source
scale_x27 = 1.0
scale_y27 = 1.0
-alias27 = "PrePass"
-mipmap_input27 = true
-shader28 = ../../shaders/guest/hsm-avg-lum.slang
+shader28 = ../../shaders/base/stock.slang
filter_linear28 = true
scale_type28 = source
-scale28 = 1.0
+scale_x28 = 1.0
+scale_y28 = 1.0
+alias28 = "PrePass"
mipmap_input28 = true
-alias28 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader29 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader29 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear29 = true
scale_type29 = source
scale29 = 1.0
-float_framebuffer29 = true
-alias29 = "LinearizePass"
+mipmap_input29 = true
+alias29 = "AvgLumPass"
-shader30 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader30 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear30 = true
-scale_type_x30 = viewport
-scale_x30 = 1.0
-scale_type_y30 = source
-scale_y30 = 1.0
+scale_type30 = source
+scale30 = 1.0
float_framebuffer30 = true
-alias30 = Pass1
+alias30 = "LinearizePass"
-shader31 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+shader31 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear31 = true
-scale_type_x31 = absolute
-scale_x31 = 640.0
+scale_type_x31 = viewport
+scale_x31 = 1.0
scale_type_y31 = source
-scale_y31 = 1.0
+scale_y31 = 1.0
float_framebuffer31 = true
+alias31 = Pass1
-shader32 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader32 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear32 = true
scale_type_x32 = absolute
scale_x32 = 640.0
-scale_type_y32 = absolute
-scale_y32 = 480.0
+scale_type_y32 = source
+scale_y32 = 1.0
float_framebuffer32 = true
-alias32 = GlowPass
-shader33 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader33 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear33 = true
scale_type_x33 = absolute
scale_x33 = 640.0
scale_type_y33 = absolute
-scale_y33 = 480.0
+scale_y33 = 480.0
float_framebuffer33 = true
+alias33 = GlowPass
-shader34 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader34 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear34 = true
scale_type_x34 = absolute
scale_x34 = 640.0
scale_type_y34 = absolute
-scale_y34 = 480.0
+scale_y34 = 480.0
float_framebuffer34 = true
-alias34 = BloomPass
-shader35 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
+shader35 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear35 = true
+scale_type_x35 = absolute
+scale_x35 = 640.0
+scale_type_y35 = absolute
+scale_y35 = 480.0
float_framebuffer35 = true
-scale_type35 = viewport
-scale_x35 = 1.0
-scale_y35 = 1.0
+alias35 = BloomPass
-shader36 = ../../shaders/guest/hsm-deconvergence.slang
+shader36 = ../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.slang
filter_linear36 = true
+float_framebuffer36 = true
scale_type36 = viewport
scale_x36 = 1.0
scale_y36 = 1.0
-shader37 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias37 = "MBZ_PostCRTPass"
+shader37 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear37 = true
+scale_type37 = viewport
+scale_x37 = 1.0
+scale_y37 = 1.0
+
+shader38 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias38 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader38 = ../../shaders/base/linearize-crt.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-// scale_x38 = 480
-// scale_y38 = 270
-// scale_x38 = 960
-// scale_y38 = 540
-scale_x38 = 800
-scale_y38 = 600
-alias38 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader39 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader39 = ../../shaders/base/linearize-crt.slang
mipmap_input39 = true
filter_linear39 = true
+scale_type39 = absolute
+// scale_x39 = 480
+// scale_y39 = 270
+// scale_x39 = 960
+// scale_y39 = 540
+scale_x39 = 800
+scale_y39 = 600
+alias39 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader40 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input40 = true
+filter_linear40 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader40 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear40 = true
-alias40 = "BR_MirrorBlurredPass"
+shader41 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear41 = true
+alias41 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader41 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input41 = true
-filter_linear41 = true
-scale_type41 = absolute
-scale_x41 = 128
-scale_y41 = 128
-alias41 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader42 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input42 = true
filter_linear42 = true
scale_type42 = absolute
-scale_x42 = 12
-scale_y42 = 12
-alias42 = "BR_MirrorFullscreenGlowPass"
+scale_x42 = 128
+scale_y42 = 128
+alias42 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader43 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input43 = true
+filter_linear43 = true
+scale_type43 = absolute
+scale_x43 = 12
+scale_y43 = 12
+alias43 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader43 = ../../shaders/base/reflection.slang
-scale_type43 = viewport
-float_framebuffer43 = true
-alias43 = "BR_CRTAndReflectionPass"
+shader44 = ../../shaders/base/reflection.slang
+scale_type44 = viewport
+float_framebuffer44 = true
+alias44 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader44 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear44 = true
-scale_type44 = viewport
-float_framebuffer44 = true
-alias44 = "BR_LayersUnderCRTPass"
-
-shader45 = ../../shaders/base/bezel-images-over-crt.slang
+shader45 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear45 = true
scale_type45 = viewport
float_framebuffer45 = true
-alias45 = "BR_LayersOverCRTPass"
+alias45 = "BR_LayersUnderCRTPass"
+
+shader46 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear46 = true
+scale_type46 = viewport
+float_framebuffer46 = true
+alias46 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader46 = ../../shaders/base/combine-passes.slang
-scale_type46 = viewport
-alias46 = "CombinePass"
+shader47 = ../../shaders/base/combine-passes.slang
+scale_type47 = viewport
+alias47 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -337,6 +340,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-1080p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-1080p.slangp
index ea11e1f..b102f71 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-1080p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-1080p.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 1440
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 1440
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-224p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-224p.slangp
index f3b3f21..083aae6 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-224p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-224p.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-240p.slangp
index 228e642..d2ded93 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-240p.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-3DS-400x480.slangp
index 5b795af..153456e 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-3DS-400x480.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-3DS-400x480.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 400
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 400
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-480p.slangp
index cd8a47c..3b34edd 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-480p.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-NDS-256x384.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-NDS-256x384.slangp
index cc25c94..456e487 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-NDS-256x384.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-NDS-256x384.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 256
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 256
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-480x272.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-480x272.slangp
index e3f5b4d..b65db51 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-480x272.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-480x272.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 480
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 480
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-960x544.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-960x544.slangp
index f2f847c..c69cf3a 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-960x544.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__GDV__DREZ-PSP-960x544.slangp
@@ -1,9 +1,9 @@
-shaders = 44
+shaders = 45
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 960
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 960
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,199 +62,202 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/guest/hsm-gaussian_horizontal.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
-scale_type_x28 = absolute
-scale_x28 = 800.0
-scale_type_y28 = source
-scale_y28 = 1.0
+scale_type28 = source
+scale28 = 1.0
float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/guest/hsm-gaussian_vertical.slang
+shader29 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 800.0
-scale_type_y29 = absolute
-scale_y29 = 600.0
+scale_type_y29 = source
+scale_y29 = 1.0
float_framebuffer29 = true
-alias29 = GlowPass
-shader30 = ../../shaders/guest/hsm-bloom_horizontal.slang
+shader30 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear30 = true
scale_type_x30 = absolute
scale_x30 = 800.0
scale_type_y30 = absolute
-scale_y30 = 600.0
+scale_y30 = 600.0
float_framebuffer30 = true
+alias30 = GlowPass
-shader31 = ../../shaders/guest/hsm-bloom_vertical.slang
+shader31 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
-scale_type_x31 = source
-scale_x31 = 1.0
-scale_type_y31 = source
-scale_y31 = 1.0
+scale_type_x31 = absolute
+scale_x31 = 800.0
+scale_type_y31 = absolute
+scale_y31 = 600.0
float_framebuffer31 = true
-alias31 = BloomPass
-shader32 = ../../shaders/guest/hsm-crt-guest-advanced.slang
+shader32 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
-float_framebuffer32 = true
-scale_type32 = viewport
+scale_type_x32 = source
scale_x32 = 1.0
+scale_type_y32 = source
scale_y32 = 1.0
+float_framebuffer32 = true
+alias32 = BloomPass
-shader33 = ../../shaders/guest/hsm-deconvergence.slang
+shader33 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
+float_framebuffer33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
-shader34 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias34 = "MBZ_PostCRTPass"
+shader34 = ../../shaders/guest/hsm-deconvergence.slang
+filter_linear34 = true
+scale_type34 = viewport
+scale_x34 = 1.0
+scale_y34 = 1.0
+
+shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias35 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader35 = ../../shaders/base/linearize-crt.slang
-mipmap_input35 = true
-filter_linear35 = true
-scale_type35 = absolute
-// scale_x35 = 480
-// scale_y35 = 270
-// scale_x35 = 960
-// scale_y35 = 540
-scale_x35 = 800
-scale_y35 = 600
-alias35 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader36 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
+scale_type36 = absolute
+// scale_x36 = 480
+// scale_y36 = 270
+// scale_x36 = 960
+// scale_y36 = 540
+scale_x36 = 800
+scale_y36 = 600
+alias36 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input37 = true
+filter_linear37 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader37 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear37 = true
-alias37 = "BR_MirrorBlurredPass"
+shader38 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear38 = true
+alias38 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader38 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input38 = true
-filter_linear38 = true
-scale_type38 = absolute
-scale_x38 = 128
-scale_y38 = 128
-alias38 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
-scale_x39 = 12
-scale_y39 = 12
-alias39 = "BR_MirrorFullscreenGlowPass"
+scale_x39 = 128
+scale_y39 = 128
+alias39 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input40 = true
+filter_linear40 = true
+scale_type40 = absolute
+scale_x40 = 12
+scale_y40 = 12
+alias40 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader40 = ../../shaders/base/reflection.slang
-scale_type40 = viewport
-float_framebuffer40 = true
-alias40 = "BR_CRTAndReflectionPass"
+shader41 = ../../shaders/base/reflection.slang
+scale_type41 = viewport
+float_framebuffer41 = true
+alias41 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader41 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear41 = true
-scale_type41 = viewport
-float_framebuffer41 = true
-alias41 = "BR_LayersUnderCRTPass"
-
-shader42 = ../../shaders/base/bezel-images-over-crt.slang
+shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
-alias42 = "BR_LayersOverCRTPass"
+alias42 = "BR_LayersUnderCRTPass"
+
+shader43 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear43 = true
+scale_type43 = viewport
+float_framebuffer43 = true
+alias43 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader43 = ../../shaders/base/combine-passes.slang
-scale_type43 = viewport
-alias43 = "CombinePass"
+shader44 = ../../shaders/base/combine-passes.slang
+scale_type44 = viewport
+alias44 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -316,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-3DS-400x480.slangp
index 4f8d622..01a40e7 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-3DS-400x480.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-3DS-400x480.slangp
@@ -1,9 +1,9 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 400
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 400
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,159 +62,162 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear28 = true
+scale_type28 = source
+scale28 = 1.0
+float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear29 = "false"
-scale_type29 = "viewport"
-scale29 = "1.0"
+shader29 = ../../shaders/base/delinearize.slang
-shader30 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias30 = "MBZ_PostCRTPass"
+shader30 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear30 = "false"
+scale_type30 = "viewport"
+scale30 = "1.0"
+
+shader31 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias31 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader31 = ../../shaders/base/linearize-crt.slang
-mipmap_input31 = true
-filter_linear31 = true
-scale_type31 = absolute
-// scale_x31 = 480
-// scale_y31 = 270
-// scale_x31 = 960
-// scale_y31 = 540
-scale_x31 = 800
-scale_y31 = 600
-alias31 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader32 = ../../shaders/base/linearize-crt.slang
mipmap_input32 = true
filter_linear32 = true
+scale_type32 = absolute
+// scale_x32 = 480
+// scale_y32 = 270
+// scale_x32 = 960
+// scale_y32 = 540
+scale_x32 = 800
+scale_y32 = 600
+alias32 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input33 = true
+filter_linear33 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear33 = true
-alias33 = "BR_MirrorBlurredPass"
+shader34 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear34 = true
+alias34 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-scale_x34 = 128
-scale_y34 = 128
-alias34 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input35 = true
filter_linear35 = true
scale_type35 = absolute
-scale_x35 = 12
-scale_y35 = 12
-alias35 = "BR_MirrorFullscreenGlowPass"
+scale_x35 = 128
+scale_y35 = 128
+alias35 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input36 = true
+filter_linear36 = true
+scale_type36 = absolute
+scale_x36 = 12
+scale_y36 = 12
+alias36 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader36 = ../../shaders/base/reflection.slang
-scale_type36 = viewport
-float_framebuffer36 = true
-alias36 = "BR_CRTAndReflectionPass"
+shader37 = ../../shaders/base/reflection.slang
+scale_type37 = viewport
+float_framebuffer37 = true
+alias37 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader37 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear37 = true
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_LayersUnderCRTPass"
-
-shader38 = ../../shaders/base/bezel-images-over-crt.slang
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear38 = true
scale_type38 = viewport
float_framebuffer38 = true
-alias38 = "BR_LayersOverCRTPass"
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader39 = ../../shaders/base/combine-passes.slang
-scale_type39 = viewport
-alias39 = "CombinePass"
+shader40 = ../../shaders/base/combine-passes.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -276,6 +279,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-NDS-256x384.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-NDS-256x384.slangp
index 883e6d4..9da77ba 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-NDS-256x384.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-NDS-256x384.slangp
@@ -1,9 +1,9 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 256
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 256
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,159 +62,162 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear28 = true
+scale_type28 = source
+scale28 = 1.0
+float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear29 = "false"
-scale_type29 = "viewport"
-scale29 = "1.0"
+shader29 = ../../shaders/base/delinearize.slang
-shader30 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias30 = "MBZ_PostCRTPass"
+shader30 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear30 = "false"
+scale_type30 = "viewport"
+scale30 = "1.0"
+
+shader31 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias31 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader31 = ../../shaders/base/linearize-crt.slang
-mipmap_input31 = true
-filter_linear31 = true
-scale_type31 = absolute
-// scale_x31 = 480
-// scale_y31 = 270
-// scale_x31 = 960
-// scale_y31 = 540
-scale_x31 = 800
-scale_y31 = 600
-alias31 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader32 = ../../shaders/base/linearize-crt.slang
mipmap_input32 = true
filter_linear32 = true
+scale_type32 = absolute
+// scale_x32 = 480
+// scale_y32 = 270
+// scale_x32 = 960
+// scale_y32 = 540
+scale_x32 = 800
+scale_y32 = 600
+alias32 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input33 = true
+filter_linear33 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear33 = true
-alias33 = "BR_MirrorBlurredPass"
+shader34 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear34 = true
+alias34 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-scale_x34 = 128
-scale_y34 = 128
-alias34 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input35 = true
filter_linear35 = true
scale_type35 = absolute
-scale_x35 = 12
-scale_y35 = 12
-alias35 = "BR_MirrorFullscreenGlowPass"
+scale_x35 = 128
+scale_y35 = 128
+alias35 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input36 = true
+filter_linear36 = true
+scale_type36 = absolute
+scale_x36 = 12
+scale_y36 = 12
+alias36 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader36 = ../../shaders/base/reflection.slang
-scale_type36 = viewport
-float_framebuffer36 = true
-alias36 = "BR_CRTAndReflectionPass"
+shader37 = ../../shaders/base/reflection.slang
+scale_type37 = viewport
+float_framebuffer37 = true
+alias37 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader37 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear37 = true
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_LayersUnderCRTPass"
-
-shader38 = ../../shaders/base/bezel-images-over-crt.slang
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear38 = true
scale_type38 = viewport
float_framebuffer38 = true
-alias38 = "BR_LayersOverCRTPass"
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader39 = ../../shaders/base/combine-passes.slang
-scale_type39 = viewport
-alias39 = "CombinePass"
+shader40 = ../../shaders/base/combine-passes.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -276,6 +279,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-PSP-480x272.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-PSP-480x272.slangp
index 7187664..8f9b576 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-PSP-480x272.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__LCD-GRID__DREZ-PSP-480x272.slangp
@@ -1,9 +1,9 @@
-shaders = 40
+shaders = 41
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 480
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 480
@@ -48,7 +48,7 @@ scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"
-shader7 = ../../shaders/base/linearize.slang
+shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma
shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -62,159 +62,162 @@ shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang
-shader16 = ../../shaders/base/delinearize.slang
+
+shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang
shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang
-// GTU TV Processing
-shader18 = ../../shaders/gtu/hsm-gtu-pass1.slang
-scale_type18 = source
-scale18 = 1.0
-float_framebuffer18 = true
+shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang
-shader19 = ../../shaders/gtu/hsm-gtu-pass2.slang
-scale_type_x19 = source
-scale_x19 = 1.0
-scale_type_y19 = source
-scale_y19 = 1.0
-filter_linear19 = false
+// GTU TV Processing
+shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
+scale_type19 = source
+scale19 = 1.0
float_framebuffer19 = true
-shader20 = ../../shaders/base/stock.slang
-alias20 = "PreCRTPass"
+shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
+scale_type_x20 = source
+scale_x20 = 1.0
+scale_type_y20 = source
+scale_y20 = 1.0
+filter_linear20 = false
+float_framebuffer20 = true
-shader21 = ../../shaders/guest/hsm-afterglow0.slang
-filter_linear21 = true
-scale_type21 = source
-scale21 = 1.0
-alias21 = "AfterglowPass"
+shader21 = ../../shaders/base/stock.slang
+alias21 = "PreCRTPass"
-shader22 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
-mipmap_input22 = true
scale22 = 1.0
+alias22 = "AfterglowPass"
+
+shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
+filter_linear23 = true
+scale_type23 = source
+mipmap_input23 = true
+scale23 = 1.0
// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
-shader23 = ../../shaders/dogway/hsm-grade.slang
-filter_linear23 = true
-scale_type23 = source
-scale23 = 1.0
-
-shader24 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
+shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
-scale_x24 = 1.0
-scale_y24 = 1.0
+scale24 = 1.0
-shader25 = ../../shaders/base/stock.slang
+shader25 = ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
-alias25 = "PrePass"
-mipmap_input25 = true
-shader26 = ../../shaders/guest/hsm-avg-lum.slang
+shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
-scale26 = 1.0
+scale_x26 = 1.0
+scale_y26 = 1.0
+alias26 = "PrePass"
mipmap_input26 = true
-alias26 = "AvgLumPass"
-// Pass referenced by subsequent blurring passes and crt pass
-shader27 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+shader27 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
-float_framebuffer27 = true
-alias27 = "LinearizePass"
+mipmap_input27 = true
+alias27 = "AvgLumPass"
-shader28 = ../../shaders/base/delinearize.slang
+// Pass referenced by subsequent blurring passes and crt pass
+shader28 = ../../shaders/guest/hsm-interlace-and-linearize.slang
+filter_linear28 = true
+scale_type28 = source
+scale28 = 1.0
+float_framebuffer28 = true
+alias28 = "LinearizePass"
-shader29 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
-filter_linear29 = "false"
-scale_type29 = "viewport"
-scale29 = "1.0"
+shader29 = ../../shaders/base/delinearize.slang
-shader30 = ../../shaders/base/post-crt-prep-image-layers.slang
-alias30 = "MBZ_PostCRTPass"
+shader30 = ../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang
+filter_linear30 = "false"
+scale_type30 = "viewport"
+scale30 = "1.0"
+
+shader31 = ../../shaders/base/post-crt-prep-image-layers.slang
+alias31 = "MBZ_PostCRTPass"
// Reduce Resolution ----------------------------------------------------------------
// Reduce the resolution to a small static size regardless of final resolution
// Allows consistent look and faster at different final resolutions for blur
// Mipmap option allows downscaling without artifacts
-shader31 = ../../shaders/base/linearize-crt.slang
-mipmap_input31 = true
-filter_linear31 = true
-scale_type31 = absolute
-// scale_x31 = 480
-// scale_y31 = 270
-// scale_x31 = 960
-// scale_y31 = 540
-scale_x31 = 800
-scale_y31 = 600
-alias31 = "BR_MirrorLowResPass"
-
-// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
-shader32 = ../../shaders/base/blur-outside-screen-horiz.slang
+shader32 = ../../shaders/base/linearize-crt.slang
mipmap_input32 = true
filter_linear32 = true
+scale_type32 = absolute
+// scale_x32 = 480
+// scale_y32 = 270
+// scale_x32 = 960
+// scale_y32 = 540
+scale_x32 = 800
+scale_y32 = 600
+alias32 = "BR_MirrorLowResPass"
+
+// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
+shader33 = ../../shaders/base/blur-outside-screen-horiz.slang
+mipmap_input33 = true
+filter_linear33 = true
// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
-shader33 = ../../shaders/base/blur-outside-screen-vert.slang
-filter_linear33 = true
-alias33 = "BR_MirrorBlurredPass"
+shader34 = ../../shaders/base/blur-outside-screen-vert.slang
+filter_linear34 = true
+alias34 = "BR_MirrorBlurredPass"
// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
// Mipmap option allows smoother downscaling
-shader34 = ../../../../blurs/shaders/royale/blur9x9.slang
-mipmap_input34 = true
-filter_linear34 = true
-scale_type34 = absolute
-scale_x34 = 128
-scale_y34 = 128
-alias34 = "BR_MirrorReflectionDiffusedPass"
-
-// Add Diffused glow all around the screen ----------------------------------------------------------------
-// Blurred so much that it's non directional
-// Mipmap option allows downscaling without artifacts
shader35 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input35 = true
filter_linear35 = true
scale_type35 = absolute
-scale_x35 = 12
-scale_y35 = 12
-alias35 = "BR_MirrorFullscreenGlowPass"
+scale_x35 = 128
+scale_y35 = 128
+alias35 = "BR_MirrorReflectionDiffusedPass"
+
+// Add Diffused glow all around the screen ----------------------------------------------------------------
+// Blurred so much that it's non directional
+// Mipmap option allows downscaling without artifacts
+shader36 = ../../../../blurs/shaders/royale/blur9x9.slang
+mipmap_input36 = true
+filter_linear36 = true
+scale_type36 = absolute
+scale_x36 = 12
+scale_y36 = 12
+alias36 = "BR_MirrorFullscreenGlowPass"
// Bezel Reflection ----------------------------------------------------------------
-shader36 = ../../shaders/base/reflection.slang
-scale_type36 = viewport
-float_framebuffer36 = true
-alias36 = "BR_CRTAndReflectionPass"
+shader37 = ../../shaders/base/reflection.slang
+scale_type37 = viewport
+float_framebuffer37 = true
+alias37 = "BR_CRTAndReflectionPass"
// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------
-shader37 = ../../shaders/base/bezel-images-under-crt.slang
-filter_linear37 = true
-scale_type37 = viewport
-float_framebuffer37 = true
-alias37 = "BR_LayersUnderCRTPass"
-
-shader38 = ../../shaders/base/bezel-images-over-crt.slang
+shader38 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear38 = true
scale_type38 = viewport
float_framebuffer38 = true
-alias38 = "BR_LayersOverCRTPass"
+alias38 = "BR_LayersUnderCRTPass"
+
+shader39 = ../../shaders/base/bezel-images-over-crt.slang
+filter_linear39 = true
+scale_type39 = viewport
+float_framebuffer39 = true
+alias39 = "BR_LayersOverCRTPass"
// Combine Passes ----------------------------------------------------------------
-shader39 = ../../shaders/base/combine-passes.slang
-scale_type39 = viewport
-alias39 = "CombinePass"
+shader40 = ../../shaders/base/combine-passes.slang
+scale_type40 = viewport
+alias40 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -276,6 +279,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp
index deea07a..740bf16 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -211,7 +211,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -273,6 +273,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp
index 214cc6e..b47f02b 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -211,7 +211,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -273,6 +273,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp
index 3756201..be58f56 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp
@@ -3,7 +3,7 @@ shaders = 27
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 1440
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 1440
@@ -185,7 +185,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -247,6 +247,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp
index 63c488c..e613ff1 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp
@@ -3,7 +3,7 @@ shaders = 27
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -185,7 +185,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -247,6 +247,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp
index 7536ae5..27bb5ae 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp
@@ -3,7 +3,7 @@ shaders = 27
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -185,7 +185,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -247,6 +247,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-240p.slangp
index 5645f3c..c23e3ac 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-240p.slangp
@@ -3,7 +3,7 @@ shaders = 36
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -257,7 +257,7 @@ shader35 = ../../shaders/base/combine-passes.slang
scale_type35 = viewport
alias35 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -319,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-480p.slangp
index 55008f8..918b554 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV-NTSC__DREZ-480p.slangp
@@ -3,7 +3,7 @@ shaders = 36
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -257,7 +257,7 @@ shader35 = ../../shaders/base/combine-passes.slang
scale_type35 = viewport
alias35 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -319,6 +319,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-1080p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-1080p.slangp
index d603f9d..9d3e632 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-1080p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-1080p.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 1440
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 1440
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-224p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-224p.slangp
index 01e30f4..fa3bafc 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-224p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-224p.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-240p.slangp
index 7cc6a40..c5c3ea7 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-240p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-240p.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 320
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 320
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-1600x1920.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-1600x1920.slangp
index 54ab95c..6b33f59 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-1600x1920.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-1600x1920.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 1600
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 1600
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-400x480.slangp
index 17cd4a3..12b01f3 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-400x480.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-3DS-400x480.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 400
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 400
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-480p.slangp
index c814566..5792445 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-480p.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-480p.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 640
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 640
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-1280x1920.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-1280x1920.slangp
index ece90f4..50d4efd 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-1280x1920.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-1280x1920.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 1280
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 1280
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-256x384.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-256x384.slangp
index 53f0288..84c22e6 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-256x384.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-NDS-256x384.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 256
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 256
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-480x272.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-480x272.slangp
index 9ba03b5..229aa04 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-480x272.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-480x272.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 480
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 480
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-960x544.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-960x544.slangp
index 10bf378..71d1544 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-960x544.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__GDV__DREZ-PSP-960x544.slangp
@@ -3,7 +3,7 @@ shaders = 31
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 960
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 960
@@ -222,7 +222,7 @@ shader30 = ../../shaders/base/combine-passes.slang
scale_type30 = viewport
alias30 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -284,6 +284,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-3DS-400x480.slangp
index 1f89356..9c1a470 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-3DS-400x480.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-3DS-400x480.slangp
@@ -3,7 +3,7 @@ shaders = 27
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 400
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 400
@@ -182,7 +182,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -244,6 +244,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-NDS-256x384.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-NDS-256x384.slangp
index 8303d31..ae28f2d 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-NDS-256x384.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-NDS-256x384.slangp
@@ -3,7 +3,7 @@ shaders = 27
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 256
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 256
@@ -182,7 +182,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -244,6 +244,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-PSP-480x272.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-PSP-480x272.slangp
index 78b673f..0f29925 100644
--- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-PSP-480x272.slangp
+++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__LCD-GRID__DREZ-PSP-480x272.slangp
@@ -3,7 +3,7 @@ shaders = 27
shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"
-shader1 = ../../shaders/hyllian/cubic/hsm-b-spline-x.slang
+shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 480
@@ -11,7 +11,7 @@ scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"
-shader2 = ../../shaders/hyllian/cubic/hsm-b-spline-y.slang
+shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 480
@@ -182,7 +182,7 @@ shader26 = ../../shaders/base/combine-passes.slang
scale_type26 = viewport
alias26 = "CombinePass"
// Define textures to be used by the different passes
-textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
+textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"
SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true
@@ -244,6 +244,10 @@ DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1
+DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
+DeviceLEDImage_linear = true
+DeviceLEDImage_mipmap = 1
+
DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1
diff --git a/bezel/Mega_Bezel/README.md b/bezel/Mega_Bezel/README.md
index 8b78a30..a07c774 100644
--- a/bezel/Mega_Bezel/README.md
+++ b/bezel/Mega_Bezel/README.md
@@ -3,7 +3,7 @@ Mega Bezel Shader Readme
------------------------------------------------------------------------------------------------------------
![Mega Bezel Logo](MegaBezelLogo.png)
-**Version V1.2.0_2022-09-11**
+**Version V1.4.0_2022-09-26**
----------------------------------------
----------------------------------------
@@ -1140,6 +1140,7 @@ Layer order adjusts the order in which the layers are composited or "layered" on
- **Viewport Vignette**
- **LED Image**
- **Device Image**
+- **Device LED Image**
- **CRT Screen**
- **Decal Image**
- **Cabinet Glass Image**
@@ -1244,7 +1245,7 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- ***1 - Show only on Screen 1***
- ***2 - Show only on Screen 2***
-- ***Inherit Scale***
+- ***Follow Layer***
- *Controls if this layer follows another layer's scaling*
- ***Full / Fullscreen*** *- Scale to the viewport*
- ***Tube*** *- Follow the Tube Scaling*
@@ -1254,8 +1255,8 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- ***Decal Image*** *- Follow the Decal Image Scaling*
- ***Top Extra Image*** *- Follow the Top Extra Image Scaling*
-- **Zoom FULL Scale Mode**
- - When the layer Inherit Scale is in **FULL** mode this controls if the layer should scale with the global zoom or not, this defaults to ON
+- **Follow Full also follows Zoom**
+ - When the layer Follow Layer is in **FULL** mode this controls if the layer should scale with the global zoom or not, this defaults to ON
- **Scale Aspect**
- Controls how the texture's aspect reacts to the inherited scale
@@ -1273,6 +1274,9 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Split Mode Preserve Center %** --- Preserves a part of the center of the graphic when split is used
- One usage is to have a logo in the center of the bottom of the monitor graphic and reserve space for this
+- **Split Mode Repeat Width %** --- Width of repeating texture in exposed area
+ - When this is 0 repeat is off
+
- **Scale** --- *Scales image layer equally in both directions*
- **Scale X** --- *Scales image layer horizontally*
- **Position X** --- *Moves the image layer horizontally*
@@ -1297,12 +1301,12 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Mask**
- **Cutout Mask**
- **Dual Screen Visibility**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - FullScreen**
- **1 - Tube**
- **2 - Bezel**
-- **Inherit Scale**
-- **Zoom FULL Scale Mode**
+- **Follow Layer**
+- **Follow Full also follows Zoom**
- **Scale Aspect**
- **Image Fill Mode**
- **Split Mode Preserve Center %**
@@ -1320,7 +1324,7 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Opacity**
- **Mask**
- **Cutout Mask**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - Full**
- **1 - Background**
- **2 - Tube**
@@ -1345,14 +1349,14 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Mask**
- **Cutout Mask**
- **Dual Screen Visibility**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - FullScreen**
- **1 - Tube**
- **2 - Bezel**
- **3 - BG**
- **4 - Device**
-- **Inherit Scale**
-- **Zoom FULL Scale Mode**
+- **Follow Layer**
+- **Follow Full also follows Zoom**
- **Scale Aspect**
- **Image Fill Mode**
- **Split Mode Preserve Center %**
@@ -1378,13 +1382,13 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Mask**
- **Cutout Mask**
- **Dual Screen Visibility**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - FullScreen**
- **1 - Tube**
- **2 - Bezel**
- **3 - BG**
-- **Inherit Scale**
-- **Zoom FULL Scale Mode**
+- **Follow Layer**
+- **Follow Full also follows Zoom**
- **Scale Aspect**
- **Image Fill Mode**
- **Split Mode Preserve Center %**
@@ -1410,14 +1414,14 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Mask**
- **Cutout Mask**
- **Dual Screen Visibility**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - FullScreen**
- **1 - Tube**
- **2 - Bezel**
- **3 - BG**
- **4 - Device**
-- **Inherit Scale**
-- **Zoom FULL Scale Mode**
+- **Follow Layer**
+- **Follow Full also follows Zoom**
- **Scale Aspect**
- **Image Fill Mode**
- **Split Mode Preserve Center %**
@@ -1443,15 +1447,15 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Mask**
- **Cutout Mask**
- **Dual Screen Visibility**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - FullScreen**
- **1 - Tube**
- **2 - Bezel**
- **3 - BG**
- **4 - Device**
- **5 - Decal**
-- **Inherit Scale**
-- **Zoom FULL Scale Mode**
+- **Follow Layer**
+- **Follow Full also follows Zoom**
- **Scale Aspect**
- **Image Fill Mode**
- **Split Mode Preserve Center %**
@@ -1479,15 +1483,15 @@ Used to cut a rectangular area from the layers, for example cutting out the hole
- **Mask**
- **Cutout Mask**
- **Dual Screen Visibility**
-- **Inherit Scale**
+- **Follow Layer**
- **0 - FullScreen**
- **1 - Tube**
- **2 - Bezel**
- **3 - BG**
- **4 - Device**
- **5 - Decal**
-- **Inherit Scale**
-- **Zoom FULL Scale Mode**
+- **Follow Layer**
+- **Follow Full also follows Zoom**
- **Scale Aspect**
- **Image Fill Mode**
- **Split Mode Preserve Center %**
diff --git a/bezel/Mega_Bezel/shaders/ShaderTodo.txt b/bezel/Mega_Bezel/shaders/ShaderTodo.txt
index 214aef5..ff49d59 100644
--- a/bezel/Mega_Bezel/shaders/ShaderTodo.txt
+++ b/bezel/Mega_Bezel/shaders/ShaderTodo.txt
@@ -1,28 +1,19 @@
![Mega_Bezel_Logo|512x256, 75%](upload://6PNkvcMF9Go9Wnk6OJXfYR1opXI.png)
-Mega Bezel is updated to V1.2.0_2022-09-11
+Mega Bezel is updated to V1.4.0_2022-09-26
Changes:
- * Split Scaliing
- * Added Split Preserve Center %
- * When an image is being split when it is being stretched this preserves the center area
- * Added Split Repeat Width
- * When this is 0 there is no repeat
- * If this is larger than 0 this sets the width of the repeated area
- * Fixed Split mode scaling when following wider horizontal aspect
- * Fixed some corner parameters not forcing update of the graphics cache
- * Added Brightness parameters for the different sides of the bezel to help create directional lighting
- * SMOOTH-ADV now uses mask 3 to add some more phosphor-ish texture to the screen
-
+ * Updated all the blur paths to match the new paths in the libretro repo
+ * Adjusted some caching to be slightly faster
----------------------------------------------------
--- TODO ---------------------------------------
----------------------------------------------------
* Try Leveraging Fake Scanlines for Gameboy type effect
+ * Integer Scale Mode not affecting tube scale
* Add .params #reference to with all parameters commented out
-
* Bezel shadow on Potato Tube / Game Image
----------------------------------------------------
@@ -30,6 +21,23 @@ Changes:
----------------------------------------------------
* Punch Out - Dual Screen
+Recent Performance 2022-09-18
+Spec RTX-2060, at 4K:
+ 240p image
+ ADV 175
+ XBR-ADV 170
+ POTATO 422
+ POTATO-XBR 390
+
+ 2K image
+ ADV 105
+ XBR-ADV 66
+
+ 4K image
+ ADV 48
+ XBR-ADV Crashed
+
+
----------------------------------------------------
--- Post V1 ---------------------------------------
----------------------------------------------------
diff --git a/bezel/Mega_Bezel/shaders/base/bezel-images.inc b/bezel/Mega_Bezel/shaders/base/bezel-images.inc
index 7025a59..2a21cb4 100644
--- a/bezel/Mega_Bezel/shaders/base/bezel-images.inc
+++ b/bezel/Mega_Bezel/shaders/base/bezel-images.inc
@@ -112,7 +112,8 @@ vec2 HSM_GetScaledCoord(vec2 in_viewport_coord,
float explicit_texture_aspect,
vec2 offset_pos,
vec2 offset_scale,
- float inherited_scale_mode,
+ float layer_to_follow,
+ float follow_mode,
float scale_full_with_zoom,
float image_aspect_mode,
float image_fill_mode,
@@ -126,10 +127,11 @@ vec2 HSM_GetScaledCoord(vec2 in_viewport_coord,
vec2 inherited_coord = in_viewport_coord / 0.5;
vec2 inherited_placement_coord = in_viewport_coord / 0.5;
+ vec2 inherited_final_coord = in_viewport_coord / 0.5;
vec2 inherited_scale = vec2(0.5);
vec2 default_offset_scale = vec2(0.5);
- if (inherited_scale_mode == INHERITED_SCALE_MODE_VIEWPORT)
+ if (layer_to_follow == FOLLOW_LAYER_VIEWPORT)
{
if (scale_full_with_zoom > 0.5)
{
@@ -142,49 +144,70 @@ vec2 HSM_GetScaledCoord(vec2 in_viewport_coord,
inherited_placement_coord = in_viewport_coord_unscaled;
}
+ inherited_final_coord = inherited_coord;
+
inherited_scale = vec2(1, 1);
default_offset_scale = vec2(1);
}
- else if (inherited_scale_mode == INHERITED_SCALE_MODE_TUBE_DIFFUSE)
+ else if (layer_to_follow == FOLLOW_LAYER_TUBE_DIFFUSE)
{
- inherited_scale = TUBE_DIFFUSE_SCALE;
inherited_coord = TUBE_DIFFUSE_COORD;
inherited_placement_coord = TUBE_DIFFUSE_COORD;
+ inherited_final_coord = TUBE_DIFFUSE_CURVED_COORD;
+ inherited_scale = TUBE_DIFFUSE_SCALE;
default_offset_scale = vec2(1) / DEFAULT_UNCORRECTED_SCREEN_SCALE.y;
default_offset_scale.x *= explicit_texture_aspect / DEFAULT_SCREEN_ASPECT;
}
- else if (inherited_scale_mode == INHERITED_SCALE_MODE_BEZEL_OUTSIDE)
+ else if (layer_to_follow == FOLLOW_LAYER_BEZEL_OUTSIDE)
{
- inherited_scale = BEZEL_OUTSIDE_SCALE;
inherited_coord = BEZEL_OUTSIDE_COORD;
inherited_placement_coord = BEZEL_OUTSIDE_COORD;
+ inherited_scale = BEZEL_OUTSIDE_SCALE;
+ inherited_final_coord = BEZEL_OUTSIDE_CURVED_COORD;
+
default_offset_scale = vec2(1) / DEFAULT_UNCORRECTED_BEZEL_SCALE.y;
default_offset_scale.x *= explicit_texture_aspect / DEFAULT_BEZEL_ASPECT;
}
- else if (inherited_scale_mode == INHERITED_SCALE_MODE_BG)
+ else if (layer_to_follow == FOLLOW_LAYER_BG)
{
inherited_coord = BACKGROUND_COORD;
inherited_placement_coord = BACKGROUND_COORD;
+ inherited_final_coord = BACKGROUND_CURVED_COORD;
+
inherited_scale = BACKGROUND_SCALE;
default_offset_scale = vec2(1);
}
- else if (inherited_scale_mode == INHERITED_SCALE_MODE_DEVICE)
+ else if (layer_to_follow == FOLLOW_LAYER_DEVICE)
{
inherited_coord = DEVICE_COORD;
inherited_placement_coord = DEVICE_COORD;
+ inherited_final_coord = DEVICE_CURVED_COORD;
+
inherited_scale = DEVICE_SCALE;
default_offset_scale = vec2(1);
}
- else if (inherited_scale_mode == INHERITED_SCALE_MODE_DECAL)
+ else if (layer_to_follow == FOLLOW_LAYER_DECAL)
{
inherited_coord = DECAL_COORD;
inherited_placement_coord = DECAL_COORD;
+ inherited_final_coord = DECAL_CURVED_COORD;
+
inherited_scale = DECAL_SCALE;
default_offset_scale = vec2(1);
}
+ //--------------------------------
+ // RETURN if we want to use the exact same coordinate of the layer we follow
+ //--------------------------------
+ if (follow_mode == FOLLOW_MODE_EXACT)
+ {
+ out_placement_coord = HSM_AddPosScaleToCoord(inherited_placement_coord, offset_pos, offset_scale);
+ out_placement_scale = inherited_scale * offset_scale;
+ return HSM_AddPosScaleToCoord(inherited_final_coord, offset_pos, offset_scale);
+ }
+
if (apply_default_scale_offset)
{
offset_scale *= default_offset_scale;
@@ -203,6 +226,7 @@ vec2 HSM_GetScaledCoord(vec2 in_viewport_coord,
out_placement_scale.x *= inherited_aspect_difference;
out_placement_scale = out_placement_scale * offset_scale;
+ // inherited_coord = out_placement_coord;
out_placement_coord = HSM_AddPosScaleToCoord(inherited_placement_coord, offset_pos, out_placement_scale / inherited_scale);
vec2 out_coord = vec2(0.5);
@@ -284,19 +308,19 @@ layout(location = 8) in vec3 BEZEL_FRAME_ORIGINAL_COLOR_RGB;
layout(location = 0) out vec4 FragColor;
// Pass Framebuffer Textures
-layout(set = 0, binding = 1) uniform sampler2D InfoCachePass;
-layout(set = 0, binding = 2) uniform sampler2D InfoCachePassFeedback;
+layout(set = 0, binding = 1) uniform sampler2D InfoCachePass;
+layout(set = 0, binding = 2) uniform sampler2D InfoCachePassFeedback;
-layout(set = 0, binding = 3) uniform sampler2D TubeDiffuseImage;
-layout(set = 0, binding = 4) uniform sampler2D BackgroundImage;
-layout(set = 0, binding = 5) uniform sampler2D BackgroundVertImage;
-layout(set = 0, binding = 6) uniform sampler2D NightLightingImage;
-layout(set = 0, binding = 7) uniform sampler2D NightLighting2Image;
+layout(set = 0, binding = 3) uniform sampler2D BackgroundImage;
+layout(set = 0, binding = 4) uniform sampler2D BackgroundVertImage;
+layout(set = 0, binding = 5) uniform sampler2D NightLightingImage;
+layout(set = 0, binding = 6) uniform sampler2D NightLighting2Image;
-layout(set = 0, binding = 8) uniform sampler2D LEDImage;
-layout(set = 0, binding = 9) uniform sampler2D FrameTextureImage;
-layout(set = 0, binding = 10) uniform sampler2D DeviceImage;
-layout(set = 0, binding = 11) uniform sampler2D DeviceVertImage;
+layout(set = 0, binding = 7) uniform sampler2D LEDImage;
+layout(set = 0, binding = 8) uniform sampler2D FrameTextureImage;
+layout(set = 0, binding = 9) uniform sampler2D DeviceImage;
+layout(set = 0, binding = 10) uniform sampler2D DeviceVertImage;
+layout(set = 0, binding = 11) uniform sampler2D DeviceLEDImage;
layout(set = 0, binding = 12) uniform sampler2D DecalImage;
layout(set = 0, binding = 13) uniform sampler2D CabinetGlassImage;
layout(set = 0, binding = 14) uniform sampler2D TopLayerImage;
@@ -324,7 +348,7 @@ void main()
HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
vec4 feedback_color_test = texture(PassFeedback, vec2(0,0));
- if (HSM_CACHE_GRAPHICS_ON > 0.5 && feedback_color_test.a < 0 && !HSM_CheckCacheInfoChanged())
+ if (HSM_CACHE_GRAPHICS_ON > 0.5 && feedback_color_test.a < 0 && !CACHE_INFO_CHANGED)
{
FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD);
return;
@@ -637,8 +661,9 @@ void main()
bg_size.x / bg_size.y,
vec2(HSM_BG_POS_X, HSM_BG_POS_Y),
vec2(HSM_BG_SCALE * HSM_BG_SCALE_X, HSM_BG_SCALE),
- HSM_BG_SCALE_MODE,
- HSM_BG_SCALE_FULL_WITH_ZOOM,
+ HSM_BG_FOLLOW_LAYER,
+ HSM_BG_FOLLOW_MODE,
+ HSM_BG_FOLLOW_FULL_USES_ZOOM,
HSM_BG_SCALE_KEEP_ASPECT,
HSM_BG_FILL_MODE,
HSM_BG_SPLIT_PRESERVE_CENTER,
@@ -688,8 +713,9 @@ void main()
device_size.x / device_size.y,
vec2(HSM_DEVICE_POS_X, HSM_DEVICE_POS_Y),
vec2(HSM_DEVICE_SCALE * HSM_DEVICE_SCALE_X, HSM_DEVICE_SCALE),
- HSM_DEVICE_SCALE_MODE,
- HSM_DEVICE_SCALE_FULL_WITH_ZOOM,
+ HSM_DEVICE_FOLLOW_LAYER,
+ HSM_DEVICE_FOLLOW_MODE,
+ HSM_DEVICE_FOLLOW_FULL_USES_ZOOM,
HSM_DEVICE_SCALE_KEEP_ASPECT,
HSM_DEVICE_FILL_MODE,
HSM_DEVICE_SPLIT_PRESERVE_CENTER,
@@ -723,6 +749,51 @@ void main()
HSM_AMBIENT_LIGHTING_SWAP_IMAGE_MODE);
}
+ //----------------------------------------------------
+ // DeviceLED Image
+ //----------------------------------------------------
+ vec2 deviceled_size = textureSize(DeviceLEDImage, 0);
+ DEVICELED_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD,
+ VIEWPORT_UNSCALED_COORD,
+ TEXTURE_ASPECT_MODE_EXPLICIT,
+ deviceled_size.x / deviceled_size.y,
+ vec2(HSM_DEVICELED_POS_X, HSM_DEVICELED_POS_Y),
+ vec2(HSM_DEVICELED_SCALE * HSM_DEVICELED_SCALE_X, HSM_DEVICELED_SCALE),
+ HSM_DEVICELED_FOLLOW_LAYER,
+ HSM_DEVICELED_FOLLOW_MODE,
+ HSM_DEVICELED_FOLLOW_FULL_USES_ZOOM,
+ HSM_DEVICELED_SCALE_KEEP_ASPECT,
+ HSM_DEVICELED_FILL_MODE,
+ HSM_DEVICELED_SPLIT_PRESERVE_CENTER,
+ HSM_DEVICELED_SPLIT_REPEAT_WIDTH,
+ true,
+ DEVICELED_COORD,
+ DEVICELED_SCALE);
+
+ vec4 deviceled_image = vec4(0);
+ if (HSM_DEVICELED_OPACITY > 0 && deviceled_size.y > 16)
+ {
+ deviceled_image = HSM_GetMipmappedTexSample(DeviceLEDImage, DEVICELED_CURVED_COORD, DEVICELED_SCALE, HSM_DEVICELED_MIPMAPPING_BLEND_BIAS);
+
+ // Premultiply Alpha
+ deviceled_image = HSM_GetPreMultipliedColorLinear(deviceled_image, HSM_DEVICELED_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA);
+
+ // HSV Adjustments
+ deviceled_image.rgb = HSM_ApplyHSVAdjustment(deviceled_image.rgb, HSM_DEVICELED_HUE, HSM_DEVICELED_SATURATION, HSM_DEVICELED_BRIGHTNESS, HSM_DEVICELED_COLORIZE_ON, HSM_DEVICELED_GAMMA);
+
+ if (HSM_STATIC_LAYERS_GAMMA != 1)
+ deviceled_image = HSM_ApplyGamma(deviceled_image, HSM_STATIC_LAYERS_GAMMA);
+
+ deviceled_image.rgb = ApplyAmbientImages(deviceled_image.rgb,
+ ambient_image.rgb,
+ ambient2_image.rgb,
+ HSM_DEVICELED_AMBIENT_LIGHTING_MULTIPLIER,
+ HSM_DEVICELED_AMBIENT2_LIGHTING_MULTIPLIER,
+ HSM_DEVICELED_APPLY_AMBIENT_IN_ADD_MODE,
+ HSM_DEVICELED_BLEND_MODE,
+ HSM_AMBIENT_LIGHTING_SWAP_IMAGE_MODE);
+ }
+
//----------------------------------------------------
// LED Image
//----------------------------------------------------
@@ -736,8 +807,9 @@ void main()
led_size.x / led_size.y,
vec2(HSM_LED_POS_X, HSM_LED_POS_Y),
vec2(HSM_LED_SCALE * HSM_LED_SCALE_X, HSM_LED_SCALE),
- HSM_LED_SCALE_MODE,
- HSM_LED_SCALE_FULL_WITH_ZOOM,
+ HSM_LED_FOLLOW_LAYER,
+ HSM_LED_FOLLOW_MODE,
+ HSM_LED_FOLLOW_FULL_USES_ZOOM,
HSM_LED_SCALE_KEEP_ASPECT,
HSM_LED_FILL_MODE,
HSM_LED_SPLIT_PRESERVE_CENTER,
@@ -781,8 +853,9 @@ void main()
decal_size.x / decal_size.y,
vec2(HSM_DECAL_POS_X, HSM_DECAL_POS_Y),
vec2(HSM_DECAL_SCALE * HSM_DECAL_SCALE_X, HSM_DECAL_SCALE),
- HSM_DECAL_SCALE_MODE,
- HSM_DECAL_SCALE_FULL_WITH_ZOOM,
+ HSM_DECAL_FOLLOW_LAYER,
+ HSM_DECAL_FOLLOW_MODE,
+ HSM_DECAL_FOLLOW_FULL_USES_ZOOM,
HSM_DECAL_SCALE_KEEP_ASPECT,
HSM_DECAL_FILL_MODE,
HSM_DECAL_SPLIT_PRESERVE_CENTER,
@@ -825,8 +898,9 @@ void main()
top_size.x / top_size.y,
vec2(HSM_TOP_POS_X, HSM_TOP_POS_Y),
vec2(HSM_TOP_SCALE * HSM_TOP_SCALE_X, HSM_TOP_SCALE),
- HSM_TOP_SCALE_MODE,
- HSM_TOP_SCALE_FULL_WITH_ZOOM,
+ HSM_TOP_FOLLOW_LAYER,
+ HSM_TOP_FOLLOW_MODE,
+ HSM_TOP_FOLLOW_FULL_USES_ZOOM,
HSM_TOP_SCALE_KEEP_ASPECT,
HSM_TOP_FILL_MODE,
HSM_TOP_SPLIT_PRESERVE_CENTER,
@@ -878,8 +952,9 @@ void main()
cab_glass_size.x / cab_glass_size.y,
vec2(HSM_CAB_GLASS_POS_X, HSM_CAB_GLASS_POS_Y),
vec2(HSM_CAB_GLASS_SCALE * HSM_CAB_GLASS_SCALE_X, HSM_CAB_GLASS_SCALE),
- HSM_CAB_GLASS_SCALE_MODE,
- HSM_CAB_GLASS_SCALE_FULL_WITH_ZOOM,
+ HSM_CAB_GLASS_FOLLOW_LAYER,
+ HSM_CAB_GLASS_FOLLOW_MODE,
+ HSM_CAB_GLASS_FOLLOW_FULL_USES_ZOOM,
HSM_CAB_GLASS_SCALE_KEEP_ASPECT,
HSM_CAB_GLASS_FILL_MODE,
HSM_CAB_GLASS_SPLIT_PRESERVE_CENTER,
@@ -925,7 +1000,7 @@ void main()
vec2 cutout_base_scale_offset = vec2(0.5);
- if ( HSM_CUTOUT_SCALE_MODE == INHERITED_SCALE_MODE_VIEWPORT )
+ if ( HSM_CUTOUT_FOLLOW_LAYER == FOLLOW_LAYER_VIEWPORT )
cutout_base_scale_offset *= vec2(DEFAULT_UNCORRECTED_BEZEL_SCALE.y * TUBE_DIFFUSE_ASPECT / output_aspect, DEFAULT_BEZEL_SCALE.y);
vec2 cutout_coord = HSM_GetScaledCoord(VIEWPORT_COORD,
@@ -934,8 +1009,9 @@ void main()
HSM_CUTOUT_EXPLICIT_ASPECT,
vec2(HSM_CUTOUT_POS_X, HSM_CUTOUT_POS_Y),
vec2(vec2(HSM_CUTOUT_SCALE * HSM_CUTOUT_SCALE_X, HSM_CUTOUT_SCALE) * cutout_base_scale_offset),
- HSM_CUTOUT_SCALE_MODE,
- HSM_CUTOUT_SCALE_FULL_WITH_ZOOM,
+ HSM_CUTOUT_FOLLOW_LAYER,
+ FOLLOW_MODE_SCALE_AND_POS,
+ HSM_CUTOUT_FOLLOW_FULL_USES_ZOOM,
HSM_CUTOUT_KEEP_ASPECT,
FILL_MODE_STRETCH,
0,
@@ -958,8 +1034,9 @@ void main()
1,
vec2(HSM_VIEWPORT_VIGNETTE_POS_X, HSM_VIEWPORT_VIGNETTE_POS_Y),
vec2(vec2(HSM_VIEWPORT_VIGNETTE_SCALE * HSM_VIEWPORT_VIGNETTE_SCALE_X, HSM_VIEWPORT_VIGNETTE_SCALE)),
- HSM_VIEWPORT_VIGNETTE_SCALE_MODE,
- INHERITED_SCALE_MODE_VIEWPORT,
+ HSM_VIEWPORT_VIGNETTE_FOLLOW_LAYER,
+ FOLLOW_MODE_SCALE_AND_POS,
+ FOLLOW_LAYER_VIEWPORT,
0,
FILL_MODE_STRETCH,
0,
@@ -1032,6 +1109,16 @@ void main()
HSM_DEVICE_DUALSCREEN_VIS_MODE,
HSM_DEVICE_OPACITY);
+ // DEVICELED IMAGE
+ if (HSM_DEVICELED_LAYER_ORDER == i && HSM_DEVICELED_OPACITY > 0)
+ frag_color_linear = BlendModeMaskLayerMix(frag_color_linear,
+ deviceled_image,
+ HSM_DEVICELED_BLEND_MODE,
+ HSM_DEVICELED_MASK_MODE,
+ HSM_DEVICELED_CUTOUT_MODE,
+ HSM_DEVICELED_DUALSCREEN_VIS_MODE,
+ HSM_DEVICELED_OPACITY);
+
// DECAL IMAGE
if (HSM_DECAL_LAYER_ORDER == i && HSM_DECAL_OPACITY > 0)
frag_color_linear = BlendModeMaskLayerMix(frag_color_linear,
diff --git a/bezel/Mega_Bezel/shaders/base/cache-info.inc b/bezel/Mega_Bezel/shaders/base/cache-info.inc
index c1633ca..ea5dbec 100644
--- a/bezel/Mega_Bezel/shaders/base/cache-info.inc
+++ b/bezel/Mega_Bezel/shaders/base/cache-info.inc
@@ -506,6 +506,8 @@ float HSM_GetParameterSum()
float out_sum = (0
+ HSM_GLOBAL_GRAPHICS_BRIGHTNESS * 100
+ HSM_STATIC_LAYERS_GAMMA
+
+ + HSM_CACHE_GRAPHICS_ON
// Night Lighting
+ HSM_AMBIENT_LIGHTING_OPACITY * 100
@@ -523,7 +525,7 @@ float HSM_GetParameterSum()
+ HSM_FLIP_VIEWPORT_HORIZONTAL
// + HSM_FLIP_CORE_VERTICAL
// + HSM_FLIP_CORE_HORIZONTAL
- // + HSM_ROTATE_CORE_IMAGE
+ + HSM_ROTATE_CORE_IMAGE
// ASPECT RATIO
+ HSM_ASPECT_RATIO_ORIENTATION
@@ -741,6 +743,7 @@ float HSM_GetParameterSum()
+ HSM_VIEWPORT_VIGNETTE_LAYER_ORDER
+ HSM_CRT_LAYER_ORDER
+ HSM_DEVICE_LAYER_ORDER
+ + HSM_DEVICELED_LAYER_ORDER
+ HSM_CAB_GLASS_LAYER_ORDER
+ HSM_DECAL_LAYER_ORDER
+ HSM_LED_LAYER_ORDER
@@ -761,8 +764,9 @@ float HSM_GetParameterSum()
+ HSM_BG_MASK_MODE
+ HSM_BG_CUTOUT_MODE
+ HSM_BG_DUALSCREEN_VIS_MODE
- + HSM_BG_SCALE_MODE
- + HSM_BG_SCALE_FULL_WITH_ZOOM
+ + HSM_BG_FOLLOW_LAYER
+ + HSM_BG_FOLLOW_MODE
+ + HSM_BG_FOLLOW_FULL_USES_ZOOM
+ HSM_BG_FILL_MODE
+ HSM_BG_SPLIT_PRESERVE_CENTER * 1000
+ HSM_BG_SPLIT_REPEAT_WIDTH * 1000
@@ -778,7 +782,7 @@ float HSM_GetParameterSum()
+ HSM_VIEWPORT_VIGNETTE_OPACITY * 100
+ HSM_VIEWPORT_VIGNETTE_MASK_MODE
+ HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE
- + HSM_VIEWPORT_VIGNETTE_SCALE_MODE
+ + HSM_VIEWPORT_VIGNETTE_FOLLOW_LAYER
+ HSM_VIEWPORT_VIGNETTE_SCALE * 100
+ HSM_VIEWPORT_VIGNETTE_SCALE_X * 100
+ HSM_VIEWPORT_VIGNETTE_POS_X * 100
@@ -787,8 +791,8 @@ float HSM_GetParameterSum()
// Cutout
+ HSM_CUTOUT_ASPECT_MODE
+ HSM_CUTOUT_EXPLICIT_ASPECT
- + HSM_CUTOUT_SCALE_MODE
- + HSM_CUTOUT_SCALE_FULL_WITH_ZOOM
+ + HSM_CUTOUT_FOLLOW_LAYER
+ + HSM_CUTOUT_FOLLOW_FULL_USES_ZOOM
+ HSM_CUTOUT_KEEP_ASPECT
+ HSM_CUTOUT_SCALE * 100
+ HSM_CUTOUT_SCALE_X * 100
@@ -811,8 +815,9 @@ float HSM_GetParameterSum()
+ HSM_LED_MASK_MODE
+ HSM_LED_CUTOUT_MODE
+ HSM_LED_DUALSCREEN_VIS_MODE
- + HSM_LED_SCALE_MODE
- + HSM_LED_SCALE_FULL_WITH_ZOOM
+ + HSM_LED_FOLLOW_LAYER
+ + HSM_LED_FOLLOW_MODE
+ + HSM_LED_FOLLOW_FULL_USES_ZOOM
+ HSM_LED_SCALE_KEEP_ASPECT
+ HSM_LED_FILL_MODE
+ HSM_LED_SPLIT_PRESERVE_CENTER * 1000
@@ -838,8 +843,9 @@ float HSM_GetParameterSum()
+ HSM_DEVICE_MASK_MODE
+ HSM_DEVICE_CUTOUT_MODE
+ HSM_DEVICE_DUALSCREEN_VIS_MODE
- + HSM_DEVICE_SCALE_MODE
- + HSM_DEVICE_SCALE_FULL_WITH_ZOOM
+ + HSM_DEVICE_FOLLOW_LAYER
+ + HSM_DEVICE_FOLLOW_MODE
+ + HSM_DEVICE_FOLLOW_FULL_USES_ZOOM
+ HSM_DEVICE_SCALE_KEEP_ASPECT
+ HSM_DEVICE_FILL_MODE
+ HSM_DEVICE_SPLIT_PRESERVE_CENTER * 1000
@@ -848,10 +854,37 @@ float HSM_GetParameterSum()
+ HSM_DEVICE_SCALE_X * 100
+ HSM_DEVICE_POS_X * 100
+ HSM_DEVICE_POS_Y * 100
- + HSM_DEVICE_COPY_INHERITED_COORD
+ HSM_DEVICE_MIPMAPPING_BLEND_BIAS
- // // Decal
+ // Device LED
+ + HSM_DEVICELED_OPACITY * 100
+ + HSM_DEVICELED_COLORIZE_ON
+ + HSM_DEVICELED_HUE * 360
+ + HSM_DEVICELED_SATURATION * 100
+ + HSM_DEVICELED_BRIGHTNESS * 100
+ + HSM_DEVICELED_GAMMA
+ + HSM_DEVICELED_AMBIENT_LIGHTING_MULTIPLIER * 100
+ + HSM_DEVICELED_AMBIENT2_LIGHTING_MULTIPLIER * 100
+ + HSM_DEVICELED_APPLY_AMBIENT_IN_ADD_MODE
+ + HSM_DEVICELED_BLEND_MODE
+ + HSM_DEVICELED_SOURCE_MATTE_TYPE
+ + HSM_DEVICELED_MASK_MODE
+ + HSM_DEVICELED_CUTOUT_MODE
+ + HSM_DEVICELED_DUALSCREEN_VIS_MODE
+ + HSM_DEVICELED_FOLLOW_LAYER
+ + HSM_DEVICELED_FOLLOW_MODE
+ + HSM_DEVICELED_FOLLOW_FULL_USES_ZOOM
+ + HSM_DEVICELED_SCALE_KEEP_ASPECT
+ + HSM_DEVICELED_FILL_MODE
+ + HSM_DEVICELED_SPLIT_PRESERVE_CENTER * 1000
+ + HSM_DEVICELED_SPLIT_REPEAT_WIDTH * 1000
+ + HSM_DEVICELED_SCALE * 100
+ + HSM_DEVICELED_SCALE_X * 100
+ + HSM_DEVICELED_POS_X * 100
+ + HSM_DEVICELED_POS_Y * 100
+ + HSM_DEVICELED_MIPMAPPING_BLEND_BIAS
+
+ // Decal
+ HSM_DECAL_OPACITY * 100
+ HSM_DECAL_COLORIZE_ON
+ HSM_DECAL_HUE * 360
@@ -866,8 +899,9 @@ float HSM_GetParameterSum()
+ HSM_DECAL_MASK_MODE
+ HSM_DECAL_CUTOUT_MODE
+ HSM_DECAL_DUALSCREEN_VIS_MODE
- + HSM_DECAL_SCALE_MODE
- + HSM_DECAL_SCALE_FULL_WITH_ZOOM
+ + HSM_DECAL_FOLLOW_LAYER
+ + HSM_DECAL_FOLLOW_MODE
+ + HSM_DECAL_FOLLOW_FULL_USES_ZOOM
+ HSM_DECAL_SCALE_KEEP_ASPECT
+ HSM_DECAL_FILL_MODE
+ HSM_DECAL_SPLIT_PRESERVE_CENTER * 1000
@@ -893,8 +927,9 @@ float HSM_GetParameterSum()
+ HSM_CAB_GLASS_MASK_MODE
+ HSM_CAB_GLASS_CUTOUT_MODE
+ HSM_CAB_GLASS_DUALSCREEN_VIS_MODE
- + HSM_CAB_GLASS_SCALE_MODE
- + HSM_CAB_GLASS_SCALE_FULL_WITH_ZOOM
+ + HSM_CAB_GLASS_FOLLOW_LAYER
+ + HSM_CAB_GLASS_FOLLOW_MODE
+ + HSM_CAB_GLASS_FOLLOW_FULL_USES_ZOOM
+ HSM_CAB_GLASS_SCALE_KEEP_ASPECT
+ HSM_CAB_GLASS_FILL_MODE
+ HSM_CAB_GLASS_SPLIT_PRESERVE_CENTER * 1000
@@ -920,8 +955,9 @@ float HSM_GetParameterSum()
+ HSM_TOP_MASK_MODE
+ HSM_TOP_CUTOUT_MODE
+ HSM_TOP_DUALSCREEN_VIS_MODE
- + HSM_TOP_SCALE_MODE
- + HSM_TOP_SCALE_FULL_WITH_ZOOM
+ + HSM_TOP_FOLLOW_LAYER
+ + HSM_TOP_FOLLOW_MODE
+ + HSM_TOP_FOLLOW_FULL_USES_ZOOM
+ HSM_TOP_SCALE_KEEP_ASPECT
+ HSM_TOP_FILL_MODE
+ HSM_TOP_SPLIT_PRESERVE_CENTER * 1000
@@ -1000,6 +1036,7 @@ vec4 HSM_GetColorForScreenInfoCache(vec2 viewport_coord, sampler2D feedback_pass
vec2 pos_offset_2nd_screen = HSM_GetScreenPositionOffset(vec2(0.5, 0.5), screen_scale_2nd_screen, 2);
vec4 sample_2d_range = vec4(0);
+ float parameter_sum = HSM_GetParameterSum();
// Sample 1, 1
// r AVERAGE_LUMA
@@ -1118,7 +1155,7 @@ vec4 HSM_GetColorForScreenInfoCache(vec2 viewport_coord, sampler2D feedback_pass
sample_2d_range = HSM_GetCacheSampleRange(1, 4);
if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1)
{
- out_color.r = HSM_GetParameterSum();
+ out_color.r = parameter_sum;
vec2 sample_coord = HSM_GetCacheSampleCoord(1, 4);
vec4 texture_sample = texture(feedback_pass, sample_coord);
@@ -1136,6 +1173,7 @@ vec4 HSM_GetColorForScreenInfoCache(vec2 viewport_coord, sampler2D feedback_pass
{
out_color.r = NEGATIVE_CROP_EXPAND_MULTIPLIER;
out_color.g = MAX_NEGATIVE_CROP;
+ out_color.b = HSM_GetUseVerticalScanlines(screen_aspect);
}
// TODO need to add TUBE_DIFFUSE_ASPECT & deal with 2nd Screen
@@ -1149,6 +1187,52 @@ vec4 HSM_GetColorForScreenInfoCache(vec2 viewport_coord, sampler2D feedback_pass
out_color.ba = tube_diffuse_scale_2nd_screen;
}
+ vec2 sample_coord = vec2(0);
+ vec4 texture_sample = vec4(0);
+
+ // Check the difference in parameter sum values to see if the cache has changed
+ // Sample 1, 4 Feedback
+ // r parameter_sum_feedback
+ sample_coord = HSM_GetCacheSampleCoord(1, 4);
+ texture_sample = texture(feedback_pass, sample_coord);
+ float parameter_sum_feedback = texture_sample.r;
+
+ //-----------------------------------------------------
+ // Screen 1 resolution
+ float res_mult_size_sum = cropped_rotated_size_with_res_mult.x + cropped_rotated_size_with_res_mult.y;
+
+ // Sample 4, 1 Feedback
+ // rg parameter_sum_feedback
+ sample_coord = HSM_GetCacheSampleCoord(4, 1);
+ texture_sample = texture(feedback_pass, sample_coord);
+ CROPPED_ROTATED_SIZE_WITH_RES_MULT_FEEDBACK = texture_sample.rg;
+ float res_mult_size_sum_feedback = CROPPED_ROTATED_SIZE_WITH_RES_MULT_FEEDBACK.x + CROPPED_ROTATED_SIZE_WITH_RES_MULT_FEEDBACK.y;
+
+ //-----------------------------------------------------
+ // Screen 2 resolution
+ // r res_mult_size2_sum
+ float res_mult_size2_sum = cropped_size_with_res_mult_2nd_screen.x + cropped_size_with_res_mult_2nd_screen.y;
+
+ sample_coord = HSM_GetCacheSampleCoord(4, 2);
+ texture_sample = texture(feedback_pass, sample_coord);
+ CROPPED_ROTATED_SIZE_WITH_RES_MULT_FEEDBACK = texture_sample.rg;
+ float res_mult_size2_sum_feedback = CROPPED_ROTATED_SIZE_WITH_RES_MULT_FEEDBACK.x + CROPPED_ROTATED_SIZE_WITH_RES_MULT_FEEDBACK.y;
+
+ // Need to check croped sample resolutions of both screens
+ bool cache_changed = res_mult_size_sum != res_mult_size_sum_feedback ||
+ res_mult_size2_sum != res_mult_size2_sum_feedback ||
+ abs((parameter_sum) - (parameter_sum_feedback)) > 0.0000001 ? true : false;
+
+ //-----------------------------------------------------
+ // Store if the cache has changed since last frame
+ // Sample 4, 4
+ // r CACHE_INFO_CHANGED
+ sample_2d_range = HSM_GetCacheSampleRange(4, 4);
+ if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1)
+ {
+ out_color.r = cache_changed ? 1 : 0;
+ }
+
return out_color;
}
diff --git a/bezel/Mega_Bezel/shaders/base/combine-passes.inc b/bezel/Mega_Bezel/shaders/base/combine-passes.inc
index 0aad663..bdd60bc 100644
--- a/bezel/Mega_Bezel/shaders/base/combine-passes.inc
+++ b/bezel/Mega_Bezel/shaders/base/combine-passes.inc
@@ -97,7 +97,7 @@ void main()
if (BEZEL_OUTSIDE_COORD.x < -0.01 || BEZEL_OUTSIDE_COORD.x > 1.01 || BEZEL_OUTSIDE_COORD.y < -0.01 || BEZEL_OUTSIDE_COORD.y > 1.01)
{
vec4 feedback_color_test = texture(PassFeedback, vec2(0,0));
- if (HSM_CACHE_GRAPHICS_ON > 0.5 && feedback_color_test.a < 0 && !HSM_CheckCacheInfoChanged() && HSM_RENDER_SIMPLE_MODE < 0.5)
+ if (HSM_CACHE_GRAPHICS_ON > 0.5 && feedback_color_test.a < 0 && !CACHE_INFO_CHANGED && HSM_RENDER_SIMPLE_MODE < 0.5)
{
FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD);
return;
diff --git a/bezel/Mega_Bezel/shaders/base/common/common-functions-bezel.inc b/bezel/Mega_Bezel/shaders/base/common/common-functions-bezel.inc
index 512eba8..9136d89 100644
--- a/bezel/Mega_Bezel/shaders/base/common/common-functions-bezel.inc
+++ b/bezel/Mega_Bezel/shaders/base/common/common-functions-bezel.inc
@@ -44,6 +44,31 @@ vec2 GetDefaultBezelScale()
return out_placement_scale;
}
+float HSM_GetSimpleBezelCoords(vec2 tube_diffuse_coord,
+ vec2 tube_diffuse_scale,
+ vec2 tube_scale,
+ float screen_aspect,
+ inout vec2 bezel_outside_coord,
+ inout vec2 frame_outside_coord)
+{
+ float output_aspect = global.OutputSize.x / global.OutputSize.y;
+
+ vec2 bezel_outer_pos_offset = vec2(0, HSM_BZL_OUTER_POSITION_Y);
+ vec2 bezel_outer_scale_offset = HSM_GetOuterBezelScale(tube_diffuse_scale, screen_aspect);
+
+ bezel_outside_coord = tube_diffuse_coord + bezel_outer_pos_offset;
+
+ vec2 black_edge_scale_offset = tube_scale / tube_diffuse_scale;
+
+ bezel_outside_coord = HSM_GetInverseScaledCoord(bezel_outside_coord, black_edge_scale_offset * bezel_outer_scale_offset) + vec2(0, HSM_BZL_OUTER_POSITION_Y);
+ frame_outside_coord = (bezel_outside_coord +
+ vec2(0, HSM_FRM_OUTER_POS_Y) - 0.5) /
+ vec2((HSM_FRM_THICKNESS * HSM_FRM_THICKNESS_SCALE_X) /
+ (tube_diffuse_scale.x / tube_diffuse_scale.y * output_aspect) + 1,
+ HSM_FRM_THICKNESS + 1) + 0.5;
+ return 0;
+}
+
float HSM_GetBezelCoords(vec2 tube_diffuse_coord,
vec2 tube_diffuse_scale,
vec2 tube_scale,
diff --git a/bezel/Mega_Bezel/shaders/base/common/common-functions.inc b/bezel/Mega_Bezel/shaders/base/common/common-functions.inc
index 3f0606d..d3eaac2 100644
--- a/bezel/Mega_Bezel/shaders/base/common/common-functions.inc
+++ b/bezel/Mega_Bezel/shaders/base/common/common-functions.inc
@@ -63,7 +63,7 @@ vec2 HSM_GetViewportCoordWithZoomAndPan(vec2 viewport_coord)
}
float HSM_GetAspectRatioFromMode(float in_aspect_ratio_mode, float in_explicit_aspect)
-{
+{
float out_explicit_aspect = in_explicit_aspect;
if (in_aspect_ratio_mode == TEXTURE_ASPECT_MODE_VIEWPORT)
@@ -189,10 +189,14 @@ vec2 HSM_GetRotatedScreenDerezedSize()
return HSM_ROTATE_CORE_IMAGE * pass_size.yx + (1 - HSM_ROTATE_CORE_IMAGE) * pass_size.xy;
}
-vec2 HSM_RotateCoordinate(vec2 in_coord, float rotation_on)
+vec2 HSM_RotateCoordinate(vec2 in_coord, float rotation)
{
vec2 ctr_coord = in_coord - 0.5;
- ctr_coord = (1 - rotation_on) * ctr_coord + rotation_on * vec2(-ctr_coord.y, ctr_coord.x);
+
+ ctr_coord = (1 - abs(rotation)) * ctr_coord
+ + clamp(rotation, 0, 1) * rotation * vec2(-ctr_coord.y, ctr_coord.x)
+ + abs(clamp(rotation, -1, 0)) * abs(rotation) * vec2(ctr_coord.y, -ctr_coord.x);
+
return ctr_coord + 0.5;
}
@@ -1036,11 +1040,11 @@ vec4 HSM_UpdateGlobalScreenValuesFromCache(sampler2D in_cache_pass, sampler2D in
SCREEN_SCALE_2ND_SCREEN = texture_sample.rg;
SCREEN_POS_OFFSET_2ND_SCREEN = texture_sample.ba;
- // Sample 1, 4
- // r parameter_sum
+ // Sample 1, 4
+ // g CURRENT_FRAME_FROM_CACHE_INFO
+ // b ROTATED_DEREZED_SIZE
sample_coord = HSM_GetCacheSampleCoord(1, 4);
texture_sample = texture(in_cache_pass, sample_coord);
- float parameter_sum = texture_sample.r;
CURRENT_FRAME_FROM_CACHE_INFO = texture_sample.g;
ROTATED_DEREZED_SIZE = texture_sample.ba;
@@ -1056,20 +1060,19 @@ vec4 HSM_UpdateGlobalScreenValuesFromCache(sampler2D in_cache_pass, sampler2D in
texture_sample = texture(in_cache_pass, sample_coord);
NEGATIVE_CROP_EXPAND_MULTIPLIER = texture_sample.r;
MAX_NEGATIVE_CROP = texture_sample.g;
+ USE_VERTICAL_SCANLINES = texture_sample.b;
+
+ // Sample 2, 4
+ // r NEGATIVE_CROP_EXPAND_MULTIPLIER
+ // g MAX_NEGATIVE_CROP
+ sample_coord = HSM_GetCacheSampleCoord(4, 4);
+ texture_sample = texture(in_cache_pass, sample_coord);
+ CACHE_INFO_CHANGED = texture_sample.r > 0.5 ? true : false;
- USE_VERTICAL_SCANLINES = HSM_GetUseVerticalScanlines(SCREEN_ASPECT);
SCREEN_COORD = HSM_GetVTexCoordWithArgs(flipped_viewport_coord, SCREEN_SCALE, SCREEN_POS_OFFSET);
TUBE_DIFFUSE_COORD = HSM_GetVTexCoordWithArgs(flipped_viewport_coord, TUBE_DIFFUSE_SCALE, SCREEN_POS_OFFSET);
-
TUBE_DIFFUSE_COORD_MIXED_POS = HSM_GetVTexCoordWithArgs(flipped_viewport_coord, TUBE_DIFFUSE_SCALE_1ST_SCREEN, (SCREEN_POS_OFFSET_1ST_SCREEN + SCREEN_POS_OFFSET_2ND_SCREEN) / 2.0);
- float param_sum_epsilon = 0.0000001;
-
- // Need to check croped sample resolutions of both screens
- CACHE_INFO_PARAM_SUM_CHANGED = false;
- CACHE_INFO_PARAM_SUM_CHANGED = res_mult_size_sum != res_mult_size_sum_feedback || res_mult_size2_sum != res_mult_size2_sum_feedback ? true : CACHE_INFO_PARAM_SUM_CHANGED;
- CACHE_INFO_PARAM_SUM_CHANGED = (abs((parameter_sum) - (parameter_sum_feedback)) > param_sum_epsilon) ? true : CACHE_INFO_PARAM_SUM_CHANGED;
-
return vec4(0);
}
@@ -1081,12 +1084,6 @@ bool HSM_GetIsInABCompareArea(vec2 viewport_coord)
mod(HSM_AB_COMPARE_AREA, 2) == 1 && test_value > position;
}
-bool HSM_CheckCacheInfoChanged()
-{
- float epsilon = 0.0001;
- return CACHE_INFO_PARAM_SUM_CHANGED;
-}
-
vec4 HSM_GetMipmappedTexSample(sampler2D in_sampler, vec2 in_coord, vec2 in_scale, float in_blend_bias)
{
vec2 tex_size = textureSize(in_sampler, 0);
diff --git a/bezel/Mega_Bezel/shaders/base/common/globals.inc b/bezel/Mega_Bezel/shaders/base/common/globals.inc
index 27b849d..1e54dd3 100644
--- a/bezel/Mega_Bezel/shaders/base/common/globals.inc
+++ b/bezel/Mega_Bezel/shaders/base/common/globals.inc
@@ -250,6 +250,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
float HSM_TUBE_DIFFUSE_IMAGE_AMBIENT2_LIGHTING;
float HSM_TUBE_DIFFUSE_IMAGE_SCALE;
float HSM_TUBE_DIFFUSE_IMAGE_SCALE_X;
+ float HSM_TUBE_DIFFUSE_IMAGE_ROTATION;
float HSM_TUBE_EMPTY_THICKNESS;
float HSM_TUBE_EMPTY_THICKNESS_X_SCALE;
float HSM_TUBE_DIFFUSE_FORCE_ASPECT;
@@ -416,6 +417,7 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_VIEWPORT_VIGNETTE_LAYER_ORDER;
float HSM_CRT_LAYER_ORDER;
float HSM_DEVICE_LAYER_ORDER;
+ float HSM_DEVICELED_LAYER_ORDER;
float HSM_CAB_GLASS_LAYER_ORDER;
float HSM_DECAL_LAYER_ORDER;
float HSM_LED_LAYER_ORDER;
@@ -424,8 +426,8 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
// Cutout
float HSM_CUTOUT_ASPECT_MODE;
float HSM_CUTOUT_EXPLICIT_ASPECT;
- float HSM_CUTOUT_SCALE_MODE;
- float HSM_CUTOUT_SCALE_FULL_WITH_ZOOM;
+ float HSM_CUTOUT_FOLLOW_LAYER;
+ float HSM_CUTOUT_FOLLOW_FULL_USES_ZOOM;
float HSM_CUTOUT_KEEP_ASPECT;
float HSM_CUTOUT_SCALE;
float HSM_CUTOUT_SCALE_X;
@@ -448,8 +450,9 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_BG_MASK_MODE;
float HSM_BG_CUTOUT_MODE;
float HSM_BG_DUALSCREEN_VIS_MODE;
- float HSM_BG_SCALE_MODE;
- float HSM_BG_SCALE_FULL_WITH_ZOOM;
+ float HSM_BG_FOLLOW_LAYER;
+ float HSM_BG_FOLLOW_MODE;
+ float HSM_BG_FOLLOW_FULL_USES_ZOOM;
float HSM_BG_FILL_MODE;
float HSM_BG_SPLIT_PRESERVE_CENTER;
float HSM_BG_SPLIT_REPEAT_WIDTH;
@@ -465,7 +468,7 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_VIEWPORT_VIGNETTE_OPACITY;
float HSM_VIEWPORT_VIGNETTE_MASK_MODE;
float HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE;
- float HSM_VIEWPORT_VIGNETTE_SCALE_MODE;
+ float HSM_VIEWPORT_VIGNETTE_FOLLOW_LAYER;
float HSM_VIEWPORT_VIGNETTE_SCALE;
float HSM_VIEWPORT_VIGNETTE_SCALE_X;
float HSM_VIEWPORT_VIGNETTE_POS_X;
@@ -486,8 +489,9 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_LED_MASK_MODE;
float HSM_LED_CUTOUT_MODE;
float HSM_LED_DUALSCREEN_VIS_MODE;
- float HSM_LED_SCALE_MODE;
- float HSM_LED_SCALE_FULL_WITH_ZOOM;
+ float HSM_LED_FOLLOW_LAYER;
+ float HSM_LED_FOLLOW_MODE;
+ float HSM_LED_FOLLOW_FULL_USES_ZOOM;
float HSM_LED_SCALE_KEEP_ASPECT;
float HSM_LED_FILL_MODE;
float HSM_LED_SPLIT_PRESERVE_CENTER;
@@ -513,8 +517,9 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_DEVICE_MASK_MODE;
float HSM_DEVICE_CUTOUT_MODE;
float HSM_DEVICE_DUALSCREEN_VIS_MODE;
- float HSM_DEVICE_SCALE_MODE;
- float HSM_DEVICE_SCALE_FULL_WITH_ZOOM;
+ float HSM_DEVICE_FOLLOW_LAYER;
+ float HSM_DEVICE_FOLLOW_MODE;
+ float HSM_DEVICE_FOLLOW_FULL_USES_ZOOM;
float HSM_DEVICE_SCALE_KEEP_ASPECT;
float HSM_DEVICE_FILL_MODE;
float HSM_DEVICE_SPLIT_PRESERVE_CENTER;
@@ -523,9 +528,37 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_DEVICE_SCALE_X;
float HSM_DEVICE_POS_X;
float HSM_DEVICE_POS_Y;
- float HSM_DEVICE_COPY_INHERITED_COORD;
- float HSM_REFLECT_MASK_SCALE_MODE;
float HSM_DEVICE_MIPMAPPING_BLEND_BIAS;
+ // float HSM_REFLECT_MASK_FOLLOW_LAYER;
+ // float HSM_REFLECT_MASK_FOLLOW_MODE;
+
+ // DEVICELED
+ float HSM_DEVICELED_OPACITY;
+ float HSM_DEVICELED_HUE;
+ float HSM_DEVICELED_COLORIZE_ON;
+ float HSM_DEVICELED_SATURATION;
+ float HSM_DEVICELED_BRIGHTNESS;
+ float HSM_DEVICELED_GAMMA;
+ float HSM_DEVICELED_AMBIENT_LIGHTING_MULTIPLIER;
+ float HSM_DEVICELED_AMBIENT2_LIGHTING_MULTIPLIER;
+ float HSM_DEVICELED_APPLY_AMBIENT_IN_ADD_MODE;
+ float HSM_DEVICELED_BLEND_MODE;
+ float HSM_DEVICELED_SOURCE_MATTE_TYPE;
+ float HSM_DEVICELED_MASK_MODE;
+ float HSM_DEVICELED_CUTOUT_MODE;
+ float HSM_DEVICELED_DUALSCREEN_VIS_MODE;
+ float HSM_DEVICELED_FOLLOW_LAYER;
+ float HSM_DEVICELED_FOLLOW_MODE;
+ float HSM_DEVICELED_FOLLOW_FULL_USES_ZOOM;
+ float HSM_DEVICELED_SCALE_KEEP_ASPECT;
+ float HSM_DEVICELED_FILL_MODE;
+ float HSM_DEVICELED_SPLIT_PRESERVE_CENTER;
+ float HSM_DEVICELED_SPLIT_REPEAT_WIDTH;
+ float HSM_DEVICELED_SCALE;
+ float HSM_DEVICELED_SCALE_X;
+ float HSM_DEVICELED_POS_X;
+ float HSM_DEVICELED_POS_Y;
+ float HSM_DEVICELED_MIPMAPPING_BLEND_BIAS;
// Generated Bezel & Frame
float HSM_FRM_OPACITY;
@@ -548,8 +581,9 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_DECAL_MASK_MODE;
float HSM_DECAL_CUTOUT_MODE;
float HSM_DECAL_DUALSCREEN_VIS_MODE;
- float HSM_DECAL_SCALE_MODE;
- float HSM_DECAL_SCALE_FULL_WITH_ZOOM;
+ float HSM_DECAL_FOLLOW_LAYER;
+ float HSM_DECAL_FOLLOW_MODE;
+ float HSM_DECAL_FOLLOW_FULL_USES_ZOOM;
float HSM_DECAL_SCALE_KEEP_ASPECT;
float HSM_DECAL_FILL_MODE;
float HSM_DECAL_SPLIT_PRESERVE_CENTER;
@@ -575,8 +609,9 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_CAB_GLASS_MASK_MODE;
float HSM_CAB_GLASS_CUTOUT_MODE;
float HSM_CAB_GLASS_DUALSCREEN_VIS_MODE;
- float HSM_CAB_GLASS_SCALE_MODE;
- float HSM_CAB_GLASS_SCALE_FULL_WITH_ZOOM;
+ float HSM_CAB_GLASS_FOLLOW_LAYER;
+ float HSM_CAB_GLASS_FOLLOW_MODE;
+ float HSM_CAB_GLASS_FOLLOW_FULL_USES_ZOOM;
float HSM_CAB_GLASS_SCALE_KEEP_ASPECT;
float HSM_CAB_GLASS_FILL_MODE;
float HSM_CAB_GLASS_SPLIT_PRESERVE_CENTER;
@@ -602,8 +637,9 @@ float HSM_TUBE_STATIC_DITHER_AMOUNT;
float HSM_TOP_MASK_MODE;
float HSM_TOP_CUTOUT_MODE;
float HSM_TOP_DUALSCREEN_VIS_MODE;
- float HSM_TOP_SCALE_MODE;
- float HSM_TOP_SCALE_FULL_WITH_ZOOM;
+ float HSM_TOP_FOLLOW_LAYER;
+ float HSM_TOP_FOLLOW_MODE;
+ float HSM_TOP_FOLLOW_FULL_USES_ZOOM;
float HSM_TOP_SCALE_KEEP_ASPECT;
float HSM_TOP_FILL_MODE;
float HSM_TOP_SPLIT_PRESERVE_CENTER;
@@ -771,12 +807,15 @@ float mask_bloom;
#define SHOW_ON_DUALSCREEN_MODE_SCREEN_1 1
#define SHOW_ON_DUALSCREEN_MODE_SCREEN_2 2
-#define INHERITED_SCALE_MODE_VIEWPORT 0
-#define INHERITED_SCALE_MODE_TUBE_DIFFUSE 1
-#define INHERITED_SCALE_MODE_BEZEL_OUTSIDE 2
-#define INHERITED_SCALE_MODE_BG 3
-#define INHERITED_SCALE_MODE_DEVICE 4
-#define INHERITED_SCALE_MODE_DECAL 5
+#define FOLLOW_LAYER_VIEWPORT 0
+#define FOLLOW_LAYER_TUBE_DIFFUSE 1
+#define FOLLOW_LAYER_BEZEL_OUTSIDE 2
+#define FOLLOW_LAYER_BG 3
+#define FOLLOW_LAYER_DEVICE 4
+#define FOLLOW_LAYER_DECAL 5
+
+float FOLLOW_MODE_SCALE_AND_POS = 0;
+float FOLLOW_MODE_EXACT = 1;
#define TEXTURE_ASPECT_MODE_VIEWPORT 0
#define TEXTURE_ASPECT_MODE_EXPLICIT 1
@@ -830,7 +869,7 @@ float FILL_MODE_SPLIT_FILL_VERTICAL = 2;
#define RENDER_SIMPLE_MASK_TYPE_BEZEL 3
#define RENDER_SIMPLE_MASK_TYPE_FRAME 4
-bool CACHE_INFO_PARAM_SUM_CHANGED = false;
+bool CACHE_INFO_CHANGED = false;
float CURRENT_FRAME_FROM_CACHE_INFO = 0;
float TUBE_DIFFUSE_MASK = 0;
@@ -870,6 +909,7 @@ vec2 BEZEL_OUTSIDE_SCALE = vec2(0.5);
vec2 BACKGROUND_SCALE = vec2(0.5);
vec2 LED_SCALE = vec2(0.5);
vec2 DEVICE_SCALE = vec2(0.5);
+vec2 DEVICELED_SCALE = vec2(0.5);
vec2 DECAL_SCALE = vec2(0.5);
vec2 CAB_GLASS_SCALE = vec2(0.5);
vec2 TOP_IMAGE_SCALE = vec2(0.5);
@@ -896,6 +936,7 @@ vec2 TUBE_DIFFUSE_COORD_MIXED_POS = vec2(0.5);
vec2 BEZEL_OUTSIDE_COORD = vec2(0.5);
vec2 BACKGROUND_COORD = vec2(0.5);
vec2 DEVICE_COORD = vec2(0.5);
+vec2 DEVICELED_COORD = vec2(0.5);
vec2 LED_COORD = vec2(0.5);
vec2 DECAL_COORD = vec2(0.5);
vec2 CAB_GLASS_COORD = vec2(0.5);
@@ -910,6 +951,7 @@ vec2 FRAME_OUTSIDE_CURVED_COORD = vec2(0.5);
vec2 BACKGROUND_CURVED_COORD = vec2(0.5);
vec2 LED_CURVED_COORD = vec2(0.5);
vec2 DEVICE_CURVED_COORD = vec2(0.5);
+vec2 DEVICELED_CURVED_COORD = vec2(0.5);
vec2 DECAL_CURVED_COORD = vec2(0.5);
vec2 CAB_GLASS_CURVED_COORD = vec2(0.5);
vec2 TOP_IMAGE_CURVED_COORD = vec2(0.5);
diff --git a/bezel/Mega_Bezel/shaders/base/common/params-0-screen-scale.inc b/bezel/Mega_Bezel/shaders/base/common/params-0-screen-scale.inc
index 9af8a51..53fdb88 100644
--- a/bezel/Mega_Bezel/shaders/base/common/params-0-screen-scale.inc
+++ b/bezel/Mega_Bezel/shaders/base/common/params-0-screen-scale.inc
@@ -23,7 +23,7 @@
*/
// Screen Scale Required Parameters
-#pragma parameter HSM_MEGA_BEZEL_TITLE "[ --- HSM MEGA BEZEL V1.2.0_2022-09-11 --- ]" 0 0 0.01 0.01
+#pragma parameter HSM_MEGA_BEZEL_TITLE "[ --- HSM MEGA BEZEL V1.4.0_2022-09-26 --- ]" 0 0 0.01 0.01
#pragma parameter HSM_RESOLUTION_DEBUG_ON " Show Resolution Info" 0 0 1 1
float HSM_RESOLUTION_DEBUG_ON = global.HSM_RESOLUTION_DEBUG_ON;
@@ -330,7 +330,7 @@ float HSM_CORE_RES_SAMPLING_SHIFT_OPPOSITE_DIR = global.HSM_CORE_RES_SAMPLING_SH
//---------------------------------------------------------------------------------------------------
#pragma parameter HSM_INTERLACE_TITLE "[ INTERLACING From Guest.r :) ]:" 0 0 0.01 0.01
-#pragma parameter HSM_INTERLACE_TRIGGER_RES " Interlacing and Fake Scanlines Trigger Res" 600 100 2000 25
+#pragma parameter HSM_INTERLACE_TRIGGER_RES " Interlacing and Fake Scanlines Trigger Res" 650 100 2000 25
#define HSM_INTERLACE_TRIGGER_RES global.HSM_INTERLACE_TRIGGER_RES
#pragma parameter HSM_INTERLACE_MODE " Interlacing Mode: OFF | Normal 1-3 | Interpolation 4-5" 4 0.0 5.0 1.0
@@ -538,6 +538,9 @@ float HSM_TUBE_DIFFUSE_IMAGE_SCALE = global.HSM_TUBE_DIFFUSE_IMAGE_SCALE / 100;
#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_SCALE_X " Image Scale X" 100 0 1000 1
float HSM_TUBE_DIFFUSE_IMAGE_SCALE_X = global.HSM_TUBE_DIFFUSE_IMAGE_SCALE_X / 100;
+#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_ROTATION " Image Rotation: -1: 270 | 0 | 1: 90" 0 -1 1 1
+float HSM_TUBE_DIFFUSE_IMAGE_ROTATION = global.HSM_TUBE_DIFFUSE_IMAGE_ROTATION;
+
#pragma parameter HSM_TUBE_DIFFUSE_FORCE_ASPECT " Tube Diffuse Aspect - EVEN | SCREEN | Explicit" 1 0 2 1
#define HSM_TUBE_DIFFUSE_FORCE_ASPECT global.HSM_TUBE_DIFFUSE_FORCE_ASPECT
diff --git a/bezel/Mega_Bezel/shaders/base/common/params-2-reflection.inc b/bezel/Mega_Bezel/shaders/base/common/params-2-reflection.inc
index 6cf9c83..288020b 100644
--- a/bezel/Mega_Bezel/shaders/base/common/params-2-reflection.inc
+++ b/bezel/Mega_Bezel/shaders/base/common/params-2-reflection.inc
@@ -117,8 +117,8 @@ float HSM_REFLECT_NOISE_SAMPLE_DISTANCE = global.HSM_REFLECT_NOISE_SAMPLE_DISTAN
// #pragma parameter HSM_REFLECT_MASK_IMG_AMOUNT " Reflection Image Mask Amount" 0 0 100 1
// float HSM_REFLECT_MASK_IMG_AMOUNT = global.HSM_REFLECT_MASK_IMG_AMOUNT / 100;
-// #pragma parameter HSM_REFLECT_MASK_SCALE_MODE " Scaling Mode (Image Layers Only)- FullScreen | Bezel Img" 0 0 1 1
-// float HSM_REFLECT_MASK_SCALE_MODE = global.HSM_REFLECT_MASK_SCALE_MODE;
+// #pragma parameter HSM_REFLECT_MASK_FOLLOW_LAYER " Scaling Mode (Image Layers Only)- FullScreen | Bezel Img" 0 0 1 1
+// float HSM_REFLECT_MASK_FOLLOW_LAYER = global.HSM_REFLECT_MASK_FOLLOW_LAYER;
#pragma parameter HSM_GLASS_BORDER_ON " Glass Border ON (For Glass Preset)" 0 0 1 1
float HSM_GLASS_BORDER_ON = global.HSM_GLASS_BORDER_ON;
diff --git a/bezel/Mega_Bezel/shaders/base/common/params-4-image-layers.inc b/bezel/Mega_Bezel/shaders/base/common/params-4-image-layers.inc
index 7d0e803..9098b3c 100644
--- a/bezel/Mega_Bezel/shaders/base/common/params-4-image-layers.inc
+++ b/bezel/Mega_Bezel/shaders/base/common/params-4-image-layers.inc
@@ -29,28 +29,31 @@
//---------------------------------------------------------------------------------------------------
#pragma parameter HSM_LAYER_ORDER_TITLE "[ LAYER ORDER ]:" 0 0 0.01 0.01
-#pragma parameter HSM_BG_LAYER_ORDER " Background Image" 0 0 12 1
+#pragma parameter HSM_BG_LAYER_ORDER " Background Layer" 0 0 12 1
float HSM_BG_LAYER_ORDER = global.HSM_BG_LAYER_ORDER;
#pragma parameter HSM_VIEWPORT_VIGNETTE_LAYER_ORDER " Viewport Vignette" 1 0 12 1
float HSM_VIEWPORT_VIGNETTE_LAYER_ORDER = global.HSM_VIEWPORT_VIGNETTE_LAYER_ORDER;
-#pragma parameter HSM_LED_LAYER_ORDER " LED Image" 2 0 12 1
+#pragma parameter HSM_LED_LAYER_ORDER " LED Layer" 2 0 12 1
float HSM_LED_LAYER_ORDER = global.HSM_LED_LAYER_ORDER;
-#pragma parameter HSM_DEVICE_LAYER_ORDER " Device Image" 3 0 12 1
+#pragma parameter HSM_DEVICE_LAYER_ORDER " Device Layer" 3 0 12 1
float HSM_DEVICE_LAYER_ORDER = global.HSM_DEVICE_LAYER_ORDER;
+#pragma parameter HSM_DEVICELED_LAYER_ORDER " Device LED Layer" 4 0 12 1
+float HSM_DEVICELED_LAYER_ORDER = global.HSM_DEVICELED_LAYER_ORDER;
+
#pragma parameter HSM_CRT_LAYER_ORDER " CRT Screen Bezel & Frame" 5 0 12 1
float HSM_CRT_LAYER_ORDER = global.HSM_CRT_LAYER_ORDER;
-#pragma parameter HSM_DECAL_LAYER_ORDER " DECAL Image" 7 0 12 1
+#pragma parameter HSM_DECAL_LAYER_ORDER " Decal Layer" 7 0 12 1
float HSM_DECAL_LAYER_ORDER = global.HSM_DECAL_LAYER_ORDER;
-#pragma parameter HSM_CAB_GLASS_LAYER_ORDER " Cabinet Glass Image" 9 0 12 1
+#pragma parameter HSM_CAB_GLASS_LAYER_ORDER " Cabinet Glass Layer" 9 0 12 1
float HSM_CAB_GLASS_LAYER_ORDER = global.HSM_CAB_GLASS_LAYER_ORDER;
-#pragma parameter HSM_TOP_LAYER_ORDER " Top Image" 12 0 12 1
+#pragma parameter HSM_TOP_LAYER_ORDER " Top Layer" 12 0 12 1
float HSM_TOP_LAYER_ORDER = global.HSM_TOP_LAYER_ORDER;
@@ -65,11 +68,11 @@ float HSM_CUTOUT_ASPECT_MODE = global.HSM_CUTOUT_ASPECT_MODE;
#pragma parameter HSM_CUTOUT_EXPLICIT_ASPECT " Explicit Aspect" 1.33333 0.01 3 0.01
float HSM_CUTOUT_EXPLICIT_ASPECT = global.HSM_CUTOUT_EXPLICIT_ASPECT;
-#pragma parameter HSM_CUTOUT_SCALE_MODE " Inherit Scale - FULL | TUBE | BZL | BG | DEVICE | DECAL" 0 0 5 1
-float HSM_CUTOUT_SCALE_MODE = global.HSM_CUTOUT_SCALE_MODE;
+#pragma parameter HSM_CUTOUT_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BZL | BG | DEVICE | DECAL" 0 0 5 1
+float HSM_CUTOUT_FOLLOW_LAYER = global.HSM_CUTOUT_FOLLOW_LAYER;
-#pragma parameter HSM_CUTOUT_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_CUTOUT_SCALE_FULL_WITH_ZOOM = global.HSM_CUTOUT_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_CUTOUT_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_CUTOUT_FOLLOW_FULL_USES_ZOOM = global.HSM_CUTOUT_FOLLOW_FULL_USES_ZOOM;
#pragma parameter HSM_CUTOUT_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | KEEP ASPECT" 1 0 1 1
float HSM_CUTOUT_KEEP_ASPECT = global.HSM_CUTOUT_KEEP_ASPECT;
@@ -136,6 +139,9 @@ float HSM_BG_BLEND_MODE = global.HSM_BG_BLEND_MODE;
#pragma parameter HSM_BG_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1
float HSM_BG_SOURCE_MATTE_TYPE = global.HSM_BG_SOURCE_MATTE_TYPE;
+#pragma parameter HSM_BG_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_BG_MIPMAPPING_BLEND_BIAS = global.HSM_BG_MIPMAPPING_BLEND_BIAS;
+
#pragma parameter HSM_BG_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
float HSM_BG_MASK_MODE = global.HSM_BG_MASK_MODE;
@@ -145,13 +151,19 @@ float HSM_BG_CUTOUT_MODE = global.HSM_BG_CUTOUT_MODE;
#pragma parameter HSM_BG_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
float HSM_BG_DUALSCREEN_VIS_MODE = global.HSM_BG_DUALSCREEN_VIS_MODE;
-#pragma parameter HSM_BG_SCALE_MODE " Inherit Scale - FULL | TUBE | BEZEL" 0 0 2 1
-float HSM_BG_SCALE_MODE = global.HSM_BG_SCALE_MODE;
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_BG_TITLE2 "[ BACKGROUND SCALE & FOLLOW ]:" 0 0 0.01 0.01
-#pragma parameter HSM_BG_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_BG_SCALE_FULL_WITH_ZOOM = global.HSM_BG_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_BG_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BEZEL" 0 0 2 1
+float HSM_BG_FOLLOW_LAYER = global.HSM_BG_FOLLOW_LAYER;
-#pragma parameter HSM_BG_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | USE TEX ASPECT" 1 0 1 1
+#pragma parameter HSM_BG_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 0 0 1 1
+float HSM_BG_FOLLOW_MODE = global.HSM_BG_FOLLOW_MODE;
+
+#pragma parameter HSM_BG_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_BG_FOLLOW_FULL_USES_ZOOM = global.HSM_BG_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_BG_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
float HSM_BG_SCALE_KEEP_ASPECT = global.HSM_BG_SCALE_KEEP_ASPECT;
#pragma parameter HSM_BG_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
@@ -178,10 +190,6 @@ float HSM_BG_POS_Y = global.HSM_BG_POS_Y / 100;
#pragma parameter HSM_BG_MIRROR_WRAP " Mirror Wrap" 1 0 1 1
float HSM_BG_MIRROR_WRAP = global.HSM_BG_MIRROR_WRAP;
-#pragma parameter HSM_BG_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias" 0 -5 5 0.1
-float HSM_BG_MIPMAPPING_BLEND_BIAS = global.HSM_BG_MIPMAPPING_BLEND_BIAS;
-
-
//---------------------------------------------------------------------------------------------------
// VIEWPORT VIGNETTE
@@ -197,8 +205,8 @@ float HSM_VIEWPORT_VIGNETTE_MASK_MODE = global.HSM_VIEWPORT_VIGNETTE_MASK_MODE;
#pragma parameter HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1
float HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE = global.HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE;
-#pragma parameter HSM_VIEWPORT_VIGNETTE_SCALE_MODE " Inherit Scale- FULL | BG | TUBE | BZL" 0 0 5 1
-float HSM_VIEWPORT_VIGNETTE_SCALE_MODE = global.HSM_VIEWPORT_VIGNETTE_SCALE_MODE;
+#pragma parameter HSM_VIEWPORT_VIGNETTE_FOLLOW_LAYER " Follow Layer- FULL | BG | TUBE | BZL" 0 0 5 1
+float HSM_VIEWPORT_VIGNETTE_FOLLOW_LAYER = global.HSM_VIEWPORT_VIGNETTE_FOLLOW_LAYER;
#pragma parameter HSM_VIEWPORT_VIGNETTE_SCALE " Scale" 100 0 1000 0.1
float HSM_VIEWPORT_VIGNETTE_SCALE = global.HSM_VIEWPORT_VIGNETTE_SCALE / 100;
@@ -254,19 +262,28 @@ float HSM_LED_SOURCE_MATTE_TYPE = global.HSM_LED_SOURCE_MATTE_TYPE;
#pragma parameter HSM_LED_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
float HSM_LED_MASK_MODE = global.HSM_LED_MASK_MODE;
+#pragma parameter HSM_LED_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_LED_MIPMAPPING_BLEND_BIAS = global.HSM_LED_MIPMAPPING_BLEND_BIAS;
+
#pragma parameter HSM_LED_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1
float HSM_LED_CUTOUT_MODE = global.HSM_LED_CUTOUT_MODE;
#pragma parameter HSM_LED_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
float HSM_LED_DUALSCREEN_VIS_MODE = global.HSM_LED_DUALSCREEN_VIS_MODE;
-#pragma parameter HSM_LED_SCALE_MODE " Inherit Scale - FULL | TUBE | BEZEL | BG | DEVICE" 3 0 4 1
-float HSM_LED_SCALE_MODE = global.HSM_LED_SCALE_MODE;
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_LED_TITLE2 "[ LED SCALE & FOLLOW]:" 0 0 0.01 0.01
-#pragma parameter HSM_LED_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_LED_SCALE_FULL_WITH_ZOOM = global.HSM_LED_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_LED_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BEZEL | BG | DEVICE" 3 0 4 1
+float HSM_LED_FOLLOW_LAYER = global.HSM_LED_FOLLOW_LAYER;
-#pragma parameter HSM_LED_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | USE TEX ASPECT" 1 0 1 1
+#pragma parameter HSM_LED_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 0 0 1 1
+float HSM_LED_FOLLOW_MODE = global.HSM_LED_FOLLOW_MODE;
+
+#pragma parameter HSM_LED_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_LED_FOLLOW_FULL_USES_ZOOM = global.HSM_LED_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_LED_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
float HSM_LED_SCALE_KEEP_ASPECT = global.HSM_LED_SCALE_KEEP_ASPECT;
#pragma parameter HSM_LED_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
@@ -290,9 +307,6 @@ float HSM_LED_POS_X = global.HSM_LED_POS_X / -100;
#pragma parameter HSM_LED_POS_Y " Position Y" 0 -1000 1000 0.05
float HSM_LED_POS_Y = global.HSM_LED_POS_Y / 100;
-#pragma parameter HSM_LED_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias" 0 -5 5 0.1
-float HSM_LED_MIPMAPPING_BLEND_BIAS = global.HSM_LED_MIPMAPPING_BLEND_BIAS;
-
//---------------------------------------------------------------------------------------------------
// DEVICE IMAGE
@@ -335,31 +349,37 @@ float HSM_DEVICE_SOURCE_MATTE_TYPE = global.HSM_DEVICE_SOURCE_MATTE_TYPE;
#pragma parameter HSM_DEVICE_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
float HSM_DEVICE_MASK_MODE = global.HSM_DEVICE_MASK_MODE;
+#pragma parameter HSM_DEVICE_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_DEVICE_MIPMAPPING_BLEND_BIAS = global.HSM_DEVICE_MIPMAPPING_BLEND_BIAS;
+
#pragma parameter HSM_DEVICE_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1
float HSM_DEVICE_CUTOUT_MODE = global.HSM_DEVICE_CUTOUT_MODE;
#pragma parameter HSM_DEVICE_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
float HSM_DEVICE_DUALSCREEN_VIS_MODE = global.HSM_DEVICE_DUALSCREEN_VIS_MODE;
-#pragma parameter HSM_DEVICE_SCALE_MODE " Inherit Scale - FULL | TUBE | BEZEL | BG" 1 0 3 1
-float HSM_DEVICE_SCALE_MODE = global.HSM_DEVICE_SCALE_MODE;
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_DEVICE_TITLE2 "[ DEVICE SCALE & FOLLOW ]:" 0 0 0.01 0.01
-#pragma parameter HSM_DEVICE_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_DEVICE_SCALE_FULL_WITH_ZOOM = global.HSM_DEVICE_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_DEVICE_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BEZEL | BG" 1 0 3 1
+float HSM_DEVICE_FOLLOW_LAYER = global.HSM_DEVICE_FOLLOW_LAYER;
-#pragma parameter HSM_DEVICE_COPY_INHERITED_COORD " Copy Inherited Coord (Keeps Curvature, No Aspect or Fill)" 0 0 1 1
-float HSM_DEVICE_COPY_INHERITED_COORD = global.HSM_DEVICE_COPY_INHERITED_COORD;
+#pragma parameter HSM_DEVICE_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 0 0 1 1
+float HSM_DEVICE_FOLLOW_MODE = global.HSM_DEVICE_FOLLOW_MODE;
-#pragma parameter HSM_DEVICE_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | USE TEX ASPECT" 1 0 1 1
+#pragma parameter HSM_DEVICE_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_DEVICE_FOLLOW_FULL_USES_ZOOM = global.HSM_DEVICE_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_DEVICE_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
float HSM_DEVICE_SCALE_KEEP_ASPECT = global.HSM_DEVICE_SCALE_KEEP_ASPECT;
#pragma parameter HSM_DEVICE_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
float HSM_DEVICE_FILL_MODE = global.HSM_DEVICE_FILL_MODE;
-#pragma parameter HSM_DEVICE_SPLIT_PRESERVE_CENTER " Split Mode Preserve Center %" 0 0 500 1
+#pragma parameter HSM_DEVICE_SPLIT_PRESERVE_CENTER " Split Mode Preserve Center %" 0 0 500 1
float HSM_DEVICE_SPLIT_PRESERVE_CENTER = global.HSM_DEVICE_SPLIT_PRESERVE_CENTER / 1000;
-#pragma parameter HSM_DEVICE_SPLIT_REPEAT_WIDTH " Split Mode Repeat Width %" 0 0 100 1
+#pragma parameter HSM_DEVICE_SPLIT_REPEAT_WIDTH " Split Mode Repeat Width %" 0 0 100 1
float HSM_DEVICE_SPLIT_REPEAT_WIDTH = global.HSM_DEVICE_SPLIT_REPEAT_WIDTH / 1000;
#pragma parameter HSM_DEVICE_SCALE " Scale" 100 0 1000 0.1
@@ -374,41 +394,125 @@ float HSM_DEVICE_POS_X = global.HSM_DEVICE_POS_X / -100;
#pragma parameter HSM_DEVICE_POS_Y " Position Y" 0 -1000 1000 0.05
float HSM_DEVICE_POS_Y = global.HSM_DEVICE_POS_Y / 100;
-#pragma parameter HSM_DEVICE_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias" 0 -5 5 0.1
-float HSM_DEVICE_MIPMAPPING_BLEND_BIAS = global.HSM_DEVICE_MIPMAPPING_BLEND_BIAS;
+//---------------------------------------------------------------------------------------------------
+// DEVICELED IMAGE
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_DEVICELED_TITLE "[ DEVICE LED IMAGE LAYER ]:" 0 0 0.01 0.01
+
+#pragma parameter HSM_DEVICELED_OPACITY " Opacity" 100 0 100 1
+float HSM_DEVICELED_OPACITY = global.HSM_DEVICELED_OPACITY / 100;
+
+#pragma parameter HSM_DEVICELED_COLORIZE_ON " Colorize" 0 0 1 1
+float HSM_DEVICELED_COLORIZE_ON = global.HSM_DEVICELED_COLORIZE_ON;
+
+#pragma parameter HSM_DEVICELED_HUE " Hue Offset" 0 0 360 1
+float HSM_DEVICELED_HUE = global.HSM_DEVICELED_HUE / 360;
+
+#pragma parameter HSM_DEVICELED_SATURATION " Saturation" 100 0 200 1
+float HSM_DEVICELED_SATURATION = global.HSM_DEVICELED_SATURATION / 100;
+
+#pragma parameter HSM_DEVICELED_BRIGHTNESS " Brightness" 100 0 200 1
+float HSM_DEVICELED_BRIGHTNESS = global.HSM_DEVICELED_BRIGHTNESS / 100;
+
+#pragma parameter HSM_DEVICELED_GAMMA " Gamma Adjust" 1 0 5 0.01
+float HSM_DEVICELED_GAMMA = global.HSM_DEVICELED_GAMMA;
+
+#pragma parameter HSM_DEVICELED_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1
+float HSM_DEVICELED_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_DEVICELED_AMBIENT_LIGHTING_MULTIPLIER / 100;
+
+#pragma parameter HSM_DEVICELED_AMBIENT2_LIGHTING_MULTIPLIER " Ambient 2nd Image Lighting Multiplier" 0 0 100 1
+float HSM_DEVICELED_AMBIENT2_LIGHTING_MULTIPLIER = global.HSM_DEVICELED_AMBIENT2_LIGHTING_MULTIPLIER / 100;
+
+#pragma parameter HSM_DEVICELED_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1
+float HSM_DEVICELED_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_DEVICELED_APPLY_AMBIENT_IN_ADD_MODE;
+
+#pragma parameter HSM_DEVICELED_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 2 0 3 1
+float HSM_DEVICELED_BLEND_MODE = global.HSM_DEVICELED_BLEND_MODE;
+
+#pragma parameter HSM_DEVICELED_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1
+float HSM_DEVICELED_SOURCE_MATTE_TYPE = global.HSM_DEVICELED_SOURCE_MATTE_TYPE;
+
+#pragma parameter HSM_DEVICELED_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
+float HSM_DEVICELED_MASK_MODE = global.HSM_DEVICELED_MASK_MODE;
+
+#pragma parameter HSM_DEVICELED_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_DEVICELED_MIPMAPPING_BLEND_BIAS = global.HSM_DEVICELED_MIPMAPPING_BLEND_BIAS;
+
+#pragma parameter HSM_DEVICELED_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1
+float HSM_DEVICELED_CUTOUT_MODE = global.HSM_DEVICELED_CUTOUT_MODE;
+
+#pragma parameter HSM_DEVICELED_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
+float HSM_DEVICELED_DUALSCREEN_VIS_MODE = global.HSM_DEVICELED_DUALSCREEN_VIS_MODE;
+
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_DEVICELED_TITLE2 "[ DEVICE LED SCALE & FOLLOW ]:" 0 0 0.01 0.01
+
+#pragma parameter HSM_DEVICELED_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BEZEL | BG | DEVICE" 4 0 4 1
+float HSM_DEVICELED_FOLLOW_LAYER = global.HSM_DEVICELED_FOLLOW_LAYER;
+
+#pragma parameter HSM_DEVICELED_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 1 0 1 1
+float HSM_DEVICELED_FOLLOW_MODE = global.HSM_DEVICELED_FOLLOW_MODE;
+
+#pragma parameter HSM_DEVICELED_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_DEVICELED_FOLLOW_FULL_USES_ZOOM = global.HSM_DEVICELED_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_DEVICELED_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
+float HSM_DEVICELED_SCALE_KEEP_ASPECT = global.HSM_DEVICELED_SCALE_KEEP_ASPECT;
+
+#pragma parameter HSM_DEVICELED_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
+float HSM_DEVICELED_FILL_MODE = global.HSM_DEVICELED_FILL_MODE;
+
+#pragma parameter HSM_DEVICELED_SPLIT_PRESERVE_CENTER " Split Mode Preserve Center %" 0 0 500 1
+float HSM_DEVICELED_SPLIT_PRESERVE_CENTER = global.HSM_DEVICELED_SPLIT_PRESERVE_CENTER / 1000;
+
+#pragma parameter HSM_DEVICELED_SPLIT_REPEAT_WIDTH " Split Mode Repeat Width %" 0 0 100 1
+float HSM_DEVICELED_SPLIT_REPEAT_WIDTH = global.HSM_DEVICELED_SPLIT_REPEAT_WIDTH / 1000;
+
+#pragma parameter HSM_DEVICELED_SCALE " Scale" 100 0 1000 0.1
+float HSM_DEVICELED_SCALE = global.HSM_DEVICELED_SCALE / 100;
+
+#pragma parameter HSM_DEVICELED_SCALE_X " Scale X" 100 0 1000 0.1
+float HSM_DEVICELED_SCALE_X = global.HSM_DEVICELED_SCALE_X / 100;
+
+#pragma parameter HSM_DEVICELED_POS_X " Position X" 0 -1000 1000 0.05
+float HSM_DEVICELED_POS_X = global.HSM_DEVICELED_POS_X / -100;
+
+#pragma parameter HSM_DEVICELED_POS_Y " Position Y" 0 -1000 1000 0.05
+float HSM_DEVICELED_POS_Y = global.HSM_DEVICELED_POS_Y / 100;
+
//---------------------------------------------------------------------------------------------------
// DECAL IMAGE
//---------------------------------------------------------------------------------------------------
-#pragma parameter HSM_DECAL_TITLE "[ DECAL LAYER ]:" 0 0 0.01 0.01
+#pragma parameter HSM_DECAL_TITLE "[ DECAL LAYER ]:" 0 0 0.01 0.01
-#pragma parameter HSM_DECAL_OPACITY " Opacity" 100 0 100 0.1
+#pragma parameter HSM_DECAL_OPACITY " Opacity" 100 0 100 0.1
float HSM_DECAL_OPACITY = global.HSM_DECAL_OPACITY / 100;
-#pragma parameter HSM_DECAL_COLORIZE_ON " Colorize" 0 0 1 1
+#pragma parameter HSM_DECAL_COLORIZE_ON " Colorize" 0 0 1 1
float HSM_DECAL_COLORIZE_ON = global.HSM_DECAL_COLORIZE_ON;
-#pragma parameter HSM_DECAL_HUE " Hue Offset" 0 0 360 1
+#pragma parameter HSM_DECAL_HUE " Hue Offset" 0 0 360 1
float HSM_DECAL_HUE = global.HSM_DECAL_HUE / 360;
-#pragma parameter HSM_DECAL_SATURATION " Saturation" 100 0 200 1
+#pragma parameter HSM_DECAL_SATURATION " Saturation" 100 0 200 1
float HSM_DECAL_SATURATION = global.HSM_DECAL_SATURATION / 100;
-#pragma parameter HSM_DECAL_BRIGHTNESS " Brightness" 100 0 200 1
+#pragma parameter HSM_DECAL_BRIGHTNESS " Brightness" 100 0 200 1
float HSM_DECAL_BRIGHTNESS = global.HSM_DECAL_BRIGHTNESS / 100;
-#pragma parameter HSM_DECAL_GAMMA " Gamma Adjust" 1 0 5 0.01
+#pragma parameter HSM_DECAL_GAMMA " Gamma Adjust" 1 0 5 0.01
float HSM_DECAL_GAMMA = global.HSM_DECAL_GAMMA;
-#pragma parameter HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1
+#pragma parameter HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1
float HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER / 100;
-#pragma parameter HSM_DECAL_AMBIENT2_LIGHTING_MULTIPLIER " Ambient 2nd Image Lighting Multiplier" 0 0 100 1
+#pragma parameter HSM_DECAL_AMBIENT2_LIGHTING_MULTIPLIER " Ambient 2nd Image Lighting Multiplier" 0 0 100 1
float HSM_DECAL_AMBIENT2_LIGHTING_MULTIPLIER = global.HSM_DECAL_AMBIENT2_LIGHTING_MULTIPLIER / 100;
-#pragma parameter HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1
+#pragma parameter HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1
float HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE;
#pragma parameter HSM_DECAL_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 0 3 1
@@ -417,6 +521,9 @@ float HSM_DECAL_BLEND_MODE = global.HSM_DECAL_BLEND_MODE;
#pragma parameter HSM_DECAL_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1
float HSM_DECAL_SOURCE_MATTE_TYPE = global.HSM_DECAL_SOURCE_MATTE_TYPE;
+#pragma parameter HSM_DECAL_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_DECAL_MIPMAPPING_BLEND_BIAS = global.HSM_DECAL_MIPMAPPING_BLEND_BIAS;
+
#pragma parameter HSM_DECAL_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
float HSM_DECAL_MASK_MODE = global.HSM_DECAL_MASK_MODE;
@@ -426,13 +533,19 @@ float HSM_DECAL_CUTOUT_MODE = global.HSM_DECAL_CUTOUT_MODE;
#pragma parameter HSM_DECAL_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
float HSM_DECAL_DUALSCREEN_VIS_MODE = global.HSM_DECAL_DUALSCREEN_VIS_MODE;
-#pragma parameter HSM_DECAL_SCALE_MODE " Inherit Scale - FULL | TUBE | BEZEL | BG | DEVICE" 0 0 4 1
-float HSM_DECAL_SCALE_MODE = global.HSM_DECAL_SCALE_MODE;
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_DECAL_TITLE2 "[ DECAL SCALE & FOLLOW ]:" 0 0 0.01 0.01
-#pragma parameter HSM_DECAL_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_DECAL_SCALE_FULL_WITH_ZOOM = global.HSM_DECAL_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_DECAL_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BEZEL | BG | DEVICE" 0 0 4 1
+float HSM_DECAL_FOLLOW_LAYER = global.HSM_DECAL_FOLLOW_LAYER;
-#pragma parameter HSM_DECAL_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | USE TEX ASPECT" 1 0 1 1
+#pragma parameter HSM_DECAL_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 0 0 1 1
+float HSM_DECAL_FOLLOW_MODE = global.HSM_DECAL_FOLLOW_MODE;
+
+#pragma parameter HSM_DECAL_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_DECAL_FOLLOW_FULL_USES_ZOOM = global.HSM_DECAL_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_DECAL_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
float HSM_DECAL_SCALE_KEEP_ASPECT = global.HSM_DECAL_SCALE_KEEP_ASPECT;
#pragma parameter HSM_DECAL_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
@@ -456,37 +569,34 @@ float HSM_DECAL_POS_X = global.HSM_DECAL_POS_X / -100;
#pragma parameter HSM_DECAL_POS_Y " Position Y" 0 -1000 1000 0.05
float HSM_DECAL_POS_Y = global.HSM_DECAL_POS_Y / 100;
-#pragma parameter HSM_DECAL_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias" 0 -5 5 0.1
-float HSM_DECAL_MIPMAPPING_BLEND_BIAS = global.HSM_DECAL_MIPMAPPING_BLEND_BIAS;
-
//---------------------------------------------------------------------------------------------------
// CAB GLS IMAGE
//---------------------------------------------------------------------------------------------------
-#pragma parameter HSM_CAB_GLASS_TITLE "[ CABINET OR CABINET GLASS LAYER ]:" 0 0 0.01 0.01
+#pragma parameter HSM_CAB_GLASS_TITLE "[ CABINET GLASS LAYER ]:" 0 0 0.01 0.01
#pragma parameter HSM_CAB_GLASS_OPACITY " Opacity" 100 0 100 1
float HSM_CAB_GLASS_OPACITY = global.HSM_CAB_GLASS_OPACITY / 100;
-#pragma parameter HSM_CAB_GLASS_COLORIZE_ON " Colorize" 0 0 1 1
+#pragma parameter HSM_CAB_GLASS_COLORIZE_ON " Colorize" 0 0 1 1
float HSM_CAB_GLASS_COLORIZE_ON = global.HSM_CAB_GLASS_COLORIZE_ON;
-#pragma parameter HSM_CAB_GLASS_HUE " Hue Offset" 0 0 360 1
+#pragma parameter HSM_CAB_GLASS_HUE " Hue Offset" 0 0 360 1
float HSM_CAB_GLASS_HUE = global.HSM_CAB_GLASS_HUE / 360;
-#pragma parameter HSM_CAB_GLASS_SATURATION " Saturation" 100 0 200 1
+#pragma parameter HSM_CAB_GLASS_SATURATION " Saturation" 100 0 200 1
float HSM_CAB_GLASS_SATURATION = global.HSM_CAB_GLASS_SATURATION / 100;
#pragma parameter HSM_CAB_GLASS_BRIGHTNESS " Brightness" 100 0 400 1
float HSM_CAB_GLASS_BRIGHTNESS = global.HSM_CAB_GLASS_BRIGHTNESS / 100;
-#pragma parameter HSM_CAB_GLASS_GAMMA " Gamma Adjust" 1 0 5 0.01
+#pragma parameter HSM_CAB_GLASS_GAMMA " Gamma Adjust" 1 0 5 0.01
float HSM_CAB_GLASS_GAMMA = global.HSM_CAB_GLASS_GAMMA;
-#pragma parameter HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1
+#pragma parameter HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1
float HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER / 100;
-#pragma parameter HSM_CAB_GLASS_AMBIENT2_LIGHTING_MULTIPLIER " Ambient 2nd Image Lighting Multiplier" 0 0 100 1
+#pragma parameter HSM_CAB_GLASS_AMBIENT2_LIGHTING_MULTIPLIER " Ambient 2nd Image Lighting Multiplier" 0 0 100 1
float HSM_CAB_GLASS_AMBIENT2_LIGHTING_MULTIPLIER = global.HSM_CAB_GLASS_AMBIENT2_LIGHTING_MULTIPLIER / 100;
#pragma parameter HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1
@@ -498,6 +608,9 @@ float HSM_CAB_GLASS_BLEND_MODE = global.HSM_CAB_GLASS_BLEND_MODE;
#pragma parameter HSM_CAB_GLASS_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1
float HSM_CAB_GLASS_SOURCE_MATTE_TYPE = global.HSM_CAB_GLASS_SOURCE_MATTE_TYPE;
+#pragma parameter HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS = global.HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS;
+
#pragma parameter HSM_CAB_GLASS_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
float HSM_CAB_GLASS_MASK_MODE = global.HSM_CAB_GLASS_MASK_MODE;
@@ -507,13 +620,19 @@ float HSM_CAB_GLASS_CUTOUT_MODE = global.HSM_CAB_GLASS_CUTOUT_MODE;
#pragma parameter HSM_CAB_GLASS_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
float HSM_CAB_GLASS_DUALSCREEN_VIS_MODE = global.HSM_CAB_GLASS_DUALSCREEN_VIS_MODE;
-#pragma parameter HSM_CAB_GLASS_SCALE_MODE "Inherit Scale- FULL | TUBE | BEZEL | BG | DEVICE | DECAL" 0 0 5 1
-float HSM_CAB_GLASS_SCALE_MODE = global.HSM_CAB_GLASS_SCALE_MODE;
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_CAB_GLASS_TITLE2 "[ CABINET GLASS SCALE & FOLLOW ]:" 0 0 0.01 0.01
-#pragma parameter HSM_CAB_GLASS_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_CAB_GLASS_SCALE_FULL_WITH_ZOOM = global.HSM_CAB_GLASS_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_CAB_GLASS_FOLLOW_LAYER " Follow Layer- FULL | TUBE | BEZEL | BG | DEVICE | DECAL" 0 0 5 1
+float HSM_CAB_GLASS_FOLLOW_LAYER = global.HSM_CAB_GLASS_FOLLOW_LAYER;
-#pragma parameter HSM_CAB_GLASS_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | USE TEX ASPECT" 1 0 1 1
+#pragma parameter HSM_CAB_GLASS_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 0 0 1 1
+float HSM_CAB_GLASS_FOLLOW_MODE = global.HSM_CAB_GLASS_FOLLOW_MODE;
+
+#pragma parameter HSM_CAB_GLASS_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_CAB_GLASS_FOLLOW_FULL_USES_ZOOM = global.HSM_CAB_GLASS_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_CAB_GLASS_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
float HSM_CAB_GLASS_SCALE_KEEP_ASPECT = global.HSM_CAB_GLASS_SCALE_KEEP_ASPECT;
#pragma parameter HSM_CAB_GLASS_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
@@ -537,9 +656,6 @@ float HSM_CAB_GLASS_POS_X = global.HSM_CAB_GLASS_POS_X / -100;
#pragma parameter HSM_CAB_GLASS_POS_Y " Position Y" 0 -1000 1000 0.05
float HSM_CAB_GLASS_POS_Y = global.HSM_CAB_GLASS_POS_Y / 100;
-#pragma parameter HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias" 0 -5 5 0.1
-float HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS = global.HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS;
-
//---------------------------------------------------------------------------------------------------
// TOP IMAGE
@@ -549,19 +665,19 @@ float HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS = global.HSM_CAB_GLASS_MIPMAPPING_BLEN
#pragma parameter HSM_TOP_OPACITY " Opacity" 100 0 100 0.1
float HSM_TOP_OPACITY = global.HSM_TOP_OPACITY / 100;
-#pragma parameter HSM_TOP_COLORIZE_ON " Colorize" 0 0 1 1
+#pragma parameter HSM_TOP_COLORIZE_ON " Colorize" 0 0 1 1
float HSM_TOP_COLORIZE_ON = global.HSM_TOP_COLORIZE_ON;
-#pragma parameter HSM_TOP_HUE " Hue Offset" 0 0 360 1
+#pragma parameter HSM_TOP_HUE " Hue Offset" 0 0 360 1
float HSM_TOP_HUE = global.HSM_TOP_HUE / 360;
-#pragma parameter HSM_TOP_SATURATION " Saturation" 100 0 200 1
+#pragma parameter HSM_TOP_SATURATION " Saturation" 100 0 200 1
float HSM_TOP_SATURATION = global.HSM_TOP_SATURATION / 100;
-#pragma parameter HSM_TOP_BRIGHTNESS " Brightness" 100 0 200 1
+#pragma parameter HSM_TOP_BRIGHTNESS " Brightness" 100 0 200 1
float HSM_TOP_BRIGHTNESS = global.HSM_TOP_BRIGHTNESS / 100;
-#pragma parameter HSM_TOP_GAMMA " Gamma Adjust" 1 0 5 0.01
+#pragma parameter HSM_TOP_GAMMA " Gamma Adjust" 1 0 5 0.01
float HSM_TOP_GAMMA = global.HSM_TOP_GAMMA;
#pragma parameter HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1
@@ -579,6 +695,9 @@ float HSM_TOP_BLEND_MODE = global.HSM_TOP_BLEND_MODE;
#pragma parameter HSM_TOP_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1
float HSM_TOP_SOURCE_MATTE_TYPE = global.HSM_TOP_SOURCE_MATTE_TYPE;
+#pragma parameter HSM_TOP_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias (Affects Sharpness)" 0 -5 5 0.1
+float HSM_TOP_MIPMAPPING_BLEND_BIAS = global.HSM_TOP_MIPMAPPING_BLEND_BIAS;
+
#pragma parameter HSM_TOP_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 0 0 8 1
float HSM_TOP_MASK_MODE = global.HSM_TOP_MASK_MODE;
@@ -588,13 +707,19 @@ float HSM_TOP_CUTOUT_MODE = global.HSM_TOP_CUTOUT_MODE;
#pragma parameter HSM_TOP_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1
float HSM_TOP_DUALSCREEN_VIS_MODE = global.HSM_TOP_DUALSCREEN_VIS_MODE;
-#pragma parameter HSM_TOP_SCALE_MODE "Inherit Scale- FULL | TUBE | BEZEL | BG | DEVICE | DECAL" 0 0 5 1
-float HSM_TOP_SCALE_MODE = global.HSM_TOP_SCALE_MODE;
+//---------------------------------------------------------------------------------------------------
+#pragma parameter HSM_TOP_TITLE2 "[ TOP SCALE & FOLLOW ]:" 0 0 0.01 0.01
-#pragma parameter HSM_TOP_SCALE_FULL_WITH_ZOOM " Zoom FULL Scale Mode" 1 0 1 1
-float HSM_TOP_SCALE_FULL_WITH_ZOOM = global.HSM_TOP_SCALE_FULL_WITH_ZOOM;
+#pragma parameter HSM_TOP_FOLLOW_LAYER " Follow Layer - FULL | TUBE | BEZEL | BG | DEVICE | DECAL" 0 0 5 1
+float HSM_TOP_FOLLOW_LAYER = global.HSM_TOP_FOLLOW_LAYER;
-#pragma parameter HSM_TOP_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | USE TEX ASPECT" 1 0 1 1
+#pragma parameter HSM_TOP_FOLLOW_MODE " Follow Mode - FOLLOW SCALE & POS | FOLLOW EXACTLY" 0 0 1 1
+float HSM_TOP_FOLLOW_MODE = global.HSM_TOP_FOLLOW_MODE;
+
+#pragma parameter HSM_TOP_FOLLOW_FULL_USES_ZOOM " Follow Full also follows Zoom" 1 0 1 1
+float HSM_TOP_FOLLOW_FULL_USES_ZOOM = global.HSM_TOP_FOLLOW_FULL_USES_ZOOM;
+
+#pragma parameter HSM_TOP_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM LAYER | USE TEX ASPECT" 1 0 1 1
float HSM_TOP_SCALE_KEEP_ASPECT = global.HSM_TOP_SCALE_KEEP_ASPECT;
#pragma parameter HSM_TOP_FILL_MODE " Image Fill Mode - STRETCH | SPLIT HORIZONTAL" 0 0 1 1
@@ -621,10 +746,10 @@ float HSM_TOP_POS_Y = global.HSM_TOP_POS_Y / 100;
#pragma parameter HSM_TOP_MIRROR_WRAP " Mirror Wrap" 1 0 1 1
float HSM_TOP_MIRROR_WRAP = global.HSM_TOP_MIRROR_WRAP;
-#pragma parameter HSM_TOP_MIPMAPPING_BLEND_BIAS " Mipmapping Blend Bias" 0 -5 5 0.1
-float HSM_TOP_MIPMAPPING_BLEND_BIAS = global.HSM_TOP_MIPMAPPING_BLEND_BIAS;
-
+//---------------------------------------------------------------------------------------------------
+// RENDER FOR SIMPLIFIED PRESETS
+//---------------------------------------------------------------------------------------------------
#pragma parameter HSM_RENDER_FOR_SIMPLIFIED_TITLE "[ RENDER FOR SIMPLIFIED PRESETS ]:" 1 0 1 1
#pragma parameter HSM_RENDER_SIMPLE_MODE " Mode: NORM | BLACK-SCREEN | BLACK-BG | PINK-MASK| BW-MASK" 0 0 4 1
diff --git a/bezel/Mega_Bezel/shaders/base/intro.inc b/bezel/Mega_Bezel/shaders/base/intro.inc
index b730fbb..ad9a917 100644
--- a/bezel/Mega_Bezel/shaders/base/intro.inc
+++ b/bezel/Mega_Bezel/shaders/base/intro.inc
@@ -98,7 +98,6 @@ vec4 GetColorWithIntro(vec4 in_color, vec2 in_coord, in sampler2D in_logo_image_
in_coord.y = HSM_FLIP_VIEWPORT_VERTICAL * HSM_FLIP_CORE_VERTICAL * in_coord.y;
in_coord.x = HSM_FLIP_VIEWPORT_HORIZONTAL * HSM_FLIP_CORE_HORIZONTAL * in_coord.x;
- // in_coord = HSM_RotateCoordinate(in_coord, HSM_ROTATE_CORE_IMAGE);
if (HSM_ROTATE_CORE_IMAGE > 0.5)
{
in_coord.xy = in_coord.yx;
@@ -288,7 +287,7 @@ void main()
FragColor = GetColorWithIntro(FragColor, viewport_coord_adjusted, IntroImage);
#endif
- bool cache_info_changed = HSM_CheckCacheInfoChanged();
+ bool cache_info_changed = CACHE_INFO_CHANGED;
bool cache_updated = cache_info_changed || HSM_CACHE_GRAPHICS_ON == 0;
bool show_update_indicator = (HSM_CACHE_UPDATE_INDICATOR_MODE == 2 && HSM_CACHE_GRAPHICS_ON == 0) || (HSM_CACHE_UPDATE_INDICATOR_MODE == 1 && cache_info_changed);
diff --git a/bezel/Mega_Bezel/shaders/base/post-crt-prep-potato.slang b/bezel/Mega_Bezel/shaders/base/post-crt-prep-potato.slang
index 0551443..05d6331 100644
--- a/bezel/Mega_Bezel/shaders/base/post-crt-prep-potato.slang
+++ b/bezel/Mega_Bezel/shaders/base/post-crt-prep-potato.slang
@@ -151,7 +151,7 @@ void main()
if (SCREEN_COORD.x < -0.01 || SCREEN_COORD.x > 1.01 || SCREEN_COORD.y < -0.01 || SCREEN_COORD.y > 1.01)
{
vec4 feedback_color_test = texture(PassFeedback, vec2(0,0));
- if (HSM_CACHE_GRAPHICS_ON > 0.5 && feedback_color_test.a < 0 && !HSM_CheckCacheInfoChanged())
+ if (HSM_CACHE_GRAPHICS_ON > 0.5 && feedback_color_test.a < 0 && !CACHE_INFO_CHANGED)
{
FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD);
return;
diff --git a/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc b/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc
index ad692ed..ea539d8 100644
--- a/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc
+++ b/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc
@@ -246,7 +246,8 @@ vec4 HSM_GetPostCrtPreppedColor(vec4 in_color_with_gamma, vec2 VIEWPORT_COORD, v
diffuse_coord = (diffuse_coord - 0.5) / (HSM_TUBE_DIFFUSE_IMAGE_SCALE * vec2(HSM_TUBE_DIFFUSE_IMAGE_SCALE_X, 1)) + 0.5;
- tube_diffuse = HSM_GetMipmappedTexSample(TubeDiffuseImage, diffuse_coord, TUBE_SCALE * HSM_TUBE_DIFFUSE_IMAGE_SCALE, 0);
+ // HSM_RotateCoordinate(diffuse_coord, HSM_TUBE_DIFFUSE_IMAGE_ROTATION)
+ tube_diffuse = HSM_GetMipmappedTexSample(TubeDiffuseImage, HSM_RotateCoordinate(diffuse_coord, HSM_TUBE_DIFFUSE_IMAGE_ROTATION), TUBE_SCALE * HSM_TUBE_DIFFUSE_IMAGE_SCALE, 0);
tube_diffuse.rgb = HSM_GLOBAL_GRAPHICS_BRIGHTNESS * HSM_GetPreMultipliedColorLinear(vec4(tube_diffuse.rgb, 1), SOURCE_MATTE_PREMULTIPLIED, DEFAULT_SRGB_GAMMA).rgb;
tube_diffuse.rgb = HSM_ApplyHSVAdjustment(tube_diffuse.rgb, HSM_TUBE_DIFFUSE_IMAGE_HUE, HSM_TUBE_DIFFUSE_IMAGE_SATURATION, HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS, HSM_TUBE_DIFFUSE_IMAGE_COLORIZE_ON, HSM_TUBE_DIFFUSE_IMAGE_GAMMA);
tube_diffuse.rgb *= HSM_TUBE_DIFFUSE_IMAGE_AMOUNT;
@@ -369,21 +370,33 @@ void main()
HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
// Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
- HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
- TUBE_DIFFUSE_SCALE,
- TUBE_SCALE,
- TUBE_DIFFUSE_ASPECT,
- false,
- BEZEL_OUTSIDE_SCALE,
- BEZEL_OUTSIDE_COORD,
- BEZEL_OUTSIDE_CURVED_COORD,
- FRAME_OUTSIDE_CURVED_COORD);
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ vec2 cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
- FRAME_OUTSIDE_CURVED_COORD = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
- if (FRAME_OUTSIDE_CURVED_COORD.x < -0.01 || FRAME_OUTSIDE_CURVED_COORD.x > 1.01 || FRAME_OUTSIDE_CURVED_COORD.y < -0.01 || FRAME_OUTSIDE_CURVED_COORD.y > 1.01)
+ if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
{
- FragColor = vec4(0);
- return;
+ FragColor = vec4(0);
+ return;
+ }
+ else
+ {
+ // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
+ HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ false,
+ BEZEL_OUTSIDE_SCALE,
+ BEZEL_OUTSIDE_COORD,
+ BEZEL_OUTSIDE_CURVED_COORD,
+ FRAME_OUTSIDE_CURVED_COORD);
}
vec2 screen_curved_coord = HSM_GetCurvedCoord(SCREEN_COORD, 1, SCREEN_ASPECT);
diff --git a/bezel/Mega_Bezel/shaders/base/reflection.inc b/bezel/Mega_Bezel/shaders/base/reflection.inc
index 945716c..c0a7c9b 100644
--- a/bezel/Mega_Bezel/shaders/base/reflection.inc
+++ b/bezel/Mega_Bezel/shaders/base/reflection.inc
@@ -404,7 +404,7 @@ void main()
// vec2 reflection_image_coord = BACKGROUND_CURVED_COORD;
// vec2 reflection_image_scale = BACKGROUND_SCALE;
- // if (HSM_REFLECT_MASK_SCALE_MODE == 1)
+ // if (HSM_REFLECT_MASK_FOLLOW_LAYER == 1)
// {
// reflection_image_coord = DEVICE_CURVED_COORD;
// reflection_image_scale = DEVICE_SCALE;
diff --git a/bezel/Mega_Bezel/shaders/base/text-resolution.inc b/bezel/Mega_Bezel/shaders/base/text-resolution.inc
index 6240844..48a6e60 100644
--- a/bezel/Mega_Bezel/shaders/base/text-resolution.inc
+++ b/bezel/Mega_Bezel/shaders/base/text-resolution.inc
@@ -406,7 +406,7 @@ float DrawResolutions(vec2 uv, vec2 viewport_size, vec2 screen_size, vec2 dereze
col += GetChar(ch_1, uv);
col += GetChar(ch_per, uv);
- col += GetChar(ch_2, uv);
+ col += GetChar(ch_4, uv);
col += GetChar(ch_per, uv);
col += GetChar(ch_0, uv);
col += GetChar(ch_spc, uv);
@@ -420,8 +420,8 @@ float DrawResolutions(vec2 uv, vec2 viewport_size, vec2 screen_size, vec2 dereze
col += GetChar(ch_0, uv);
col += GetChar(ch_9, uv);
col += GetChar(ch_dsh, uv);
- col += GetChar(ch_1, uv);
- col += GetChar(ch_1, uv);
+ col += GetChar(ch_2, uv);
+ col += GetChar(ch_6, uv);
// Line 01 Title ----------------------------------------------------------
diff --git a/bezel/Mega_Bezel/shaders/base/text.inc b/bezel/Mega_Bezel/shaders/base/text.inc
index b1340fb..07df2ca 100644
--- a/bezel/Mega_Bezel/shaders/base/text.inc
+++ b/bezel/Mega_Bezel/shaders/base/text.inc
@@ -95,7 +95,7 @@ void main()
FragColor = vec4(0);
vec4 feedback_color_test = texture(PassFeedback, vec2(0,0));
- if (feedback_color_test.a < 0 && !HSM_CheckCacheInfoChanged())
+ if (feedback_color_test.a < 0 && !CACHE_INFO_CHANGED)
{
FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD);
return;
diff --git a/bezel/Mega_Bezel/shaders/dedither/dedither-gamma-prep-1-before.slang b/bezel/Mega_Bezel/shaders/dedither/dedither-gamma-prep-1-before.slang
new file mode 100644
index 0000000..b820d71
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/dedither/dedither-gamma-prep-1-before.slang
@@ -0,0 +1,68 @@
+#version 450
+
+/*
+ Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel
+ Copyright (C) 2019-2022 HyperspaceMadness - HyperspaceMadness@outlook.com
+
+ Incorporates much great feedback from the libretro forum, and thanks
+ to Hunterk who helped me get started
+
+ See more at the libretro forum
+ https://forums.libretro.com/t/hsm-mega-bezel-reflection-shader-feedback-and-updates
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include "../base/common/globals-and-screen-scale-params.inc"
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float HSM_DEDITHER_MODE;
+ float HSM_DEDITHER_BRIGHTNESS_BIAS;
+} params;
+
+#pragma parameter HSM_DEDITHERING_TITLE "[ --- MDAPT & HYLLIAN DE-DITHERING --- ]:" 0 0 0.01 0.01
+
+#pragma parameter HSM_DEDITHER_MODE "Mode: OFF| STRICT | RELAXED | HYLLIAN | HYL + STRIPES | STRIPES" 0 0 5 1
+#define HSM_DEDITHER_MODE params.HSM_DEDITHER_MODE
+
+#pragma parameter HSM_DEDITHER_BRIGHTNESS_BIAS " Transparency Brightness Bias" 100 10 300 5
+#define HSM_DEDITHER_BRIGHTNESS_BIAS params.HSM_DEDITHER_BRIGHTNESS_BIAS * 0.013
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ FragColor = texture(Source, vTexCoord);
+ if (HSM_DEDITHER_MODE > 0.5)
+ FragColor = HSM_Linearize(texture(Source, vTexCoord), HSM_DEDITHER_BRIGHTNESS_BIAS);
+}
\ No newline at end of file
diff --git a/bezel/Mega_Bezel/shaders/dedither/dedither-gamma-prep-2-after.slang b/bezel/Mega_Bezel/shaders/dedither/dedither-gamma-prep-2-after.slang
new file mode 100644
index 0000000..9a50ac5
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/dedither/dedither-gamma-prep-2-after.slang
@@ -0,0 +1,68 @@
+#version 450
+
+/*
+ Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel
+ Copyright (C) 2019-2022 HyperspaceMadness - HyperspaceMadness@outlook.com
+
+ Incorporates much great feedback from the libretro forum, and thanks
+ to Hunterk who helped me get started
+
+ See more at the libretro forum
+ https://forums.libretro.com/t/hsm-mega-bezel-reflection-shader-feedback-and-updates
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include "../base/common/globals-and-screen-scale-params.inc"
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float HSM_DEDITHER_MODE;
+ float HSM_DEDITHER_BRIGHTNESS_BIAS;
+} params;
+
+#pragma parameter HSM_DEDITHERING_TITLE "[ --- MDAPT & HYLLIAN DE-DITHERING --- ]:" 0 0 0.01 0.01
+
+#pragma parameter HSM_DEDITHER_MODE "Mode: OFF| STRICT | RELAXED | HYLLIAN | HYL + STRIPES | STRIPES" 0 0 5 1
+#define HSM_DEDITHER_MODE params.HSM_DEDITHER_MODE
+
+#pragma parameter HSM_DEDITHER_BRIGHTNESS_BIAS " Transparency Brightness Bias" 100 10 300 5
+#define HSM_DEDITHER_BRIGHTNESS_BIAS params.HSM_DEDITHER_BRIGHTNESS_BIAS * 0.013
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ FragColor = texture(Source, vTexCoord);
+ if (HSM_DEDITHER_MODE > 0.5)
+ FragColor = HSM_Delinearize(texture(Source, vTexCoord), HSM_DEDITHER_BRIGHTNESS_BIAS);
+}
\ No newline at end of file
diff --git a/bezel/Mega_Bezel/shaders/easymode/hsm-crt-easymode-halation.inc b/bezel/Mega_Bezel/shaders/easymode/hsm-crt-easymode-halation.inc
index 406cecf..d22a946 100644
--- a/bezel/Mega_Bezel/shaders/easymode/hsm-crt-easymode-halation.inc
+++ b/bezel/Mega_Bezel/shaders/easymode/hsm-crt-easymode-halation.inc
@@ -34,7 +34,7 @@ layout(push_constant) uniform Push
// #pragma parameter GAMMA_OUTPUT " Gamma Output" 2.2 0.1 5.0 0.01
#pragma parameter ESM_EASYMODE_TITLE "[ --- EASYMODE--- ]:" 0 0 0 1
#pragma parameter ESM_SCANLINE_TITLE "[ SCANLINE ]:" 0 0 0 1
-#pragma parameter ESM_INTERLACING_TOGGLE "[EASYMODE SCANLINE] Interlace ON" 0 0.0 1.0 1.0
+// #pragma parameter ESM_INTERLACING_TOGGLE "[EASYMODE SCANLINE] Interlace ON" 0 0.0 1.0 1.0
#pragma parameter ESM_SCANLINE_STRENGTH_MIN " Strength Min." 0.2 0.0 1.0 0.05
#pragma parameter ESM_SCANLINE_STRENGTH_MAX " Strength Max." 0.4 0.0 1.0 0.05
#pragma parameter ESM_SCANLINE_BEAM_MIN " Beam Min." 1.0 0.25 5.0 0.05
@@ -62,7 +62,7 @@ layout(push_constant) uniform Push
// #pragma parameter GEOM_CORNER_SMOOTH "Geom Corner Smoothness" 150.0 50.0 1000.0 25.0
// #pragma parameter ESM_INTERLACING_TOGGLE " Interlacing Toggle" 1.0 0.0 1.0 1.0
-// REMOVED FOR MEGA SCREEN SCALE because MEGA SCREEN SCALE has its own globals, required variables moved to params
+// HSM REMOVED
/* Removed the following
layout(std140, set = 0, binding = 0) uniform UBO
{
@@ -181,14 +181,35 @@ void main()
vec2 tex_size = CROPPED_ROTATED_SIZE_WITH_RES_MULT;
// End Addition
+ vec2 cache_bounds_coord = SCREEN_COORD;
+
+// If it's the potato preset render the whole frame
+#ifndef IS_POTATO_PRESET
+#ifndef IS_NO_REFLECT_PRESET
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
+#endif
+#endif
+
+ if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
+ {
+ FragColor = vec4(0);
+ return;
+ }
+
vec2 midpoint = vec2(0.5, 0.5);
- float scan_offset = 0.0;
+ float scan_offset = 0;
float timer = vec2(global.FrameCount, global.FrameCount).x;
- // HSM Removed
- // if (params.ESM_INTERLACING_TOGGLE > 0.5 && global.SourceSize.y >= 400)
-
- if (params.ESM_INTERLACING_TOGGLE > 0.5 && tex_size.y >= HSM_INTERLACE_TRIGGER_RES)
+ /* HSM Removed
+ if (params.ESM_INTERLACING_TOGGLE > 0.5 && global.SourceSize.y >= 400)
{
tex_size.y *= 0.5;
@@ -200,7 +221,6 @@ void main()
else midpoint.y = 0.25;
}
- /* HSM Removed
vec2 co = vTexCoord * tex_size * global.SourceSize.zw;
vec2 xy = curve_coordinate(co, params.GEOM_WARP);
float corner_weight = get_corner_weight(curve_coordinate(co, params.GEOM_CURVATURE), vec2(params.GEOM_CORNER_SIZE), params.GEOM_CORNER_SMOOTH);
diff --git a/bezel/Mega_Bezel/shaders/guest/guest-extras/hsm-g-sharp_resampler.slang b/bezel/Mega_Bezel/shaders/guest/extras/hsm-g-sharp_resampler.slang
similarity index 100%
rename from bezel/Mega_Bezel/shaders/guest/guest-extras/hsm-g-sharp_resampler.slang
rename to bezel/Mega_Bezel/shaders/guest/extras/hsm-g-sharp_resampler.slang
diff --git a/bezel/Mega_Bezel/shaders/guest/extras/hsm-sharpsmoother.slang b/bezel/Mega_Bezel/shaders/guest/extras/hsm-sharpsmoother.slang
new file mode 100644
index 0000000..053fc94
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/guest/extras/hsm-sharpsmoother.slang
@@ -0,0 +1,137 @@
+#version 450
+
+/*
+ Sharpsmoother shader
+
+ Copyright (C) 2005-2017 guest(r) - guest.r@gmail.com
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float max_w;
+ float min_w;
+ float smoot;
+ float lumad;
+ float mtric;
+ float SHARPSMOOTHER_ON;
+} params;
+
+// Original Values:
+// max_w = "0.1"
+// min_w = "-0.07"
+// smoot = "0.55"
+// lumad = "0.3"
+// mtric = "0.7"
+
+// New default values tuned by Hyllian
+#pragma parameter SHARPSMOOTHER_TITLE "[ --- SHARPSMOOTHER by Guest.r --- ] " 0 0 0.0.001 0.001
+#pragma parameter SHARPSMOOTHER_ON " SharpSmoother ON" 0 0 1 1
+#define SHARPSMOOTHER_ON params.SHARPSMOOTHER_ON
+
+#pragma parameter max_w " Max filter weight" 0.05 0.00 0.20 0.01
+#pragma parameter min_w " Min filter weight" 0.00 -0.15 0.05 0.01
+#pragma parameter smoot " Smoothing strength" 0.4 0.00 1.50 0.01
+#pragma parameter lumad " Effects smoothing" 0.5 0.10 5.00 0.10
+#pragma parameter mtric " Metric Used" 0.3 0.10 2.00 0.10
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+} global;
+
+vec3 dt = vec3(1.0, 1.0, 1.0);
+
+
+float wt(vec3 A, vec3 B)
+{
+ return clamp(params.smoot - ((6.0+params.lumad)/pow(3.0,params.mtric))*pow(dot(pow(abs(A-B),vec3(1.0/params.mtric)),dt),params.mtric)/(dot(A+B,dt)+params.lumad), params.min_w, params.max_w);
+}
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+layout(location = 1) out vec4 t1;
+layout(location = 2) out vec4 t2;
+layout(location = 3) out vec4 t3;
+layout(location = 4) out vec4 t4;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+
+ if (SHARPSMOOTHER_ON < 0.5)
+ {
+ return;
+ }
+
+ float x = 1.0 * (1.0 / params.SourceSize.x);
+ float y = 1.0 * (1.0 / params.SourceSize.y);
+ vec2 dg1 = vec2( x, y);
+ vec2 dg2 = vec2(-x, y);
+ vec2 dx = vec2(x, 0.0);
+ vec2 dy = vec2(0.0, y);
+ t1 = vec4(vTexCoord.xy-dg1,vTexCoord.xy-dy);
+ t2 = vec4(vTexCoord.xy-dg2,vTexCoord.xy+dx);
+ t3 = vec4(vTexCoord.xy+dg1,vTexCoord.xy+dy);
+ t4 = vec4(vTexCoord.xy+dg2,vTexCoord.xy-dx);
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 1) in vec4 t1;
+layout(location = 2) in vec4 t2;
+layout(location = 3) in vec4 t3;
+layout(location = 4) in vec4 t4;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ if (SHARPSMOOTHER_ON < 0.5)
+ {
+ FragColor = texture(Source, vTexCoord);
+ return;
+ }
+
+ vec3 c00 = texture(Source, t1.xy).xyz;
+ vec3 c10 = texture(Source, t1.zw).xyz;
+ vec3 c20 = texture(Source, t2.xy).xyz;
+ vec3 c01 = texture(Source, t4.zw).xyz;
+ vec3 c11 = texture(Source, vTexCoord.xy).xyz;
+ vec3 c21 = texture(Source, t2.zw).xyz;
+ vec3 c02 = texture(Source, t4.xy).xyz;
+ vec3 c12 = texture(Source, t3.zw).xyz;
+ vec3 c22 = texture(Source, t3.xy).xyz;
+
+ float w10 = wt(c11,c10);
+ float w21 = wt(c11,c21);
+ float w12 = wt(c11,c12);
+ float w01 = wt(c11,c01);
+ float w00 = wt(c11,c00)*0.75;
+ float w22 = wt(c11,c22)*0.75;
+ float w20 = wt(c11,c20)*0.75;
+ float w02 = wt(c11,c02)*0.75;
+
+ FragColor = vec4(w10*c10+w21*c21+w12*c12+w01*c01+w00*c00+w22*c22+w20*c20+w02*c02+(1.0-w10-w21-w12-w01-w00-w22-w20-w02)*c11, 1.0);
+}
\ No newline at end of file
diff --git a/bezel/Mega_Bezel/shaders/guest/hsm-crt-dariusg-gdv-mini.inc b/bezel/Mega_Bezel/shaders/guest/hsm-crt-dariusg-gdv-mini.inc
index da5ff4c..42e0bd6 100644
--- a/bezel/Mega_Bezel/shaders/guest/hsm-crt-dariusg-gdv-mini.inc
+++ b/bezel/Mega_Bezel/shaders/guest/hsm-crt-dariusg-gdv-mini.inc
@@ -260,21 +260,19 @@ void main()
// If it's the potato preset render the whole frame
#ifndef IS_POTATO_PRESET
#ifndef IS_NO_REFLECT_PRESET
- // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
- HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
- TUBE_DIFFUSE_SCALE,
- TUBE_SCALE,
- SCREEN_ASPECT,
- false,
- BEZEL_OUTSIDE_SCALE,
- BEZEL_OUTSIDE_COORD,
- BEZEL_OUTSIDE_CURVED_COORD,
- FRAME_OUTSIDE_CURVED_COORD);
- cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
#endif
#endif
- if (cache_bounds_coord.x < -0.01 || cache_bounds_coord.x > 1.01 || cache_bounds_coord.y < -0.01 || cache_bounds_coord.y > 1.01)
+ if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
{
FragColor = vec4(0);
return;
diff --git a/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.inc b/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.inc
index 6dc6a3e..6cb3fe5 100644
--- a/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.inc
+++ b/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced-ntsc-pass2.inc
@@ -249,17 +249,15 @@ void main()
// If it's the potato preset render the whole frame
#ifndef IS_POTATO_PRESET
#ifndef IS_NO_REFLECT_PRESET
- // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
- HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
- TUBE_DIFFUSE_SCALE,
- TUBE_SCALE,
- SCREEN_ASPECT,
- false,
- BEZEL_OUTSIDE_SCALE,
- BEZEL_OUTSIDE_COORD,
- BEZEL_OUTSIDE_CURVED_COORD,
- FRAME_OUTSIDE_CURVED_COORD);
- cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
#endif
#endif
diff --git a/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced.inc b/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced.inc
index a84abc3..cb7ac5a 100644
--- a/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced.inc
+++ b/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced.inc
@@ -252,17 +252,15 @@ void main()
// If it's the potato preset render the whole frame
#ifndef IS_POTATO_PRESET
#ifndef IS_NO_REFLECT_PRESET
- // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
- HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
- TUBE_DIFFUSE_SCALE,
- TUBE_SCALE,
- SCREEN_ASPECT,
- false,
- BEZEL_OUTSIDE_SCALE,
- BEZEL_OUTSIDE_COORD,
- BEZEL_OUTSIDE_CURVED_COORD,
- FRAME_OUTSIDE_CURVED_COORD);
- cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
#endif
#endif
diff --git a/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass1.slang b/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass1.slang
index 76ad9d7..eaacf96 100644
--- a/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass1.slang
+++ b/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass1.slang
@@ -15,15 +15,17 @@ layout(std140, set = 0, binding = 0) uniform UBO
float quality, ntsc_sat, cust_fringing, cust_artifacting, ntsc_bright, ntsc_scale, ntsc_fields, ntsc_phase, ntsc_sharp;
} global;
-#pragma parameter ntsc_title "[ NTSC ]:" 0 0 0.1 0.1
-#pragma parameter quality " NTSC Preset: S-Video | Composite | RF | Custom:-1 -- quality" 1.0 -1.0 2.0 1.0
-#pragma parameter ntsc_fields " NTSC Merge Fields" 0.0 0.0 1.0 1.0
-#pragma parameter ntsc_phase " NTSC Phase: Auto | 2 phase | 3 phase" 1.0 1.0 3.0 1.0
-#pragma parameter ntsc_scale " NTSC Resolution Scaling" 1.0 0.20 2.5 0.01
-#pragma parameter ntsc_sat " NTSC Color Saturation" 1.0 0.0 2.0 0.01
-#pragma parameter ntsc_bright " NTSC Brightness" 1.0 0.0 1.5 0.01
-#pragma parameter cust_fringing " NTSC Custom Fringing Value (When NTSC Preset = -1)" 0.0 0.0 5.0 0.1
-#pragma parameter cust_artifacting " NTSC Custom Artifacting Value (When NTSC Preset = -1)" 0.0 0.0 5.0 0.1
+#pragma parameter ntsc_title "[ NTSC ]:" 0 0 0.01 0.01
+#pragma parameter ntsc_sat " Color Saturation" 1.0 0.0 2.0 0.01
+#pragma parameter ntsc_bright " Brightness" 1.0 0.0 1.5 0.01
+#pragma parameter ntsc_quality_title " [ NTSC QUALITY ]:" 0 0 0.01 0.01
+#pragma parameter quality " Preset: S-Video | Composite | RF | Custom:-1 -- quality" 1.0 -1.0 2.0 1.0
+#pragma parameter ntsc_phase " Phase: Auto | 2 phase | 3 phase" 1.0 1.0 3.0 1.0
+#pragma parameter ntsc_scale " Resolution Scaling" 1.0 0.20 2.5 0.01
+#pragma parameter ntsc_custom_title " [ NTSC Custom Options]:" 0 0 0.01 0.01
+#pragma parameter ntsc_fields " Merge Fields" 0.0 0.0 1.0 1.0
+#pragma parameter cust_fringing " Fringing" 0.0 0.0 5.0 0.1
+#pragma parameter cust_artifacting " Artifacting" 0.0 0.0 5.0 0.1
#define PI 3.14159265
diff --git a/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass2.slang b/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass2.slang
index 803ff16..3bb047d 100644
--- a/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass2.slang
+++ b/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass2.slang
@@ -16,8 +16,8 @@ layout(std140, set = 0, binding = 0) uniform UBO
float auto_res;
} global;
-#pragma parameter ntsc_scale " NTSC Resolution Scaling" 1.0 0.20 2.5 0.01
-#pragma parameter ntsc_phase " NTSC Phase: Auto | 2 phase | 3 phase" 1.0 1.0 3.0 1.0
+#pragma parameter ntsc_phase " Phase: Auto | 2 phase | 3 phase" 1.0 1.0 3.0 1.0
+#pragma parameter ntsc_scale " Resolution Scaling" 1.0 0.20 2.5 0.01
#pragma stage vertex
layout(location = 0) in vec4 Position;
diff --git a/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass3.slang b/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass3.slang
index c9b4ba9..f1b88bd 100644
--- a/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass3.slang
+++ b/bezel/Mega_Bezel/shaders/guest/ntsc/hsm-ntsc-pass3.slang
@@ -16,9 +16,10 @@ layout(std140, set = 0, binding = 0) uniform UBO
float blendMode;
} global;
-#pragma parameter ntsc_sharp " NTSC Sharpness (Negative: Adaptive)" 0.0 -10.0 10.0 0.50
-#pragma parameter ntsc_shape " NTSC Sharpness Shape" 0.75 0.5 1.0 0.05
-#pragma parameter blendMode " NTSC Blend Mode (Main Mode Control)" 1.0 0.0 1.0 1.0
+#pragma parameter ntsc_sharpness_title " [ NTSC SHARPNESS ]:" 0 0 0.01 0.01
+#pragma parameter ntsc_sharp " Sharpness (Negative: Adaptive)" 0.0 -10.0 10.0 0.50
+#pragma parameter ntsc_shape " Sharpness Shape" 0.75 0.5 1.0 0.05
+#pragma parameter blendMode " Blend Mode (Main Mode Control)" 1.0 0.0 1.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
diff --git a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
index 97d981e..a05c239 100644
--- a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
+++ b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
@@ -84,41 +84,37 @@ void main()
return;
}
- vec2 dx = vec2(1.0, 0.0)*params.SourceSize.zw;
- vec2 dy = vec2(0.0, 1.0)*params.SourceSize.zw;
+ vec2 dx = vec2(1.0, 0.0)*params.SourceSize.zw;
+ vec2 dy = vec2(0.0, 1.0)*params.SourceSize.zw;
- // Reading the texels.
- vec3 C = texture(Source, vTexCoord ).xyz;
- vec3 L = texture(Source, vTexCoord -dx).xyz;
- vec3 R = texture(Source, vTexCoord +dx).xyz;
- vec3 U = texture(Source, vTexCoord -dy).xyz;
- vec3 D = texture(Source, vTexCoord +dy).xyz;
- vec3 UL = texture(Source, vTexCoord -dx -dy).xyz;
- vec3 UR = texture(Source, vTexCoord +dx -dy).xyz;
- vec3 DL = texture(Source, vTexCoord -dx +dy).xyz;
- vec3 DR = texture(Source, vTexCoord +dx +dy).xyz;
+ // Reading the texels.
+ vec3 C = texture(Source, vTexCoord ).xyz;
+ vec3 L = texture(Source, vTexCoord -dx).xyz;
+ vec3 R = texture(Source, vTexCoord +dx).xyz;
+ vec3 U = texture(Source, vTexCoord -dy).xyz;
+ vec3 D = texture(Source, vTexCoord +dy).xyz;
+ vec3 UL = texture(Source, vTexCoord -dx -dy).xyz;
+ vec3 UR = texture(Source, vTexCoord +dx -dy).xyz;
+ vec3 DL = texture(Source, vTexCoord -dx +dy).xyz;
+ vec3 DR = texture(Source, vTexCoord +dx +dy).xyz;
- vec3 color = C;
+ vec3 color = C;
- // Get min/max samples
- vec3 min_sample = min_s(C, L, R);
- vec3 max_sample = max_s(C, L, R);
+ if (CD_BLEND_OPTION == 1)
+ {
+ float diff = dot(max(C, max(L, R)) - min(C, min(L, R)), Y);
- float diff = dot(max(max(C, L), max(C, R)) - min(min(C, L), min(C, R)), Y);
+ diff *= (1.0 - CD_BLEND_LEVEL);
- diff *= (1.0 - CD_BLEND_LEVEL);
+ vec3 min_sample = max(min_s(C, L, R), min_s(C, U, D));
+ vec3 max_sample = min(max_s(C, L, R), max_s(C, U, D));
- if (CD_BLEND_OPTION == 1)
- {
- min_sample = max(min_sample, min_s(C, U, D));
- max_sample = min(max_sample, max_s(C, U, D));
+ color = 0.5*( 1.0 + diff )*C + 0.125*( 1.0 - diff )*(L + R + U + D);
- color = 0.5*( 1.0 + diff )*C + 0.125*( 1.0 - diff )*(L + R + U + D);
- }
+ color = clamp(color, min_sample, max_sample);
+ }
- color = clamp(color, min_sample, max_sample);
+ float luma_diff = abs(dot(C, Y)-dot(color, Y));
- float luma_diff = abs(dot(C, Y)-dot(color, Y));
-
- FragColor = vec4(color, luma_diff);
+ FragColor = vec4(color, luma_diff);
}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
index 48b43b6..ceeb1b2 100644
--- a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
+++ b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
@@ -42,15 +42,14 @@ layout(push_constant) uniform Push
#pragma parameter CD_BLEND_LEVEL " Dedither Blend Amount" 1.0 0.0 1.0 0.02
#define CD_BLEND_LEVEL params.CD_BLEND_LEVEL
+#define PATTERN(A) step(Delta,A)
+
const float Delta = 0.000000001;
const vec3 Y = vec3( 0.299, 0.587, 0.114);
-vec3 min_s(vec3 central, vec3 adj1, vec3 adj2) {return min(central, max(adj1, adj2));}
-vec3 max_s(vec3 central, vec3 adj1, vec3 adj2) {return max(central, min(adj1, adj2));}
-
layout(std140, set = 0, binding = 0) uniform UBO
{
- mat4 MVP;
+ mat4 MVP;
} global;
@@ -79,53 +78,74 @@ void main()
return;
}
- vec2 dx = vec2(1.0, 0.0)*params.SourceSize.zw;
- vec2 dy = vec2(0.0, 1.0)*params.SourceSize.zw;
+ vec2 dx = vec2(1.0, 0.0)*params.SourceSize.zw;
+ vec2 dy = vec2(0.0, 1.0)*params.SourceSize.zw;
- // Reading the texels.
- vec4 C = texture(Source, vTexCoord );
- vec4 L = texture(Source, vTexCoord -dx );
- vec4 R = texture(Source, vTexCoord +dx );
- vec4 U = texture(Source, vTexCoord -dy);
- vec4 D = texture(Source, vTexCoord +dy);
- vec4 UL = texture(Source, vTexCoord -dx -dy);
- vec4 UR = texture(Source, vTexCoord +dx -dy);
- vec4 DL = texture(Source, vTexCoord -dx +dy);
- vec4 DR = texture(Source, vTexCoord +dx +dy);
+ // Reading the texels.
+ vec4 C = texture(Source, vTexCoord );
+ vec4 L = texture(Source, vTexCoord -dx );
+ vec4 R = texture(Source, vTexCoord +dx );
+ vec4 U = texture(Source, vTexCoord -dy);
+ vec4 D = texture(Source, vTexCoord +dy);
+ vec4 UL = texture(Source, vTexCoord -dx -dy);
+ vec4 UR = texture(Source, vTexCoord +dx -dy);
+ vec4 DL = texture(Source, vTexCoord -dx +dy);
+ vec4 DR = texture(Source, vTexCoord +dx +dy);
- vec3 color = C.rgb;
+ vec4 L2 = texture(Source, vTexCoord -2.0*dx );
+ vec4 R2 = texture(Source, vTexCoord +2.0*dx );
+ vec4 U2 = texture(Source, vTexCoord -2.0*dy);
+ vec4 D2 = texture(Source, vTexCoord +2.0*dy);
- vec3 oriC = texture(LinearGamma, vTexCoord ).rgb;
- vec3 oriL = texture(LinearGamma, vTexCoord -dx ).rgb;
- vec3 oriR = texture(LinearGamma, vTexCoord +dx ).rgb;
- vec3 oriU = texture(LinearGamma, vTexCoord -dy).rgb;
- vec3 oriD = texture(LinearGamma, vTexCoord +dy).rgb;
+ vec4 UL2 = texture(Source, vTexCoord -2.0*dx -dy);
+ vec4 UR2 = texture(Source, vTexCoord +2.0*dx -dy);
+ vec4 DL2 = texture(Source, vTexCoord -2.0*dx +dy);
+ vec4 DR2 = texture(Source, vTexCoord +2.0*dx +dy);
- float count1 = 0.0;
- float count2 = 0.0;
+ vec4 LU2 = texture(Source, vTexCoord -dx -2.0*dy);
+ vec4 RU2 = texture(Source, vTexCoord +dx -2.0*dy);
+ vec4 LD2 = texture(Source, vTexCoord -dx +2.0*dy);
+ vec4 RD2 = texture(Source, vTexCoord +dx -2.0*dy);
- float diff = (1.0 - CD_BLEND_LEVEL);
+ vec3 color = C.rgb;
-// UL U UR
-// L C R
-// DL D DR
+ vec3 oriC = texture(LinearGamma, vTexCoord ).rgb;
+ vec3 oriL = texture(LinearGamma, vTexCoord -dx ).rgb;
+ vec3 oriR = texture(LinearGamma, vTexCoord +dx ).rgb;
+ vec3 oriU = texture(LinearGamma, vTexCoord -dy).rgb;
+ vec3 oriD = texture(LinearGamma, vTexCoord +dy).rgb;
- count1 += (step(Delta, L.a*D.a*R.a));
- count1 += (step(Delta, L.a*U.a*R.a));
- count1 += (step(Delta, L.a*UL.a*R.a*UR.a + L.a*DL.a*R.a*DR.a));
+ float count1 = 0.0;
+ float count2 = 0.0;
- count2 += (step(Delta, U.a*L.a*D.a));
- count2 += (step(Delta, U.a*R.a*D.a));
- count2 += (step(Delta, U.a*UR.a*D.a*DR.a + D.a*DL.a*U.a*UL.a));
+ float diff = (1.0 - CD_BLEND_LEVEL);
- if ((count1 * count2) > 0.0)
- color = 0.5*(1.0+diff)*oriC + 0.125*(1.0-diff)*(oriL + oriR + oriU + oriD);
- else if (count1 > 0.0)
- color = 0.5*(1.0+diff)*oriC + 0.25*(1.0-diff)*(oriL + oriR);
- else if (count2 > 0.0)
- color = 0.5*(1.0+diff)*oriC + 0.25*(1.0-diff)*(oriU + oriD);
+// LU2 U2 RU2
+// UL2 UL U UR UR2
+// L2 L C R R2
+// DL2 DL D DR DR2
+// LD2 D2 RD2
- float luma_diff = abs(dot(oriC, Y)-dot(color, Y));
+ count1 += PATTERN(L.a*D.a*R.a);
+ count1 += PATTERN(L.a*U.a*R.a);
+ count1 += PATTERN(L.a*UL.a*R.a*UR.a + L.a*DL.a*R.a*DR.a);
- FragColor = vec4(color, luma_diff);
+ count1 += PATTERN(U.a*D2.a*(UL.a*LD2.a + UR.a*RD2.a) + U2.a*D.a*(LU2.a*DL.a + RU2.a*DR.a));
+
+ count2 += PATTERN(U.a*L.a*D.a);
+ count2 += PATTERN(U.a*R.a*D.a);
+ count2 += PATTERN(U.a*UR.a*D.a*DR.a + D.a*DL.a*U.a*UL.a);
+
+ count2 += PATTERN(L.a*R2.a*(DL.a*DR2.a + UL.a*UR2.a) + L2.a*R.a*(DL2.a*DR.a + UL2.a*UR.a));
+
+ if ((count1 * count2) > 0.0 && count1 == count2)
+ color = 0.5*(1.0+diff)*oriC + 0.125*(1.0-diff)*(oriL + oriR + oriU + oriD);
+ else if (count1 > 0.0 && count1 > count2)
+ color = 0.5*(1.0+diff)*oriC + 0.25*(1.0-diff)*(oriL + oriR);
+ else if (count2 > 0.0 && count2 > count1)
+ color = 0.5*(1.0+diff)*oriC + 0.25*(1.0-diff)*(oriU + oriD);
+
+ float luma_diff = abs(dot(oriC, Y)-dot(color, Y));
+
+ FragColor = vec4(color, luma_diff);
}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
index 4e644cc..4635c2f 100644
--- a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
+++ b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
@@ -32,33 +32,38 @@ layout(push_constant) uniform Push
vec4 OriginalSize;
vec4 OutputSize;
uint FrameCount;
- float CD_HUD_DETAILS;
- float CD_ADJUST_VIEW;
+ float CD_MITIG_NEIGHBRS;
+ float CD_MITIG_LINES;
+ float CD_ADJUST_VIEW;
float HSM_DEDITHER_MODE;
} params;
#pragma parameter HSM_DEDITHER_MODE "Mode: OFF| STRICT | RELAXED | HYLLIAN | HYL + STRIPES | STRIPES" 0 0 5 1
#define HSM_DEDITHER_MODE params.HSM_DEDITHER_MODE
-#pragma parameter CD_HUD_DETAILS " Hyllian Checkerboard Details Threshold" 1.0 0.0 5.0 1.0
-// #pragma parameter CD_ADJUST_VIEW " Hyllian Checkerboard Debug View" 0.0 0.0 1.0 1.0
+#pragma parameter CD_MITIG_NEIGHBRS " Hyllian CB - Reduce Neighbor Errors" 4.0 0.0 4.0 1.0
+// CD_MITIG_NEIGHBRS default 1, changed to 4
+#pragma parameter CD_MITIG_LINES " Hyllian CB - Reduce Region Errors" 1.0 0.0 1.0 1.0
+// CD_MITIG_LINES default 0, changed to 1
+#pragma parameter CD_ADJUST_VIEW " Hyllian CB - Debug View" 0.0 0.0 1.0 1.0
+// #pragma parameter UseGamma " Gamma Slider" 1.0 0.0 1.0 0.1
-#define CD_HUD_DETAILS params.CD_HUD_DETAILS
-#define CD_ADJUST_VIEW 0
+#define CD_MITIG_NEIGHBRS params.CD_MITIG_NEIGHBRS
+#define CD_MITIG_LINES params.CD_MITIG_LINES
+#define CD_ADJUST_VIEW params.CD_ADJUST_VIEW
+// #define UseGamma params.UseGamma
+// #define OuputGamma (UseGamma+1.0)
-#define GAMMA_EXP 2.0
-#define GAMMA_IN(color) pow(color, vec3(GAMMA_EXP, GAMMA_EXP, GAMMA_EXP))
-#define GAMMA_OUT(color) pow(color, vec3(1.0 / GAMMA_EXP, 1.0 / GAMMA_EXP, 1.0 / GAMMA_EXP))
+// #define GAMMA_OUT(color) pow(color, vec3(1.0 / OuputGamma, 1.0 / OuputGamma, 1.0 / OuputGamma))
+
+#define PATTERN(A) step(Delta,A)
const float Delta = 0.000000001;
const vec3 Y = vec3( 0.299, 0.587, 0.114);
-vec3 min_s(vec3 central, vec3 adj1, vec3 adj2) {return min(central, max(adj1, adj2));}
-vec3 max_s(vec3 central, vec3 adj1, vec3 adj2) {return max(central, min(adj1, adj2));}
-
layout(std140, set = 0, binding = 0) uniform UBO
{
- mat4 MVP;
+ mat4 MVP;
} global;
@@ -88,44 +93,71 @@ void main()
}
vec2 dx = vec2(1.0, 0.0)*params.SourceSize.zw;
- vec2 dy = vec2(0.0, 1.0)*params.SourceSize.zw;
+ vec2 dy = vec2(0.0, 1.0)*params.SourceSize.zw;
- // Reading the texels.
- vec4 C = texture(Source, vTexCoord );
- vec4 L = texture(Source, vTexCoord -dx );
- vec4 R = texture(Source, vTexCoord +dx );
- vec4 U = texture(Source, vTexCoord -dy);
- vec4 D = texture(Source, vTexCoord +dy);
- vec4 UL = texture(Source, vTexCoord -dx -dy);
- vec4 UR = texture(Source, vTexCoord +dx -dy);
- vec4 DL = texture(Source, vTexCoord -dx +dy);
- vec4 DR = texture(Source, vTexCoord +dx +dy);
+ // Reading the texels.
+ vec4 C = texture(Source, vTexCoord );
+ vec4 L = texture(Source, vTexCoord -dx );
+ vec4 R = texture(Source, vTexCoord +dx );
+ vec4 U = texture(Source, vTexCoord -dy);
+ vec4 D = texture(Source, vTexCoord +dy);
+ vec4 UL = texture(Source, vTexCoord -dx -dy);
+ vec4 UR = texture(Source, vTexCoord +dx -dy);
+ vec4 DL = texture(Source, vTexCoord -dx +dy);
+ vec4 DR = texture(Source, vTexCoord +dx +dy);
- vec3 color = C.rgb;
+ vec4 L2 = texture(Source, vTexCoord -2.0*dx );
+ vec4 R2 = texture(Source, vTexCoord +2.0*dx );
+ vec4 U2 = texture(Source, vTexCoord -2.0*dy);
+ vec4 D2 = texture(Source, vTexCoord +2.0*dy);
- vec3 oriC = texture(LinearGamma, vTexCoord ).rgb;
+ vec4 L3 = texture(Source, vTexCoord -3.0*dx );
+ vec4 R3 = texture(Source, vTexCoord +3.0*dx );
+ vec4 U3 = texture(Source, vTexCoord -3.0*dy);
+ vec4 D3 = texture(Source, vTexCoord +3.0*dy);
- float count = 0.0;
- float count2 = 0.0;
+ vec3 color = C.rgb;
-// UL U UR
-// L C R
-// DL D DR
+ vec3 oriC = texture(LinearGamma, vTexCoord ).rgb;
- count += step(Delta, L.a);
- count += step(Delta, R.a);
- count += step(Delta, U.a);
- count += step(Delta, D.a);
- count += step(Delta, UL.a*UR.a*DL.a*DR.a);
+ float count = 0.0;
+ float count2 = 0.0;
+ float count3 = 0.0;
- count2 += (step(Delta, L.a*UL.a*U.a + U.a*UR.a*R.a + R.a*DR.a*D.a + D.a*DL.a*L.a));
+// U3
+// U2
+// UL U UR
+// L3 L2 L C R R2 R3
+// DL D DR
+// D2
+// D3
- if ((count < CD_HUD_DETAILS) && (count2 < 1.0))
- color = oriC;
+ count += PATTERN(L.a);
+ count += PATTERN(R.a);
+ count += PATTERN(U.a);
+ count += PATTERN(D.a);
+ count += PATTERN(UL.a*UR.a*DL.a*DR.a);
- float luma_diff = abs(dot(oriC, Y)-dot(color, Y));
+ count2 += PATTERN(L.a*UL.a*U.a + U.a*UR.a*R.a + R.a*DR.a*D.a + D.a*DL.a*L.a);
- color = mix(color, vec3(luma_diff), CD_ADJUST_VIEW);
+ count3 += PATTERN(L3.a*L2.a*L.a);
+ count3 += PATTERN(L2.a*L.a*R.a);
+ count3 += PATTERN(L.a*R.a*R2.a);
+ count3 += PATTERN(R.a*R2.a*R3.a);
+
+ count3 += PATTERN(U3.a*U2.a*U.a);
+ count3 += PATTERN(U2.a*U.a*D.a);
+ count3 += PATTERN(U.a*D.a*D2.a);
+ count3 += PATTERN(D.a*D2.a*D3.a);
+
+ if ((count < CD_MITIG_NEIGHBRS) && (count2 < 1.0))
+ color = oriC;
+ else if ((CD_MITIG_LINES == 1.0) && (count3 < 1.0))
+ color = oriC;
+
+ float luma_diff = abs(dot(oriC, Y)-dot(color, Y));
+
+ color = mix(color, vec3(luma_diff), CD_ADJUST_VIEW);
// FragColor = vec4(GAMMA_OUT(color), 1.0);
FragColor = vec4(color, 1.0);
diff --git a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither_version.txt b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither_version.txt
index 562d298..b3c90be 100644
--- a/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither_version.txt
+++ b/bezel/Mega_Bezel/shaders/hyllian/checkerboard-dedither/checkerboard-dedither_version.txt
@@ -1 +1 @@
-Checkerboard-Dedither Version 3
\ No newline at end of file
+Checkerboard-Dedither 2022-09-15
\ No newline at end of file
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/blur_horiz.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/blur_horiz.slang
new file mode 100644
index 0000000..086f5cb
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/blur_horiz.slang
@@ -0,0 +1,47 @@
+#version 450
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+ vec4 OutputSize;
+ vec4 OriginalSize;
+ vec4 SourceSize;
+} global;
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+#pragma format R8G8B8A8_SRGB
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+#define GLOW_FALLOFF 0.35
+#define TAPS 4
+
+#define kernel(x) exp(-GLOW_FALLOFF * (x) * (x))
+
+void main()
+{
+ vec3 col = vec3(0.0);
+ float dx = 4.0 * global.SourceSize.z; // Mipmapped
+
+ float k_total = 0.0;
+ for (int i = -TAPS; i <= TAPS; i++)
+ {
+ float k = kernel(i);
+ k_total += k;
+ col += k * texture(Source, vTexCoord + vec2(float(i) * dx, 0.0)).rgb;
+ }
+
+ FragColor = vec4(col / k_total, 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/blur_vert.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/blur_vert.slang
new file mode 100644
index 0000000..99d3e9a
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/blur_vert.slang
@@ -0,0 +1,46 @@
+#version 450
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+ vec4 OutputSize;
+ vec4 OriginalSize;
+ vec4 SourceSize;
+} global;
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+#define GLOW_FALLOFF 0.35
+#define TAPS 4
+
+#define kernel(x) exp(-GLOW_FALLOFF * (x) * (x))
+
+void main()
+{
+ vec3 col = vec3(0.0);
+ float dy = global.SourceSize.w;
+
+ float k_total = 0.0;
+ for (int i = -TAPS; i <= TAPS; i++)
+ {
+ float k = kernel(i);
+ k_total += k;
+ col += k * texture(Source, vTexCoord + vec2(0.0, float(i) * dy)).rgb;
+ }
+
+ FragColor = vec4(col / k_total, 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-hyllian-sinc-curvature.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-hyllian-sinc-curvature.slang
new file mode 100644
index 0000000..2cad8da
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-hyllian-sinc-curvature.slang
@@ -0,0 +1,299 @@
+#version 450
+
+#include "../../base/common/globals-and-screen-scale-params.inc"
+#include "../../base/common/params-2-bezel.inc"
+#include "../../base/common/common-functions-bezel.inc"
+
+layout(push_constant) uniform Push
+{
+ float BEAM_MIN_WIDTH;
+ float BEAM_MAX_WIDTH;
+ float SCANLINES_STRENGTH;
+ float COLOR_BOOST;
+ float SHARPNESS_HACK;
+ float PHOSPHOR_LAYOUT;
+ float MASK_INTENSITY;
+ float InputGamma;
+ float OutputGamma;
+ float VSCANLINES;
+ float CRT_ANTI_RINGING;
+ float CRT_CURVATURE;
+ float CRT_warpX;
+ float CRT_warpY;
+ float CRT_cornersize;
+ float CRT_cornersmooth;
+} param;
+
+#pragma parameter CRT_HYLLIAN_SINC "[ CRT-HYLLIAN-SINC PARAMS ]:" 0.0 0.0 0.0 0.0
+#pragma parameter BEAM_MIN_WIDTH " MIN BEAM WIDTH" 1.0 0.0 1.0 0.01
+#pragma parameter BEAM_MAX_WIDTH " MAX BEAM WIDTH" 1.0 0.0 1.0 0.01
+#pragma parameter SCANLINES_STRENGTH " SCANLINES STRENGTH" 0.67 0.0 1.0 0.01
+#pragma parameter COLOR_BOOST " COLOR BOOST" 1.20 1.0 2.0 0.05
+#pragma parameter SHARPNESS_HACK " SHARPNESS_HACK" 1.0 1.0 4.0 1.0
+#pragma parameter PHOSPHOR_LAYOUT " PHOSPHOR LAYOUT" 12.0 0.0 24.0 1.0
+#pragma parameter MASK_INTENSITY " MASK INTENSITY" 0.7 0.0 1.0 0.1
+#pragma parameter VSCANLINES " SCANLINES DIRECTION" 0.0 0.0 1.0 1.0
+#pragma parameter CRT_CURVATURE " CRT-Curvature" 1.0 0.0 1.0 1.0
+#pragma parameter CRT_warpX " CRT-Curvature X-Axis" 0.010 0.0 0.125 0.01
+#pragma parameter CRT_warpY " CRT-Curvature Y-Axis" 0.020 0.0 0.125 0.01
+vec2 CRT_Distortion = vec2(param.CRT_warpX, param.CRT_warpY) * 15.;
+#pragma parameter CRT_cornersize " CRT-Corner Size" 0.01 0.001 1.0 0.005
+#define cornersize param.CRT_cornersize
+#pragma parameter CRT_cornersmooth " CRT-Corner Smoothness" 280.0 80.0 2080.0 100.0
+#define cornersmooth param.CRT_cornersmooth
+
+#pragma parameter CRT_ANTI_RINGING " CRT Anti-Ringing [ OFF | ON ]" 1.0 0.0 1.0 1.0
+#define CRT_ANTI_RINGING param.CRT_ANTI_RINGING
+
+// layout(std140, set = 0, binding = 0) uniform UBO
+// {
+// mat4 MVP;
+// vec4 OutputSize;
+// vec4 OriginalSize;
+// vec4 SourceSize;
+// } global;
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 1) in vec2 FragCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+layout(set = 0, binding = 3) uniform sampler2D InfoCachePass;
+layout(set = 0, binding = 4) uniform sampler2D InfoCachePassFeedback;
+
+/*
+ Hyllian's CRT Shader - Sinc/Spline16 version
+
+ Copyright (C) 2011-2022 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
+
+#include "../../../../../include/subpixel_masks.h"
+
+
+#define scanlines_strength (2.0*param.SCANLINES_STRENGTH)
+#define beam_min_width param.BEAM_MIN_WIDTH
+#define beam_max_width param.BEAM_MAX_WIDTH
+#define color_boost param.COLOR_BOOST
+
+#define pi 3.1415926535897932384626433832795
+#define wa (0.5*pi)
+#define wb (pi)
+
+const vec2 corner_aspect = vec2(1.0, 0.75);
+
+float corner(vec2 coord)
+{
+ coord = (coord - vec2(0.5)) + vec2(0.5, 0.5);
+ coord = min(coord, vec2(1.0) - coord) * corner_aspect;
+ vec2 cdist = vec2(cornersize);
+ coord = (cdist - min(coord, cdist));
+ float dist = sqrt(dot(coord, coord));
+
+ return clamp((cdist.x - dist)*cornersmooth, 0.0, 1.0);
+}
+
+
+vec2 Warp(vec2 texCoord){
+
+ vec2 curvedCoords = texCoord * 2.0 - 1.0;
+ float curvedCoordsDistance = sqrt(curvedCoords.x*curvedCoords.x+curvedCoords.y*curvedCoords.y);
+
+ curvedCoords = curvedCoords / curvedCoordsDistance;
+
+ curvedCoords = curvedCoords * (1.0-pow(vec2(1.0-(curvedCoordsDistance/1.4142135623730950488016887242097)),(1.0/(1.0+CRT_Distortion*0.2))));
+
+ curvedCoords = curvedCoords / (1.0-pow(vec2(0.29289321881345247559915563789515),(1.0/(vec2(1.0)+CRT_Distortion*0.2))));
+
+ curvedCoords = curvedCoords * 0.5 + 0.5;
+ return curvedCoords;
+}
+
+float weight(float x)
+{
+ x = abs(x);
+
+ if (x < 1.0)
+ {
+ return
+ (
+ ((x - 9.0 / 5.0) * x - 1.0 / 5.0 ) * x + 1.0
+ );
+ }
+ else if ((x >= 1.0) && (x < 2.0))
+ {
+ return
+ (
+ (( -1.0 / 3.0 * (x - 1) + 4.0 / 5.0 ) * (x - 1) - 7.0 / 15.0 ) * (x - 1)
+ );
+ }
+ else
+ {
+ return 0.0;
+ }
+}
+
+vec4 weight4(float x)
+{
+ return vec4(
+ weight(x - 2.0),
+ weight(x - 1.0),
+ weight(x),
+ weight(x + 1.0)
+ );
+}
+
+
+vec3 resampler3(vec3 x)
+{
+ vec3 res;
+ res.x = (x.x<=0.001) ? wa*wb : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x);
+ res.y = (x.y<=0.001) ? wa*wb : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y);
+ res.z = (x.z<=0.001) ? wa*wb : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z);
+ return res;
+}
+
+void main()
+{
+ // HSM Added
+ vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord);
+ HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
+
+ vec2 cache_bounds_coord = SCREEN_COORD;
+
+// If it's the potato preset render the whole frame
+#ifndef IS_POTATO_PRESET
+#ifndef IS_NO_REFLECT_PRESET
+ // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
+ HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ false,
+ BEZEL_OUTSIDE_SCALE,
+ BEZEL_OUTSIDE_COORD,
+ BEZEL_OUTSIDE_CURVED_COORD,
+ FRAME_OUTSIDE_CURVED_COORD);
+ cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+#endif
+#endif
+
+ if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
+ {
+ FragColor = vec4(0);
+ return;
+ }
+
+ // HSM Added
+ vec4 SourceSize = vec4(CROPPED_ROTATED_SIZE_WITH_RES_MULT, 1/CROPPED_ROTATED_SIZE_WITH_RES_MULT);
+
+ // float TATE = USE_VERTICAL_SCANLINES;
+
+ // HSM Removed
+ // vec2 TextureSize = mix(vec2(global.SourceSize.x * param.SHARPNESS_HACK, global.SourceSize.y), vec2(global.SourceSize.x, global.SourceSize.y * param.SHARPNESS_HACK), USE_VERTICAL_SCANLINES);
+
+ vec2 TextureSize = mix(vec2(SourceSize.x * param.SHARPNESS_HACK, SourceSize.y), vec2(SourceSize.x, SourceSize.y * param.SHARPNESS_HACK), USE_VERTICAL_SCANLINES);
+
+ vec2 dx = mix(vec2(1.0/TextureSize.x, 0.0), vec2(0.0, 1.0/TextureSize.y), USE_VERTICAL_SCANLINES);
+ vec2 dy = mix(vec2(0.0, 1.0/TextureSize.y), vec2(1.0/TextureSize.x, 0.0), USE_VERTICAL_SCANLINES);
+
+ // HSM Removed
+ // vec2 pp = vTexCoord.xy;
+ // pp = (param.CRT_CURVATURE > 0.5) ? Warp(pp) : pp;
+
+ vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(SCREEN_COORD);
+ vec2 pp = HSM_GetMirrorWrappedCoord(screen_curved_coord);
+
+ vec2 pix_coord = pp.xy*TextureSize + vec2(-0.5, 0.5);
+
+ vec2 tc = mix((floor(pix_coord) + vec2(0.5, 0.5))/TextureSize, (floor(pix_coord) + vec2(1.5, -0.5))/TextureSize, USE_VERTICAL_SCANLINES);
+
+ vec2 fp = mix(fract(pix_coord), fract(pix_coord.yx), USE_VERTICAL_SCANLINES);
+
+ vec3 c00 = HSM_GetCroppedTexSample(Source, tc - dx - dy).xyz;
+ vec3 c01 = HSM_GetCroppedTexSample(Source, tc - dy).xyz;
+ vec3 c02 = HSM_GetCroppedTexSample(Source, tc + dx - dy).xyz;
+ vec3 c03 = HSM_GetCroppedTexSample(Source, tc + 2.0*dx - dy).xyz;
+ vec3 c10 = HSM_GetCroppedTexSample(Source, tc - dx ).xyz;
+ vec3 c11 = HSM_GetCroppedTexSample(Source, tc ).xyz;
+ vec3 c12 = HSM_GetCroppedTexSample(Source, tc + dx ).xyz;
+ vec3 c13 = HSM_GetCroppedTexSample(Source, tc + 2.0*dx ).xyz;
+
+ mat4x3 color_matrix0 = mat4x3(c00, c01, c02, c03);
+ mat4x3 color_matrix1 = mat4x3(c10, c11, c12, c13);
+
+ // Get weights for spline16 horizontal filter
+ vec4 weights = weight4(1.0 - fp.x);
+
+ // Spline16 horizontal filter
+ vec3 color0 = (color_matrix0 * weights)/dot(weights, vec4(1.0));
+ vec3 color1 = (color_matrix1 * weights)/dot(weights, vec4(1.0));
+
+ // Get min/max samples
+ vec3 min_sample0 = min(c01,c02);
+ vec3 max_sample0 = max(c01,c02);
+ vec3 min_sample1 = min(c11,c12);
+ vec3 max_sample1 = max(c11,c12);
+
+ // Anti-ringing
+ vec3 aux = color0;
+ color0 = clamp(color0, min_sample0, max_sample0);
+ color0 = mix(aux, color0, CRT_ANTI_RINGING * step(0.0, (c00-c01)*(c02-c03)));
+ aux = color1;
+ color1 = clamp(color1, min_sample1, max_sample1);
+ color1 = mix(aux, color1, CRT_ANTI_RINGING * step(0.0, (c10-c11)*(c12-c13)));
+
+ // Apply scanlines. Sinc filter vertically.
+ float pos0 = fp.y;
+ float pos1 = 1 - fp.y;
+
+ vec3 lum0 = mix(vec3(beam_min_width), vec3(beam_max_width), color0);
+ vec3 lum1 = mix(vec3(beam_min_width), vec3(beam_max_width), color1);
+
+ vec3 d0 = clamp(scanlines_strength*pos0/(lum0*lum0+0.0000001), 0.0, 1.0);
+ vec3 d1 = clamp(scanlines_strength*pos1/(lum1*lum1+0.0000001), 0.0, 1.0);
+
+ d0 = resampler3(d0);
+ d1 = resampler3(d1);
+
+ // Apply color enhancement, scanlines orientation, mask and gamma.
+ vec3 color = color_boost*(color0*d0+color1*d1)/(wa*wb);
+
+ vec2 mask_coords = vTexCoord.xy * global.OutputSize.xy;
+
+ mask_coords = mix(mask_coords.xy, mask_coords.yx, USE_VERTICAL_SCANLINES);
+
+ color.rgb*=mask_weights(mask_coords, param.MASK_INTENSITY, int(param.PHOSPHOR_LAYOUT));
+
+ FragColor = vec4(color, 1.0);
+
+ FragColor *= (param.CRT_CURVATURE > 0.5) ? corner(pp) : 1.0;
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-super-xbr.slangp b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-super-xbr.slangp
new file mode 100644
index 0000000..20a8816
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-super-xbr.slangp
@@ -0,0 +1,126 @@
+shaders = "11"
+
+
+shader0 = "shaders/linearize.slang"
+filter_linear0 = "false"
+wrap_mode0 = "clamp_to_border"
+mipmap_input0 = "false"
+alias0 = "XbrSource"
+float_framebuffer0 = "false"
+srgb_framebuffer0 = "true"
+scale_type_x0 = "source"
+scale_x0 = "1.000000"
+scale_type_y0 = "source"
+scale_y0 = "1.000000"
+
+shader1 = "shaders/super-xbr-pass0.slang"
+filter_linear1 = "false"
+wrap_mode1 = "clamp_to_border"
+mipmap_input1 = "false"
+alias1 = ""
+float_framebuffer1 = "false"
+srgb_framebuffer1 = "true"
+scale_type_x1 = "source"
+scale_x1 = "1.000000"
+scale_type_y1 = "source"
+scale_y1 = "1.000000"
+
+shader2 = "shaders/super-xbr-pass1.slang"
+filter_linear2 = "false"
+wrap_mode2 = "clamp_to_border"
+mipmap_input2 = "false"
+alias2 = ""
+float_framebuffer2 = "false"
+srgb_framebuffer2 = "true"
+scale_type_x2 = "source"
+scale_x2 = "2.000000"
+scale_type_y2 = "source"
+scale_y2 = "2.000000"
+
+shader3 = "shaders/super-xbr-pass2.slang"
+filter_linear3 = "false"
+wrap_mode3 = "clamp_to_border"
+mipmap_input3 = "false"
+alias3 = ""
+float_framebuffer3 = "false"
+srgb_framebuffer3 = "true"
+scale_type_x3 = "source"
+scale_x3 = "1.000000"
+scale_type_y3 = "source"
+scale_y3 = "1.000000"
+
+shader4 = "shaders/custom-bicubic-x.slang"
+filter_linear4 = "false"
+wrap_mode4 = "clamp_to_border"
+mipmap_input4 = "false"
+alias4 = ""
+float_framebuffer4 = "false"
+srgb_framebuffer4 = "true"
+scale_type_x4 = "source"
+scale_x4 = "1.000000"
+scale_type_y4 = "source"
+scale_y4 = "1.000000"
+
+shader5 = "shaders/custom-bicubic-y.slang"
+filter_linear5 = "false"
+wrap_mode5 = "clamp_to_border"
+mipmap_input5 = "false"
+alias5 = ""
+float_framebuffer5 = "false"
+srgb_framebuffer5 = "true"
+scale_type_x5 = "source"
+scale_x5 = "1.000000"
+scale_type_y5 = "source"
+scale_y5 = "0.500000"
+
+shader6 = "shaders/crt-hyllian-sinc-curvature.slang"
+filter_linear6 = "true"
+wrap_mode6 = "clamp_to_border"
+mipmap_input6 = "false"
+alias6 = "CRT_PASS"
+float_framebuffer6 = "false"
+srgb_framebuffer6 = "true"
+scale_type_x6 = "viewport"
+scale_x6 = "1.000000"
+scale_type_y6 = "viewport"
+scale_y6 = "1.000000"
+
+shader7 = "shaders/threshold.slang"
+filter_linear7 = "false"
+wrap_mode7 = "clamp_to_border"
+mipmap_input7 = "false"
+alias7 = ""
+float_framebuffer7 = "false"
+srgb_framebuffer7 = "true"
+scale_type_x7 = "source"
+scale_x7 = "1.000000"
+scale_type_y7 = "source"
+scale_y7 = "1.000000"
+
+shader8 = "shaders/blur_horiz.slang"
+filter_linear8 = "true"
+wrap_mode8 = "clamp_to_border"
+mipmap_input8 = "true"
+alias8 = ""
+float_framebuffer8 = "false"
+srgb_framebuffer8 = "true"
+scale_type_x8 = "source"
+scale_x8 = "0.200000"
+scale_type_y8 = "source"
+scale_y8 = "0.200000"
+
+shader9 = "shaders/blur_vert.slang"
+filter_linear9 = "true"
+wrap_mode9 = "clamp_to_border"
+mipmap_input9 = "false"
+alias9 = ""
+float_framebuffer9 = "false"
+srgb_framebuffer9 = "true"
+
+shader10 = "shaders/custom-resolve.slang"
+filter_linear10 = "true"
+wrap_mode10 = "clamp_to_border"
+mipmap_input10 = "false"
+alias10 = ""
+float_framebuffer10 = "false"
+srgb_framebuffer10 = "true"
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-super-xbr_version.txt b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-super-xbr_version.txt
new file mode 100644
index 0000000..eb3e0e9
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/crt-super-xbr_version.txt
@@ -0,0 +1 @@
+crt-super-xbr_2022-09-09
\ No newline at end of file
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-bicubic-x.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-bicubic-x.slang
new file mode 100644
index 0000000..e67633f
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-bicubic-x.slang
@@ -0,0 +1,132 @@
+#version 450
+
+/*
+ b-spline-x Shader
+
+ Copyright (C) 2011-2022 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float SUPERXBR_ON;
+} params;
+
+#pragma parameter SUPERXBR_ON " Super-XBR ON" 1 0 1 1
+#define SUPERXBR_ON params.SUPERXBR_ON
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+} global;
+
+// B-Spline bicubic parameters
+const float B = 0.0;
+const float C = 1.0;
+
+const mat4 INV = mat4( (-B - 6.0*C)/6.0, (3.0*B + 12.0*C)/6.0, (-3.0*B - 6.0*C)/6.0, B/6.0,
+ (12.0 - 9.0*B - 6.0*C)/6.0, (-18.0 + 12.0*B + 6.0*C)/6.0, 0.0, (6.0 - 2.0*B)/6.0,
+ -(12.0 - 9.0*B - 6.0*C)/6.0, (18.0 - 15.0*B - 12.0*C)/6.0, (3.0*B + 6.0*C)/6.0, B/6.0,
+ (B + 6.0*C)/6.0, -C, 0.0, 0.0);
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+layout(location = 1) out vec4 t1;
+layout(location = 2) out vec4 t2;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+
+ vec2 ps = vec2(params.SourceSize.z, params.SourceSize.w);
+ float dx = ps.x;
+ float dy = ps.y;
+
+ vTexCoord = TexCoord * 1.0001 - vec2(0.5, 0.0)*ps;
+// vTexCoord = TexCoord * 1.0001 - vec2(1.0, 0.0)*ps;
+
+ t1 = vTexCoord.xyxy + vec4( -dx, 0.0, 0.0, 0.0);
+ t2 = vTexCoord.xyxy + vec4( dx, 0.0, 2.0*dx, 0.0);
+
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 1) in vec4 t1;
+layout(location = 2) in vec4 t2;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+// // HSM Added
+// vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord);
+// HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
+
+// vec2 cache_bounds_coord = SCREEN_COORD;
+
+// // If it's the potato preset render the whole frame
+// #ifndef IS_POTATO_PRESET
+// #ifndef IS_NO_REFLECT_PRESET
+// // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
+// HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
+// TUBE_DIFFUSE_SCALE,
+// TUBE_SCALE,
+// SCREEN_ASPECT,
+// false,
+// BEZEL_OUTSIDE_SCALE,
+// BEZEL_OUTSIDE_COORD,
+// BEZEL_OUTSIDE_CURVED_COORD,
+// FRAME_OUTSIDE_CURVED_COORD);
+// cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+// #endif
+// #endif
+
+// if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
+// {
+// FragColor = vec4(0);
+// return;
+// }
+
+ if (SUPERXBR_ON < 0.5)
+ {
+ FragColor = texture(Source, vTexCoord);
+ return;
+ }
+
+ vec2 fp = fract(vTexCoord*params.SourceSize.xy);
+
+ vec3 C0 = texture(Source, t1.xy).xyz;
+ vec3 C1 = texture(Source, t1.zw).xyz;
+ vec3 C2 = texture(Source, t2.xy).xyz;
+ vec3 C3 = texture(Source, t2.zw).xyz;
+
+ vec4 Px = vec4(fp.x*fp.x*fp.x, fp.x*fp.x, fp.x, 1.0) * INV;
+ vec3 color = mat4x3(C0, C1, C2, C3) * Px;
+
+ FragColor = vec4(color, 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
new file mode 100644
index 0000000..a722ff8
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
@@ -0,0 +1,132 @@
+#version 450
+
+/*
+ b-spline-y Shader
+
+ Copyright (C) 2011-2022 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float SUPERXBR_ON;
+} params;
+
+#pragma parameter SUPERXBR_ON " Super-XBR ON" 1 0 1 1
+#define SUPERXBR_ON params.SUPERXBR_ON
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+} global;
+
+// B-Spline bicubic parameters
+const float B = 0.0;
+const float C = 1.0;
+
+const mat4 INV = mat4( (-B - 6.0*C)/6.0, (3.0*B + 12.0*C)/6.0, (-3.0*B - 6.0*C)/6.0, B/6.0,
+ (12.0 - 9.0*B - 6.0*C)/6.0, (-18.0 + 12.0*B + 6.0*C)/6.0, 0.0, (6.0 - 2.0*B)/6.0,
+ -(12.0 - 9.0*B - 6.0*C)/6.0, (18.0 - 15.0*B - 12.0*C)/6.0, (3.0*B + 6.0*C)/6.0, B/6.0,
+ (B + 6.0*C)/6.0, -C, 0.0, 0.0);
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+layout(location = 1) out vec4 t1;
+layout(location = 2) out vec4 t2;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+
+ vec2 ps = vec2(params.SourceSize.z, params.SourceSize.w);
+ float dx = ps.x;
+ float dy = ps.y;
+
+ vTexCoord = TexCoord * 1.0001 - vec2(0.0, 0.5)*ps;
+
+ t1 = vTexCoord.xyxy + vec4( 0.0, -dy, 0.0, 0.0);
+ t2 = vTexCoord.xyxy + vec4( 0.0, dy, 0.0, 2.0*dy);
+
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 1) in vec4 t1;
+layout(location = 2) in vec4 t2;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+layout(set = 0, binding = 3) uniform sampler2D XbrSource;
+
+void main()
+{
+// // HSM Added
+// vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord);
+// HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
+
+// vec2 cache_bounds_coord = SCREEN_COORD;
+
+// // If it's the potato preset render the whole frame
+// #ifndef IS_POTATO_PRESET
+// #ifndef IS_NO_REFLECT_PRESET
+// // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
+// HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
+// TUBE_DIFFUSE_SCALE,
+// TUBE_SCALE,
+// SCREEN_ASPECT,
+// false,
+// BEZEL_OUTSIDE_SCALE,
+// BEZEL_OUTSIDE_COORD,
+// BEZEL_OUTSIDE_CURVED_COORD,
+// FRAME_OUTSIDE_CURVED_COORD);
+// cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+// #endif
+// #endif
+
+// if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
+// {
+// FragColor = vec4(0);
+// return;
+// }
+
+ if (SUPERXBR_ON < 0.5)
+ {
+ FragColor = texture(XbrSource, vTexCoord);
+ return;
+ }
+
+ vec2 fp = fract(vTexCoord*params.SourceSize.xy);
+
+ vec3 C0 = texture(Source, t1.xy).xyz;
+ vec3 C1 = texture(Source, t1.zw).xyz;
+ vec3 C2 = texture(Source, t2.xy).xyz;
+ vec3 C3 = texture(Source, t2.zw).xyz;
+
+ vec4 Py = vec4(fp.y*fp.y*fp.y, fp.y*fp.y, fp.y, 1.0) * INV;
+ vec3 color = mat4x3(C0, C1, C2, C3) * Py;
+
+ FragColor = vec4(color, 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-resolve.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-resolve.slang
new file mode 100644
index 0000000..0d77bf7
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/custom-resolve.slang
@@ -0,0 +1,92 @@
+#version 450
+
+#include "../../base/common/globals-and-screen-scale-params.inc"
+#include "../../base/common/params-2-bezel.inc"
+#include "../../base/common/common-functions-bezel.inc"
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float BLOOM_STRENGTH;
+ float SOURCE_BOOST;
+ float OUTPUT_GAMMA;
+} params;
+
+#pragma parameter BLOOM_STRENGTH " Bloom Strength" 0.10 0.0 1.0 0.01
+#pragma parameter SOURCE_BOOST " Bloom Color Boost" 1.15 1.0 2.0 0.05
+#pragma parameter OUTPUT_GAMMA "OUTPUT GAMMA" 2.2 1.0 3.0 0.1
+
+#define BLOOM_STRENGTH params.BLOOM_STRENGTH
+#define SOURCE_BOOST params.SOURCE_BOOST
+#define OUTPUT_GAMMA params.OUTPUT_GAMMA
+
+#define INV_OUTPUT_GAMMA (1.0 / OUTPUT_GAMMA)
+#define saturate(c) clamp(c, 0.0, 1.0)
+
+// layout(std140, set = 0, binding = 0) uniform UBO
+// {
+// mat4 MVP;
+// } global;
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+layout(set = 0, binding = 3) uniform sampler2D CRT_PASS;
+
+void main()
+{
+// // HSM Added
+// vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord);
+// HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
+
+// vec2 cache_bounds_coord = SCREEN_COORD;
+
+// // If it's the potato preset render the whole frame
+// #ifndef IS_POTATO_PRESET
+// #ifndef IS_NO_REFLECT_PRESET
+// // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
+// HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
+// TUBE_DIFFUSE_SCALE,
+// TUBE_SCALE,
+// SCREEN_ASPECT,
+// false,
+// BEZEL_OUTSIDE_SCALE,
+// BEZEL_OUTSIDE_COORD,
+// BEZEL_OUTSIDE_CURVED_COORD,
+// FRAME_OUTSIDE_CURVED_COORD);
+// cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+// #endif
+// #endif
+
+// if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
+// {
+// FragColor = vec4(0);
+// return;
+// }
+
+ vec3 source = SOURCE_BOOST * texture(CRT_PASS, vTexCoord).rgb;
+ vec3 bloom = texture(Source, vTexCoord).rgb;
+ source += BLOOM_STRENGTH * bloom;
+
+ // HSM Removed
+ FragColor = vec4(pow(saturate(source), vec3(INV_OUTPUT_GAMMA,INV_OUTPUT_GAMMA,INV_OUTPUT_GAMMA)), 1.0);
+
+ // HSM add output gamma
+ // FragColor = HSM_Delinearize(vec4(saturate(source), 1), HSM_GAMMA_OUT_CRT);
+ // End Addition
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/linearize.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/linearize.slang
new file mode 100644
index 0000000..e66f7f7
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/linearize.slang
@@ -0,0 +1,40 @@
+#version 450
+
+layout(push_constant) uniform Push
+{
+ float INPUT_GAMMA;
+} params;
+
+#pragma parameter INPUT_GAMMA "Input Gamma" 2.4 2.0 2.6 0.02
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+ vec4 OutputSize;
+ vec4 OriginalSize;
+ vec4 SourceSize;
+} global;
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+#pragma format R8G8B8A8_SRGB
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ vec3 color = texture(Source, vTexCoord).rgb;
+
+ FragColor = vec4(pow(color, vec3(params.INPUT_GAMMA)), 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
new file mode 100644
index 0000000..dd83c50
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
@@ -0,0 +1,249 @@
+#version 450
+
+/*
+
+ ******* Super XBR Shader - pass0 *******
+
+ Copyright (c) 2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float XBR_EDGE_STR_P0;
+ float XBR_WEIGHT;
+ float XBR_ANTI_RINGING;
+ float MODE;
+ float XBR_EDGE_SHP;
+ float XBR_TEXTURE_SHP;
+ float SUPERXBR_ON;
+} params;
+
+#pragma parameter SUPERXBR_TITLE "[ --- SUPER-XBR by HYLLIAN --- ]:" 0 0 0.01 0.01
+#pragma parameter SUPERXBR_ON " Super-XBR ON" 1 0 1 1
+#define SUPERXBR_ON params.SUPERXBR_ON
+
+#pragma parameter MODE " Mode - Normal, Details, Adaptive" 1.0 0.0 2.0 1.0
+#pragma parameter XBR_EDGE_STR_P0 " Xbr - Edge Strength p0" 1.0 0.0 5.0 0.5
+#pragma parameter XBR_WEIGHT " Xbr - Filter Weight" 0.0 0.0 1.0 0.1
+#pragma parameter XBR_EDGE_SHP " Adaptive Dynamic Edge Sharp" 0.4 0.0 3.0 0.1
+#pragma parameter XBR_TEXTURE_SHP " Adaptive Static Edge Sharp" 1.0 0.0 2.0 0.1
+
+#define XBR_EDGE_STR_P0 params.XBR_EDGE_STR_P0
+#define XBR_WEIGHT params.XBR_WEIGHT
+#define MODE params.MODE
+#define XBR_EDGE_SHP params.XBR_EDGE_SHP
+#define XBR_TEXTURE_SHP params.XBR_TEXTURE_SHP
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+} global;
+
+#define mul(a,b) (b*a)
+
+const vec3 Y = vec3(.2126, .7152, .0722);
+
+float RGBtoYUV(vec3 color)
+{
+ return dot(color, Y);
+}
+
+float df(float A, float B)
+{
+ return abs(A-B);
+}
+
+/*
+ P1
+ |P0|B |C |P1| C F4 |a0|b1|c2|d3|
+ |D |E |F |F4| B F I4 |b0|c1|d2|e3| |e1|i1|i2|e2|
+ |G |H |I |I4| P0 E A I P3 |c0|d1|e2|f3| |e3|i3|i4|e4|
+ |P2|H5|I5|P3| D H I5 |d0|e1|f2|g3|
+ G H5
+ P2
+*/
+
+
+float d_wd(float wp1, float wp2, float wp3, float wp4, float wp5, float wp6, float b0, float b1, float c0, float c1, float c2, float d0, float d1, float d2, float d3, float e1, float e2, float e3, float f2, float f3)
+{
+ return (wp1*(df(c1,c2) + df(c1,c0) + df(e2,e1) + df(e2,e3)) + wp2*(df(d2,d3) + df(d0,d1)) + wp3*(df(d1,d3) + df(d0,d2)) + wp4*df(d1,d2) + wp5*(df(c0,c2) + df(e1,e3)) + wp6*(df(b0,b1) + df(f2,f3)));
+}
+
+float hv_wd(float wp1, float wp2, float wp3, float wp4, float wp5, float wp6, float i1, float i2, float i3, float i4, float e1, float e2, float e3, float e4)
+{
+ return ( wp4*(df(i1,i2)+df(i3,i4)) + wp1*(df(i1,e1)+df(i2,e2)+df(i3,e3)+df(i4,e4)) + wp3*(df(i1,e2)+df(i3,e4)+df(e1,i2)+df(e3,i4)));
+}
+
+vec3 min4(vec3 a, vec3 b, vec3 c, vec3 d)
+{
+ return min(a, min(b, min(c, d)));
+}
+
+vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d)
+{
+ return max(a, max(b, max(c, d)));
+}
+
+float max4float(float a, float b, float c, float d)
+{
+ return max(a, max(b, max(c, d)));
+}
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+layout(location = 1) out vec4 t1;
+layout(location = 2) out vec4 t2;
+layout(location = 3) out vec4 t3;
+layout(location = 4) out vec4 t4;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord * 1.0001;
+
+ float dx = params.SourceSize.z;
+ float dy = params.SourceSize.w;
+ t1 = vTexCoord.xyxy + vec4(-dx, -dy, 2.0*dx, 2.0*dy);
+ t2 = vTexCoord.xyxy + vec4( 0, -dy, dx, 2.0*dy);
+ t3 = vTexCoord.xyxy + vec4(-dx, 0, 2.0*dx, dy);
+ t4 = vTexCoord.xyxy + vec4( 0, 0, dx, dy);
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 1) in vec4 t1;
+layout(location = 2) in vec4 t2;
+layout(location = 3) in vec4 t3;
+layout(location = 4) in vec4 t4;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ if (SUPERXBR_ON < 0.5)
+ {
+ FragColor = texture(Source, vTexCoord);
+ return;
+ }
+
+// settings //
+ float wp1, wp2, wp3, wp4, wp5, wp6, weight1, weight2;
+
+ wp1 = 2.0;
+ wp2 = 1.0;
+ wp3 = -1.0;
+ wp4 = 4.0;
+ wp5 = -1.0;
+ wp6 = 1.0;
+
+ weight1 = (XBR_WEIGHT*1.29633/10.0);
+ weight2 = (XBR_WEIGHT*1.75068/10.0/2.0);
+
+// end settings //
+
+ vec3 P0 = texture(Source, t1.xy).xyz;
+ vec3 P1 = texture(Source, t1.zy).xyz;
+ vec3 P2 = texture(Source, t1.xw).xyz;
+ vec3 P3 = texture(Source, t1.zw).xyz;
+
+ vec3 B = texture(Source, t2.xy).xyz;
+ vec3 C = texture(Source, t2.zy).xyz;
+ vec3 H5 = texture(Source, t2.xw).xyz;
+ vec3 I5 = texture(Source, t2.zw).xyz;
+
+ vec3 D = texture(Source, t3.xy).xyz;
+ vec3 F4 = texture(Source, t3.zy).xyz;
+ vec3 G = texture(Source, t3.xw).xyz;
+ vec3 I4 = texture(Source, t3.zw).xyz;
+
+ vec3 E = texture(Source, t4.xy).xyz;
+ vec3 F = texture(Source, t4.zy).xyz;
+ vec3 H = texture(Source, t4.xw).xyz;
+ vec3 I = texture(Source, t4.zw).xyz;
+
+ float b = RGBtoYUV( B );
+ float c = RGBtoYUV( C );
+ float d = RGBtoYUV( D );
+ float e = RGBtoYUV( E );
+ float f = RGBtoYUV( F );
+ float g = RGBtoYUV( G );
+ float h = RGBtoYUV( H );
+ float i = RGBtoYUV( I );
+
+ float i4 = RGBtoYUV( I4 ); float p0 = RGBtoYUV( P0 );
+ float i5 = RGBtoYUV( I5 ); float p1 = RGBtoYUV( P1 );
+ float h5 = RGBtoYUV( H5 ); float p2 = RGBtoYUV( P2 );
+ float f4 = RGBtoYUV( F4 ); float p3 = RGBtoYUV( P3 );
+
+ /* Calc edgeness in diagonal directions. */
+ float d_edge = (d_wd( wp1, wp2, wp3, wp4, wp5, wp6, d, b, g, e, c, p2, h, f, p1, h5, i, f4, i5, i4 ) - d_wd( wp1, wp2, wp3, wp4, wp5, wp6, c, f4, b, f, i4, p0, e, i, p3, d, h, i5, g, h5 ));
+
+ /* Calc edgeness in horizontal/vertical directions. */
+ float hv_edge = (hv_wd(wp1, wp2, wp3, wp4, wp5, wp6, f, i, e, h, c, i5, b, h5) - hv_wd(wp1, wp2, wp3, wp4, wp5, wp6, e, f, h, i, d, f4, g, i4));
+
+ float limits = XBR_EDGE_STR_P0 + 0.000001;
+ float edge_strength = smoothstep(0.0, limits, abs(d_edge));
+
+ vec4 w1, w2;
+ vec3 c3, c4;
+ if (MODE == 2.0)
+ {
+ float contrast = max(max4float(df(e,f),df(e,i),df(e,h),df(f,h)),max(df(f,i),df(h,i)))/(e+0.001);
+
+ float wgt1 = weight1*(smoothstep(0.0, 0.6, contrast)*XBR_EDGE_SHP + XBR_TEXTURE_SHP);
+ float wgt2 = weight2*(smoothstep(0.0, 0.6, contrast)*XBR_EDGE_SHP + XBR_TEXTURE_SHP);
+
+ /* Filter weights. Two taps only. */
+ w1 = vec4(-wgt1, wgt1+ 0.5, wgt1+ 0.5, -wgt1);
+ w2 = vec4(-wgt2, wgt2+0.25, wgt2+0.25, -wgt2);
+ c3 = mul(w2, mat4x3(P0+2.0*(D+G)+P2, B+2.0*(E+H)+H5, C+2.0*(F+I)+I5, P1+2.0*(F4+I4)+P3))/3.0;
+ c4 = mul(w2, mat4x3(P0+2.0*(C+B)+P1, D+2.0*(F+E)+F4, G+2.0*(I+H)+I4, P2+2.0*(I5+H5)+P3))/3.0;
+ }
+ else
+ {
+ /* Filter weights. Two taps only. */
+ w1 = vec4(-weight1, weight1+0.5, weight1+0.5, -weight1);
+ w2 = vec4(-weight2, weight2+0.25, weight2+0.25, -weight2);
+ c3 = mul(w2, mat4x3(D+G, E+H, F+I, F4+I4));
+ c4 = mul(w2, mat4x3(C+B, F+E, I+H, I5+H5));
+ }
+
+ /* Filtering and normalization in four direction generating four colors. */
+ vec3 c1 = mul(w1, mat4x3( P2, H, F, P1 ));
+ vec3 c2 = mul(w1, mat4x3( P0, E, I, P3 ));
+
+ /* Smoothly blends the two strongest directions (one in diagonal and the other in vert/horiz direction). */
+ vec3 color = mix(mix(c1, c2, step(0.0, d_edge)), mix(c3, c4, step(0.0, hv_edge)), 1. - edge_strength);
+
+ /* Anti-ringing code. */
+ vec3 min_sample = min4( E, F, H, I );
+ vec3 max_sample = max4( E, F, H, I );
+ color = clamp(color, min_sample, max_sample);
+
+ FragColor = vec4(color, 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
new file mode 100644
index 0000000..72ebe00
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
@@ -0,0 +1,268 @@
+#version 450
+
+/*
+
+ ******* Super XBR Shader - pass1 *******
+
+ Copyright (c) 2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#define XBR_WEIGHT 1.0
+#define XBR_ANTI_RINGING 1.0
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float MODE;
+ float XBR_EDGE_SHP;
+ float XBR_TEXTURE_SHP;
+ float XBR_EDGE_STR_P1;
+ float SUPERXBR_ON;
+} params;
+
+#pragma parameter SUPERXBR_ON " Super-XBR ON" 1 0 1 1
+#define SUPERXBR_ON params.SUPERXBR_ON
+
+#pragma parameter XBR_EDGE_STR_P1 " Xbr - Edge Strength p1" 1.0 0.0 5.0 0.5
+#pragma parameter MODE " Mode - Normal, Details, Adaptive" 1.0 0.0 2.0 1.0
+#pragma parameter XBR_EDGE_SHP " Adaptive Dynamic Edge Sharp" 0.4 0.0 3.0 0.1
+#pragma parameter XBR_TEXTURE_SHP " Adaptive Static Edge Sharp" 1.0 0.0 2.0 0.1
+
+#define MODE params.MODE
+#define XBR_EDGE_SHP params.XBR_EDGE_SHP
+#define XBR_TEXTURE_SHP params.XBR_TEXTURE_SHP
+#define XBR_EDGE_STR_P1 params.XBR_EDGE_STR_P1
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+} global;
+
+#define mul(a,b) (b*a)
+
+const vec3 Y = vec3(.2126, .7152, .0722);
+
+float RGBtoYUV(vec3 color)
+{
+ return dot(color, Y);
+}
+
+float df(float A, float B)
+{
+ return abs(A-B);
+}
+
+/*
+ P1
+ |P0|B |C |P1| C F4 |a0|b1|c2|d3|
+ |D |E |F |F4| B F I4 |b0|c1|d2|e3| |e1|i1|i2|e2|
+ |G |H |I |I4| P0 E A I P3 |c0|d1|e2|f3| |e3|i3|i4|e4|
+ |P2|H5|I5|P3| D H I5 |d0|e1|f2|g3|
+ G H5
+ P2
+*/
+
+float d_wd(float wp1, float wp2, float wp3, float wp4, float wp5, float wp6, float b0, float b1, float c0, float c1, float c2, float d0, float d1, float d2, float d3, float e1, float e2, float e3, float f2, float f3)
+{
+ return (wp1*(df(c1,c2) + df(c1,c0) + df(e2,e1) + df(e2,e3)) + wp2*(df(d2,d3) + df(d0,d1)) + wp3*(df(d1,d3) + df(d0,d2)) + wp4*df(d1,d2) + wp5*(df(c0,c2) + df(e1,e3)) + wp6*(df(b0,b1) + df(f2,f3)));
+}
+
+float hv_wd(float wp1, float wp2, float wp3, float wp4, float wp5, float wp6, float i1, float i2, float i3, float i4, float e1, float e2, float e3, float e4)
+{
+ return ( wp4*(df(i1,i2)+df(i3,i4)) + wp1*(df(i1,e1)+df(i2,e2)+df(i3,e3)+df(i4,e4)) + wp3*(df(i1,e2)+df(i3,e4)+df(e1,i2)+df(e3,i4)));
+}
+
+vec3 min4(vec3 a, vec3 b, vec3 c, vec3 d)
+{
+ return min(a, min(b, min(c, d)));
+}
+vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d)
+{
+ return max(a, max(b, max(c, d)));
+}
+
+float max4float(float a, float b, float c, float d)
+{
+ return max(a, max(b, max(c, d)));
+}
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord * 1.0001;
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+layout(set = 0, binding = 3) uniform sampler2D XbrSource;
+
+void main()
+{
+ if (SUPERXBR_ON < 0.5)
+ {
+ FragColor = texture(Source, vTexCoord);
+ return;
+ }
+
+// settings //
+ float wp1, wp2, wp3, wp4, wp5, wp6, weight1, weight2;
+ if (MODE == 1.0)
+ {
+ wp1 = 1.0;
+ wp2 = 0.0;
+ wp3 = 0.0;
+ wp4 = 0.0;
+ wp5 = 0.0;
+ wp6 = 0.0;
+
+ weight1 = (XBR_WEIGHT*1.29633/10.0);
+ weight2 = (XBR_WEIGHT*1.75068/10.0/2.0);
+ }
+ else if (MODE == 2.0)
+ {
+ wp1 = 8.0;
+ wp2 = 0.0;
+ wp3 = 0.0;
+ wp4 = 0.0;
+ wp5 = 0.0;
+ wp6 = 0.0;
+
+ weight1 = (1.29633/10.0);
+ weight2 = (1.75068/10.0/2.0);
+ }
+ else
+ {
+ wp1 = 8.0;
+ wp2 = 0.0;
+ wp3 = 0.0;
+ wp4 = 0.0;
+ wp5 = 0.0;
+ wp6 = 0.0;
+
+ weight1 = (XBR_WEIGHT*1.29633/10.0);
+ weight2 = (XBR_WEIGHT*1.75068/10.0/2.0);
+ }
+// end settings //
+
+ //Skip pixels on wrong grid
+ vec2 fp = fract(vTexCoord.xy * params.SourceSize.xy);
+ vec2 dir = fp - vec2(0.5,0.5);
+ if ((dir.x*dir.y)>0.0)
+ {
+ FragColor = mix( texture(XbrSource, vTexCoord), texture(Source, vTexCoord), step(0.0, dir.x));
+ }
+ else
+ {
+ vec2 g1 = (fp.x>0.5) ? vec2(0.5/params.SourceSize.x, 0.0) : vec2(0.0, 0.5/params.SourceSize.y);
+ vec2 g2 = (fp.x>0.5) ? vec2(0.0, 0.5/params.SourceSize.y) : vec2(0.5/params.SourceSize.x, 0.0);
+
+ vec3 P0 = texture(XbrSource, vTexCoord -3.0*g1 ).xyz;
+ vec3 P1 = texture(Source, vTexCoord -3.0*g2).xyz;
+ vec3 P2 = texture(Source, vTexCoord +3.0*g2).xyz;
+ vec3 P3 = texture(XbrSource, vTexCoord +3.0*g1 ).xyz;
+
+ vec3 B = texture(Source, vTexCoord -2.0*g1 -g2).xyz;
+ vec3 C = texture(XbrSource, vTexCoord -g1 -2.0*g2).xyz;
+ vec3 D = texture(Source, vTexCoord -2.0*g1 +g2).xyz;
+ vec3 E = texture(XbrSource, vTexCoord -g1 ).xyz;
+ vec3 F = texture(Source, vTexCoord -g2).xyz;
+ vec3 G = texture(XbrSource, vTexCoord -g1 +2.0*g2).xyz;
+ vec3 H = texture(Source, vTexCoord +g2).xyz;
+ vec3 I = texture(XbrSource, vTexCoord +g1 ).xyz;
+
+ vec3 F4 = texture(XbrSource, vTexCoord +g1 -2.0*g2).xyz;
+ vec3 I4 = texture(Source, vTexCoord +2.0*g1 -g2).xyz;
+ vec3 H5 = texture(XbrSource, vTexCoord +g1 +2.0*g2).xyz;
+ vec3 I5 = texture(Source, vTexCoord +2.0*g1 +g2).xyz;
+
+ float b = RGBtoYUV( B );
+ float c = RGBtoYUV( C );
+ float d = RGBtoYUV( D );
+ float e = RGBtoYUV( E );
+ float f = RGBtoYUV( F );
+ float g = RGBtoYUV( G );
+ float h = RGBtoYUV( H );
+ float i = RGBtoYUV( I );
+
+ float i4 = RGBtoYUV( I4 ); float p0 = RGBtoYUV( P0 );
+ float i5 = RGBtoYUV( I5 ); float p1 = RGBtoYUV( P1 );
+ float h5 = RGBtoYUV( H5 ); float p2 = RGBtoYUV( P2 );
+ float f4 = RGBtoYUV( F4 ); float p3 = RGBtoYUV( P3 );
+
+ /* Calc edgeness in diagonal directions. */
+ float d_edge = (d_wd( wp1, wp2, wp3, wp4, wp5, wp6, d, b, g, e, c, p2, h, f, p1, h5, i, f4, i5, i4 ) - d_wd( wp1, wp2, wp3, wp4, wp5, wp6, c, f4, b, f, i4, p0, e, i, p3, d, h, i5, g, h5 ));
+
+ /* Calc edgeness in horizontal/vertical directions. */
+ float hv_edge = (hv_wd(wp1, wp2, wp3, wp4, wp5, wp6, f, i, e, h, c, i5, b, h5) - hv_wd(wp1, wp2, wp3, wp4, wp5, wp6, e, f, h, i, d, f4, g, i4));
+
+ float limits = XBR_EDGE_STR_P1 + 0.000001;
+ float edge_strength = smoothstep(0.0, limits, abs(d_edge));
+
+ vec4 w1, w2;
+ vec3 c3, c4;
+ if (MODE == 2.0)
+ {
+ float contrast = max(max4float(df(e,f),df(e,i),df(e,h),df(f,h)),max(df(f,i),df(h,i)))/(e+0.001);
+
+ float wgt1 = weight1*(smoothstep(0.0, 0.6, contrast)*XBR_EDGE_SHP + XBR_TEXTURE_SHP);
+ float wgt2 = weight2*(smoothstep(0.0, 0.6, contrast)*XBR_EDGE_SHP + XBR_TEXTURE_SHP);
+
+ /* Filter weights. Two taps only. */
+ w1 = vec4(-wgt1, wgt1+ 0.5, wgt1+ 0.5, -wgt1);
+ w2 = vec4(-wgt2, wgt2+0.25, wgt2+0.25, -wgt2);
+ c3 = mul(w2, mat4x3(P0+2.0*(D+G)+P2, B+2.0*(E+H)+H5, C+2.0*(F+I)+I5, P1+2.0*(F4+I4)+P3))/3.0;
+ c4 = mul(w2, mat4x3(P0+2.0*(C+B)+P1, D+2.0*(F+E)+F4, G+2.0*(I+H)+I4, P2+2.0*(I5+H5)+P3))/3.0;
+ }
+ else
+ {
+ /* Filter weights. Two taps only. */
+ w1 = vec4(-weight1, weight1+0.5, weight1+0.5, -weight1);
+ w2 = vec4(-weight2, weight2+0.25, weight2+0.25, -weight2);
+ c3 = mul(w2, mat4x3(D+G, E+H, F+I, F4+I4));
+ c4 = mul(w2, mat4x3(C+B, F+E, I+H, I5+H5));
+ }
+
+ /* Filtering and normalization in four direction generating four colors. */
+ vec3 c1 = mul(w1, mat4x3( P2, H, F, P1 ));
+ vec3 c2 = mul(w1, mat4x3( P0, E, I, P3 ));
+
+ /* Smoothly blends the two strongest directions (one in diagonal and the other in vert/horiz direction). */
+ vec3 color = mix(mix(c1, c2, step(0.0, d_edge)), mix(c3, c4, step(0.0, hv_edge)), 1. - edge_strength);
+
+ /* Anti-ringing code. */
+ vec3 min_sample = min4( E, F, H, I );
+ vec3 max_sample = max4( E, F, H, I );
+ color = clamp(color, min_sample, max_sample);
+
+ FragColor = vec4(color, 1.0);
+ }
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
new file mode 100644
index 0000000..63ca123
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
@@ -0,0 +1,280 @@
+#version 450
+
+/*
+
+ ******* Super XBR Shader - pass2 ******* This pass is optional.
+
+ Copyright (c) 2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+const float XBR_WEIGHT = 1.0;
+const float XBR_ANTI_RINGING = 1.0;
+
+layout(push_constant) uniform Push
+{
+ vec4 SourceSize;
+ vec4 OriginalSize;
+ vec4 OutputSize;
+ uint FrameCount;
+ float MODE;
+ float XBR_EDGE_SHP;
+ float XBR_TEXTURE_SHP;
+ float XBR_EDGE_STR_P2;
+ float SUPERXBR_ON;
+} params;
+
+#pragma parameter SUPERXBR_ON " Super-XBR ON" 1 0 1 1
+#define SUPERXBR_ON params.SUPERXBR_ON
+
+#pragma parameter MODE " Mode - Normal, Details, Adaptive" 1.0 0.0 2.0 1.0
+#pragma parameter XBR_EDGE_STR_P2 " Xbr - Edge Strength p2" 1.0 0.0 5.0 0.5
+#pragma parameter XBR_EDGE_SHP " Adaptive Dynamic Edge Sharp" 0.4 0.0 3.0 0.1
+#pragma parameter XBR_TEXTURE_SHP " Adaptive Static Edge Sharp" 1.0 0.0 2.0 0.1
+
+#define MODE params.MODE
+#define XBR_EDGE_SHP params.XBR_EDGE_SHP
+#define XBR_TEXTURE_SHP params.XBR_TEXTURE_SHP
+#define XBR_EDGE_STR_P2 params.XBR_EDGE_STR_P2
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+} global;
+
+#define mul(a,b) (b*a)
+
+const vec3 Y = vec3(.2126, .7152, .0722);
+
+float RGBtoYUV(vec3 color)
+{
+ return dot(color, Y);
+}
+
+float df(float A, float B)
+{
+ return abs(A-B);
+}
+
+/*
+ P1
+ |P0|B |C |P1| C F4 |a0|b1|c2|d3|
+ |D |E |F |F4| B F I4 |b0|c1|d2|e3| |e1|i1|i2|e2|
+ |G |H |I |I4| P0 E A I P3 |c0|d1|e2|f3| |e3|i3|i4|e4|
+ |P2|H5|I5|P3| D H I5 |d0|e1|f2|g3|
+ G H5
+ P2
+*/
+
+float d_wd(float wp1, float wp2, float wp3, float wp4, float wp5, float wp6, float b0, float b1, float c0, float c1, float c2, float d0, float d1, float d2, float d3, float e1, float e2, float e3, float f2, float f3)
+{
+ return (wp1*(df(c1,c2) + df(c1,c0) + df(e2,e1) + df(e2,e3)) + wp2*(df(d2,d3) + df(d0,d1)) + wp3*(df(d1,d3) + df(d0,d2)) + wp4*df(d1,d2) + wp5*(df(c0,c2) + df(e1,e3)) + wp6*(df(b0,b1) + df(f2,f3)));
+}
+
+float hv_wd(float wp1, float wp2, float wp3, float wp4, float wp5, float wp6, float i1, float i2, float i3, float i4, float e1, float e2, float e3, float e4)
+{
+ return ( wp4*(df(i1,i2)+df(i3,i4)) + wp1*(df(i1,e1)+df(i2,e2)+df(i3,e3)+df(i4,e4)) + wp3*(df(i1,e2)+df(i3,e4)+df(e1,i2)+df(e3,i4)));
+}
+
+vec3 min4(vec3 a, vec3 b, vec3 c, vec3 d)
+{
+ return min(a, min(b, min(c, d)));
+}
+vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d)
+{
+ return max(a, max(b, max(c, d)));
+}
+
+float max4float(float a, float b, float c, float d)
+{
+ return max(a, max(b, max(c, d)));
+}
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+layout(location = 1) out vec4 t1;
+layout(location = 2) out vec4 t2;
+layout(location = 3) out vec4 t3;
+layout(location = 4) out vec4 t4;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord * 1.0001;
+
+ float dx = params.SourceSize.z;
+ float dy = params.SourceSize.w;
+ t1 = vTexCoord.xyxy + vec4(-2.0*dx, -2.0*dy, dx, dy);
+ t2 = vTexCoord.xyxy + vec4( -dx, -2.0*dy, 0, dy);
+ t3 = vTexCoord.xyxy + vec4(-2.0*dx, -dy, dx, 0);
+ t4 = vTexCoord.xyxy + vec4( -dx, -dy, 0, 0);
+}
+
+#pragma stage fragment
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 1) in vec4 t1;
+layout(location = 2) in vec4 t2;
+layout(location = 3) in vec4 t3;
+layout(location = 4) in vec4 t4;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ if (SUPERXBR_ON < 0.5)
+ {
+ FragColor = texture(Source, vTexCoord);
+ return;
+ }
+
+// settings //
+ float wp1, wp2, wp3, wp4, wp5, wp6, weight1, weight2;
+ if (MODE == 1.0)
+ {
+ wp1 = 0.0;
+ wp2 = 0.0;
+ wp3 = 0.0;
+ wp4 = 1.0;
+ wp5 = 0.0;
+ wp6 = 0.0;
+
+ weight1 = (XBR_WEIGHT*1.29633/10.0);
+ weight2 = (XBR_WEIGHT*1.75068/10.0/2.0);
+ }
+ else if (MODE == 2.0)
+ {
+ wp1 = 1.0;
+ wp2 = 0.0;
+ wp3 = 1.0;
+ wp4 = 3.0;
+ wp5 = -2.0;
+ wp6 = 0.0;
+
+ weight1 = (1.29633/10.0);
+ weight2 = (1.75068/10.0/2.0);
+ }
+ else
+ {
+ wp1 = 1.0;
+ wp2 = 0.0;
+ wp3 = 2.0;
+ wp4 = 3.0;
+ wp5 = -2.0;
+ wp6 = 1.0;
+
+ weight1 = (XBR_WEIGHT*1.29633/10.0);
+ weight2 = (XBR_WEIGHT*1.75068/10.0/2.0);
+ }
+// end settings //
+
+ vec3 P0 = texture(Source, t1.xy).xyz;
+ vec3 P1 = texture(Source, t1.zy).xyz;
+ vec3 P2 = texture(Source, t1.xw).xyz;
+ vec3 P3 = texture(Source, t1.zw).xyz;
+
+ vec3 B = texture(Source, t2.xy).xyz;
+ vec3 C = texture(Source, t2.zy).xyz;
+ vec3 H5 = texture(Source, t2.xw).xyz;
+ vec3 I5 = texture(Source, t2.zw).xyz;
+
+ vec3 D = texture(Source, t3.xy).xyz;
+ vec3 F4 = texture(Source, t3.zy).xyz;
+ vec3 G = texture(Source, t3.xw).xyz;
+ vec3 I4 = texture(Source, t3.zw).xyz;
+
+ vec3 E = texture(Source, t4.xy).xyz;
+ vec3 F = texture(Source, t4.zy).xyz;
+ vec3 H = texture(Source, t4.xw).xyz;
+ vec3 I = texture(Source, t4.zw).xyz;
+
+ float b = RGBtoYUV( B );
+ float c = RGBtoYUV( C );
+ float d = RGBtoYUV( D );
+ float e = RGBtoYUV( E );
+ float f = RGBtoYUV( F );
+ float g = RGBtoYUV( G );
+ float h = RGBtoYUV( H );
+ float i = RGBtoYUV( I );
+
+ float i4 = RGBtoYUV( I4 ); float p0 = RGBtoYUV( P0 );
+ float i5 = RGBtoYUV( I5 ); float p1 = RGBtoYUV( P1 );
+ float h5 = RGBtoYUV( H5 ); float p2 = RGBtoYUV( P2 );
+ float f4 = RGBtoYUV( F4 ); float p3 = RGBtoYUV( P3 );
+
+/*
+ P1
+ |P0|B |C |P1| C F4 |a0|b1|c2|d3|
+ |D |E |F |F4| B F I4 |b0|c1|d2|e3| |e1|i1|i2|e2|
+ |G |H |I |I4| P0 E A I P3 |c0|d1|e2|f3| |e3|i3|i4|e4|
+ |P2|H5|I5|P3| D H I5 |d0|e1|f2|g3|
+ G H5
+ P2
+*/
+
+ /* Calc edgeness in diagonal directions. */
+ float d_edge = (d_wd( wp1, wp2, wp3, wp4, wp5, wp6, d, b, g, e, c, p2, h, f, p1, h5, i, f4, i5, i4 ) - d_wd( wp1, wp2, wp3, wp4, wp5, wp6, c, f4, b, f, i4, p0, e, i, p3, d, h, i5, g, h5 ));
+
+ /* Calc edgeness in horizontal/vertical directions. */
+ float hv_edge = (hv_wd(wp1, wp2, wp3, wp4, wp5, wp6, f, i, e, h, c, i5, b, h5) - hv_wd(wp1, wp2, wp3, wp4, wp5, wp6, e, f, h, i, d, f4, g, i4));
+
+ float limits = XBR_EDGE_STR_P2 + 0.000001;
+ float edge_strength = smoothstep(0.0, limits, abs(d_edge));
+
+ vec4 w1, w2;
+ vec3 c3, c4;
+ if (MODE == 2.0)
+ {
+ float contrast = max(max4float(df(e,f),df(e,i),df(e,h),df(f,h)),max(df(f,i),df(h,i)))/(e+0.001);
+
+ float wgt1 = weight1*(smoothstep(0.0, 0.6, contrast)*XBR_EDGE_SHP + XBR_TEXTURE_SHP);
+ float wgt2 = weight2*(smoothstep(0.0, 0.6, contrast)*XBR_EDGE_SHP + XBR_TEXTURE_SHP);
+
+ /* Filter weights. Two taps only. */
+ w1 = vec4(-wgt1, wgt1+ 0.5, wgt1+ 0.5, -wgt1);
+ w2 = vec4(-wgt2, wgt2+0.25, wgt2+0.25, -wgt2);
+ c3 = mul(w2, mat4x3(P0+2.0*(D+G)+P2, B+2.0*(E+H)+H5, C+2.0*(F+I)+I5, P1+2.0*(F4+I4)+P3))/3.0;
+ c4 = mul(w2, mat4x3(P0+2.0*(C+B)+P1, D+2.0*(F+E)+F4, G+2.0*(I+H)+I4, P2+2.0*(I5+H5)+P3))/3.0;
+ }
+ else
+ {
+ /* Filter weights. Two taps only. */
+ w1 = vec4(-weight1, weight1+0.5, weight1+0.5, -weight1);
+ w2 = vec4(-weight2, weight2+0.25, weight2+0.25, -weight2);
+ c3 = mul(w2, mat4x3(D+G, E+H, F+I, F4+I4));
+ c4 = mul(w2, mat4x3(C+B, F+E, I+H, I5+H5));
+ }
+
+ /* Filtering and normalization in four direction generating four colors. */
+ vec3 c1 = mul(w1, mat4x3( P2, H, F, P1 ));
+ vec3 c2 = mul(w1, mat4x3( P0, E, I, P3 ));
+
+ /* Smoothly blends the two strongest directions (one in diagonal and the other in vert/horiz direction). */
+ vec3 color = mix(mix(c1, c2, step(0.0, d_edge)), mix(c3, c4, step(0.0, hv_edge)), 1. - edge_strength);
+
+ /* Anti-ringing code. */
+ vec3 min_sample = min4( E, F, H, I );
+ vec3 max_sample = max4( E, F, H, I );
+ color = clamp(color, min_sample, max_sample);
+
+ FragColor = vec4(color, 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/threshold.slang b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/threshold.slang
new file mode 100644
index 0000000..274ca29
--- /dev/null
+++ b/bezel/Mega_Bezel/shaders/hyllian/crt-super-xbr/threshold.slang
@@ -0,0 +1,43 @@
+#version 450
+
+layout(push_constant) uniform Push
+{
+ float GLOW_WHITEPOINT;
+ float GLOW_ROLLOFF;
+} params;
+
+#pragma parameter GLOW_WHITEPOINT " Glow Whitepoint" 1.0 0.5 1.1 0.02
+#pragma parameter GLOW_ROLLOFF " Glow Rolloff" 3.0 1.2 6.0 0.1
+
+layout(std140, set = 0, binding = 0) uniform UBO
+{
+ mat4 MVP;
+ vec4 OutputSize;
+ vec4 OriginalSize;
+ vec4 SourceSize;
+} global;
+
+#pragma stage vertex
+layout(location = 0) in vec4 Position;
+layout(location = 1) in vec2 TexCoord;
+layout(location = 0) out vec2 vTexCoord;
+
+void main()
+{
+ gl_Position = global.MVP * Position;
+ vTexCoord = TexCoord;
+}
+
+#pragma stage fragment
+#pragma format R8G8B8A8_SRGB
+layout(location = 0) in vec2 vTexCoord;
+layout(location = 0) out vec4 FragColor;
+layout(set = 0, binding = 2) uniform sampler2D Source;
+
+void main()
+{
+ vec3 color = 1.15 * texture(Source, vTexCoord).rgb;
+ vec3 factor = clamp(color / params.GLOW_WHITEPOINT, 0.0, 1.0);
+
+ FragColor = vec4(pow(factor, vec3(params.GLOW_ROLLOFF)), 1.0);
+}
diff --git a/bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-b-spline-x.slang b/bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
similarity index 100%
rename from bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-b-spline-x.slang
rename to bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
diff --git a/bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-b-spline-y.slang b/bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
similarity index 100%
rename from bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-b-spline-y.slang
rename to bezel/Mega_Bezel/shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
diff --git a/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.inc b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.inc
index 0e2c643..57fb6b5 100644
--- a/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.inc
+++ b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.inc
@@ -105,6 +105,29 @@ void main()
vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord);
HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord);
+ vec2 cache_bounds_coord = SCREEN_COORD;
+
+// If it's the potato preset render the whole frame
+#ifndef IS_POTATO_PRESET
+#ifndef IS_NO_REFLECT_PRESET
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
+#endif
+#endif
+
+ if (HHLP_IsOutsideCoordSpace(cache_bounds_coord))
+ {
+ FragColor = vec4(0);
+ return;
+ }
+
vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(SCREEN_COORD);
vec2 curved_coord = HSM_GetMirrorWrappedCoord(screen_curved_coord);
vec2 texelSize = 1 / CROPPED_ROTATED_SIZE_WITH_RES_MULT;
diff --git a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-hdr-pass.slang b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-hdr-pass.slang
index 3462648..8a82db3 100644
--- a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-hdr-pass.slang
+++ b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-hdr-pass.slang
@@ -23,7 +23,8 @@ Dont use this shader directly - use the hdr\crt-make-model-hdr.slangp where make
THIS SHADER DOES NOT SUPPORT WRGB OLED (Due to the sub pixel layout of WRGB - RGB QD-OLED or LCD (and variants thereof screens are fine)
*/
-#pragma format A2B10G10R10_UNORM_PACK32
+//#pragma format A2B10G10R10_UNORM_PACK32
+#pragma format R16G16B16A16_SFLOAT
layout(push_constant) uniform Push
{
@@ -31,6 +32,8 @@ layout(push_constant) uniform Push
float hcrt_hdr;
float hcrt_max_nits;
float hcrt_paper_white_nits;
+ float hcrt_expand_gamut;
+ float hcrt_colour_accurate;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
@@ -47,6 +50,8 @@ layout(std140, set = 0, binding = 0) uniform UBO
#define HCRT_HDR 0
#define HCRT_MAX_NITS 700
#define HCRT_PAPER_WHITE_NITS 700
+#define HCRT_EXPAND_GAMUT 0
+#define HCRT_COLOUR_ACCURATE params.hcrt_colour_accurate
#define COMPAT_TEXTURE(c, d) texture(c, d)
@@ -67,6 +72,7 @@ layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
#include "include/inverse_tonemap.h"
+#include "include/hdr10.h"
vec3 InverseTonemapConditional(const vec3 linear)
{
@@ -84,7 +90,19 @@ void main()
{
vec3 source = COMPAT_TEXTURE(Source, vTexCoord).rgb;
- const vec3 hdr_colour = InverseTonemapConditional(source);
+ vec3 hdr_colour = InverseTonemapConditional(source);
- FragColor = vec4(hdr_colour, 1.0);
+ vec3 transformed_colour;
+
+ if((HCRT_HDR >= 1.0f) && (HCRT_COLOUR_ACCURATE < 1.0f))
+ {
+ const vec3 rec2020 = hdr_colour * k2020Gamuts[uint(HCRT_EXPAND_GAMUT)];
+ transformed_colour = rec2020 * (HCRT_PAPER_WHITE_NITS / kMaxNitsFor2084);
+ }
+ else
+ {
+ transformed_colour = hdr_colour;
+ }
+
+ FragColor = vec4(transformed_colour, 1.0);
}
diff --git a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-source-pass.slang b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-source-pass.slang
index 2e55c6b..6fbcb4e 100644
--- a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-source-pass.slang
+++ b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron-source-pass.slang
@@ -23,6 +23,8 @@ Dont use this shader directly - use the hdr\crt-make-model-hdr.slangp where make
THIS SHADER DOES NOT SUPPORT WRGB OLED (Due to the sub pixel layout of WRGB - RGB QD-OLED or LCD (and variants thereof screens are fine)
*/
+#pragma format R16G16B16A16_SFLOAT
+
layout(push_constant) uniform Push
{
float hcrt_hdr;
@@ -38,6 +40,7 @@ layout(push_constant) uniform Push
float hcrt_contrast;
float hcrt_saturation;
float hcrt_gamma_in;
+ float hcrt_colour_accurate;
} params;
/* HSM Removed
@@ -55,7 +58,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#include "include/parameters.h"
-#define HCRT_HDR params.hcrt_hdr
+#define HCRT_HDR 0
#define HCRT_OUTPUT_COLOUR_SPACE params.hcrt_colour_space
#define HCRT_CRT_COLOUR_SYSTEM params.hcrt_colour_system
#define HCRT_WHITE_TEMPERATURE params.hcrt_white_temperature
@@ -63,6 +66,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#define HCRT_CONTRAST params.hcrt_contrast
#define HCRT_SATURATION params.hcrt_saturation
#define HCRT_GAMMA_IN params.hcrt_gamma_in
+#define HCRT_COLOUR_ACCURATE params.hcrt_colour_accurate
#define COMPAT_TEXTURE(c, d) texture(c, d)
@@ -93,5 +97,23 @@ void main()
const vec3 colour = ColourGrade(source);
- FragColor = vec4(colour, 1.0);
+ vec3 transformed_colour = colour;
+
+ if((HCRT_HDR < 1.0f) && (HCRT_COLOUR_ACCURATE < 1.0f))
+ {
+ if(HCRT_OUTPUT_COLOUR_SPACE == 2.0f)
+ {
+ transformed_colour = (colour * k709_to_XYZ) * kXYZ_to_DCIP3;
+ }
+ else
+ {
+ transformed_colour = colour;
+ }
+ }
+ else
+ {
+ transformed_colour = colour;
+ }
+
+ FragColor = vec4(transformed_colour, 1.0);
}
diff --git a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc
index 2649576..a56d4a7 100644
--- a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc
+++ b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc
@@ -34,6 +34,7 @@ layout(push_constant) uniform Push
float hcrt_paper_white_nits;
float hcrt_expand_gamut;
float hcrt_gamma_out;
+ float hcrt_colour_accurate;
float hcrt_lcd_resolution;
float hcrt_lcd_subpixel;
@@ -96,6 +97,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#define HCRT_PAPER_WHITE_NITS 700
#define HCRT_EXPAND_GAMUT 0
#define HCRT_GAMMA_OUT params.hcrt_gamma_out
+#define HCRT_COLOUR_ACCURATE params.hcrt_colour_accurate
#define HCRT_LCD_RESOLUTION params.hcrt_lcd_resolution
#define HCRT_LCD_SUBPIXEL params.hcrt_lcd_subpixel
@@ -383,7 +385,7 @@ const uint kApertureGrilleMasks8K600TVL[kBGRAxis][kMaxApertureGrilleSize] =
const uint kApertureGrilleMasks8K800TVL[kBGRAxis][kMaxApertureGrilleSize] =
{
- kRYCBX, kRMCGX, kRYCBX
+ kRYCBX, kRMCGX, kBCYRX
};
#undef kMaxApertureGrilleSize
@@ -1132,7 +1134,6 @@ const uint kBlackWhiteMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxBlackWhiteS
#endif // ENABLE_BLACK_WHITE_MASKS
#include "include/scanline_generation.h"
-#include "include/hdr10.h"
#include "include/gamma_correct.h"
#define k1080p 0
@@ -1155,17 +1156,15 @@ void main()
// If it's the potato preset render the whole frame
#ifndef IS_POTATO_PRESET
#ifndef IS_NO_REFLECT_PRESET
- // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area
- HSM_GetBezelCoords(TUBE_DIFFUSE_COORD,
- TUBE_DIFFUSE_SCALE,
- TUBE_SCALE,
- SCREEN_ASPECT,
- false,
- BEZEL_OUTSIDE_SCALE,
- BEZEL_OUTSIDE_COORD,
- BEZEL_OUTSIDE_CURVED_COORD,
- FRAME_OUTSIDE_CURVED_COORD);
- cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5;
+ vec2 bezel_outside_flat_coord;
+ vec2 frame_outside_flat_coord;
+ HSM_GetSimpleBezelCoords(TUBE_DIFFUSE_COORD,
+ TUBE_DIFFUSE_SCALE,
+ TUBE_SCALE,
+ SCREEN_ASPECT,
+ bezel_outside_flat_coord,
+ frame_outside_flat_coord);
+ cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5;
#endif
#endif
@@ -1677,9 +1676,32 @@ void main()
scanline_colour += scanline_channel_2 * kColourMask[channel_2];
}
- vec3 hdr10;
-
- GammaCorrect(scanline_colour, hdr10);
+ vec3 transformed_colour;
- FragColor = vec4(hdr10, 1.0f);
+ if(HCRT_COLOUR_ACCURATE >= 1.0f)
+ {
+ if(HCRT_HDR >= 1.0f)
+ {
+ const vec3 rec2020 = scanline_colour * k2020Gamuts[uint(HCRT_EXPAND_GAMUT)];
+ transformed_colour = rec2020 * (HCRT_PAPER_WHITE_NITS / kMaxNitsFor2084);
+ }
+ else if(HCRT_OUTPUT_COLOUR_SPACE == 2.0f)
+ {
+ transformed_colour = (scanline_colour * k709_to_XYZ) * kXYZ_to_DCIP3;
+ }
+ else
+ {
+ transformed_colour = scanline_colour;
+ }
+ }
+ else
+ {
+ transformed_colour = scanline_colour;
+ }
+
+ vec3 gamma_corrected;
+
+ GammaCorrect(transformed_colour, gamma_corrected);
+
+ FragColor = vec4(gamma_corrected, 1.0f);
}
diff --git a/bezel/Mega_Bezel/shaders/megatron/include/colour_grade.h b/bezel/Mega_Bezel/shaders/megatron/include/colour_grade.h
index f40663e..9aa2c30 100644
--- a/bezel/Mega_Bezel/shaders/megatron/include/colour_grade.h
+++ b/bezel/Mega_Bezel/shaders/megatron/include/colour_grade.h
@@ -27,6 +27,11 @@ const mat3 kXYZ_to_709 = mat3(
-0.969244f, 1.875968f, 0.041555f,
0.055630f, -0.203977f, 1.056972f);
+const mat3 kXYZ_to_DCIP3 = mat3 (
+ 2.4934969119f, -0.9313836179f, -0.4027107845f,
+ -0.8294889696f, 1.7626640603f, 0.0236246858f,
+ 0.0358458302f, -0.0761723893f, 0.9568845240f);
+
const mat3 kColourGamut[kColourSystems] = { k709_to_XYZ, kPAL_to_XYZ, kNTSC_to_XYZ, kNTSC_to_XYZ };
const float kTemperatures[kColourSystems] = { kD65, kD65, kD65, kD93 };
diff --git a/bezel/Mega_Bezel/shaders/megatron/include/gamma_correct.h b/bezel/Mega_Bezel/shaders/megatron/include/gamma_correct.h
index 0a1aa33..7a87c65 100644
--- a/bezel/Mega_Bezel/shaders/megatron/include/gamma_correct.h
+++ b/bezel/Mega_Bezel/shaders/megatron/include/gamma_correct.h
@@ -1,3 +1,5 @@
+#include "hdr10.h"
+
// SDR Colour output spaces
const mat3 k709_to_XYZ = mat3(
@@ -30,31 +32,35 @@ vec3 LinearTo709(const vec3 colour)
return vec3(LinearTo709_1(colour.r), LinearTo709_1(colour.g), LinearTo709_1(colour.b));
}
-vec3 LinearToDCIP3(const vec3 colour)
+float LinearToDCIP3_1(const float channel)
{
- return clamp(pow(colour, vec3(1.0f / (HCRT_GAMMA_OUT + 0.2f))), 0.0f, 1.0f); // Gamma: 2.4 + 0.2 = 2.6
+ return pow(channel, 1.0f / (HCRT_GAMMA_OUT + 0.2f)); // Gamma: 2.4 + 0.2 = 2.6
}
-void GammaCorrect(const vec3 scanline_colour, inout vec3 gamma_out)
+vec3 LinearToDCIP3(const vec3 colour)
+{
+ return vec3(LinearToDCIP3_1(colour.r), LinearToDCIP3_1(colour.g), LinearToDCIP3_1(colour.b));
+}
+
+void GammaCorrect(const vec3 scanline_colour, inout vec3 gamma_corrected)
{
if(HCRT_HDR < 1.0f)
{
if(HCRT_OUTPUT_COLOUR_SPACE == 0.0f)
{
- gamma_out = LinearTo709(scanline_colour);
+ gamma_corrected = LinearTo709(scanline_colour);
}
else if(HCRT_OUTPUT_COLOUR_SPACE == 1.0f)
{
- gamma_out = LinearTosRGB(scanline_colour);
+ gamma_corrected = LinearTosRGB(scanline_colour);
}
else
{
- const vec3 dcip3_colour = (scanline_colour * k709_to_XYZ) * kXYZ_to_DCIP3;
- gamma_out = LinearToDCIP3(dcip3_colour);
+ gamma_corrected = LinearToDCIP3(scanline_colour);
}
}
else
{
- gamma_out = Hdr10(scanline_colour, HCRT_PAPER_WHITE_NITS, HCRT_EXPAND_GAMUT);
+ gamma_corrected = LinearToST2084(scanline_colour);
}
}
\ No newline at end of file
diff --git a/bezel/Mega_Bezel/shaders/megatron/include/hdr10.h b/bezel/Mega_Bezel/shaders/megatron/include/hdr10.h
index c6a584e..c9c2cf0 100644
--- a/bezel/Mega_Bezel/shaders/megatron/include/hdr10.h
+++ b/bezel/Mega_Bezel/shaders/megatron/include/hdr10.h
@@ -14,19 +14,25 @@ const mat3 kExpanded709_to_2020 = mat3 (
const mat3 k2020Gamuts[2] = { k709_to_2020, kExpanded709_to_2020 };
-vec3 LinearToST2084(vec3 normalizedLinearValue)
+float LinearToST2084_1(const float channel)
{
- vec3 ST2084 = pow((0.8359375f + 18.8515625f * pow(abs(normalizedLinearValue), vec3(0.1593017578f))) / (1.0f + 18.6875f * pow(abs(normalizedLinearValue), vec3(0.1593017578f))), vec3(78.84375f));
+ float ST2084 = pow((0.8359375f + 18.8515625f * pow(abs(channel), 0.1593017578f)) / (1.0f + 18.6875f * pow(abs(channel), 0.1593017578f)), 78.84375f);
return ST2084; /* Don't clamp between [0..1], so we can still perform operations on scene values higher than 10,000 nits */
}
+
+vec3 LinearToST2084(const vec3 colour)
+{
+ return vec3(LinearToST2084_1(colour.r), LinearToST2084_1(colour.g), LinearToST2084_1(colour.b));
+}
+
/* END Converted from (Copyright (c) Microsoft Corporation - Licensed under the MIT License.) https://github.com/microsoft/Xbox-ATG-Samples/tree/master/Kits/ATGTK/HDR */
/* Convert into HDR10 */
-vec3 Hdr10(vec3 hdr_linear, float paper_white_nits, float expand_gamut)
+vec3 Hdr10(const vec3 hdr_linear, float paper_white_nits, float expand_gamut)
{
- vec3 rec2020 = hdr_linear * k2020Gamuts[uint(expand_gamut)];
- vec3 linearColour = rec2020 * (paper_white_nits / kMaxNitsFor2084);
- vec3 hdr10 = LinearToST2084(linearColour);
+ const vec3 rec2020 = hdr_linear * k2020Gamuts[uint(expand_gamut)];
+ const vec3 linearColour = rec2020 * (paper_white_nits / kMaxNitsFor2084);
+ vec3 hdr10 = LinearToST2084(linearColour);
return hdr10;
}
diff --git a/bezel/Mega_Bezel/shaders/megatron/include/parameters.h b/bezel/Mega_Bezel/shaders/megatron/include/parameters.h
index b981017..f72f820 100644
--- a/bezel/Mega_Bezel/shaders/megatron/include/parameters.h
+++ b/bezel/Mega_Bezel/shaders/megatron/include/parameters.h
@@ -13,6 +13,7 @@
#pragma parameter hcrt_space1 " " 0.0 0.0 0.0001 0.0001
#pragma parameter hcrt_user_settings "[ YOUR DISPLAY'S SETTINGS ]:" 0.0 0.0 0.0001 0.0001
// #pragma parameter hcrt_hdr " SDR | HDR" 1.0 0.0 1.0 1.0
+#pragma parameter hcrt_colour_accurate " Mask Accurate/Colour Accurate" 1.0 0.0 1.0 1.0
#pragma parameter hcrt_colour_space " Display's Colour Space: r709 | sRGB | DCI-P3" 1.0 0.0 2.0 1.0
// #pragma parameter hcrt_max_nits " HDR: Display's Peak Luminance" 700.0 0.0 10000.0 10.0
// #pragma parameter hcrt_paper_white_nits " HDR: Display's Paper White Luminance" 700.0 0.0 10000.0 10.0