From 6fdb0796b49f4600a185b44743b8fe60c6ada1f7 Mon Sep 17 00:00:00 2001 From: HyperspaceMadness Date: Mon, 13 Mar 2023 21:23:28 -0400 Subject: [PATCH] Mega Bezel V1.12.0_2023-03-11 Changes: * Improved Performance * Fixed a performance issue where we were rendering more than we needed to * This should increase performance across most presets * Fixed color rainbowing in reflection for Guest-Advanced and LCD-GRID * Updated to crt-guest-advanced-2023-03-11-release1 * Updated GDV-MINI from @ROBMARK85's request --- .../MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp | 3 +- .../MBZ__1__ADV__GDV-MINI-NTSC.slangp | 3 +- .../Root_Presets/MBZ__1__ADV__GDV-MINI.slangp | 3 +- .../MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp | 3 +- .../MBZ__2__ADV-GLASS__GDV-MINI.slangp | 3 +- ...__2__ADV-SCREEN-ONLY__GDV-MINI-NTSC.slangp | 3 +- .../MBZ__2__ADV-SCREEN-ONLY__GDV-MINI.slangp | 3 +- .../MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp | 3 +- .../MBZ__3__STD-GLASS__GDV-MINI.slangp | 3 +- .../MBZ__3__STD__GDV-MINI-NTSC.slangp | 3 +- .../Root_Presets/MBZ__3__STD__GDV-MINI.slangp | 3 +- ...Z__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp | 3 +- .../MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp | 3 +- .../MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp | 2 +- ...__4__STD-SCREEN-ONLY__GDV-MINI-NTSC.slangp | 3 +- .../MBZ__4__STD-SCREEN-ONLY__GDV-MINI.slangp | 3 +- .../MBZ__5__POTATO__GDV-MINI-NTSC.slangp | 3 +- .../MBZ__5__POTATO__GDV-MINI.slangp | 3 +- .../MBZ__5__POTATO__LCD-GRID.slangp | 2 +- ...Z__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp | 3 +- ...Z__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp | 3 +- ...V-MINI-NTSC__DREZ_X-VIEWPORT_Y-240p.slangp | 3 +- ...V-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp | 3 +- .../MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp | 3 +- .../MBZ__3__STD__GDV-MINI__DREZ-240p.slangp | 3 +- .../MBZ__3__STD__GDV-MINI__DREZ-480p.slangp | 3 +- ...BZ__3__STD__GDV-MINI__DREZ-VIEWPORT.slangp | 3 +- ...D__GDV-MINI__DREZ_X-VIEWPORT_Y-240p.slangp | 3 +- ...D__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp | 3 +- ...5__POTATO__GDV-MINI-NTSC__DREZ-480p.slangp | 3 +- ...V-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp | 3 +- ...MBZ__5__POTATO__GDV-MINI__DREZ-480p.slangp | 3 +- ...O__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp | 3 +- bezel/Mega_Bezel/README.md | 2 +- bezel/Mega_Bezel/shaders/ShaderTodo.txt | 23 ++- .../shaders/base/common/helper-functions.inc | 2 +- .../base/common/params-0-screen-scale.inc | 2 +- .../Mega_Bezel/shaders/base/post-crt-prep.inc | 2 +- bezel/Mega_Bezel/shaders/base/text.inc | 6 +- .../guest/hsm-crt-dariusg-gdv-mini.inc | 153 ++++++++++++++---- .../hsm-crt-guest-advanced-ntsc-pass2.inc | 2 +- .../shaders/guest/hsm-crt-guest-advanced.inc | 19 ++- .../shaders/guest/hsm-deconvergence.inc | 153 ++++++++++++++++-- ...hsm_crt-guest-advanced-release-version.txt | 2 +- .../crt-hyllian-sinc-curvature.slang | 2 +- .../lcd-cgwg/hsm-lcd-grid-v2-no-reflect.slang | 6 + .../lcd-cgwg/hsm-lcd-grid-v2-potato.slang | 5 + .../shaders/lcd-cgwg/hsm-lcd-grid-v2.inc | 50 +++--- .../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang | 2 + .../shaders/megatron/crt-sony-megatron.inc | 2 +- 50 files changed, 410 insertions(+), 120 deletions(-) create mode 100644 bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-no-reflect.slang create mode 100644 bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-potato.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp index 1812b69..765ec1a 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp @@ -186,7 +186,8 @@ filter_linear33 = true float_framebuffer33 = "true" alias33 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader34 = ../../../shaders/base/post-crt-prep-glass.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp index 021aeef..967f942 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp @@ -167,7 +167,8 @@ filter_linear29 = true float_framebuffer29 = "true" alias29 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader30 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI.slangp index 3f496d6..3815b97 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__1__ADV__GDV-MINI.slangp @@ -155,7 +155,8 @@ filter_linear27 = true float_framebuffer27 = "true" alias27 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader28 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp index 283ad3b..ae44225 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp @@ -167,7 +167,8 @@ filter_linear29 = true float_framebuffer29 = "true" alias29 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader30 = ../../../shaders/base/post-crt-prep-glass.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp index d98ced4..d273ad1 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp @@ -155,7 +155,8 @@ filter_linear27 = true float_framebuffer27 = "true" alias27 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader28 = ../../../shaders/base/post-crt-prep-glass.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI-NTSC.slangp index 7fc9cb8..7d5d449 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI-NTSC.slangp @@ -167,7 +167,8 @@ filter_linear29 = true float_framebuffer29 = "true" alias29 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader30 = ../../../shaders/base/post-crt-prep-no-reflect.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI.slangp index 003f2fa..341c209 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__2__ADV-SCREEN-ONLY__GDV-MINI.slangp @@ -155,7 +155,8 @@ filter_linear27 = true float_framebuffer27 = "true" alias27 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader28 = ../../../shaders/base/post-crt-prep-no-reflect.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp index 9f3782d..b9c7584 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp @@ -133,7 +133,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-glass.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp index 8bf2496..2112d5d 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp @@ -107,7 +107,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-glass.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp index 00e37a4..2741c4b 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp @@ -133,7 +133,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI.slangp index 6f50af5..06d5d78 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__3__STD__GDV-MINI.slangp @@ -107,7 +107,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp index 47f9eb9..42bc44c 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp @@ -133,7 +133,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-no-reflect.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp index 318d100..cead132 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp @@ -107,7 +107,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-no-reflect.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp index 1b84fdb..138d70e 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp @@ -98,7 +98,7 @@ alias14 = "LinearizePass" shader15 = ../../../shaders/base/delinearize.slang float_framebuffer15 = "true" -shader16 = ../../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang +shader16 = ../../../shaders/lcd-cgwg/hsm-lcd-grid-v2-no-reflect.slang filter_linear16 = "false" scale_type16 = "viewport" scale16 = "1.0" diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI-NTSC.slangp index f57863a..d53b805 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI-NTSC.slangp @@ -133,7 +133,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-no-reflect.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI.slangp index 2664fd0..01b644f 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__4__STD-SCREEN-ONLY__GDV-MINI.slangp @@ -107,7 +107,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-no-reflect.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp index f75ff01..215636e 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp @@ -115,7 +115,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-potato.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI.slangp index e90ded7..04d7d88 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__GDV-MINI.slangp @@ -89,7 +89,8 @@ filter_linear12 = true float_framebuffer12 = "true" alias12 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader13 = ../../../shaders/base/post-crt-prep-potato.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__LCD-GRID.slangp index c6d4331..a8f9a00 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__LCD-GRID.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Root_Presets/MBZ__5__POTATO__LCD-GRID.slangp @@ -95,7 +95,7 @@ alias13 = "LinearizePass" shader14 = ../../../shaders/base/delinearize.slang float_framebuffer14 = "true" -shader15 = ../../../shaders/lcd-cgwg/hsm-lcd-grid-v2.slang +shader15 = ../../../shaders/lcd-cgwg/hsm-lcd-grid-v2-potato.slang filter_linear15 = "false" scale_type15 = "viewport" scale15 = "1.0" diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp index c8e3ca4..3638a27 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-240p.slangp @@ -134,7 +134,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp index 54893d4..81a3ad0 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ-480p.slangp @@ -134,7 +134,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-240p.slangp index 3b037d9..bf7a963 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-240p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-240p.slangp @@ -134,7 +134,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp index 18aa7eb..9ff4f36 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp @@ -134,7 +134,8 @@ filter_linear20 = true float_framebuffer20 = "true" alias20 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader21 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp index e85e4a8..f19680f 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-1080p.slangp @@ -108,7 +108,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp index 096dc3a..e7642d2 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-240p.slangp @@ -108,7 +108,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp index cfc7dcf..b06cf7c 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-480p.slangp @@ -108,7 +108,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-VIEWPORT.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-VIEWPORT.slangp index 486f3e7..39a4f96 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-VIEWPORT.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ-VIEWPORT.slangp @@ -108,7 +108,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-240p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-240p.slangp index c055d43..d460abc 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-240p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-240p.slangp @@ -108,7 +108,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp index d4cbc76..87a239a 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__3__STD__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp @@ -108,7 +108,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-image-layers.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ-480p.slangp index d40a0c1..bf7cefb 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ-480p.slangp @@ -116,7 +116,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-potato.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp index d657c1a..8044569 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI-NTSC__DREZ_X-VIEWPORT_Y-480p.slangp @@ -116,7 +116,8 @@ filter_linear16 = true float_framebuffer16 = "true" alias16 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader17 = ../../../shaders/base/post-crt-prep-potato.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ-480p.slangp index 2e77f14..49de8da 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ-480p.slangp @@ -84,7 +84,8 @@ filter_linear11 = true float_framebuffer11 = "true" alias11 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader12 = ../../../shaders/base/post-crt-prep-potato.slang diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp index 8759c26..976fab5 100644 --- a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/Root_Presets/MBZ__5__POTATO__GDV-MINI__DREZ_X-VIEWPORT_Y-480p.slangp @@ -84,7 +84,8 @@ filter_linear11 = true float_framebuffer11 = "true" alias11 = "CRTPass" -g_sat = 0.15 +g_sat = 0.25 +g_lum = 0.15 g_gamma_out = 2.45 shader12 = ../../../shaders/base/post-crt-prep-potato.slang diff --git a/bezel/Mega_Bezel/README.md b/bezel/Mega_Bezel/README.md index 0f371d2..2010890 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.11.0_2023-02-25** +**Version V1.12.0_2023-03-11** ---------------------------------------- ---------------------------------------- diff --git a/bezel/Mega_Bezel/shaders/ShaderTodo.txt b/bezel/Mega_Bezel/shaders/ShaderTodo.txt index a7d58a5..5063e24 100644 --- a/bezel/Mega_Bezel/shaders/ShaderTodo.txt +++ b/bezel/Mega_Bezel/shaders/ShaderTodo.txt @@ -1,27 +1,22 @@ ![Mega_Bezel_Logo|512x256, 75%](upload://6PNkvcMF9Go9Wnk6OJXfYR1opXI.png) -Mega Bezel is updated to V1.11.0_2023-02-25 +Mega Bezel is updated to V1.12.0_2023-03-11 Changes: - * Guest Advanced updated to crt-guest-advanced-2023-02-25-release1 - * Improvements to the new Magic Glow feature - * Turn Magic Glow on and Increase the Glow amount to see the effect - * New Slot Mask Mitigation option to reduce moire - * Added/Restored Guest's Raster Bloom as well as Overscan control - * Updated Comments in presets to use # instead of // as per @hunterk's request - * Added rotation option for Rotate CRT Tube: - * -1 = 90 Degrees Clockwise (or 270 Counter Clockwise) - * 0 = No Rotation - * 1 = 90 Degrees Counter Clockwise - * Added groundwork for the wildcard replacement feature so presets will auto rotate and not flip in the future + * Fixed a performance issue where we were rendering more than we needed to + * This should increase performance across most presets + * Fixed color rainbowing in reflection for Guest-Advanced and LCD-GRID + * Updated to crt-guest-advanced-2023-03-11-release1 + * Updated GDV-MINI from @ROBMARK85's request + ---------------------------------------------------- --- TODO --------------------------------------- ---------------------------------------------------- - * Update Guest to latest + * Check on Afterglow for BiRaitBec * Add Curvature to EasyMode for lasly - * Rotate Texture Parameters + * Rotate Image Layers with Parameters * Update Megatron * Add Passthrough Preset, no crt shader * Add AbsoluteMax as a scaling type diff --git a/bezel/Mega_Bezel/shaders/base/common/helper-functions.inc b/bezel/Mega_Bezel/shaders/base/common/helper-functions.inc index 7e8c9be..7bef9d3 100644 --- a/bezel/Mega_Bezel/shaders/base/common/helper-functions.inc +++ b/bezel/Mega_Bezel/shaders/base/common/helper-functions.inc @@ -285,7 +285,7 @@ vec4 HHLP_GetBilinearTextureSample(sampler2D in_sampler, vec2 in_coord, vec4 in_ bool HHLP_IsOutsideCoordSpace(vec2 in_coord) { - return (abs(in_coord.x - 0.5) > 0.51 && abs(in_coord.y - 0.5) > 0.51); + return (abs(in_coord.x - 0.5) > 0.501 || abs(in_coord.y - 0.5) > 0.501); } float rand(vec2 co, float size){ 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 a8257ac..f96af36 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.11.0_2023-02-25 --- ]" 0 0 0.001 0.001 +#pragma parameter HSM_MEGA_BEZEL_TITLE "[ --- HSM MEGA BEZEL V1.12.0_2023-03-11 --- ]" 0 0 0.001 0.001 #pragma parameter HSM_RESOLUTION_DEBUG_ON " Show Resolution Info" 0 0 1 1 float HSM_RESOLUTION_DEBUG_ON = global.HSM_RESOLUTION_DEBUG_ON; diff --git a/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc b/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc index 9026f48..703d544 100644 --- a/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc +++ b/bezel/Mega_Bezel/shaders/base/post-crt-prep.inc @@ -362,7 +362,7 @@ void main() SCREEN_ASPECT, bezel_outside_flat_coord, frame_outside_flat_coord); - cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (bezel_outside_flat_coord - 0.5) * 0.9 + 0.5; #endif if (HHLP_IsOutsideCoordSpace(cache_bounds_coord)) diff --git a/bezel/Mega_Bezel/shaders/base/text.inc b/bezel/Mega_Bezel/shaders/base/text.inc index 72259a3..43c2248 100644 --- a/bezel/Mega_Bezel/shaders/base/text.inc +++ b/bezel/Mega_Bezel/shaders/base/text.inc @@ -569,11 +569,11 @@ float DrawResolutions(vec2 uv, vec2 viewport_size, vec2 screen_size, vec4 screen print_pos.x = margin; print_pos.y += STRHEIGHT(1); - // Text Version V1.11.0_2023-02-25 + // Text Version V1.12.0_2023-03-11 // Version - _1 _per _1 _1 _per _0 _spc + _1 _per _1 _2 _per _0 _spc // Date - _2 _0 _2 _3 _dsh _0 _2 _dsh _2 _5 + _2 _0 _2 _3 _dsh _0 _3 _dsh _1 _1 // Title ---------------------------------------------------------- print_pos.x = margin; 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 86bbaf1..d64cd74 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 @@ -1,5 +1,5 @@ /* - CRT - Guest - Nomask w. Curvature + CRT - Guest - Nomask w. Curvature With work by DariusG to create a cut down extra fast version Copyright (C) 2017-2018 guest(r) - guest.r@gmail.com @@ -25,8 +25,6 @@ layout(push_constant) uniform Push vec4 SourceSize; vec4 OriginalSize; vec4 OutputSize; - uint FrameCount; - float brightboost; float saturation; float scanline; @@ -39,48 +37,61 @@ layout(push_constant) uniform Push float maskDark; float maskLight; float CGWG; + // float warpX; + // float warpY; + // float gamma_out; + // float vignette; } params; // Parameter lines go here: #pragma parameter GDVMINI_X_EMPTY_LINE " " 0 0 0.001 0.001 #pragma parameter gdv_mini_title "[ GDV MINI - DariusG ]:" 0.0 0.0 1.0 1.0 -#pragma parameter brightboost " Bright boost -- brightboost" 1.1 0.5 2.0 0.05 +#pragma parameter brightboost " Bright boost -- brightboost" 1.0 0.5 2.0 0.05 #define brightboost params.brightboost -#pragma parameter saturation " Saturation adjustment -- saturation" 1.1 0.1 2.0 0.05 +#pragma parameter saturation " Saturation adjustment -- saturation" 1.0 0.0 2.0 0.05 #define saturation params.saturation -#pragma parameter scanline " Scanline Adjust -- scanline" 8 1 12 1 +#pragma parameter scanline " Scanline Adjust -- scanline" 8.0 1.0 12.0 1.0 #define scanline params.scanline -#pragma parameter beam_min " Scanline Dark -- beam_min" 1.7 0.5 3 0.05 +#pragma parameter beam_min " Scanline Dark -- beam_min" 1.7 0.5 3.0 0.05 #define beam_min params.beam_min -#pragma parameter beam_max " Scanline Bright -- beam_max" 2.1 0.5 3 0.05 +#pragma parameter beam_max " Scanline Bright -- beam_max" 2.1 0.5 3.0 0.05 #define beam_max params.beam_max -#pragma parameter h_sharp " Horizontal Sharpness -- h_sharp" 2 1 5 0.05 +#pragma parameter h_sharp " Horizontal Sharpness -- h_sharp" 2.0 1.0 5.0 0.05 #define h_sharp params.h_sharp -#pragma parameter shadowMask " CRT Mask: 0:CGWG, 1-4:Lottes, 5-6:Trinitron" 0.0 -1.0 8.0 1.0 +#pragma parameter shadowMask " CRT Mask: 0:CGWG, 1-4:Lottes, 5-6:Trinitron" 0.0 -1.0 10.0 1.0 #define shadowMask params.shadowMask -#pragma parameter masksize " CRT Mask Size (2.0 is nice in 4k) -- masksize" 0 0 2.0 1.0 +#pragma parameter masksize " CRT Mask Size (2.0 is nice in 4k) -- masksize" 0.0 0.0 2.0 1.0 #define masksize params.masksize -#pragma parameter mcut " Mask 5-7 cutoff -- mcut" 0.2 0.0 0.5 0.05 +#pragma parameter mcut " Mask 5-7-10 cutoff -- mcut" 0.2 0.0 0.5 0.05 #define mcut params.mcut -#pragma parameter maskDark " Lottes maskDark" 0.5 0.0 2 0.1 +#pragma parameter maskDark " Lottes maskDark" 0.5 0.0 2.0 0.1 #define maskDark params.maskDark #pragma parameter maskLight " Lottes maskLight" 1.5 0.0 2.0 0.1 #define maskLight params.maskLight -#pragma parameter CGWG " CGWG Mask Str. -- CGWG" 0.4 0 1 0.1 +#pragma parameter CGWG " CGWG Mask Str. -- CGWG" 0.4 0.0 1.0 0.1 #define CGWG params.CGWG +// #pragma parameter warpX "CurvatureX (default 0.03)" 0.0 0.0 0.25 0.01 +// #define warpX params.warpX + +// #pragma parameter warpY "CurvatureY (default 0.04)" 0.0 0.0 0.25 0.01 +// #define warpY params.warpY + +// #pragma parameter vignette "Vignette On/Off" 0.0 0.0 1.0 1.0 +// #define vignette params.vignette + #pragma stage vertex layout(location = 0) in vec4 Position; layout(location = 1) in vec2 TexCoord; @@ -152,9 +163,9 @@ vec3 Mask(vec2 pos, vec3 c) pos.x = fract(pos.x/3.0); - if (pos.x < 0.333) mask.r = maskLight; + if (pos.x < 0.333) mask.b = maskLight; else if (pos.x < 0.666) mask.g = maskLight; - else mask.b = maskLight; + else mask.r = maskLight; mask*=line; } @@ -164,9 +175,9 @@ vec3 Mask(vec2 pos, vec3 c) { pos.x = fract(pos.x/3.0); - if (pos.x < 0.333) mask.r = maskLight; + if (pos.x < 0.333) mask.b = maskLight; else if (pos.x < 0.666) mask.g = maskLight; - else mask.b = maskLight; + else mask.r = maskLight; } // Stretched VGA style shadow mask (same as prior shaders). @@ -175,9 +186,9 @@ vec3 Mask(vec2 pos, vec3 c) pos.x += pos.y*3.0; pos.x = fract(pos.x/6.0); - if (pos.x < 0.333) mask.r = maskLight; + if (pos.x < 0.333) mask.b = maskLight; else if (pos.x < 0.666) mask.g = maskLight; - else mask.b = maskLight; + else mask.r = maskLight; } // VGA style shadow mask. @@ -187,9 +198,9 @@ vec3 Mask(vec2 pos, vec3 c) pos.x += pos.y*3.0; pos.x = fract(pos.x/6.0); - if (pos.x < 0.333) mask.r = maskLight; + if (pos.x < 0.333) mask.b = maskLight; else if (pos.x < 0.666) mask.g = maskLight; - else mask.b = maskLight; + else mask.r = maskLight; } // Alternate mask 5 @@ -246,8 +257,91 @@ vec3 Mask(vec2 pos, vec3 c) else mask.g = maskLight; mask*=line; } + + else if (shadowMask == 9.0) + { + vec3 Mask = vec3(maskDark); + + float bright = maskLight; + float left = 0.0; + + + if (fract(pos.x/6.0) < 0.5) + left = 1.0; + + + float m = fract(pos.x/3.0); + + if (m < 0.3333) Mask.b = 0.9; + else if (m < 0.6666) Mask.g = 0.9; + else Mask.r = 0.9; + + if (mod(pos.y,2.0)==1.0 && left == 1.0 || mod(pos.y,2.0)==0.0 && left == 0.0 ) Mask*=bright; + + return Mask; + } + + else if (shadowMask == 10.0) + { + vec3 Mask = vec3(maskDark); + float line = maskLight; + float odd = 0.0; + + if (fract(pos.x/6.0) < 0.5) + odd = 1.0; + if (fract((pos.y + odd)/2.0) < 0.5) + line = 1.0; + + float m = fract(pos.x/3.0); + float y = fract(pos.y/2.0); + + if (m > 0.3333) {Mask.r = 1.0; Mask.b = 1.0;} + else if (m > 0.6666) Mask.g = 1.0; + else Mask = vec3(mcut); + if (m>0.333) Mask*=line; + return Mask; + } return mask; -} +} + +/* HSM Removed +mat3 vign( float l ) +{ + vec2 vpos = vTexCoord; + + vpos *= 1.0 - vpos.xy; + float vig = vpos.x * vpos.y * 40.0; + vig = min(pow(vig, 0.2), 1.0); + if (vignette == 0.0) vig=1.0; + + return mat3(vig, 0, 0, + 0, vig, 0, + 0, 0, vig); + +} + +// Distortion of scanlines, and end of screen alpha. +vec2 Warp(vec2 pos) +{ + pos = pos*2.0-1.0; + pos *= vec2(1.0 + (pos.y*pos.y)*warpX, 1.0 + (pos.x*pos.x)*warpY); + return pos*0.5 + 0.5; +} +*/ + +vec3 saturationFunction (vec3 textureColor) +{ + float lum=length(textureColor.rgb)*0.5775; + + vec3 luminanceWeighting = vec3(0.3,0.6,0.1); + if (lum<0.5) luminanceWeighting.rgb=(luminanceWeighting.rgb*luminanceWeighting.rgb)+(luminanceWeighting.rgb*luminanceWeighting.rgb); + + float luminance = dot(textureColor.rgb, luminanceWeighting); + vec3 greyScaleColor = vec3(luminance); + + vec3 res = vec3(mix(greyScaleColor, textureColor.rgb, saturation)); + return res; +} void main() { @@ -268,7 +362,7 @@ void main() SCREEN_ASPECT, bezel_outside_flat_coord, frame_outside_flat_coord); - cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (bezel_outside_flat_coord - 0.5) * 0.9 + 0.5; #endif #endif @@ -312,15 +406,18 @@ void main() vec3 color = color1*sw(f,luma1) + color2*sw(1.0-f,luma2); - color*=brightboost; color = min(color, 1.0); color = color * Mask(vTexCoord * global.OutputSize.xy, color); + float lum = color.r*0.3+color.g*0.6+color.b*0.1; // Apply difference between GAMMA_INPUT and HSM_GAMMA_OUT_CRT color = pow(color, vec3(GAMMA_INPUT / HSM_GAMMA_OUT_CRT) + 0.05); - - float l = length(color); - color = normalize(pow(color, vec3(saturation,saturation,saturation)))*l; + color*= mix(1.0,brightboost,lum); + + color = saturationFunction(color); + + // HSM Removed + // color*= vign(lum); FragColor = vec4(color, 1.0); } 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 4e3b4c3..3b8057a 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 @@ -255,7 +255,7 @@ void main() SCREEN_ASPECT, bezel_outside_flat_coord, frame_outside_flat_coord); - cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (bezel_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 0f00d36..24cb521 100644 --- a/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced.inc +++ b/bezel/Mega_Bezel/shaders/guest/hsm-crt-guest-advanced.inc @@ -273,7 +273,7 @@ void main() SCREEN_ASPECT, bezel_outside_flat_coord, frame_outside_flat_coord); - cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (bezel_outside_flat_coord - 0.5) * 0.9 + 0.5; #endif #endif @@ -643,7 +643,22 @@ if (abs(vertmask) > 0.025) USE_VERTICAL_SCANLINES * CROPPED_ROTATED_SIZE_WITH_RES_MULT.x; float hsm_no_scanlines = HSM_INTERLACE_MODE < 0 && HSM_INTERLACE_TRIGGER_RES <= scan_res ? 1 : no_scanlines; - color = (gc(color1)*w1*cd1 + gc(color2)*w2*cd2)/mix(1.0.xxx, w1+w2, hsm_no_scanlines); + // HSM Added + float screen_mask = HSM_GetCornerMask((screen_curved_coord - 0.5) * 0.999 + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_SCREEN_CORNER_RADIUS_SCALE, 0.9); + bool is_inside_screen = screen_mask > 0.001; + + // if (is_inside_screen) + color = (gc(color1)*w1*cd1 + gc(color2)*w2*cd2)/mix(1.0.xxx, w1+w2, hsm_no_scanlines); + + // TODO this bit was to remove scanlines outside of the screen, + // but it has a problem when scangamma is used, so is disabled for now + // else + // { + // color = (gc(color1)*w1*cd1 + gc(color2)*w2*cd2)/(w1+w2); + // vec3 color_no_scanline = gc(color1) + gc(color2); + // color = mix(color, color_no_scanline, hsm_no_scanlines); + // } + // End HSM Addition if (abs(rolling_scan) > 0.005) { diff --git a/bezel/Mega_Bezel/shaders/guest/hsm-deconvergence.inc b/bezel/Mega_Bezel/shaders/guest/hsm-deconvergence.inc index a82fef6..756cbe3 100644 --- a/bezel/Mega_Bezel/shaders/guest/hsm-deconvergence.inc +++ b/bezel/Mega_Bezel/shaders/guest/hsm-deconvergence.inc @@ -163,14 +163,14 @@ #pragma parameter slotmask1 " Slot Mask Strength Dark Pixels -- slotmask1" 0.0 0.0 1.0 0.05 #define slotmask1 global.slotmask1 -#pragma parameter slotwidth " Slot Mask Width -- slotwidth" 2.0 1.0 8.0 1.0 +#pragma parameter slotwidth " Slot Mask Width -- slotwidth" 2.0 1.0 16.0 1.0 #define slotwidth global.slotwidth // Slot Mask Width #pragma parameter double_slot " Slot Mask Height: 2x1 or 4x1... -- double_slot" 1.0 1.0 4.0 1.0 #define double_slot global.double_slot // Slot Mask Height -#pragma parameter slotms " Slot Mask Size - Auto | 2K | 4k -- slotms" 1.0 0.0 4.0 1.0 -#define slotms global.slotms // Slot Mask Size +#pragma parameter slotms " Slot Mask Thickness - Auto | 2K | 4k -- slotms" 1.0 0.0 4.0 1.0 +#define slotms global.slotms // Slot Mask Thickness #pragma parameter mclip " Keep Mask Effect with Clipping -- mclip" 0.0 0.0 1.0 0.05 #define mclip global.mclip @@ -231,6 +231,15 @@ // #pragma parameter post_br " Post CRT Brightness" 1.0 0.25 5.0 0.01 +#define red vec3(1, 0, 0) +#define green vec3(0, 1, 0) +#define blue vec3(0, 0, 1) +#define magenta vec3(1, 0, 1) +#define yellow vec3(1, 1, 0) +#define cyan vec3(0, 1, 1) +#define white vec3(1, 1, 1) +#define black vec3(0, 0, 0) + #define COMPAT_TEXTURE(c,d) texture(c,d) #define TEX0 vTexCoord @@ -283,7 +292,7 @@ float HSM_GetAutoScaledMaskSize(float in_masksize) // Shadow mask (1-4 from PD CRT Lottes shader). -vec3 Mask(vec2 pos, float mx, float mb) +vec3 Mask(vec2 pos, float mx, float mb, inout float mask_average_luma) { // HSM Added float final_mask_size = HSM_GetAutoScaledMaskSize(masksize); @@ -310,6 +319,7 @@ vec3 Mask(vec2 pos, float mx, float mb) */ vec3 mask = vec3(maskDark, maskDark, maskDark); + vec3 mask_average = vec3(maskDark, maskDark, maskDark); vec3 one = vec3(1.0); // brightness correcture masks 5-12 @@ -322,6 +332,9 @@ vec3 Mask(vec2 pos, float mx, float mb) if (shadowMask == -1.0) { mask = vec3(1.0); + mask_average = vec3(1.0); + mask_average_luma = 1; + return mask; } // Phosphor. @@ -330,6 +343,9 @@ vec3 Mask(vec2 pos, float mx, float mb) pos.x = fract(pos.x*0.5); if (pos.x < 0.49) { mask.r = 1.0; mask.g = mc; mask.b = 1.0; } else { mask.r = mc; mask.g = 1.0; mask.b = mc; } + + // HSM Added + mask_average = (black + white + white + vec3(1, mc, 1) + vec3(mc, 1, mc)) / 5; } // Very compressed TV style shadow mask. @@ -350,6 +366,14 @@ vec3 Mask(vec2 pos, float mx, float mb) else mask.b = maskLight; mask*=line; + + // HSM Added + mask_average = ( + vec3(maskLight, mask_average.g, mask_average.b) + + vec3(mask_average.r, maskLight, mask_average.b) + + vec3(mask_average.r, mask_average.g, maskLight)) + / 3; + mask_average *= (maskDark * 2 + maskLight) / 3.0; } // Aperture-grille. @@ -360,6 +384,13 @@ vec3 Mask(vec2 pos, float mx, float mb) if (pos.x < 0.5) mask.r = maskLight; else if (pos.x < 1.5) mask.g = maskLight; else mask.b = maskLight; + + // HSM Added + mask_average = (black + + vec3(maskLight, mask_average.g, mask_average.b) + + vec3(mask_average.r, maskLight, mask_average.b) + + vec3(mask_average.r, mask_average.g, maskLight)) + / 4; } // Stretched VGA style shadow mask (same as prior shaders). @@ -371,6 +402,14 @@ vec3 Mask(vec2 pos, float mx, float mb) if (pos.x < 0.3) mask.r = maskLight; else if (pos.x < 0.6) mask.g = maskLight; else mask.b = maskLight; + + // HSM Added + mask_average = (black + + white + + vec3(maskLight, mask_average.g, mask_average.b) + + vec3(mask_average.r, maskLight, mask_average.b) + + vec3(mask_average.r, mask_average.g, maskLight)) + / 5; } // VGA style shadow mask. @@ -380,9 +419,17 @@ vec3 Mask(vec2 pos, float mx, float mb) pos.x += pos.y*3.0; pos.x = fract(pos.x/6.0); - if (pos.x < 0.3) mask.r = maskLight; + if (pos.x < 0.3) mask.r = maskLight; else if (pos.x < 0.6) mask.g = maskLight; else mask.b = maskLight; + + // HSM Added + mask_average = (black + + white + + vec3(maskLight, mask_average.g, mask_average.b) + + vec3(mask_average.r, maskLight, mask_average.b) + + vec3(mask_average.r, mask_average.g, maskLight)) + / 5; } // Trinitron mask 5 @@ -396,6 +443,10 @@ vec3 Mask(vec2 pos, float mx, float mb) } else mask.g = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (magenta + green) / 2; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // Trinitron mask 6 @@ -407,6 +458,10 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 1.5) mask.g = 1.0; else mask.b = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (red + green + blue) / 3; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // BW Trinitron mask 7 @@ -419,6 +474,10 @@ vec3 Mask(vec2 pos, float mx, float mb) } else mask = 1.0.xxx; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (black + white) / 2; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // BW Trinitron mask 8 @@ -430,6 +489,10 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 0.6) mask = 1.0.xxx; else mask = 1.0.xxx; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (black + white + white) / 3.0; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // Magenta - Green - Black mask @@ -441,6 +504,10 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 0.6) mask.rb = 1.0.xx; else mask.g = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (black + black + magenta + green) / 4.0; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // RGBX @@ -453,6 +520,11 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 0.7) mask.g = 1.0; else mask.b = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + // mask_average = (black + red + green + blue) / 4.0; + mask_average = (red + green + blue) / 4.0; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // 4k mask @@ -465,6 +537,10 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 0.7) mask.gb = 1.0.xx; else mask.b = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (red + yellow + cyan + blue) / 4.0; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // RRGGBBX mask @@ -477,6 +553,11 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 4.5) mask.g = 1.0; else mask.b = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + // mask_average = (black + red * red + green * green + blue + blue) / 7.0; + mask_average = (red * red + green * green + blue + blue) / 6.0; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } // 4k mask @@ -491,12 +572,41 @@ vec3 Mask(vec2 pos, float mx, float mb) else if (pos.x < 4.5) mask.gb = 1.0.xx; else mask.b = 1.0; mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + + // HSM Added + mask_average = (black + red + yellow + white + cyan + blue) / 6.0; + mask_average = clamp(mix( mix(one, mask_average, mcut), mix(one, mask_average, maskstr), mx), 0.0, 1.0) * dark_compensate; } + // HSM Added + float maskmin_average = min(min(mask_average.r, mask_average.g), mask_average.b); + mask_average = (mask_average - maskmin_average) * (1.0 + (maskboost - 1.0) * mb) + maskmin_average; + mask_average_luma = dot(mask_average.rgb, vec3(0.299, 0.587, 0.114)); + float maskmin = min(min(mask.r,mask.g),mask.b); return (mask - maskmin) * (1.0 + (maskboost-1.0)*mb) + maskmin; } +// TODO need to instead just have a extra parameter to the mask functions to give the average back + +// HSM Added +// vec3 HSM_MaskAverage(vec2 start_pos, float mx, float mb) +// { +// int sample_count = 32; + +// vec3 mask_sum = vec3(0); + +// for(int i=0; i <= sample_count; i++) +// { +// for(int j=0; j <= sample_count; j++) +// { +// mask_sum += Mask(start_pos + vec2(i, j), mx, mb); +// } +// } + +// return vec3((mask_sum.r + mask_sum.g + mask_sum.b) / 3.0) / float(sample_count * sample_count); +// } + float SlotMask(vec2 pos, float m) { if ((slotmask + slotmask1) == 0.0) return 1.0; @@ -506,7 +616,7 @@ float SlotMask(vec2 pos, float m) // HSM Added float final_mask_size = HSM_GetAutoScaledMaskSize(slotms); - pos = floor(pos / final_mask_size); + pos.y = floor(pos.y / final_mask_size); // End HSM Added /* HSM Removed @@ -523,7 +633,17 @@ float SlotMask(vec2 pos, float m) return slot; } } - + +// HSM Added +float HSM_SlotMaskAverage(vec2 start_pos, float m) +{ + float slot_dark = mix(1.0 - slotmask1, 1.0 - slotmask, m); + float slot = (slotwidth * 1 + 2 * slot_dark + + double_slot * 1 + 2 * slot_dark) / + (slotwidth + 2 + double_slot + 2); + return slot; +} + /* HSM Removed vec2 Warp(vec2 pos) { @@ -723,11 +843,11 @@ void main() BEZEL_OUTSIDE_COORD, BEZEL_OUTSIDE_CURVED_COORD, FRAME_OUTSIDE_CURVED_COORD); - cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (BEZEL_OUTSIDE_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; @@ -806,7 +926,10 @@ if ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(glob */ // HSM Added - if (GDV_DECONVERGENCE_ON > 0.5 && ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(global.deconrgy) + abs(global.deconrb) + abs(global.deconrby)) > 0.2)) + float screen_mask = HSM_GetCornerMask((screen_curved_coord - 0.5) * 0.999 + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_SCREEN_CORNER_RADIUS_SCALE, 0.9); + bool is_inside_screen = screen_mask > 0.001; + + if (is_inside_screen && GDV_DECONVERGENCE_ON > 0.5 && ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(global.deconrgy) + abs(global.deconrb) + abs(global.deconrby)) > 0.2)) fetch_pixel(color, Bloom, pos1, pos); // deconvergence float cm = igc(max(max(color.r,color.g),color.b)); @@ -847,7 +970,15 @@ if ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(glob float smask = SlotMask(maskcoord, mx); smask = clamp(smask + mix(smask_mit, 0.0, min(w3, sqrt(max(max(orig1.r,orig1.g),orig1.b)))), 0.0, 1.0); - cmask*= Mask(maskcoord, mx, mb); + float mask_average_luma = 0; + cmask*= Mask(maskcoord, mx, mb, mask_average_luma); + + if (!is_inside_screen) + { + smask = HSM_SlotMaskAverage(vec2(0.5), mx); + smask = clamp(smask + mix(smask_mit, 0.0, min(w3, sqrt(max(max(orig1.r,orig1.g),orig1.b)))), 0.0, 1.0); + cmask = vec3(mask_average_luma); + } if (mask_layout > 0.5) cmask = cmask.rbg; diff --git a/bezel/Mega_Bezel/shaders/guest/hsm_crt-guest-advanced-release-version.txt b/bezel/Mega_Bezel/shaders/guest/hsm_crt-guest-advanced-release-version.txt index f9c5610..448a63e 100644 --- a/bezel/Mega_Bezel/shaders/guest/hsm_crt-guest-advanced-release-version.txt +++ b/bezel/Mega_Bezel/shaders/guest/hsm_crt-guest-advanced-release-version.txt @@ -1 +1 @@ -crt-guest-advanced-2023-02-25-release1 \ No newline at end of file +crt-guest-advanced-2023-03-11-release1 \ No newline at end of file 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 index bc03af5..24ae611 100644 --- 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 @@ -201,7 +201,7 @@ void main() BEZEL_OUTSIDE_COORD, BEZEL_OUTSIDE_CURVED_COORD, FRAME_OUTSIDE_CURVED_COORD); - cache_bounds_coord = (FRAME_OUTSIDE_CURVED_COORD - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (BEZEL_OUTSIDE_COORD - 0.5) * 0.9 + 0.5; #endif #endif diff --git a/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-no-reflect.slang b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-no-reflect.slang new file mode 100644 index 0000000..de014ef --- /dev/null +++ b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-no-reflect.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET +#include "../base/common/globals-and-screen-scale-params.inc" +#include "../base/common/common-functions.inc" +#include "hsm-lcd-grid-v2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-potato.slang b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-potato.slang new file mode 100644 index 0000000..9111884 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2-potato.slang @@ -0,0 +1,5 @@ +#version 450 + +#include "../base/common/globals-and-potato-params.inc" +#include "../base/common/common-functions.inc" +#include "hsm-crt-guest-advanced.inc" \ No newline at end of file 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 8b6e32b..5171108 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 @@ -106,28 +106,34 @@ void main() 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 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 = (BEZEL_OUTSIDE_COORD - 0.5) * 0.9 + 0.5; +#endif +#endif -// if (HHLP_IsOutsideCoordSpace(cache_bounds_coord)) -// { -// FragColor = vec4(0); -// return; -// } + if (HHLP_IsOutsideCoordSpace(cache_bounds_coord)) + { + FragColor = vec4(0); + return; + } vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(SCREEN_COORD); + + // HSM Added + float screen_mask = HSM_GetCornerMask((screen_curved_coord - 0.5) * 1.00 + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_SCREEN_CORNER_RADIUS_SCALE, 0.9); + vec2 curved_coord = HSM_GetMirrorWrappedCoord(screen_curved_coord); vec2 texelSize = 1 / CROPPED_ROTATED_SIZE_WITH_RES_MULT; // End Addition @@ -169,9 +175,11 @@ void main() vec3 averageColor = topLeftColor + bottomRightColor + bottomLeftColor + topRightColor; - averageColor = mat3(cred, cgreen, cblue) * averageColor; - // HSM Added + vec3 source_color = texture(Source, curved_coord).rgb; + vec3 averageColorOutsideScreen = mix(mat3(cred, cgreen, cblue) * source_color, source_color, 0.75); + averageColor = mix(averageColorOutsideScreen, averageColor, screen_mask); + FragColor = vec4(averageColor, 1); FragColor = pow(FragColor, vec4(1 / (HSM_GAMMA_OUT_CRT / DEFAULT_SRGB_GAMMA))); } diff --git a/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.slang b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.slang index be8f107..eb533df 100644 --- a/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.slang +++ b/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.slang @@ -2,4 +2,6 @@ #include "../base/common/globals-and-screen-scale-params.inc" #include "../base/common/common-functions.inc" +#include "../base/common/params-2-bezel.inc" +#include "../base/common/common-functions-bezel.inc" #include "hsm-lcd-grid-v2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc index 10a267a..5b9dc8b 100644 --- a/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc +++ b/bezel/Mega_Bezel/shaders/megatron/crt-sony-megatron.inc @@ -1164,7 +1164,7 @@ void main() SCREEN_ASPECT, bezel_outside_flat_coord, frame_outside_flat_coord); - cache_bounds_coord = (frame_outside_flat_coord - 0.5) * 0.9 + 0.5; + cache_bounds_coord = (bezel_outside_flat_coord - 0.5) * 0.9 + 0.5; #endif #endif