diff --git a/bezel/Mega_Bezel/MegaBezelLogo.png b/bezel/Mega_Bezel/MegaBezelLogo.png new file mode 100644 index 0000000..bf9a128 Binary files /dev/null and b/bezel/Mega_Bezel/MegaBezelLogo.png differ 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 new file mode 100644 index 0000000..89fdedc --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__EASYMODE.slangp @@ -0,0 +1,354 @@ +shaders = 40 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang +filter_linear29 = false +srgb_framebuffer29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang +filter_linear30 = false +srgb_framebuffer30 = true + +shader31 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang +filter_linear31 = false +srgb_framebuffer31 = true + +// Easymode's Shader! +shader32 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input35 = true +filter_linear35 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader37 = ../../../../blurs/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/blur9x9.slang +mipmap_input38 = true +filter_linear38 = true +scale_type38 = absolute +scale_x38 = 12 +scale_y38 = 12 +alias38 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Easymode Parameters +gamma_out = 2.2 + +// SMOOTH-ADV +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..0d0cad5 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-MINI.slangp @@ -0,0 +1,343 @@ +shaders = 38 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type30 = viewport +scale_x30 = 1.0 +scale_y30 = 1.0 +filter_linear30 = true + +g_sat = 0.15 + +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input33 = true +filter_linear33 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader35 = ../../../../blurs/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/blur9x9.slang +mipmap_input36 = true +filter_linear36 = true +scale_type36 = absolute +scale_x36 = 12 +scale_y36 = 12 +alias36 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..6b1cfda --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV-NTSC.slangp @@ -0,0 +1,405 @@ +shaders = 45 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear31 = true +scale_type_x31 = viewport +scale_x31 = 1.0 +scale_type_y31 = source +scale_y31 = 1.0 +float_framebuffer31 = true +alias31 = Pass1 + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 640.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 640.0 +scale_type_y33 = absolute +scale_y33 = 480.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 640.0 +scale_type_y34 = absolute +scale_y34 = 480.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-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 +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input40 = true +filter_linear40 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader42 = ../../../../blurs/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/blur9x9.slang +mipmap_input43 = true +filter_linear43 = true +scale_type43 = absolute +scale_x43 = 12 +scale_y43 = 12 +alias43 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..1ad3af2 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp @@ -0,0 +1,380 @@ +shaders = 42 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 800.0 +scale_type_y29 = source +scale_y29 = 1.0 +float_framebuffer29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear30 = true +scale_type_x30 = absolute +scale_x30 = 800.0 +scale_type_y30 = absolute +scale_y30 = 600.0 +float_framebuffer30 = true +alias30 = GlowPass + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear31 = true +scale_type_x31 = absolute +scale_x31 = 800.0 +scale_type_y31 = absolute +scale_y31 = 600.0 +float_framebuffer31 = true + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear32 = true +scale_type_x32 = source +scale_x32 = 1.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true +alias32 = BloomPass + +shader33 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear34 = true +scale_type34 = viewport +scale_x34 = 1.0 +scale_y34 = 1.0 + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.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 +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input37 = true +filter_linear37 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../../../blurs/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/blur9x9.slang +mipmap_input40 = true +filter_linear40 = true +scale_type40 = absolute +scale_x40 = 12 +scale_y40 = 12 +alias40 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type41 = viewport +alias41 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..0531518 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__LCD-GRID.slangp @@ -0,0 +1,340 @@ +shaders = 38 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader30 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear30 = "false" +scale_type30 = "viewport" +scale30 = "1.0" + +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input33 = true +filter_linear33 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader35 = ../../../../blurs/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/blur9x9.slang +mipmap_input36 = true +filter_linear36 = true +scale_type36 = absolute +scale_x36 = 12 +scale_y36 = 12 +alias36 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..1a22ae9 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON-NTSC.slangp @@ -0,0 +1,388 @@ +shaders = 41 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader31 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear31 = "false" +scale_type31 = "source" +scale31 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input31 = "false" +alias31 = "SourceSDR" + +shader32 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear32 = "false" +scale_type32 = "source" +scale32 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input32 = "false" +alias32 = "SourceHDR" + +shader33 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear33 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input33 = "false" +alias33 = "" +float_framebuffer33 = "false" +srgb_framebuffer33 = "false" +scale_type33 = "viewport" + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input36 = true +filter_linear36 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader38 = ../../../../blurs/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/blur9x9.slang +mipmap_input39 = true +filter_linear39 = true +scale_type39 = absolute +scale_x39 = 12 +scale_y39 = 12 +alias39 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..68f361a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__MEGATRON.slangp @@ -0,0 +1,372 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader29 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear29 = "false" +scale_type29 = "source" +scale29 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input29 = "false" +alias29 = "SourceSDR" + +shader30 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear30 = "false" +scale_type30 = "source" +scale30 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input30 = "false" +alias30 = "SourceHDR" + +shader31 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear31 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input31 = "false" +alias31 = "" +float_framebuffer31 = "false" +srgb_framebuffer31 = "false" +scale_type31 = "viewport" + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input34 = true +filter_linear34 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../../../blurs/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/blur9x9.slang +mipmap_input37 = true +filter_linear37 = true +scale_type37 = absolute +scale_x37 = 12 +scale_y37 = 12 +alias37 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..9eb9986 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV-NTSC.slangp @@ -0,0 +1,334 @@ +shaders = 42 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear31 = true +scale_type_x31 = viewport +scale_x31 = 1.0 +scale_type_y31 = source +scale_y31 = 1.0 +float_framebuffer31 = true +alias31 = Pass1 + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 640.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 640.0 +scale_type_y33 = absolute +scale_y33 = 480.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 640.0 +scale_type_y34 = absolute +scale_y34 = 480.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-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 +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang +filter_linear36 = true +float_framebuffer36 = true +scale_type36 = viewport +scale_x36 = 1.0 +scale_y36 = 1.0 + +shader37 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias38 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear39 = true +scale_type39 = viewport +float_framebuffer39 = true +alias39 = "BR_LayersUnderCRTPass" + +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear40 = true +scale_type40 = viewport +float_framebuffer40 = true +alias40 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..6ff238f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV.slangp @@ -0,0 +1,309 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 800.0 +scale_type_y29 = source +scale_y29 = 1.0 +float_framebuffer29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear30 = true +scale_type_x30 = absolute +scale_x30 = 800.0 +scale_type_y30 = absolute +scale_y30 = 600.0 +float_framebuffer30 = true +alias30 = GlowPass + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear31 = true +scale_type_x31 = absolute +scale_x31 = 800.0 +scale_type_y31 = absolute +scale_y31 = 600.0 +float_framebuffer31 = true + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear32 = true +scale_type_x32 = source +scale_x32 = 1.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true +alias32 = BloomPass + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-no-reflect.slang +filter_linear33 = true +float_framebuffer33 = true +scale_type33 = viewport +scale_x33 = 1.0 +scale_y33 = 1.0 + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-no-reflect.slang +filter_linear34 = true +scale_type34 = viewport +scale_x34 = 1.0 +scale_y34 = 1.0 + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias35 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..2ba1a45 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON-NTSC.slangp @@ -0,0 +1,317 @@ +shaders = 38 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader31 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear31 = "false" +scale_type31 = "source" +scale31 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input31 = "false" +alias31 = "SourceSDR" + +shader32 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear32 = "false" +scale_type32 = "source" +scale32 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input32 = "false" +alias32 = "SourceHDR" + +shader33 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang" +filter_linear33 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input33 = "false" +alias33 = "" +float_framebuffer33 = "false" +srgb_framebuffer33 = "false" +scale_type33 = "viewport" + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias34 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear35 = true +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_LayersUnderCRTPass" + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..4604722 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__MEGATRON.slangp @@ -0,0 +1,301 @@ +shaders = 36 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader29 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear29 = "false" +scale_type29 = "source" +scale29 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input29 = "false" +alias29 = "SourceSDR" + +shader30 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear30 = "false" +scale_type30 = "source" +scale30 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input30 = "false" +alias30 = "SourceHDR" + +shader31 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang" +filter_linear31 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input31 = "false" +alias31 = "" +float_framebuffer31 = "false" +srgb_framebuffer31 = "false" +scale_type31 = "viewport" + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias32 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersUnderCRTPass" + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear34 = true +scale_type34 = viewport +float_framebuffer34 = true +alias34 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..7a50ee7 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV-NTSC.slangp @@ -0,0 +1,388 @@ +shaders = 48 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear31 = true +scale_type_x31 = viewport +scale_x31 = 1.0 +scale_type_y31 = source +scale_y31 = 1.0 +float_framebuffer31 = true +alias31 = Pass1 + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 640.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 640.0 +scale_type_y33 = absolute +scale_y33 = 480.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 640.0 +scale_type_y34 = absolute +scale_y34 = 480.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-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 +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input40 = true +filter_linear40 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader42 = ../../../../blurs/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/blur9x9.slang +mipmap_input43 = true +filter_linear43 = true +scale_type43 = absolute +scale_x43 = 12 +scale_y43 = 12 +alias43 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type44 = viewport +float_framebuffer44 = true +alias44 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader45 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear45 = true +scale_type45 = viewport +float_framebuffer45 = true +alias45 = "BR_LayersUnderCRTPass" + +shader46 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear46 = true +scale_type46 = viewport +float_framebuffer46 = true +alias46 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader47 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..51dd617 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp @@ -0,0 +1,363 @@ +shaders = 45 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 800.0 +scale_type_y29 = source +scale_y29 = 1.0 +float_framebuffer29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear30 = true +scale_type_x30 = absolute +scale_x30 = 800.0 +scale_type_y30 = absolute +scale_y30 = 600.0 +float_framebuffer30 = true +alias30 = GlowPass + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear31 = true +scale_type_x31 = absolute +scale_x31 = 800.0 +scale_type_y31 = absolute +scale_y31 = 600.0 +float_framebuffer31 = true + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear32 = true +scale_type_x32 = source +scale_x32 = 1.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true +alias32 = BloomPass + +shader33 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear34 = true +scale_type34 = viewport +scale_x34 = 1.0 +scale_y34 = 1.0 + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input37 = true +filter_linear37 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../../../blurs/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/blur9x9.slang +mipmap_input40 = true +filter_linear40 = true +scale_type40 = absolute +scale_x40 = 12 +scale_y40 = 12 +alias40 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type41 = viewport +float_framebuffer41 = true +alias41 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader42 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear42 = true +scale_type42 = viewport +float_framebuffer42 = true +alias42 = "BR_LayersUnderCRTPass" + +shader43 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear43 = true +scale_type43 = viewport +float_framebuffer43 = true +alias43 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..3fe0432 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__LCD-GRID.slangp @@ -0,0 +1,323 @@ +shaders = 41 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader30 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear30 = "false" +scale_type30 = "viewport" +scale30 = "1.0" + +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input33 = true +filter_linear33 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader35 = ../../../../blurs/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/blur9x9.slang +mipmap_input36 = true +filter_linear36 = true +scale_type36 = absolute +scale_x36 = 12 +scale_y36 = 12 +alias36 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear38 = true +scale_type38 = viewport +float_framebuffer38 = true +alias38 = "BR_LayersUnderCRTPass" + +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear39 = true +scale_type39 = viewport +float_framebuffer39 = true +alias39 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 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 new file mode 100644 index 0000000..1b82707 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON-NTSC.slangp @@ -0,0 +1,371 @@ +shaders = 44 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader31 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear31 = "false" +scale_type31 = "source" +scale31 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input31 = "false" +alias31 = "SourceSDR" + +shader32 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear32 = "false" +scale_type32 = "source" +scale32 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input32 = "false" +alias32 = "SourceHDR" + +shader33 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear33 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input33 = "false" +alias33 = "" +float_framebuffer33 = "false" +srgb_framebuffer33 = "false" +scale_type33 = "viewport" + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input36 = true +filter_linear36 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader38 = ../../../../blurs/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/blur9x9.slang +mipmap_input39 = true +filter_linear39 = true +scale_type39 = absolute +scale_x39 = 12 +scale_y39 = 12 +alias39 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type40 = viewport +float_framebuffer40 = true +alias40 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear41 = true +scale_type41 = viewport +float_framebuffer41 = true +alias41 = "BR_LayersUnderCRTPass" + +shader42 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear42 = true +scale_type42 = viewport +float_framebuffer42 = true +alias42 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader43 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..64546eb --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__0__SMOOTH-ADV__MEGATRON.slangp @@ -0,0 +1,355 @@ +shaders = 42 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader29 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear29 = "false" +scale_type29 = "source" +scale29 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input29 = "false" +alias29 = "SourceSDR" + +shader30 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear30 = "false" +scale_type30 = "source" +scale30 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input30 = "false" +alias30 = "SourceHDR" + +shader31 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear31 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input31 = "false" +alias31 = "" +float_framebuffer31 = "false" +srgb_framebuffer31 = "false" +scale_type31 = "viewport" + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input34 = true +filter_linear34 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../../../blurs/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/blur9x9.slang +mipmap_input37 = true +filter_linear37 = true +scale_type37 = absolute +scale_x37 = 12 +scale_y37 = 12 +alias37 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type38 = viewport +float_framebuffer38 = true +alias38 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear39 = true +scale_type39 = viewport +float_framebuffer39 = true +alias39 = "BR_LayersUnderCRTPass" + +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear40 = true +scale_type40 = viewport +float_framebuffer40 = true +alias40 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..561d746 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV-RESHADE-FX__GDV.slangp @@ -0,0 +1,449 @@ +shaders = 48 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = "../../../../reshade/shaders/bloom/BloomPass0.slang" +filter_linear15 = "true" +wrap_mode0 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "SamplerBloom1" +float_framebuffer15 = "true" +srgb_framebuffer15 = "false" +scale_type_x15 = "source" +scale_x15 = "4.000000" +scale_type_y15 = "source" +scale_y15 = "4.000000" + +shader16 = "../../../../reshade/shaders/bloom/BloomPass1.slang" +filter_linear16 = "true" +wrap_mode1 = "clamp_to_border" +mipmap_input16 = "false" +alias16 = "SamplerBloom2" +float_framebuffer16 = "true" +srgb_framebuffer16 = "false" + +shader17 = "../../../../reshade/shaders/bloom/BloomPass2.slang" +filter_linear17 = "true" +wrap_mode2 = "clamp_to_border" +mipmap_input17 = "false" +alias17 = "SamplerBloom3" +float_framebuffer17 = "true" +srgb_framebuffer17 = "false" + +shader18 = "../../../../reshade/shaders/bloom/BloomPass3.slang" +filter_linear18 = "true" +wrap_mode3 = "clamp_to_border" +mipmap_input18 = "false" +alias18 = "SamplerBloom4" +float_framebuffer18 = "true" +srgb_framebuffer18 = "false" + +shader19 = "../../../../reshade/shaders/bloom/BloomPass4.slang" +filter_linear19 = "true" +wrap_mode4 = "clamp_to_border" +mipmap_input19 = "false" +alias19 = "SamplerBloom5" +float_framebuffer19 = "true" +srgb_framebuffer19 = "false" + +shader20 = "../../../../reshade/shaders/bloom/LensFlarePass0.slang" +filter_linear20 = "true" +wrap_mode5 = "clamp_to_border" +mipmap_input20 = "false" +alias20 = "LensFlare1" +float_framebuffer20 = "true" +srgb_framebuffer20 = "false" + +shader21 = "../../../../reshade/shaders/bloom/LensFlarePass1.slang" +filter_linear21 = "true" +wrap_mode6 = "clamp_to_border" +mipmap_input21 = "false" +alias21 = "LensFlare2" +float_framebuffer21 = "true" +srgb_framebuffer21 = "false" + +shader22 = "../../../../reshade/shaders/bloom/LensFlarePass2.slang" +filter_linear22 = "true" +wrap_mode7 = "clamp_to_border" +mipmap_input22 = "false" +alias22 = "LensFlare3" +float_framebuffer22 = "true" +srgb_framebuffer22 = "false" + +shader23 = "../../../../reshade/shaders/bloom/LightingCombine.slang" +filter_linear23 = "true" +wrap_mode8 = "clamp_to_border" +mipmap_input23 = "false" +alias23 = "" +float_framebuffer23 = "false" +srgb_framebuffer23 = "false" +scale_type_x23 = "source" +scale_x23 = "0.250000" +scale_type_y23 = "source" +scale_y23 = "0.250000" + +shader24 = ../../../../stock.slang +alias24 = "PreCRTPass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear25 = true +scale_type25 = source +scale25 = 1.0 +alias25 = "AfterglowPass" + +shader26 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../../../stock.slang +filter_linear29 = true +scale_type29 = source +scale_x29 = 1.0 +scale_y29 = 1.0 +alias29 = "PrePass" +mipmap_input29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +mipmap_input30 = true +alias30 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear31 = true +scale_type31 = source +scale31 = 1.0 +float_framebuffer31 = true +alias31 = "LinearizePass" + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 800.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 800.0 +scale_type_y33 = absolute +scale_y33 = 600.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 800.0 +scale_type_y34 = absolute +scale_y34 = 600.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear35 = true +scale_type_x35 = source +scale_x35 = 1.0 +scale_type_y35 = source +scale_y35 = 1.0 +float_framebuffer35 = true +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear36 = true +float_framebuffer36 = true +scale_type36 = viewport +scale_x36 = 1.0 +scale_y36 = 1.0 + +shader37 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input40 = true +filter_linear40 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader42 = ../../../../blurs/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/blur9x9.slang +mipmap_input43 = true +filter_linear43 = true +scale_type43 = absolute +scale_x43 = 12 +scale_y43 = 12 +alias43 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type44 = viewport +float_framebuffer44 = true +alias44 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader45 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear45 = true +scale_type45 = viewport +float_framebuffer45 = true +alias45 = "BR_LayersUnderCRTPass" + +shader46 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear46 = true +scale_type46 = viewport +float_framebuffer46 = true +alias46 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader47 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type47 = viewport +alias47 = "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;LEDImage;TopLayerImage;" + +Dirt = ../../../../reshade/shaders/bloom/LensDB.png +Dirt_wrap_mode = "clamp_to_border" +Dirt_mipmap = "false" + +Sprite = ../../../../reshade/shaders/bloom/LensSprite.png +Sprite_wrap_mode = "clamp_to_border" +Sprite_mipmap = "false" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Reshade-FX +MDAPT_MODE = 1 + +bLensdirtEnable_toggle = "1.000000" +bAnamFlareEnable_toggle = "1.000000" +bChapFlareEnable_toggle = "1.000000" +bGodrayEnable_toggle = "1.000000" +iBloomMixmode = "1.000000" +fBloomAmount = "1.500000" +fBloomSaturation = "1.100000" +fBloomTint_r = "1.000000" +fBloomTint_g = "0.500000" +fBloomTint_b = "0.800000" +iLensdirtMixmode = "1.000000" +fAnamFlareWideness = "1.200000" +fAnamFlareAmount = "2.500000" +fChapFlareIntensity = "10.000000" +fGodrayDecay = "0.999900" +fGodrayWeight = "0.400000" +fGodrayThreshold = "0.850000" +iGodraySamples = "48.000000" +fFlareLuminance = "0.875000" +fFlareBlur = "10000.000000" +fFlareIntensity = "1.570000" +fFlareTint_r = "1.000000" +fFlareTint_g = "1.000000" +glow = "0.000000" +gamma_c = "1.100000" +brightboost1 = "1.300000" +scanline2 = "15.000000" +beam_min = "1.999999" +shadowMask = "10.000000" +deconrr = "-1.000000" +deconrb = "1.000000" +deconrry = "-1.000000" +deconrby = "1.000000" +post_br = "1.100000" 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 new file mode 100644 index 0000000..1c3c5bf --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__EASYMODE.slangp @@ -0,0 +1,297 @@ +shaders = 37 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang +filter_linear23 = false +srgb_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang +filter_linear24 = false +srgb_framebuffer24 = true + +shader25 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang +filter_linear25 = false +srgb_framebuffer25 = true + +// Easymode's Shader! +shader26 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang +filter_linear26 = true +scale_type26 = viewport +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias27 = "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 +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input28 = true +filter_linear28 = true +scale_type28 = absolute +// scale_x28 = 480 +// scale_y28 = 270 +// scale_x28 = 960 +// scale_y28 = 540 +scale_x28 = 800 +scale_y28 = 600 +alias28 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input29 = true +filter_linear29 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear30 = true +alias30 = "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 +shader31 = ../../../../blurs/blur9x9.slang +mipmap_input31 = true +filter_linear31 = true +scale_type31 = absolute +scale_x31 = 128 +scale_y31 = 128 +alias31 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader32 = ../../../../blurs/blur9x9.slang +mipmap_input32 = true +filter_linear32 = true +scale_type32 = absolute +scale_x32 = 12 +scale_y32 = 12 +alias32 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear34 = true +scale_type34 = viewport +float_framebuffer34 = true +alias34 = "BR_LayersUnderCRTPass" + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear35 = true +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Easymode Parameters +gamma_out = 2.2 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 new file mode 100644 index 0000000..151935a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI-NTSC.slangp @@ -0,0 +1,302 @@ +shaders = 37 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type26 = viewport +scale_x26 = 1.0 +scale_y26 = 1.0 +filter_linear26 = true + +g_sat = 0.15 + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias27 = "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 +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input28 = true +filter_linear28 = true +scale_type28 = absolute +// scale_x28 = 480 +// scale_y28 = 270 +// scale_x28 = 960 +// scale_y28 = 540 +scale_x28 = 800 +scale_y28 = 600 +alias28 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input29 = true +filter_linear29 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear30 = true +alias30 = "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 +shader31 = ../../../../blurs/blur9x9.slang +mipmap_input31 = true +filter_linear31 = true +scale_type31 = absolute +scale_x31 = 128 +scale_y31 = 128 +alias31 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader32 = ../../../../blurs/blur9x9.slang +mipmap_input32 = true +filter_linear32 = true +scale_type32 = absolute +scale_x32 = 12 +scale_y32 = 12 +alias32 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear34 = true +scale_type34 = viewport +float_framebuffer34 = true +alias34 = "BR_LayersUnderCRTPass" + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear35 = true +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..357697d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-MINI.slangp @@ -0,0 +1,286 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 +filter_linear24 = true + +g_sat = 0.15 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..be96b37 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV-NTSC.slangp @@ -0,0 +1,348 @@ +shaders = 42 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear25 = true +scale_type_x25 = viewport +scale_x25 = 1.0 +scale_type_y25 = source +scale_y25 = 1.0 +float_framebuffer25 = true +alias25 = Pass1 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear26 = true +scale_type_x26 = absolute +scale_x26 = 640.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear27 = true +scale_type_x27 = absolute +scale_x27 = 640.0 +scale_type_y27 = absolute +scale_y27 = 480.0 +float_framebuffer27 = true +alias27 = GlowPass + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear28 = true +scale_type_x28 = absolute +scale_x28 = 640.0 +scale_type_y28 = absolute +scale_y28 = 480.0 +float_framebuffer28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 640.0 +scale_type_y29 = absolute +scale_y29 = 480.0 +float_framebuffer29 = true +alias29 = BloomPass + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang +filter_linear30 = true +float_framebuffer30 = true +scale_type30 = viewport +scale_x30 = 1.0 +scale_y30 = 1.0 + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear31 = true +scale_type31 = viewport +scale_x31 = 1.0 +scale_y31 = 1.0 + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input34 = true +filter_linear34 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../../../blurs/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/blur9x9.slang +mipmap_input37 = true +filter_linear37 = true +scale_type37 = absolute +scale_x37 = 12 +scale_y37 = 12 +alias37 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type38 = viewport +float_framebuffer38 = true +alias38 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear39 = true +scale_type39 = viewport +float_framebuffer39 = true +alias39 = "BR_LayersUnderCRTPass" + +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear40 = true +scale_type40 = viewport +float_framebuffer40 = true +alias40 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..f2b3d66 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV.slangp @@ -0,0 +1,323 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..13f9335 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__LCD-GRID.slangp @@ -0,0 +1,283 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear24 = "false" +scale_type24 = "viewport" +scale24 = "1.0" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..8504b26 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON-NTSC.slangp @@ -0,0 +1,331 @@ +shaders = 38 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader25 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear25 = "false" +scale_type25 = "source" +scale25 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input25 = "false" +alias25 = "SourceSDR" + +shader26 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear26 = "false" +scale_type26 = "source" +scale26 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input26 = "false" +alias26 = "SourceHDR" + +shader27 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear27 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input27 = "false" +alias27 = "" +float_framebuffer27 = "false" +srgb_framebuffer27 = "false" +scale_type27 = "viewport" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias28 = "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 +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input29 = true +filter_linear29 = true +scale_type29 = absolute +// scale_x29 = 480 +// scale_y29 = 270 +// scale_x29 = 960 +// scale_y29 = 540 +scale_x29 = 800 +scale_y29 = 600 +alias29 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input30 = true +filter_linear30 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear31 = true +alias31 = "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 +shader32 = ../../../../blurs/blur9x9.slang +mipmap_input32 = true +filter_linear32 = true +scale_type32 = absolute +scale_x32 = 128 +scale_y32 = 128 +alias32 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader33 = ../../../../blurs/blur9x9.slang +mipmap_input33 = true +filter_linear33 = true +scale_type33 = absolute +scale_x33 = 12 +scale_y33 = 12 +alias33 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type34 = viewport +float_framebuffer34 = true +alias34 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear35 = true +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_LayersUnderCRTPass" + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..e51d989 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__MEGATRON.slangp @@ -0,0 +1,315 @@ +shaders = 36 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader23 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear23 = "false" +scale_type23 = "source" +scale23 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input23 = "false" +alias23 = "SourceSDR" + +shader24 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear24 = "false" +scale_type24 = "source" +scale24 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input24 = "false" +alias24 = "SourceHDR" + +shader25 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear25 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input25 = "false" +alias25 = "" +float_framebuffer25 = "false" +srgb_framebuffer25 = "false" +scale_type25 = "viewport" + +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input28 = true +filter_linear28 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input31 = true +filter_linear31 = true +scale_type31 = absolute +scale_x31 = 12 +scale_y31 = 12 +alias31 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersUnderCRTPass" + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear34 = true +scale_type34 = viewport +float_framebuffer34 = true +alias34 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..6443e2c --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS-RESHADE-FX__GDV.slangp @@ -0,0 +1,466 @@ +shaders = 45 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = "../../../../reshade/shaders/bloom/BloomPass0.slang" +filter_linear15 = "true" +wrap_mode0 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "SamplerBloom1" +float_framebuffer15 = "true" +srgb_framebuffer15 = "false" +scale_type_x15 = "source" +scale_x15 = "4.000000" +scale_type_y15 = "source" +scale_y15 = "4.000000" + +shader16 = "../../../../reshade/shaders/bloom/BloomPass1.slang" +filter_linear16 = "true" +wrap_mode1 = "clamp_to_border" +mipmap_input16 = "false" +alias16 = "SamplerBloom2" +float_framebuffer16 = "true" +srgb_framebuffer16 = "false" + +shader17 = "../../../../reshade/shaders/bloom/BloomPass2.slang" +filter_linear17 = "true" +wrap_mode2 = "clamp_to_border" +mipmap_input17 = "false" +alias17 = "SamplerBloom3" +float_framebuffer17 = "true" +srgb_framebuffer17 = "false" + +shader18 = "../../../../reshade/shaders/bloom/BloomPass3.slang" +filter_linear18 = "true" +wrap_mode3 = "clamp_to_border" +mipmap_input18 = "false" +alias18 = "SamplerBloom4" +float_framebuffer18 = "true" +srgb_framebuffer18 = "false" + +shader19 = "../../../../reshade/shaders/bloom/BloomPass4.slang" +filter_linear19 = "true" +wrap_mode4 = "clamp_to_border" +mipmap_input19 = "false" +alias19 = "SamplerBloom5" +float_framebuffer19 = "true" +srgb_framebuffer19 = "false" + +shader20 = "../../../../reshade/shaders/bloom/LensFlarePass0.slang" +filter_linear20 = "true" +wrap_mode5 = "clamp_to_border" +mipmap_input20 = "false" +alias20 = "LensFlare1" +float_framebuffer20 = "true" +srgb_framebuffer20 = "false" + +shader21 = "../../../../reshade/shaders/bloom/LensFlarePass1.slang" +filter_linear21 = "true" +wrap_mode6 = "clamp_to_border" +mipmap_input21 = "false" +alias21 = "LensFlare2" +float_framebuffer21 = "true" +srgb_framebuffer21 = "false" + +shader22 = "../../../../reshade/shaders/bloom/LensFlarePass2.slang" +filter_linear22 = "true" +wrap_mode7 = "clamp_to_border" +mipmap_input22 = "false" +alias22 = "LensFlare3" +float_framebuffer22 = "true" +srgb_framebuffer22 = "false" + +shader23 = "../../../../reshade/shaders/bloom/LightingCombine.slang" +filter_linear23 = "true" +wrap_mode8 = "clamp_to_border" +mipmap_input23 = "false" +alias23 = "" +float_framebuffer23 = "false" +srgb_framebuffer23 = "false" +scale_type_x23 = "source" +scale_x23 = "0.250000" +scale_type_y23 = "source" +scale_y23 = "0.250000" + +shader24 = ../../../../stock.slang +alias24 = "PreCRTPass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear25 = true +scale_type25 = source +scale25 = 1.0 +alias25 = "AfterglowPass" + +shader26 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../../../stock.slang +filter_linear29 = true +scale_type29 = source +scale_x29 = 1.0 +scale_y29 = 1.0 +alias29 = "PrePass" +mipmap_input29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +mipmap_input30 = true +alias30 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear31 = true +scale_type31 = source +scale31 = 1.0 +float_framebuffer31 = true +alias31 = "LinearizePass" + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 800.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 800.0 +scale_type_y33 = absolute +scale_y33 = 600.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 800.0 +scale_type_y34 = absolute +scale_y34 = 600.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear35 = true +scale_type_x35 = source +scale_x35 = 1.0 +scale_type_y35 = source +scale_y35 = 1.0 +float_framebuffer35 = true +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear36 = true +float_framebuffer36 = true +scale_type36 = viewport +scale_x36 = 1.0 +scale_y36 = 1.0 + +shader37 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input40 = true +filter_linear40 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader42 = ../../../../blurs/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/blur9x9.slang +mipmap_input43 = true +filter_linear43 = true +scale_type43 = absolute +scale_x43 = 12 +scale_y43 = 12 +alias43 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type44 = viewport +alias44 = "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;LEDImage;TopLayerImage;" + +Dirt = ../../../../reshade/shaders/bloom/LensDB.png +Dirt_wrap_mode = "clamp_to_border" +Dirt_mipmap = "false" + +Sprite = ../../../../reshade/shaders/bloom/LensSprite.png +Sprite_wrap_mode = "clamp_to_border" +Sprite_mipmap = "false" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Reshade-FX +MDAPT_MODE = 1 + +bLensdirtEnable_toggle = "1.000000" +bAnamFlareEnable_toggle = "1.000000" +bChapFlareEnable_toggle = "1.000000" +bGodrayEnable_toggle = "1.000000" +iBloomMixmode = "1.000000" +fBloomAmount = "1.500000" +fBloomSaturation = "1.100000" +fBloomTint_r = "1.000000" +fBloomTint_g = "0.500000" +fBloomTint_b = "0.800000" +iLensdirtMixmode = "1.000000" +fAnamFlareWideness = "1.200000" +fAnamFlareAmount = "2.500000" +fChapFlareIntensity = "10.000000" +fGodrayDecay = "0.999900" +fGodrayWeight = "0.400000" +fGodrayThreshold = "0.850000" +iGodraySamples = "48.000000" +fFlareLuminance = "0.875000" +fFlareBlur = "10000.000000" +fFlareIntensity = "1.570000" +fFlareTint_r = "1.000000" +fFlareTint_g = "1.000000" +glow = "0.000000" +gamma_c = "1.100000" +brightboost1 = "1.300000" +scanline2 = "15.000000" +beam_min = "1.999999" +shadowMask = "10.000000" +deconrr = "-1.000000" +deconrb = "1.000000" +deconrry = "-1.000000" +deconrby = "1.000000" +post_br = "1.100000" 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 new file mode 100644 index 0000000..2dd0d69 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__EASYMODE.slangp @@ -0,0 +1,314 @@ +shaders = 34 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang +filter_linear23 = false +srgb_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang +filter_linear24 = false +srgb_framebuffer24 = true + +shader25 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang +filter_linear25 = false +srgb_framebuffer25 = true + +// Easymode's Shader! +shader26 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang +filter_linear26 = true +scale_type26 = viewport +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias27 = "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 +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input28 = true +filter_linear28 = true +scale_type28 = absolute +// scale_x28 = 480 +// scale_y28 = 270 +// scale_x28 = 960 +// scale_y28 = 540 +scale_x28 = 800 +scale_y28 = 600 +alias28 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input29 = true +filter_linear29 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear30 = true +alias30 = "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 +shader31 = ../../../../blurs/blur9x9.slang +mipmap_input31 = true +filter_linear31 = true +scale_type31 = absolute +scale_x31 = 128 +scale_y31 = 128 +alias31 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader32 = ../../../../blurs/blur9x9.slang +mipmap_input32 = true +filter_linear32 = true +scale_type32 = absolute +scale_x32 = 12 +scale_y32 = 12 +alias32 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type33 = viewport +alias33 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Easymode Parameters +gamma_out = 2.2 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 new file mode 100644 index 0000000..480cdaa --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI-NTSC.slangp @@ -0,0 +1,319 @@ +shaders = 34 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type26 = viewport +scale_x26 = 1.0 +scale_y26 = 1.0 +filter_linear26 = true + +g_sat = 0.15 + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias27 = "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 +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input28 = true +filter_linear28 = true +scale_type28 = absolute +// scale_x28 = 480 +// scale_y28 = 270 +// scale_x28 = 960 +// scale_y28 = 540 +scale_x28 = 800 +scale_y28 = 600 +alias28 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input29 = true +filter_linear29 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear30 = true +alias30 = "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 +shader31 = ../../../../blurs/blur9x9.slang +mipmap_input31 = true +filter_linear31 = true +scale_type31 = absolute +scale_x31 = 128 +scale_y31 = 128 +alias31 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader32 = ../../../../blurs/blur9x9.slang +mipmap_input32 = true +filter_linear32 = true +scale_type32 = absolute +scale_x32 = 12 +scale_y32 = 12 +alias32 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type33 = viewport +alias33 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 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 new file mode 100644 index 0000000..f2c1cc5 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-MINI.slangp @@ -0,0 +1,303 @@ +shaders = 32 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 +filter_linear24 = true + +g_sat = 0.15 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" 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 new file mode 100644 index 0000000..0b1f89a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV-NTSC.slangp @@ -0,0 +1,365 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear25 = true +scale_type_x25 = viewport +scale_x25 = 1.0 +scale_type_y25 = source +scale_y25 = 1.0 +float_framebuffer25 = true +alias25 = Pass1 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear26 = true +scale_type_x26 = absolute +scale_x26 = 640.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear27 = true +scale_type_x27 = absolute +scale_x27 = 640.0 +scale_type_y27 = absolute +scale_y27 = 480.0 +float_framebuffer27 = true +alias27 = GlowPass + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear28 = true +scale_type_x28 = absolute +scale_x28 = 640.0 +scale_type_y28 = absolute +scale_y28 = 480.0 +float_framebuffer28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 640.0 +scale_type_y29 = absolute +scale_y29 = 480.0 +float_framebuffer29 = true +alias29 = BloomPass + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang +filter_linear30 = true +float_framebuffer30 = true +scale_type30 = viewport +scale_x30 = 1.0 +scale_y30 = 1.0 + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear31 = true +scale_type31 = viewport +scale_x31 = 1.0 +scale_y31 = 1.0 + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input34 = true +filter_linear34 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../../../blurs/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/blur9x9.slang +mipmap_input37 = true +filter_linear37 = true +scale_type37 = absolute +scale_x37 = 12 +scale_y37 = 12 +alias37 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 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 new file mode 100644 index 0000000..2d7aac4 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp @@ -0,0 +1,340 @@ +shaders = 36 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type35 = viewport +alias35 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" 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 new file mode 100644 index 0000000..7007783 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__LCD-GRID.slangp @@ -0,0 +1,300 @@ +shaders = 32 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear24 = "false" +scale_type24 = "viewport" +scale24 = "1.0" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" 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 new file mode 100644 index 0000000..01ce334 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON-NTSC.slangp @@ -0,0 +1,348 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader25 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear25 = "false" +scale_type25 = "source" +scale25 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input25 = "false" +alias25 = "SourceSDR" + +shader26 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear26 = "false" +scale_type26 = "source" +scale26 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input26 = "false" +alias26 = "SourceHDR" + +shader27 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear27 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input27 = "false" +alias27 = "" +float_framebuffer27 = "false" +srgb_framebuffer27 = "false" +scale_type27 = "viewport" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias28 = "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 +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input29 = true +filter_linear29 = true +scale_type29 = absolute +// scale_x29 = 480 +// scale_y29 = 270 +// scale_x29 = 960 +// scale_y29 = 540 +scale_x29 = 800 +scale_y29 = 600 +alias29 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input30 = true +filter_linear30 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear31 = true +alias31 = "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 +shader32 = ../../../../blurs/blur9x9.slang +mipmap_input32 = true +filter_linear32 = true +scale_type32 = absolute +scale_x32 = 128 +scale_y32 = 128 +alias32 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader33 = ../../../../blurs/blur9x9.slang +mipmap_input33 = true +filter_linear33 = true +scale_type33 = absolute +scale_x33 = 12 +scale_y33 = 12 +alias33 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type34 = viewport +alias34 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..91c8866 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-GLASS__MEGATRON.slangp @@ -0,0 +1,332 @@ +shaders = 33 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader23 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear23 = "false" +scale_type23 = "source" +scale23 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input23 = "false" +alias23 = "SourceSDR" + +shader24 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear24 = "false" +scale_type24 = "source" +scale24 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input24 = "false" +alias24 = "SourceHDR" + +shader25 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear25 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input25 = "false" +alias25 = "" +float_framebuffer25 = "false" +srgb_framebuffer25 = "false" +scale_type25 = "viewport" + +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input28 = true +filter_linear28 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input31 = true +filter_linear31 = true +scale_type31 = absolute +scale_x31 = 12 +scale_y31 = 12 +alias31 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang +scale_type32 = viewport +alias32 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..0299594 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV-NTSC.slangp @@ -0,0 +1,294 @@ +shaders = 36 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear25 = true +scale_type_x25 = viewport +scale_x25 = 1.0 +scale_type_y25 = source +scale_y25 = 1.0 +float_framebuffer25 = true +alias25 = Pass1 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear26 = true +scale_type_x26 = absolute +scale_x26 = 640.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear27 = true +scale_type_x27 = absolute +scale_x27 = 640.0 +scale_type_y27 = absolute +scale_y27 = 480.0 +float_framebuffer27 = true +alias27 = GlowPass + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear28 = true +scale_type_x28 = absolute +scale_x28 = 640.0 +scale_type_y28 = absolute +scale_y28 = 480.0 +float_framebuffer28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 640.0 +scale_type_y29 = absolute +scale_y29 = 480.0 +float_framebuffer29 = true +alias29 = BloomPass + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang +filter_linear30 = true +float_framebuffer30 = true +scale_type30 = viewport +scale_x30 = 1.0 +scale_y30 = 1.0 + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear31 = true +scale_type31 = viewport +scale_x31 = 1.0 +scale_y31 = 1.0 + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias32 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersUnderCRTPass" + +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear34 = true +scale_type34 = viewport +float_framebuffer34 = true +alias34 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..a0d3a36 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp @@ -0,0 +1,269 @@ +shaders = 33 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-no-reflect.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-no-reflect.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias29 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear30 = true +scale_type30 = viewport +float_framebuffer30 = true +alias30 = "BR_LayersUnderCRTPass" + +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear31 = true +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.slang +scale_type32 = viewport +alias32 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..acccd30 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON-NTSC.slangp @@ -0,0 +1,277 @@ +shaders = 32 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader25 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear25 = "false" +scale_type25 = "source" +scale25 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input25 = "false" +alias25 = "SourceSDR" + +shader26 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear26 = "false" +scale_type26 = "source" +scale26 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input26 = "false" +alias26 = "SourceHDR" + +shader27 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang" +filter_linear27 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input27 = "false" +alias27 = "" +float_framebuffer27 = "false" +srgb_framebuffer27 = "false" +scale_type27 = "viewport" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias28 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear29 = true +scale_type29 = viewport +float_framebuffer29 = true +alias29 = "BR_LayersUnderCRTPass" + +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear30 = true +scale_type30 = viewport +float_framebuffer30 = true +alias30 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.slang +scale_type31 = viewport +alias31 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..16a1ec2 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__MEGATRON.slangp @@ -0,0 +1,261 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader23 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear23 = "false" +scale_type23 = "source" +scale23 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input23 = "false" +alias23 = "SourceSDR" + +shader24 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear24 = "false" +scale_type24 = "source" +scale24 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input24 = "false" +alias24 = "SourceHDR" + +shader25 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang" +filter_linear25 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input25 = "false" +alias25 = "" +float_framebuffer25 = "false" +srgb_framebuffer25 = "false" +scale_type25 = "viewport" + +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias26 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..8998c36 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI-NTSC.slangp @@ -0,0 +1,307 @@ +shaders = 27 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 +filter_linear19 = true + +g_sat = 0.15 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 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 new file mode 100644 index 0000000..6b96c5f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-MINI.slangp @@ -0,0 +1,277 @@ +shaders = 23 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type15 = viewport +scale_x15 = 1.0 +scale_y15 = 1.0 +filter_linear15 = true + +g_sat = 0.15 + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias16 = "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 +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input17 = true +filter_linear17 = true +scale_type17 = absolute +// scale_x17 = 480 +// scale_y17 = 270 +// scale_x17 = 960 +// scale_y17 = 540 +scale_x17 = 800 +scale_y17 = 600 +alias17 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input18 = true +filter_linear18 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear19 = true +alias19 = "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 +shader20 = ../../../../blurs/blur9x9.slang +mipmap_input20 = true +filter_linear20 = true +scale_type20 = absolute +scale_x20 = 128 +scale_y20 = 128 +alias20 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 12 +scale_y21 = 12 +alias21 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" 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 new file mode 100644 index 0000000..11b3f17 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV-NTSC.slangp @@ -0,0 +1,353 @@ +shaders = 32 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear24 = true +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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 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 new file mode 100644 index 0000000..f6c557c --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__GDV.slangp @@ -0,0 +1,314 @@ +shaders = 27 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" 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 new file mode 100644 index 0000000..ba930b0 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__LCD-GRID.slangp @@ -0,0 +1,274 @@ +shaders = 23 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear15 = "false" +scale_type15 = "viewport" +scale15 = "1.0" + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias16 = "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 +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input17 = true +filter_linear17 = true +scale_type17 = absolute +// scale_x17 = 480 +// scale_y17 = 270 +// scale_x17 = 960 +// scale_y17 = 540 +scale_x17 = 800 +scale_y17 = 600 +alias17 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input18 = true +filter_linear18 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear19 = true +alias19 = "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 +shader20 = ../../../../blurs/blur9x9.slang +mipmap_input20 = true +filter_linear20 = true +scale_type20 = absolute +scale_x20 = 128 +scale_y20 = 128 +alias20 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 12 +scale_y21 = 12 +alias21 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" 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 new file mode 100644 index 0000000..0ea2661 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON-NTSC.slangp @@ -0,0 +1,336 @@ +shaders = 28 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader18 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear18 = "false" +scale_type18 = "source" +scale18 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input18 = "false" +alias18 = "SourceSDR" + +shader19 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear19 = "false" +scale_type19 = "source" +scale19 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input19 = "false" +alias19 = "SourceHDR" + +shader20 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear20 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input20 = "false" +alias20 = "" +float_framebuffer20 = "false" +srgb_framebuffer20 = "false" +scale_type20 = "viewport" + +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias21 = "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 +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input22 = true +filter_linear22 = true +scale_type22 = absolute +// scale_x22 = 480 +// scale_y22 = 270 +// scale_x22 = 960 +// scale_y22 = 540 +scale_x22 = 800 +scale_y22 = 600 +alias22 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input23 = true +filter_linear23 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear24 = true +alias24 = "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 +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 128 +scale_y25 = 128 +alias25 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader26 = ../../../../blurs/blur9x9.slang +mipmap_input26 = true +filter_linear26 = true +scale_type26 = absolute +scale_x26 = 12 +scale_y26 = 12 +alias26 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..c16276e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD-GLASS__MEGATRON.slangp @@ -0,0 +1,306 @@ +shaders = 24 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader14 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear14 = "false" +scale_type14 = "source" +scale14 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input14 = "false" +alias14 = "SourceSDR" + +shader15 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear15 = "false" +scale_type15 = "source" +scale15 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "SourceHDR" + +shader16 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear16 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input16 = "false" +alias16 = "" +float_framebuffer16 = "false" +srgb_framebuffer16 = "false" +scale_type16 = "viewport" + +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang +alias17 = "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 +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input18 = true +filter_linear18 = true +scale_type18 = absolute +// scale_x18 = 480 +// scale_y18 = 270 +// scale_x18 = 960 +// scale_y18 = 540 +scale_x18 = 800 +scale_y18 = 600 +alias18 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input19 = true +filter_linear19 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear20 = true +alias20 = "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 +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 128 +scale_y21 = 128 +alias21 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader22 = ../../../../blurs/blur9x9.slang +mipmap_input22 = true +filter_linear22 = true +scale_type22 = absolute +scale_x22 = 12 +scale_y22 = 12 +alias22 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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_REFLECT_IS_LAST_PASS = "1.000000" +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" + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..7147c75 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__EASYMODE.slangp @@ -0,0 +1,271 @@ +shaders = 28 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang +filter_linear14 = false +srgb_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang +filter_linear15 = false +srgb_framebuffer15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang +filter_linear16 = false +srgb_framebuffer16 = true + +// Easymode's Shader! +shader17 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang +filter_linear17 = true +scale_type17 = viewport +float_framebuffer17 = true + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias18 = "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 +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input19 = true +filter_linear19 = true +scale_type19 = absolute +// scale_x19 = 480 +// scale_y19 = 270 +// scale_x19 = 960 +// scale_y19 = 540 +scale_x19 = 800 +scale_y19 = 600 +alias19 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input20 = true +filter_linear20 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear21 = true +alias21 = "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 +shader22 = ../../../../blurs/blur9x9.slang +mipmap_input22 = true +filter_linear22 = true +scale_type22 = absolute +scale_x22 = 128 +scale_y22 = 128 +alias22 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader23 = ../../../../blurs/blur9x9.slang +mipmap_input23 = true +filter_linear23 = true +scale_type23 = absolute +scale_x23 = 12 +scale_y23 = 12 +alias23 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type24 = viewport +float_framebuffer24 = true +alias24 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear25 = true +scale_type25 = viewport +float_framebuffer25 = true +alias25 = "BR_LayersUnderCRTPass" + +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear26 = true +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Easymode Parameters +gamma_out = 2.2 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 new file mode 100644 index 0000000..89f7071 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI-NTSC.slangp @@ -0,0 +1,290 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 +filter_linear19 = true + +g_sat = 0.15 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..355578e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-MINI.slangp @@ -0,0 +1,260 @@ +shaders = 26 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type15 = viewport +scale_x15 = 1.0 +scale_y15 = 1.0 +filter_linear15 = true + +g_sat = 0.15 + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias16 = "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 +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input17 = true +filter_linear17 = true +scale_type17 = absolute +// scale_x17 = 480 +// scale_y17 = 270 +// scale_x17 = 960 +// scale_y17 = 540 +scale_x17 = 800 +scale_y17 = 600 +alias17 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input18 = true +filter_linear18 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear19 = true +alias19 = "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 +shader20 = ../../../../blurs/blur9x9.slang +mipmap_input20 = true +filter_linear20 = true +scale_type20 = absolute +scale_x20 = 128 +scale_y20 = 128 +alias20 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 12 +scale_y21 = 12 +alias21 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type22 = viewport +float_framebuffer22 = true +alias22 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear23 = true +scale_type23 = viewport +float_framebuffer23 = true +alias23 = "BR_LayersUnderCRTPass" + +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear24 = true +scale_type24 = viewport +float_framebuffer24 = true +alias24 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..3683695 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV-NTSC.slangp @@ -0,0 +1,418 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear24 = true +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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;DecalImage;NightLightingImage;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..8b12ec7 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__GDV.slangp @@ -0,0 +1,297 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..7a1f51f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp @@ -0,0 +1,257 @@ +shaders = 26 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear15 = "false" +scale_type15 = "viewport" +scale15 = "1.0" + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias16 = "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 +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input17 = true +filter_linear17 = true +scale_type17 = absolute +// scale_x17 = 480 +// scale_y17 = 270 +// scale_x17 = 960 +// scale_y17 = 540 +scale_x17 = 800 +scale_y17 = 600 +alias17 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input18 = true +filter_linear18 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear19 = true +alias19 = "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 +shader20 = ../../../../blurs/blur9x9.slang +mipmap_input20 = true +filter_linear20 = true +scale_type20 = absolute +scale_x20 = 128 +scale_y20 = 128 +alias20 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 12 +scale_y21 = 12 +alias21 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type22 = viewport +float_framebuffer22 = true +alias22 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear23 = true +scale_type23 = viewport +float_framebuffer23 = true +alias23 = "BR_LayersUnderCRTPass" + +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear24 = true +scale_type24 = viewport +float_framebuffer24 = true +alias24 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..9cebd4f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON-NTSC.slangp @@ -0,0 +1,331 @@ +shaders = 31 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader18 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear18 = "false" +scale_type18 = "source" +scale18 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input18 = "false" +alias18 = "SourceSDR" + +shader19 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear19 = "false" +scale_type19 = "source" +scale19 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input19 = "false" +alias19 = "SourceHDR" + +shader20 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear20 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input20 = "false" +alias20 = "" +float_framebuffer20 = "false" +srgb_framebuffer20 = "false" +scale_type20 = "viewport" + +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias21 = "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 +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input22 = true +filter_linear22 = true +scale_type22 = absolute +// scale_x22 = 480 +// scale_y22 = 270 +// scale_x22 = 960 +// scale_y22 = 540 +scale_x22 = 800 +scale_y22 = 600 +alias22 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input23 = true +filter_linear23 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear24 = true +alias24 = "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 +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 128 +scale_y25 = 128 +alias25 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader26 = ../../../../blurs/blur9x9.slang +mipmap_input26 = true +filter_linear26 = true +scale_type26 = absolute +scale_x26 = 12 +scale_y26 = 12 +alias26 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersUnderCRTPass" + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear29 = true +scale_type29 = viewport +float_framebuffer29 = true +alias29 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader30 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..de7ff86 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON.slangp @@ -0,0 +1,289 @@ +shaders = 27 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader14 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear14 = "false" +scale_type14 = "source" +scale14 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input14 = "false" +alias14 = "SourceSDR" + +shader15 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear15 = "false" +scale_type15 = "source" +scale15 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "SourceHDR" + +shader16 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang" +filter_linear16 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input16 = "false" +alias16 = "" +float_framebuffer16 = "false" +srgb_framebuffer16 = "false" +scale_type16 = "viewport" + +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias17 = "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 +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input18 = true +filter_linear18 = true +scale_type18 = absolute +// scale_x18 = 480 +// scale_y18 = 270 +// scale_x18 = 960 +// scale_y18 = 540 +scale_x18 = 800 +scale_y18 = 600 +alias18 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input19 = true +filter_linear19 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear20 = true +alias20 = "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 +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 128 +scale_y21 = 128 +alias21 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader22 = ../../../../blurs/blur9x9.slang +mipmap_input22 = true +filter_linear22 = true +scale_type22 = absolute +scale_x22 = 12 +scale_y22 = 12 +alias22 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type23 = viewport +float_framebuffer23 = true +alias23 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear24 = true +scale_type24 = viewport +float_framebuffer24 = true +alias24 = "BR_LayersUnderCRTPass" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear25 = true +scale_type25 = viewport +float_framebuffer25 = true +alias25 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" 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 new file mode 100644 index 0000000..08bfc3e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__EASYMODE.slangp @@ -0,0 +1,217 @@ +shaders = 22 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang +filter_linear14 = false +srgb_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang +filter_linear15 = false +srgb_framebuffer15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang +filter_linear16 = false +srgb_framebuffer16 = true + +// Easymode's Shader! +shader17 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang +filter_linear17 = true +scale_type17 = viewport +float_framebuffer17 = true + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias18 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear19 = true +scale_type19 = viewport +float_framebuffer19 = true +alias19 = "BR_LayersUnderCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear20 = true +scale_type20 = viewport +float_framebuffer20 = true +alias20 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Easymode Parameters +gamma_out = 2.2 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 new file mode 100644 index 0000000..f13c881 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI-NTSC.slangp @@ -0,0 +1,236 @@ +shaders = 24 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 +filter_linear19 = true + +g_sat = 0.15 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias20 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear21 = true +scale_type21 = viewport +float_framebuffer21 = true +alias21 = "BR_LayersUnderCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear22 = true +scale_type22 = viewport +float_framebuffer22 = true +alias22 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..4f6f85d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-MINI.slangp @@ -0,0 +1,206 @@ +shaders = 20 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type15 = viewport +scale_x15 = 1.0 +scale_y15 = 1.0 +filter_linear15 = true + +g_sat = 0.15 + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias16 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear17 = true +scale_type17 = viewport +float_framebuffer17 = true +alias17 = "BR_LayersUnderCRTPass" + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear18 = true +scale_type18 = viewport +float_framebuffer18 = true +alias18 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..6bf05af --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-NTSC.slangp @@ -0,0 +1,282 @@ +shaders = 29 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang +filter_linear23 = true +float_framebuffer23 = true +scale_type23 = viewport +scale_x23 = 1.0 +scale_y23 = 1.0 + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear24 = true +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias25 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear26 = true +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_LayersUnderCRTPass" + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..164da9a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp @@ -0,0 +1,243 @@ +shaders = 24 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-no-reflect.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-no-reflect.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias20 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear21 = true +scale_type21 = viewport +float_framebuffer21 = true +alias21 = "BR_LayersUnderCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear22 = true +scale_type22 = viewport +float_framebuffer22 = true +alias22 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..ffc0e51 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp @@ -0,0 +1,203 @@ +shaders = 20 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear15 = "false" +scale_type15 = "viewport" +scale15 = "1.0" + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias16 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear17 = true +scale_type17 = viewport +float_framebuffer17 = true +alias17 = "BR_LayersUnderCRTPass" + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear18 = true +scale_type18 = viewport +float_framebuffer18 = true +alias18 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..67daf2d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON-NTSC.slangp @@ -0,0 +1,265 @@ +shaders = 25 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader18 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear18 = "false" +scale_type18 = "source" +scale18 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input18 = "false" +alias18 = "SourceSDR" + +shader19 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear19 = "false" +scale_type19 = "source" +scale19 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input19 = "false" +alias19 = "SourceHDR" + +shader20 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang" +filter_linear20 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input20 = "false" +alias20 = "" +float_framebuffer20 = "false" +srgb_framebuffer20 = "false" +scale_type20 = "viewport" + +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias21 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear22 = true +scale_type22 = viewport +float_framebuffer22 = true +alias22 = "BR_LayersUnderCRTPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear23 = true +scale_type23 = viewport +float_framebuffer23 = true +alias23 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..76e6c48 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__MEGATRON.slangp @@ -0,0 +1,235 @@ +shaders = 21 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader14 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear14 = "false" +scale_type14 = "source" +scale14 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input14 = "false" +alias14 = "SourceSDR" + +shader15 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear15 = "false" +scale_type15 = "source" +scale15 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "SourceHDR" + +shader16 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang" +filter_linear16 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input16 = "false" +alias16 = "" +float_framebuffer16 = "false" +srgb_framebuffer16 = "false" +scale_type16 = "viewport" + +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang +alias17 = "MBZ_PostCRTPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear18 = true +scale_type18 = viewport +float_framebuffer18 = true +alias18 = "BR_LayersUnderCRTPass" + +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear19 = true +scale_type19 = viewport +float_framebuffer19 = true +alias19 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__EASYMODE.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__EASYMODE.slangp new file mode 100644 index 0000000..ab0bd55 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__EASYMODE.slangp @@ -0,0 +1,145 @@ +shaders = 19 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang +filter_linear14 = false +srgb_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang +filter_linear15 = false +srgb_framebuffer15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang +filter_linear16 = false +srgb_framebuffer16 = true + +// Easymode's Shader! +shader17 = ../../shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang +filter_linear17 = true +scale_type17 = viewport +float_framebuffer17 = true + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias18 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 + +// Easymode Parameters +gamma_out = 2.2 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp new file mode 100644 index 0000000..63f4dae --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI-NTSC.slangp @@ -0,0 +1,109 @@ +shaders = 13 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +// Color Correction with Dogway's awesome Grade shader +// Grade is after Afterglow so that brightening the black level does not break the afterglow +shader6 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear6 = true +scale_type6 = source +scale6 = 1.0 + +shader7 = ../../../../stock.slang +alias7 = "PrePass0" + +shader8 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear8 = false +float_framebuffer8 = true +scale_type_x8 = source +scale_type_y8 = source +scale_x8 = 4.0 +scale_y8 = 1.0 +frame_count_mod8 = 2 +alias8 = NPass1 + +shader9 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer9 = true +filter_linear9 = true +scale_type9 = source +scale_x9 = 0.5 +scale_y9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini-potato.slang +scale_type11 = viewport +scale_x11 = 1.0 +scale_y11 = 1.0 +filter_linear11 = true + +g_sat = 0.15 + +shader12 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias12 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI.slangp new file mode 100644 index 0000000..dbfb8e7 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI.slangp @@ -0,0 +1,79 @@ +shaders = 9 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +// Color Correction with Dogway's awesome Grade shader +// Grade is after Afterglow so that brightening the black level does not break the afterglow +shader6 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear6 = true +scale_type6 = source +scale6 = 1.0 + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini-potato.slang +scale_type7 = viewport +scale_x7 = 1.0 +scale_y7 = 1.0 +filter_linear7 = true + +g_sat = 0.15 + +shader8 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias8 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-NTSC.slangp new file mode 100644 index 0000000..102cd47 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV-NTSC.slangp @@ -0,0 +1,210 @@ +shaders = 26 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-potato.slang +filter_linear23 = true +float_framebuffer23 = true +scale_type23 = viewport +scale_x23 = 1.0 +scale_y23 = 1.0 + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear24 = true +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias25 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV.slangp new file mode 100644 index 0000000..ce7d852 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__GDV.slangp @@ -0,0 +1,171 @@ +shaders = 21 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-potato.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-potato.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias20 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__LCD-GRID.slangp new file mode 100644 index 0000000..689f368 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__LCD-GRID.slangp @@ -0,0 +1,131 @@ +shaders = 17 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear15 = "false" +scale_type15 = "viewport" +scale15 = "1.0" + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias16 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 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 new file mode 100644 index 0000000..66f7327 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON-NTSC.slangp @@ -0,0 +1,193 @@ +shaders = 22 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader18 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear18 = "false" +scale_type18 = "source" +scale18 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input18 = "false" +alias18 = "SourceSDR" + +shader19 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear19 = "false" +scale_type19 = "source" +scale19 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input19 = "false" +alias19 = "SourceHDR" + +shader20 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-potato.slang" +filter_linear20 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input20 = "false" +alias20 = "" +float_framebuffer20 = "false" +srgb_framebuffer20 = "false" +scale_type20 = "viewport" + +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias21 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 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 new file mode 100644 index 0000000..cdf14c0 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__5__POTATO__MEGATRON.slangp @@ -0,0 +1,163 @@ +shaders = 18 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = false +srgb_framebuffer1 = true +scale_type1 = source +scale_x1 = 1 +scale_y1 = 1 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-potato.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" +feedback_pass = "0" + +// Sony Megatron Colour Video Monitor by Major Pain The Cactus +shader14 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang" +filter_linear14 = "false" +scale_type14 = "source" +scale14 = "1.0" +wrap_mode0 = "clamp_to_border" +mipmap_input14 = "false" +alias14 = "SourceSDR" + +shader15 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang" +filter_linear15 = "false" +scale_type15 = "source" +scale15 = "1.0" +wrap_mode1 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "SourceHDR" + +shader16 = "../../shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-potato.slang" +filter_linear16 = "false" +wrap_mode2 = "clamp_to_border" +mipmap_input16 = "false" +alias16 = "" +float_framebuffer16 = "false" +srgb_framebuffer16 = "false" +scale_type16 = "viewport" + +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang +alias17 = "MBZ_PostCRTPass" +// Define textures to be used by the different passes +textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/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 + +// Sony Megatron Color Monitor +hcrt_hdr = "0.000000" + +hcrt_brightness = "-0.200000" +hcrt_contrast = "0.500000" +hcrt_gamma = "-0.600000" + +HSM_INT_SCALE_MODE = "1.000000" +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_GLOBAL_GRAPHICS_BRIGHTNESS = "40.000000" +HSM_REFLECT_GLOBAL_AMOUNT = "300.000000" diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-aeg-CTV-4800-VT-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-aeg-CTV-4800-VT-sdr.slangp new file mode 100644 index 0000000..95b51fc --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-aeg-CTV-4800-VT-sdr.slangp @@ -0,0 +1,33 @@ +#reference "shaders/crt-sony-megatron-ntsc-sdr.slangp" + +hcrt_crt_screen_type = "2.000000" +hcrt_crt_resolution = "0.000000" +hcrt_paper_white_nits = "700.000000" +hcrt_expand_gamut = "0.000000" + +hcrt_red_vertical_convergence = "0.000000" +hcrt_green_vertical_convergence = "0.000000" +hcrt_blue_vertical_convergence = "0.000000" +hcrt_red_horizontal_convergence = "0.000000" +hcrt_green_horizontal_convergence = "0.000000" +hcrt_blue_horizontal_convergence = "-1.000000" + +hcrt_red_scanline_min = "1.0000000" +hcrt_red_scanline_max = "1.100000" +hcrt_red_scanline_attack = "0.850000" +hcrt_red_scanline_end = "0.000000" +hcrt_green_scanline_min = "1.000000" +hcrt_green_scanline_max = "1.100000" +hcrt_green_scanline_attack = "0.850000" +hcrt_green_scanline_end = "0.000000" +hcrt_blue_scanline_min = "1.000000" +hcrt_blue_scanline_max = "1.100000" +hcrt_blue_scanline_attack = "0.850000" +hcrt_blue_scanline_end = "0.000000" + +hcrt_red_beam_sharpness = "1.000000" +hcrt_red_beam_attack = "0.0000000" +hcrt_green_beam_sharpness = "1.000000" +hcrt_green_beam_attack = "0.000000" +hcrt_blue_beam_sharpness = "1.000000" +hcrt_blue_beam_attack = "0.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-bang-olufsen-mx8000-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-bang-olufsen-mx8000-sdr.slangp new file mode 100644 index 0000000..42da15a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-bang-olufsen-mx8000-sdr.slangp @@ -0,0 +1,18 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +hcrt_crt_screen_type = "2.000000" +hcrt_red_scanline_min = "0.650000" +hcrt_red_scanline_max = "0.900000" +hcrt_red_scanline_attack = "0.500000" +hcrt_green_scanline_min = "0.650000" +hcrt_green_scanline_max = "0.900000" +hcrt_green_scanline_attack = "0.500000" +hcrt_blue_scanline_min = "0.650000" +hcrt_blue_scanline_max = "0.900000" +hcrt_blue_scanline_attack = "0.500000" +hcrt_red_beam_sharpness = "1.600000" +hcrt_red_beam_attack = "1.7500000" +hcrt_green_beam_sharpness = "1.600000" +hcrt_green_beam_attack = "1.750000" +hcrt_blue_beam_sharpness = "1.600000" +hcrt_blue_beam_attack = "1.750000" 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 new file mode 100644 index 0000000..c54e7ee --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-d-series-AV-36D501-sdr.slangp @@ -0,0 +1,24 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +hcrt_crt_screen_type = "2.000000" +hcrt_paper_white_nits = "700.000000" +hcrt_brightness = "0.200000" +hcrt_contrast = "0.000000" +hcrt_saturation = "0.000000" +hcrt_gamma_in = "-0.3000000" +hcrt_expand_gamut = "1.000000" +hcrt_red_scanline_min = "0.2000000" +hcrt_red_scanline_max = "1.050000" +hcrt_red_scanline_attack = "0.300000" +hcrt_green_scanline_min = "0.200000" +hcrt_green_scanline_max = "1.050000" +hcrt_green_scanline_attack = "0.300000" +hcrt_blue_scanline_min = "0.200000" +hcrt_blue_scanline_max = "1.050000" +hcrt_blue_scanline_attack = "0.300000" +hcrt_red_beam_sharpness = "1.600000" +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 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 new file mode 100644 index 0000000..1f6c95b --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-jvc-professional-TM-H1950CG-sdr.slangp @@ -0,0 +1,24 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +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" +hcrt_red_scanline_min = "0.200000" +hcrt_red_scanline_max = "0.750000" +hcrt_red_scanline_attack = "1.000000" +hcrt_green_scanline_min = "0.200000" +hcrt_green_scanline_max = "0.750000" +hcrt_green_scanline_attack = "1.000000" +hcrt_blue_scanline_min = "0.200000" +hcrt_blue_scanline_max = "0.750000" +hcrt_blue_scanline_attack = "1.000000" +hcrt_red_beam_sharpness = "1.000000" +hcrt_red_beam_attack = "1.0000000" +hcrt_green_beam_sharpness = "1.000000" +hcrt_green_beam_attack = "1.000000" +hcrt_blue_beam_sharpness = "1.000000" +hcrt_blue_beam_attack = "1.000000" \ No newline at end of file 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 new file mode 100644 index 0000000..e62d990 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sammy-atomiswave-sdr.slangp @@ -0,0 +1,21 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +hcrt_crt_screen_type = "2.000000" +hcrt_paper_white_nits = "600.000000" +hcrt_contrast = "0.000000" +hcrt_expand_gamut = "1.000000" +hcrt_red_scanline_min = "0.8900000" +hcrt_red_scanline_max = "1.000000" +hcrt_red_scanline_attack = "0.300000" +hcrt_green_scanline_min = "0.600000" +hcrt_green_scanline_max = "0.800000" +hcrt_green_scanline_attack = "0.300000" +hcrt_blue_scanline_min = "0.600000" +hcrt_blue_scanline_max = "0.800000" +hcrt_blue_scanline_attack = "0.300000" +hcrt_red_beam_sharpness = "1.300000" +hcrt_red_beam_attack = "1.000000" +hcrt_green_beam_sharpness = "1.300000" +hcrt_green_beam_attack = "1.000000" +hcrt_blue_beam_sharpness = "1.300000" +hcrt_blue_beam_attack = "1.000000" \ No newline at end of file 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 new file mode 100644 index 0000000..2185b45 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sega-virtua-fighter-sdr.slangp @@ -0,0 +1,26 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +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" +hcrt_red_horizontal_convergence = "0.400000" +hcrt_green_horizontal_convergence = "-0.250000" +hcrt_blue_horizontal_convergence = "-0.100000" +hcrt_red_scanline_min = "1.0000000" +hcrt_red_scanline_max = "2.000000" +hcrt_red_scanline_attack = "1.000000" +hcrt_green_scanline_min = "1.000000" +hcrt_green_scanline_max = "2.000000" +hcrt_green_scanline_attack = "1.000000" +hcrt_blue_scanline_min = "1.000000" +hcrt_blue_scanline_max = "2.000000" +hcrt_blue_scanline_attack = "1.000000" +hcrt_red_beam_sharpness = "1.000000" +hcrt_red_beam_attack = "0.0000000" +hcrt_green_beam_sharpness = "1.000000" +hcrt_green_beam_attack = "0.000000" +hcrt_blue_beam_sharpness = "1.000000" +hcrt_blue_beam_attack = "0.000000" \ No newline at end of file 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 new file mode 100644 index 0000000..efbc292 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-1910-sdr.slangp @@ -0,0 +1,26 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +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 = "0.250000" +hcrt_red_vertical_convergence = "0.000000" +hcrt_green_vertical_convergence = "-0.150000" +hcrt_blue_vertical_convergence = "0.000000" +hcrt_red_scanline_min = "0.400000" +hcrt_red_scanline_max = "0.750000" +hcrt_red_scanline_attack = "0.350000" +hcrt_green_scanline_min = "0.400000" +hcrt_green_scanline_max = "1.000000" +hcrt_green_scanline_attack = "0.350000" +hcrt_blue_scanline_min = "0.400000" +hcrt_blue_scanline_max = "0.750000" +hcrt_blue_scanline_attack = "0.350000" +hcrt_red_beam_sharpness = "1.400000" +hcrt_red_beam_attack = "0.7200000" +hcrt_green_beam_sharpness = "1.400000" +hcrt_green_beam_attack = "0.800000" +hcrt_blue_beam_sharpness = "1.400000" +hcrt_blue_beam_attack = "0.450000" \ No newline at end of file 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 new file mode 100644 index 0000000..9ef527d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-20L4-sdr.slangp @@ -0,0 +1,24 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +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" +hcrt_blue_vertical_convergence = "0.000000" +hcrt_red_scanline_min = "0.250000" +hcrt_red_scanline_max = "0.400000" +hcrt_red_scanline_attack = "0.150000" +hcrt_green_scanline_min = "0.250000" +hcrt_green_scanline_max = "0.400000" +hcrt_green_scanline_attack = "0.150000" +hcrt_blue_scanline_min = "0.250000" +hcrt_blue_scanline_max = "0.400000" +hcrt_blue_scanline_attack = "0.150000" +hcrt_red_beam_sharpness = "2.000000" +hcrt_red_beam_attack = "1.0000000" +hcrt_green_beam_sharpness = "2.000000" +hcrt_green_beam_attack = "1.000000" +hcrt_blue_beam_sharpness = "2.000000" +hcrt_blue_beam_attack = "1.000000" \ No newline at end of file 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 new file mode 100644 index 0000000..e1d73fc --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-sony-pvm-2730-sdr.slangp @@ -0,0 +1,23 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +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" +hcrt_red_scanline_min = "0.550000" +hcrt_red_scanline_max = "0.820000" +hcrt_red_scanline_attack = "0.650000" +hcrt_green_scanline_min = "0.550000" +hcrt_green_scanline_max = "0.900000" +hcrt_green_scanline_attack = "0.130000" +hcrt_blue_scanline_min = "0.720000" +hcrt_blue_scanline_max = "1.000000" +hcrt_blue_scanline_attack = "0.650000" +hcrt_red_beam_sharpness = "1.750000" +hcrt_red_beam_attack = "0.7200000" +hcrt_green_beam_sharpness = "1.600000" +hcrt_green_beam_attack = "0.800000" +hcrt_blue_beam_sharpness = "1.900000" +hcrt_blue_beam_attack = "0.450000" diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-toshiba-microfilter-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-toshiba-microfilter-sdr.slangp new file mode 100644 index 0000000..4d01149 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-toshiba-microfilter-sdr.slangp @@ -0,0 +1,3 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +hcrt_crt_screen_type = "1.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 new file mode 100644 index 0000000..8f0af96 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/crt-sony-megatron-viewsonic-A90f+-sdr.slangp @@ -0,0 +1,20 @@ +#reference "shaders/crt-sony-megatron-sdr.slangp" + +hcrt_crt_screen_type = "1.000000" +hcrt_crt_resolution = "2.000000" +hcrt_paper_white_nits = "400.000000" +hcrt_red_scanline_min = "0.5000000" +hcrt_red_scanline_max = "1.000000" +hcrt_red_scanline_attack = "0.350000" +hcrt_green_scanline_min = "0.550000" +hcrt_green_scanline_max = "1.000000" +hcrt_green_scanline_attack = "0.350000" +hcrt_blue_scanline_min = "0.550000" +hcrt_blue_scanline_max = "1.000000" +hcrt_blue_scanline_attack = "0.350000" +hcrt_red_beam_sharpness = "1.200000" +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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-ntsc-sdr.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-ntsc-sdr.slangp new file mode 100644 index 0000000..bac2e54 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-ntsc-sdr.slangp @@ -0,0 +1,33 @@ +/* +Sony Megatron Colour Video Monitor +Author: Major Pain The Cactus + +A shader that specifically tries to emulate arcade monitor's with an shadow mask screen but with full brightness. + +The novel thing about this shader is that it transforms the image output by the 'console/arcade/computer' into HDR space first i.e brightens it first and then applies +an shadow mask afterwards which is kind of what a CRT would actually do - its kind of a kin to the electron beam (but nothing like it lol). + +My DisplayHDR 600 monitor does seem to get reasonably close to the brightness of my PVM - its not quite there but its close. I think DisplayHDR 1000 and above will be able to match. + +To use: +Please Enable HDR in RetroArch 1.10+ +[UPDATE] This shader supports SDR as well - just enable it in the shader parameters + +NOTE: when this shader is envoked the Contrast, Peak Luminance and Paper White Luminance in the HDR menu do nothing instead set those values through the shader parameters + +For this shader set Paper White Luminance to above 700 and Peak Luminance to the peak luminance of your monitor. + +Also try to use a integer scaling - its just better - overscaling is fine/great. + +This shader doesn't do any geometry warping or bouncing of light around inside the screen - I think these effects just add unwanted noise, I know people disagree. Please feel free to make you own and add them + +Works only with the D3D11/D3D12/Vulkan drivers currently + +DONT USE THIS PRESET DIRECTLY - Use any of the others in this directory +*/ + +#reference "../../../MBZ__3__STD__MEGATRON-NTSC.slangp" + +hcrt_hdr = "0.000000" + +hcrt_gamma_in = "-0.200000" 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 new file mode 100644 index 0000000..0d36dbe --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets/Sony-Megatron/STD/shaders/crt-sony-megatron-sdr.slangp @@ -0,0 +1,33 @@ +/* +Sony Megatron Colour Video Monitor +Author: Major Pain The Cactus + +A shader that specifically tries to emulate arcade monitor's with an shadow mask screen but with full brightness. + +The novel thing about this shader is that it transforms the image output by the 'console/arcade/computer' into HDR space first i.e brightens it first and then applies +an shadow mask afterwards which is kind of what a CRT would actually do - its kind of a kin to the electron beam (but nothing like it lol). + +My DisplayHDR 600 monitor does seem to get reasonably close to the brightness of my PVM - its not quite there but its close. I think DisplayHDR 1000 and above will be able to match. + +To use: +Please Enable HDR in RetroArch 1.10+ +[UPDATE] This shader supports SDR as well - just enable it in the shader parameters + +NOTE: when this shader is envoked the Contrast, Peak Luminance and Paper White Luminance in the HDR menu do nothing instead set those values through the shader parameters + +For this shader set Paper White Luminance to above 700 and Peak Luminance to the peak luminance of your monitor. + +Also try to use a integer scaling - its just better - overscaling is fine/great. + +This shader doesn't do any geometry warping or bouncing of light around inside the screen - I think these effects just add unwanted noise, I know people disagree. Please feel free to make you own and add them + +Works only with the D3D11/D3D12/Vulkan drivers currently + +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 = "-0.200000" diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-240p__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-240p__GDV-NTSC.slangp new file mode 100644 index 0000000..8198fb2 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-240p__GDV-NTSC.slangp @@ -0,0 +1,389 @@ +shaders = 48 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 240 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear31 = true +scale_type_x31 = viewport +scale_x31 = 1.0 +scale_type_y31 = source +scale_y31 = 1.0 +float_framebuffer31 = true +alias31 = Pass1 + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 640.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 640.0 +scale_type_y33 = absolute +scale_y33 = 480.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 640.0 +scale_type_y34 = absolute +scale_y34 = 480.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-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 +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input40 = true +filter_linear40 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader42 = ../../../../blurs/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/blur9x9.slang +mipmap_input43 = true +filter_linear43 = true +scale_type43 = absolute +scale_x43 = 12 +scale_y43 = 12 +alias43 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type44 = viewport +float_framebuffer44 = true +alias44 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader45 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear45 = true +scale_type45 = viewport +float_framebuffer45 = true +alias45 = "BR_LayersUnderCRTPass" + +shader46 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear46 = true +scale_type46 = viewport +float_framebuffer46 = true +alias46 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader47 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-3DS-400x480__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-3DS-400x480__GDV.slangp new file mode 100644 index 0000000..6f3417a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-3DS-400x480__GDV.slangp @@ -0,0 +1,385 @@ +shaders = 45 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 400 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 800.0 +scale_type_y29 = source +scale_y29 = 1.0 +float_framebuffer29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear30 = true +scale_type_x30 = absolute +scale_x30 = 800.0 +scale_type_y30 = absolute +scale_y30 = 600.0 +float_framebuffer30 = true +alias30 = GlowPass + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear31 = true +scale_type_x31 = absolute +scale_x31 = 800.0 +scale_type_y31 = absolute +scale_y31 = 600.0 +float_framebuffer31 = true + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear32 = true +scale_type_x32 = source +scale_x32 = 1.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true +alias32 = BloomPass + +shader33 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear34 = true +scale_type34 = viewport +scale_x34 = 1.0 +scale_y34 = 1.0 + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input37 = true +filter_linear37 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../../../blurs/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/blur9x9.slang +mipmap_input40 = true +filter_linear40 = true +scale_type40 = absolute +scale_x40 = 12 +scale_y40 = 12 +alias40 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type41 = viewport +float_framebuffer41 = true +alias41 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader42 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear42 = true +scale_type42 = viewport +float_framebuffer42 = true +alias42 = "BR_LayersUnderCRTPass" + +shader43 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear43 = true +scale_type43 = viewport +float_framebuffer43 = true +alias43 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// 3DS Parameters +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV-NTSC.slangp new file mode 100644 index 0000000..1074c23 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV-NTSC.slangp @@ -0,0 +1,389 @@ +shaders = 48 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +shader19 = ../../../../stock.slang +alias19 = "PreCRTPass" + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear20 = true +scale_type20 = source +scale20 = 1.0 +alias20 = "AfterglowPass" + +shader21 = ../../shaders/HyperspaceMadness/hsm-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 +shader22 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 + +shader23 = ../../../../stock.slang +alias23 = "PrePass0" + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear24 = false +float_framebuffer24 = true +scale_type_x24 = source +scale_type_y24 = source +scale_x24 = 4.0 +scale_y24 = 1.0 +frame_count_mod24 = 2 +alias24 = NPass1 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer25 = true +filter_linear25 = true +scale_type25 = source +scale_x25 = 0.5 +scale_y25 = 1.0 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear27 = true +scale_type27 = source +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../../../stock.slang +filter_linear28 = true +scale_type28 = source +scale_x28 = 1.0 +scale_y28 = 1.0 +alias28 = "PrePass" +mipmap_input28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear30 = true +scale_type30 = source +scale30 = 1.0 +float_framebuffer30 = true +alias30 = "LinearizePass" + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear31 = true +scale_type_x31 = viewport +scale_x31 = 1.0 +scale_type_y31 = source +scale_y31 = 1.0 +float_framebuffer31 = true +alias31 = Pass1 + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear32 = true +scale_type_x32 = absolute +scale_x32 = 640.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true + +shader33 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear33 = true +scale_type_x33 = absolute +scale_x33 = 640.0 +scale_type_y33 = absolute +scale_y33 = 480.0 +float_framebuffer33 = true +alias33 = GlowPass + +shader34 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear34 = true +scale_type_x34 = absolute +scale_x34 = 640.0 +scale_type_y34 = absolute +scale_y34 = 480.0 +float_framebuffer34 = true + +shader35 = ../../shaders/HyperspaceMadness/hsm-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 +alias35 = BloomPass + +shader36 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear37 = true +scale_type37 = viewport +scale_x37 = 1.0 +scale_y37 = 1.0 + +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input40 = true +filter_linear40 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader42 = ../../../../blurs/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/blur9x9.slang +mipmap_input43 = true +filter_linear43 = true +scale_type43 = absolute +scale_x43 = 12 +scale_y43 = 12 +alias43 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type44 = viewport +float_framebuffer44 = true +alias44 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader45 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear45 = true +scale_type45 = viewport +float_framebuffer45 = true +alias45 = "BR_LayersUnderCRTPass" + +shader46 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear46 = true +scale_type46 = viewport +float_framebuffer46 = true +alias46 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader47 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 + +// NTSC Parameters +GAMMA_INPUT = 2.0 +gamma_out = 1.95 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV.slangp new file mode 100644 index 0000000..2b09763 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV.slangp @@ -0,0 +1,364 @@ +shaders = 45 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = refpass + +shader14 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang +filter_linear14 = false +scale_type14 = source +scale14 = 1.0 +float_framebuffer14 = true +alias14 = scalefx_pass0 + +shader15 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang +filter_linear15 = false +scale_type15 = source +scale15 = 1.0 +float_framebuffer12 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang +filter_linear16 = false +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang +filter_linear17 = false +scale_type17 = source +scale17 = 1.0 + +shader18 = ../../shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang +filter_linear18 = false +scale_type18 = source +scale18 = 3 + +// GTU TV Processing +shader19 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type19 = source +scale19 = 1.0 +float_framebuffer19 = true + +shader20 = ../../shaders/HyperspaceMadness/hsm-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 = ../../../../stock.slang +alias21 = "PreCRTPass" + +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +alias22 = "AfterglowPass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-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 +shader24 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear25 = true +scale_type25 = source +scale_x25 = 1.0 +scale_y25 = 1.0 + +shader26 = ../../../../stock.slang +filter_linear26 = true +scale_type26 = source +scale_x26 = 1.0 +scale_y26 = 1.0 +alias26 = "PrePass" +mipmap_input26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear27 = true +scale_type27 = source +scale27 = 1.0 +mipmap_input27 = true +alias27 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear28 = true +scale_type28 = source +scale28 = 1.0 +float_framebuffer28 = true +alias28 = "LinearizePass" + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 800.0 +scale_type_y29 = source +scale_y29 = 1.0 +float_framebuffer29 = true + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear30 = true +scale_type_x30 = absolute +scale_x30 = 800.0 +scale_type_y30 = absolute +scale_y30 = 600.0 +float_framebuffer30 = true +alias30 = GlowPass + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear31 = true +scale_type_x31 = absolute +scale_x31 = 800.0 +scale_type_y31 = absolute +scale_y31 = 600.0 +float_framebuffer31 = true + +shader32 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear32 = true +scale_type_x32 = source +scale_x32 = 1.0 +scale_type_y32 = source +scale_y32 = 1.0 +float_framebuffer32 = true +alias32 = BloomPass + +shader33 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear34 = true +scale_type34 = viewport +scale_x34 = 1.0 +scale_y34 = 1.0 + +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input37 = true +filter_linear37 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader39 = ../../../../blurs/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/blur9x9.slang +mipmap_input40 = true +filter_linear40 = true +scale_type40 = absolute +scale_x40 = 12 +scale_y40 = 12 +alias40 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type41 = viewport +float_framebuffer41 = true +alias41 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader42 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear42 = true +scale_type42 = viewport +float_framebuffer42 = true +alias42 = "BR_LayersUnderCRTPass" + +shader43 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear43 = true +scale_type43 = viewport +float_framebuffer43 = true +alias43 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader44 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 +MDAPT_MODE = 1 + +HSM_SCALEFX_ON = 1 + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 500 +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100 +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 30 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-224p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-224p__GDV.slangp new file mode 100644 index 0000000..55ba86e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-224p__GDV.slangp @@ -0,0 +1,324 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 224 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-240p__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-240p__GDV-NTSC.slangp new file mode 100644 index 0000000..88e5e3a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-240p__GDV-NTSC.slangp @@ -0,0 +1,349 @@ +shaders = 42 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 240 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear25 = true +scale_type_x25 = viewport +scale_x25 = 1.0 +scale_type_y25 = source +scale_y25 = 1.0 +float_framebuffer25 = true +alias25 = Pass1 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear26 = true +scale_type_x26 = absolute +scale_x26 = 640.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear27 = true +scale_type_x27 = absolute +scale_x27 = 640.0 +scale_type_y27 = absolute +scale_y27 = 480.0 +float_framebuffer27 = true +alias27 = GlowPass + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear28 = true +scale_type_x28 = absolute +scale_x28 = 640.0 +scale_type_y28 = absolute +scale_y28 = 480.0 +float_framebuffer28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 640.0 +scale_type_y29 = absolute +scale_y29 = 480.0 +float_framebuffer29 = true +alias29 = BloomPass + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang +filter_linear30 = true +float_framebuffer30 = true +scale_type30 = viewport +scale_x30 = 1.0 +scale_y30 = 1.0 + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear31 = true +scale_type31 = viewport +scale_x31 = 1.0 +scale_y31 = 1.0 + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input34 = true +filter_linear34 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../../../blurs/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/blur9x9.slang +mipmap_input37 = true +filter_linear37 = true +scale_type37 = absolute +scale_x37 = 12 +scale_y37 = 12 +alias37 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type38 = viewport +float_framebuffer38 = true +alias38 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear39 = true +scale_type39 = viewport +float_framebuffer39 = true +alias39 = "BR_LayersUnderCRTPass" + +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear40 = true +scale_type40 = viewport +float_framebuffer40 = true +alias40 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-240p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-240p__GDV.slangp new file mode 100644 index 0000000..322a62a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-240p__GDV.slangp @@ -0,0 +1,324 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 240 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__GDV.slangp new file mode 100644 index 0000000..c7657e3 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__GDV.slangp @@ -0,0 +1,345 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 400 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// 3DS Parameters +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__LCD-GRID.slangp new file mode 100644 index 0000000..6114915 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__LCD-GRID.slangp @@ -0,0 +1,305 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 400 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear24 = "false" +scale_type24 = "viewport" +scale24 = "1.0" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// 3DS Parameters +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-480p__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-480p__GDV-NTSC.slangp new file mode 100644 index 0000000..e69f424 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-480p__GDV-NTSC.slangp @@ -0,0 +1,349 @@ +shaders = 42 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +shader13 = ../../../../stock.slang +alias13 = "PreCRTPass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear14 = true +scale_type14 = source +scale14 = 1.0 +alias14 = "AfterglowPass" + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear15 = true +scale_type15 = source +mipmap_input15 = true +scale15 = 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 +shader16 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 + +shader17 = ../../../../stock.slang +alias17 = "PrePass0" + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang +filter_linear18 = false +float_framebuffer18 = true +scale_type_x18 = source +scale_type_y18 = source +scale_x18 = 4.0 +scale_y18 = 1.0 +frame_count_mod18 = 2 +alias18 = NPass1 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang +float_framebuffer19 = true +filter_linear19 = true +scale_type19 = source +scale_x19 = 0.5 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear21 = true +scale_type21 = source +scale_x21 = 1.0 +scale_y21 = 1.0 + +shader22 = ../../../../stock.slang +filter_linear22 = true +scale_type22 = source +scale_x22 = 1.0 +scale_y22 = 1.0 +alias22 = "PrePass" +mipmap_input22 = true + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear23 = true +scale_type23 = source +scale23 = 1.0 +mipmap_input23 = true +alias23 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear24 = true +scale_type24 = source +scale24 = 1.0 +float_framebuffer24 = true +alias24 = "LinearizePass" + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang +filter_linear25 = true +scale_type_x25 = viewport +scale_x25 = 1.0 +scale_type_y25 = source +scale_y25 = 1.0 +float_framebuffer25 = true +alias25 = Pass1 + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear26 = true +scale_type_x26 = absolute +scale_x26 = 640.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear27 = true +scale_type_x27 = absolute +scale_x27 = 640.0 +scale_type_y27 = absolute +scale_y27 = 480.0 +float_framebuffer27 = true +alias27 = GlowPass + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear28 = true +scale_type_x28 = absolute +scale_x28 = 640.0 +scale_type_y28 = absolute +scale_y28 = 480.0 +float_framebuffer28 = true + +shader29 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear29 = true +scale_type_x29 = absolute +scale_x29 = 640.0 +scale_type_y29 = absolute +scale_y29 = 480.0 +float_framebuffer29 = true +alias29 = BloomPass + +shader30 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang +filter_linear30 = true +float_framebuffer30 = true +scale_type30 = viewport +scale_x30 = 1.0 +scale_y30 = 1.0 + +shader31 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear31 = true +scale_type31 = viewport +scale_x31 = 1.0 +scale_y31 = 1.0 + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input34 = true +filter_linear34 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-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 +shader36 = ../../../../blurs/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/blur9x9.slang +mipmap_input37 = true +filter_linear37 = true +scale_type37 = absolute +scale_x37 = 12 +scale_y37 = 12 +alias37 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type38 = viewport +float_framebuffer38 = true +alias38 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader39 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear39 = true +scale_type39 = viewport +float_framebuffer39 = true +alias39 = "BR_LayersUnderCRTPass" + +shader40 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear40 = true +scale_type40 = viewport +float_framebuffer40 = true +alias40 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader41 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-480p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-480p__GDV.slangp new file mode 100644 index 0000000..e991339 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-480p__GDV.slangp @@ -0,0 +1,324 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-NDS-256x384__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-NDS-256x384__GDV.slangp new file mode 100644 index 0000000..db21255 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-NDS-256x384__GDV.slangp @@ -0,0 +1,340 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 256 +scale_y1 = 384 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// NDS Parameters +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-NDS-256x384__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-NDS-256x384__LCD-GRID.slangp new file mode 100644 index 0000000..81d4443 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-NDS-256x384__LCD-GRID.slangp @@ -0,0 +1,300 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 256 +scale_y1 = 384 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear24 = "false" +scale_type24 = "viewport" +scale24 = "1.0" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// NDS Parameters +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-PSP-480x272__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-PSP-480x272__GDV.slangp new file mode 100644 index 0000000..d2f5f51 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-PSP-480x272__GDV.slangp @@ -0,0 +1,338 @@ +shaders = 39 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 480 +scale_y1 = 272 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear23 = true +scale_type_x23 = absolute +scale_x23 = 800.0 +scale_type_y23 = source +scale_y23 = 1.0 +float_framebuffer23 = true + +shader24 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear24 = true +scale_type_x24 = absolute +scale_x24 = 800.0 +scale_type_y24 = absolute +scale_y24 = 600.0 +float_framebuffer24 = true +alias24 = GlowPass + +shader25 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear25 = true +scale_type_x25 = absolute +scale_x25 = 800.0 +scale_type_y25 = absolute +scale_y25 = 600.0 +float_framebuffer25 = true + +shader26 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear26 = true +scale_type_x26 = source +scale_x26 = 1.0 +scale_type_y26 = source +scale_y26 = 1.0 +float_framebuffer26 = true +alias26 = BloomPass + +shader27 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear27 = true +float_framebuffer27 = true +scale_type27 = viewport +scale_x27 = 1.0 +scale_y27 = 1.0 + +shader28 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear28 = true +scale_type28 = viewport +scale_x28 = 1.0 +scale_y28 = 1.0 + +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias29 = "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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input31 = true +filter_linear31 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear32 = true +alias32 = "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/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/blur9x9.slang +mipmap_input34 = true +filter_linear34 = true +scale_type34 = absolute +scale_x34 = 12 +scale_y34 = 12 +alias34 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader35 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type35 = viewport +float_framebuffer35 = true +alias35 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader36 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear36 = true +scale_type36 = viewport +float_framebuffer36 = true +alias36 = "BR_LayersUnderCRTPass" + +shader37 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear37 = true +scale_type37 = viewport +float_framebuffer37 = true +alias37 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader38 = ../../shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang +scale_type38 = viewport +alias38 = "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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// PSP Parameters +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-PSP-480x272__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-PSP-480x272__LCD-GRID.slangp new file mode 100644 index 0000000..706aefa --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-PSP-480x272__LCD-GRID.slangp @@ -0,0 +1,298 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 480 +scale_y1 = 272 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-adv.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreDeDitheringPass" + +// De-Dithering - Mdapt +shader7 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang +shader8 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang +shader9 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang +shader10 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang +shader11 = ../../shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang + +shader12 = ../../shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang + +// GTU TV Processing +shader13 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true + +shader14 = ../../shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang +scale_type_x14 = source +scale_x14 = 1.0 +scale_type_y14 = source +scale_y14 = 1.0 +filter_linear14 = false +float_framebuffer14 = true + +shader15 = ../../../../stock.slang +alias15 = "PreCRTPass" + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear16 = true +scale_type16 = source +scale16 = 1.0 +alias16 = "AfterglowPass" + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang +filter_linear17 = true +scale_type17 = source +mipmap_input17 = true +scale17 = 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 +shader18 = ../../shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear18 = true +scale_type18 = source +scale18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear19 = true +scale_type19 = source +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../../../stock.slang +filter_linear20 = true +scale_type20 = source +scale_x20 = 1.0 +scale_y20 = 1.0 +alias20 = "PrePass" +mipmap_input20 = true + +shader21 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear21 = true +scale_type21 = source +scale21 = 1.0 +mipmap_input21 = true +alias21 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader22 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear22 = true +scale_type22 = source +scale22 = 1.0 +float_framebuffer22 = true +alias22 = "LinearizePass" + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader24 = ../../shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang +filter_linear24 = "false" +scale_type24 = "viewport" +scale24 = "1.0" + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 + +// PSP Parameters +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-1080p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-1080p__GDV.slangp new file mode 100644 index 0000000..ecbe3c4 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-1080p__GDV.slangp @@ -0,0 +1,298 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 1440 +scale_y1 = 1080 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-224p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-224p__GDV.slangp new file mode 100644 index 0000000..a245f92 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-224p__GDV.slangp @@ -0,0 +1,298 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 224 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-240p__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-240p__GDV-NTSC.slangp new file mode 100644 index 0000000..2ba7803 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-240p__GDV-NTSC.slangp @@ -0,0 +1,337 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 240 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear24 = true +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-240p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-240p__GDV.slangp new file mode 100644 index 0000000..d92369a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-240p__GDV.slangp @@ -0,0 +1,298 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 320 +scale_y1 = 240 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-3DS-400x480__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-3DS-400x480__GDV.slangp new file mode 100644 index 0000000..2f2a13c --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-3DS-400x480__GDV.slangp @@ -0,0 +1,298 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 400 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-MINI-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-MINI-NTSC.slangp new file mode 100644 index 0000000..00cad03 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-MINI-NTSC.slangp @@ -0,0 +1,291 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 +filter_linear19 = true + +g_sat = 0.15 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-MINI.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-MINI.slangp new file mode 100644 index 0000000..6bd7d0f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-MINI.slangp @@ -0,0 +1,261 @@ +shaders = 26 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm/hsm-delinearize.slang + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang +scale_type15 = viewport +scale_x15 = 1.0 +scale_y15 = 1.0 +filter_linear15 = true + +g_sat = 0.15 + +shader16 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias16 = "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 +shader17 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input17 = true +filter_linear17 = true +scale_type17 = absolute +// scale_x17 = 480 +// scale_y17 = 270 +// scale_x17 = 960 +// scale_y17 = 540 +scale_x17 = 800 +scale_y17 = 600 +alias17 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader18 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input18 = true +filter_linear18 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader19 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear19 = true +alias19 = "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 +shader20 = ../../../../blurs/blur9x9.slang +mipmap_input20 = true +filter_linear20 = true +scale_type20 = absolute +scale_x20 = 128 +scale_y20 = 128 +alias20 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader21 = ../../../../blurs/blur9x9.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +scale_x21 = 12 +scale_y21 = 12 +alias21 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type22 = viewport +float_framebuffer22 = true +alias22 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear23 = true +scale_type23 = viewport +float_framebuffer23 = true +alias23 = "BR_LayersUnderCRTPass" + +shader24 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear24 = true +scale_type24 = viewport +float_framebuffer24 = true +alias24 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-NTSC.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-NTSC.slangp new file mode 100644 index 0000000..babf08b --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV-NTSC.slangp @@ -0,0 +1,337 @@ +shaders = 35 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../../../stock.slang +alias10 = "PrePass0" + +shader11 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang +filter_linear13 = true +scale_type13 = source +scale_x13 = 1.0 +scale_y13 = 1.0 + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear14 = true +scale_type14 = source +scale_x14 = 1.0 +scale_y14 = 1.0 + +shader15 = ../../../../stock.slang +filter_linear15 = true +scale_type15 = source +scale_x15 = 1.0 +scale_y15 = 1.0 +alias15 = "PrePass" +mipmap_input15 = true + +shader16 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear17 = true +scale_type17 = source +scale17 = 1.0 +float_framebuffer17 = true +alias17 = "LinearizePass" + +shader18 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear24 = true +scale_type24 = viewport +scale_x24 = 1.0 +scale_y24 = 1.0 + +shader25 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input27 = true +filter_linear27 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-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/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/blur9x9.slang +mipmap_input30 = true +filter_linear30 = true +scale_type30 = absolute +scale_x30 = 12 +scale_y30 = 12 +alias30 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader31 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type31 = viewport +float_framebuffer31 = true +alias31 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader32 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear32 = true +scale_type32 = viewport +float_framebuffer32 = true +alias32 = "BR_LayersUnderCRTPass" + +shader33 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear33 = true +scale_type33 = viewport +float_framebuffer33 = true +alias33 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader34 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV.slangp b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV.slangp new file mode 100644 index 0000000..12e52b2 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-480p__GDV.slangp @@ -0,0 +1,298 @@ +shaders = 30 + +shader0 = ../../shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang +alias0 = "CorePass" + +shader1 = ../../../../stock.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear1 = true +mipmap_input1 = true +srgb_framebuffer1 = true +scale_type1 = absolute +scale_x1 = 640 +scale_y1 = 480 +alias1 = "DerezedPass" + +shader2 = ../../shaders/HyperspaceMadness/hsm/hsm-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/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang +filter_linear3 = false +scale_type3 = source +scale3 = 1.0 +alias3 = "InfoCachePass" + +shader4 = ../../shaders/HyperspaceMadness/hsm/hsm-text-std.slang +filter_linear4 = false +float_framebuffer4 = true +scale_type4 = source +scale4 = 1.0 +alias4 = "TextPass" + +shader5 = ../../shaders/HyperspaceMadness/hsm/hsm-intro.slang +filter_linear5 = false +float_framebuffer5 = true +scale_type5 = source +scale5 = 1.0 +alias5 = "IntroPass" + +shader6 = ../../../../stock.slang +alias6 = "PreCRTPass" + +shader7 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang +filter_linear7 = true +scale_type7 = source +scale7 = 1.0 +alias7 = "AfterglowPass" + +shader8 = ../../shaders/HyperspaceMadness/hsm-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/HyperspaceMadness/hsm-dogway/hsm-grade.slang +filter_linear9 = true +scale_type9 = source +scale9 = 1.0 + +shader10 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang // ../../shaders/HyperspaceMadness/hsm-guest/g-sharp_resampler.slang +filter_linear10 = true +scale_type10 = source +scale_x10 = 1.0 +scale_y10 = 1.0 + +shader11 = ../../../../stock.slang +filter_linear11 = true +scale_type11 = source +scale_x11 = 1.0 +scale_y11 = 1.0 +alias11 = "PrePass" +mipmap_input11 = true + +shader12 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang +filter_linear12 = true +scale_type12 = source +scale12 = 1.0 +mipmap_input12 = true +alias12 = "AvgLumPass" + +// Pass referenced by subsequent blurring passes and crt pass +shader13 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang +filter_linear13 = true +scale_type13 = source +scale13 = 1.0 +float_framebuffer13 = true +alias13 = "LinearizePass" + +shader14 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang +filter_linear14 = true +scale_type_x14 = absolute +scale_x14 = 800.0 +scale_type_y14 = source +scale_y14 = 1.0 +float_framebuffer14 = true + +shader15 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang +filter_linear15 = true +scale_type_x15 = absolute +scale_x15 = 800.0 +scale_type_y15 = absolute +scale_y15 = 600.0 +float_framebuffer15 = true +alias15 = GlowPass + +shader16 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang +filter_linear16 = true +scale_type_x16 = absolute +scale_x16 = 800.0 +scale_type_y16 = absolute +scale_y16 = 600.0 +float_framebuffer16 = true + +shader17 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang +filter_linear17 = true +scale_type_x17 = source +scale_x17 = 1.0 +scale_type_y17 = source +scale_y17 = 1.0 +float_framebuffer17 = true +alias17 = BloomPass + +shader18 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang +filter_linear18 = true +float_framebuffer18 = true +scale_type18 = viewport +scale_x18 = 1.0 +scale_y18 = 1.0 + +shader19 = ../../shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang +filter_linear19 = true +scale_type19 = viewport +scale_x19 = 1.0 +scale_y19 = 1.0 + +shader20 = ../../shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang +alias20 = "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 +shader21 = ../../shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang +mipmap_input21 = true +filter_linear21 = true +scale_type21 = absolute +// scale_x21 = 480 +// scale_y21 = 270 +// scale_x21 = 960 +// scale_y21 = 540 +scale_x21 = 800 +scale_y21 = 600 +alias21 = "BR_MirrorLowResPass" + +// Add Blur for the Reflection (Horizontal) ---------------------------------------------------------------- +shader22 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang +mipmap_input22 = true +filter_linear22 = true + +// Add Blur for the Reflection (Vertical) ---------------------------------------------------------------- +shader23 = ../../shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang +filter_linear23 = true +alias23 = "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 +shader24 = ../../../../blurs/blur9x9.slang +mipmap_input24 = true +filter_linear24 = true +scale_type24 = absolute +scale_x24 = 128 +scale_y24 = 128 +alias24 = "BR_MirrorReflectionDiffusedPass" + +// Add Diffused glow all around the screen ---------------------------------------------------------------- +// Blurred so much that it's non directional +// Mipmap option allows downscaling without artifacts +shader25 = ../../../../blurs/blur9x9.slang +mipmap_input25 = true +filter_linear25 = true +scale_type25 = absolute +scale_x25 = 12 +scale_y25 = 12 +alias25 = "BR_MirrorFullscreenGlowPass" + +// Bezel Reflection ---------------------------------------------------------------- +shader26 = ../../shaders/HyperspaceMadness/hsm/hsm-reflection.slang +scale_type26 = viewport +float_framebuffer26 = true +alias26 = "BR_CRTAndReflectionPass" + +// Bezel Generation & Composite of Image Layers ---------------------------------------------------------------- + +shader27 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang +filter_linear27 = true +scale_type27 = viewport +float_framebuffer27 = true +alias27 = "BR_LayersUnderCRTPass" + +shader28 = ../../shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang +filter_linear28 = true +scale_type28 = viewport +float_framebuffer28 = true +alias28 = "BR_LayersOverCRTPass" + +// Combine Passes ---------------------------------------------------------------- +shader29 = ../../shaders/HyperspaceMadness/hsm/hsm-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;LEDImage;TopLayerImage;" + +SamplerLUT1 = ../../shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png +SamplerLUT1_linear = true +SamplerLUT2 = ../../shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png +SamplerLUT2_linear = true +SamplerLUT3 = ../../shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png +SamplerLUT3_linear = true +SamplerLUT4 = ../../shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png +SamplerLUT4_linear = true + +IntroImage = ../../shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png +IntroImage_linear = true +IntroImage_mipmap = 1 + +ScreenPlacementImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +ScreenPlacementImage_linear = false + +TubeDiffuseImage = ../../shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png +TubeDiffuseImage_linear = true +TubeDiffuseImage_mipmap = 1 + +TubeColoredGelImage = ../../shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png +TubeColoredGelImage_linear = true +TubeColoredGelImage_mipmap = 1 + +TubeShadowImage = ../../shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png +TubeShadowImage_linear = true +TubeShadowImage_mipmap = 1 + +TubeStaticReflectionImage = ../../shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png +TubeStaticReflectionImage_linear = true +TubeStaticReflectionImage_mipmap = 1 + +ReflectionMaskImage = ../../shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png +ReflectionMaskImage_linear = true +ReflectionMaskImage_mipmap = 1 + +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png +FrameTextureImage_linear = true +FrameTextureImage_mipmap = 1 + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundImage_linear = true +BackgroundImage_mipmap = 1 + +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png +BackgroundVertImage_linear = true +BackgroundVertImage_mipmap = 1 + +CabinetGlassImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +CabinetGlassImage_linear = true +CabinetGlassImage_mipmap = 1 + +DeviceImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceImage_linear = true +DeviceImage_mipmap = 1 + +DeviceVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DeviceVertImage_linear = true +DeviceVertImage_mipmap = 1 + +DecalImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +DecalImage_linear = true +DecalImage_mipmap = 1 + +NightLightingImage = ../../shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png +NightLightingImage_linear = true +NightLightingImage_mipmap = 1 + +LEDImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +LEDImage_linear = true +LEDImage_mipmap = 1 + +TopLayerImage = ../../shaders/HyperspaceMadness/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 diff --git a/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV-GLASS.slangp b/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV-GLASS.slangp new file mode 100644 index 0000000..62c3e1c --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV-GLASS.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp b/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp new file mode 100644 index 0000000..17b5b90 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__1__ADV.slangp b/bezel/Mega_Bezel/Presets/MBZ__1__ADV.slangp new file mode 100644 index 0000000..cebd60d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__1__ADV.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__1__ADV__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__2__ADV-GLASS.slangp b/bezel/Mega_Bezel/Presets/MBZ__2__ADV-GLASS.slangp new file mode 100644 index 0000000..7f5d7d6 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__2__ADV-GLASS.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__2__ADV-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/MBZ__2__ADV-NO-REFLECT.slangp new file mode 100644 index 0000000..2c4521f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__2__ADV-NO-REFLECT.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__3__STD-GLASS.slangp b/bezel/Mega_Bezel/Presets/MBZ__3__STD-GLASS.slangp new file mode 100644 index 0000000..38862ce --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__3__STD-GLASS.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__3__STD-GLASS__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__3__STD.slangp b/bezel/Mega_Bezel/Presets/MBZ__3__STD.slangp new file mode 100644 index 0000000..78b6ad0 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__3__STD.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__3__STD__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__4__STD-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/MBZ__4__STD-NO-REFLECT.slangp new file mode 100644 index 0000000..d5dec25 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__4__STD-NO-REFLECT.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/MBZ__5__POTATO.slangp b/bezel/Mega_Bezel/Presets/MBZ__5__POTATO.slangp new file mode 100644 index 0000000..29d37b5 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/MBZ__5__POTATO.slangp @@ -0,0 +1 @@ +#reference "Base_CRT_Presets/MBZ__5__POTATO__GDV-MINI.slangp" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV.slangp new file mode 100644 index 0000000..a93d9a0 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV.slangp @@ -0,0 +1,21 @@ +#reference "../Base_CRT_Presets/MBZ__1__ADV__GDV.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV__DREZ-3DS-400x480.slangp new file mode 100644 index 0000000..bf9f3e5 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV__DREZ-3DS-400x480.slangp @@ -0,0 +1,21 @@ +#reference "../Base_CRT_Presets_DREZ/MBZ__1__ADV__DREZ-3DS-400x480__GDV.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV__LCD-GRID.slangp new file mode 100644 index 0000000..23a592d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__ADV__LCD-GRID.slangp @@ -0,0 +1,15 @@ +#reference "../Base_CRT_Presets/MBZ__1__ADV__LCD-GRID.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 2 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 +HSM_DUALSCREEN_MODE = 1 +// HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION = "76.000000" +HSM_2ND_SCREEN_SCALE_OFFSET = "70.500000" +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" + +HSM_SCREEN_VIGNETTE_ON = "0.000000" diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__POTATO__GDV.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__POTATO__GDV.slangp new file mode 100644 index 0000000..5440cd8 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__POTATO__GDV.slangp @@ -0,0 +1,23 @@ +#reference "../Base_CRT_Presets/MBZ__5__POTATO__GDV.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 + +HSM_BG_OPACITY = 0 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD-NO-REFLECT.slangp new file mode 100644 index 0000000..c33455f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD-NO-REFLECT.slangp @@ -0,0 +1,24 @@ +#reference "../Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD-NO-REFLECT__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD-NO-REFLECT__LCD-GRID.slangp new file mode 100644 index 0000000..8deaf3a --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD-NO-REFLECT__LCD-GRID.slangp @@ -0,0 +1,26 @@ +#reference "../Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 + +HSM_SCREEN_VIGNETTE_ON = "0.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD.slangp new file mode 100644 index 0000000..cee7d3e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD.slangp @@ -0,0 +1,21 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD__DREZ-3DS-400x480.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD__DREZ-3DS-400x480.slangp new file mode 100644 index 0000000..8de261d --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD__DREZ-3DS-400x480.slangp @@ -0,0 +1,21 @@ +#reference "../Base_CRT_Presets_DREZ/MBZ__3__STD__DREZ-3DS-400x480__GDV.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD__LCD-GRID.slangp new file mode 100644 index 0000000..84c4cf6 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-3DS__STD__LCD-GRID.slangp @@ -0,0 +1,23 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp" + +HSM_FLIP_VIEWPORT_VERTICAL = 1 +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 88.888 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 +HSM_2ND_SCREEN_ASPECT_RATIO_MODE = 1 +HSM_2ND_SCREEN_CROP_PERCENT_LEFT = "10" +HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = "10" +HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = "-2.8" + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 + +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 + +HSM_SCREEN_VIGNETTE_ON = "0.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__POTATO__GDV.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__POTATO__GDV.slangp new file mode 100644 index 0000000..de1e6be --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__POTATO__GDV.slangp @@ -0,0 +1,18 @@ +#reference "../Base_CRT_Presets/MBZ__5__POTATO__GDV.slangp" + +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 + +HSM_BG_OPACITY = 0 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD-NO-REFLECT.slangp new file mode 100644 index 0000000..4d26a30 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD-NO-REFLECT.slangp @@ -0,0 +1,20 @@ +#reference "../Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 + +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD-NO-REFLECT__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD-NO-REFLECT__LCD-GRID.slangp new file mode 100644 index 0000000..537c88f --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD-NO-REFLECT__LCD-GRID.slangp @@ -0,0 +1,20 @@ +#reference "../Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__LCD-GRID.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +HSM_ASPECT_RATIO_MODE = 5 +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 71.17 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 + +HSM_SCREEN_VIGNETTE_ON = "0.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD.slangp new file mode 100644 index 0000000..ce9ce0b --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD.slangp @@ -0,0 +1,16 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_INT_SCALE_BORDER_MIN_HEIGHT = 10 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD__LCD-GRID.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD__LCD-GRID.slangp new file mode 100644 index 0000000..f2376b5 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen-DS__STD__LCD-GRID.slangp @@ -0,0 +1,18 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__LCD-GRID.slangp" + +HSM_ASPECT_RATIO_MODE = 5 + +HSM_INT_SCALE_MODE = 0 +HSM_NON_INTEGER_SCALE = 71.17 + +HSM_DUALSCREEN_MODE = 1 + +HSM_CURVATURE_MODE = 0 + +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_THICKNESS = 50 +HSM_BZL_WIDTH = 160 +HSM_BZL_HEIGHT = 150 +HSM_FRM_THICKNESS = 100 + +HSM_SCREEN_VIGNETTE_ON = "0.000000" diff --git a/bezel/Mega_Bezel/Presets/Variations/Dual-Screen__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen__STD.slangp new file mode 100644 index 0000000..f428ff5 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Dual-Screen__STD.slangp @@ -0,0 +1,4 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +HSM_DUALSCREEN_MODE = 1 +HSM_ASPECT_RATIO_EXPLICIT = 1.333 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/FBNEO-Vertical__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/FBNEO-Vertical__STD.slangp new file mode 100644 index 0000000..7861b21 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/FBNEO-Vertical__STD.slangp @@ -0,0 +1,4 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +HSM_ROTATE_CORE_IMAGE = 1 +HSM_ASPECT_RATIO_MODE = 2 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Glass-Minimal-Bezel-Edge__ADV-GLASS.slangp b/bezel/Mega_Bezel/Presets/Variations/Glass-Minimal-Bezel-Edge__ADV-GLASS.slangp new file mode 100644 index 0000000..1730989 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Glass-Minimal-Bezel-Edge__ADV-GLASS.slangp @@ -0,0 +1,9 @@ +#reference "../Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp" + +HSM_TUBE_BLACK_EDGE_THICKNESS = "-15.000000" +HSM_BZL_INNER_EDGE_THICKNESS = "540.000000" +HSM_BZL_INNER_EDGE_SHARPNESS = "20.000000" +HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = "1.480000" +HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = "100.000000" +HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = "13.000000" +HSM_BG_OPACITY = "0.000000" diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__0__SMOOTH-ADV-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__0__SMOOTH-ADV-NO-REFLECT.slangp new file mode 100644 index 0000000..6085199 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__0__SMOOTH-ADV-NO-REFLECT.slangp @@ -0,0 +1,20 @@ +#reference "../../Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__0__SMOOTH-ADV-NO-REFLECT__NTSC.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__0__SMOOTH-ADV-NO-REFLECT__NTSC.slangp new file mode 100644 index 0000000..a00c0e1 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__0__SMOOTH-ADV-NO-REFLECT__NTSC.slangp @@ -0,0 +1,20 @@ +#reference "../../Base_CRT_Presets/MBZ__0__SMOOTH-ADV-NO-REFLECT__GDV-NTSC.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__2__ADV-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__2__ADV-NO-REFLECT.slangp new file mode 100644 index 0000000..2a5906e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__2__ADV-NO-REFLECT.slangp @@ -0,0 +1,19 @@ +#reference "../../Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__2__ADV-NO-REFLECT__NTSC.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__2__ADV-NO-REFLECT__NTSC.slangp new file mode 100644 index 0000000..5f87449 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__2__ADV-NO-REFLECT__NTSC.slangp @@ -0,0 +1,19 @@ +#reference "../../Base_CRT_Presets/MBZ__2__ADV-NO-REFLECT__GDV-NTSC.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__4__STD-NO-REFLECT.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__4__STD-NO-REFLECT.slangp new file mode 100644 index 0000000..a8cb203 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__4__STD-NO-REFLECT.slangp @@ -0,0 +1,19 @@ +#reference "../../Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__4__STD-NO-REFLECT__NTSC.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__4__STD-NO-REFLECT__NTSC.slangp new file mode 100644 index 0000000..82d35c9 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__4__STD-NO-REFLECT__NTSC.slangp @@ -0,0 +1,19 @@ +#reference "../../Base_CRT_Presets/MBZ__4__STD-NO-REFLECT__GDV-NTSC.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__5__POTATO.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__5__POTATO.slangp new file mode 100644 index 0000000..13a85b2 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__5__POTATO.slangp @@ -0,0 +1,19 @@ +#reference "../../Base_CRT_Presets/MBZ__5__POTATO__GDV.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + diff --git a/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__5__POTATO__NTSC.slangp b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__5__POTATO__NTSC.slangp new file mode 100644 index 0000000..e2994c9 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Max-Int-Scale/Max-Int-Scale-No-Bezel__5__POTATO__NTSC.slangp @@ -0,0 +1,19 @@ +#reference "../../Base_CRT_Presets/MBZ__5__POTATO__GDV-NTSC.slangp" + +BackgroundImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_ASPECT_RATIO_MODE = 0 +HSM_INT_SCALE_MODE = 1 +HSM_INT_SCALE_MAX_HEIGHT = 115 +HSM_CURVATURE_MODE = 0 +HSM_GLOBAL_CORNER_RADIUS = 4 +HSM_TUBE_BLACK_EDGE_SHARPNESS = 90 +HSM_SCREEN_VIGNETTE_ON = 0 +HSM_BG_OPACITY = 0 +HSM_BZL_OPACITY = 0 +HSM_FRM_OPACITY = 0 + diff --git a/bezel/Mega_Bezel/Presets/Variations/N64__SMOOTH-ADV__DREZ-480p.slangp b/bezel/Mega_Bezel/Presets/Variations/N64__SMOOTH-ADV__DREZ-480p.slangp new file mode 100644 index 0000000..3287b21 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/N64__SMOOTH-ADV__DREZ-480p.slangp @@ -0,0 +1,28 @@ +#reference "../Base_CRT_Presets_DREZ/MBZ__0__SMOOTH-ADV__DREZ-480p__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png + +HSM_FLIP_VIEWPORT_VERTICAL = "1.000000" +HSM_ASPECT_RATIO_MODE = 2 + +// HSM_CROP_MODE = "1.000000" +// HSM_CROP_PERCENT_TOP = "7.0800000" +// HSM_CROP_PERCENT_BOTTOM = "5.620000" +// HSM_CROP_PERCENT_LEFT = "2.180000" +// HSM_CROP_PERCENT_RIGHT = "2.700000" +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = "200.000000" +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = "200.000000" + +GTU_ON = "1.000000" +signalResolution = "480.000000" + +HSM_SCALEFX_ON = "1.000000" + +GDV_INTERLACE_MODE = "2.000000" +shadowMask = "2.000000" + +HSM_BZL_COLOR_VALUE = "30.000000" +HSM_AMBIENT_LIGHTING_OPACITY = "98.000000" + +HSM_BG_FILL_MODE = 1 +HSM_BG_SCALE_KEEP_ASPECT = 0 diff --git a/bezel/Mega_Bezel/Presets/Variations/N64__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/N64__STD.slangp new file mode 100644 index 0000000..58b6e6e --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/N64__STD.slangp @@ -0,0 +1,21 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png + +HSM_FLIP_VIEWPORT_VERTICAL = "1.000000" +HSM_ASPECT_RATIO_MODE = 2 + +// HSM_CROP_MODE = "1.000000" +// HSM_CROP_PERCENT_TOP = "7.0800000" +// HSM_CROP_PERCENT_BOTTOM = "5.620000" +// HSM_CROP_PERCENT_LEFT = "2.180000" +// HSM_CROP_PERCENT_RIGHT = "2.700000" + +GDV_INTERLACE_MODE = "2.000000" +shadowMask = "2.000000" + +HSM_BZL_COLOR_VALUE = "30.000000" +HSM_AMBIENT_LIGHTING_OPACITY = "98.000000" + +HSM_BG_FILL_MODE = 1 +HSM_BG_SCALE_KEEP_ASPECT = 0 diff --git a/bezel/Mega_Bezel/Presets/Variations/Newpixie-Clone__SMOOTH-ADV__GDV.slangp b/bezel/Mega_Bezel/Presets/Variations/Newpixie-Clone__SMOOTH-ADV__GDV.slangp new file mode 100644 index 0000000..9e72201 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Newpixie-Clone__SMOOTH-ADV__GDV.slangp @@ -0,0 +1,34 @@ +#reference "../Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp" +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = "300.000000" +HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = "30.000000" + +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = "300.000000" + +HSM_INTERLACE_TRIGGER_RES = "100.000000" + +HSM_FAKE_SCANLINE_OPACITY = "70.000000" +HSM_FAKE_SCANLINE_RES = "216.000000" +HSM_FAKE_SCANLINE_ROLL = "20.000000" + +SHARPEN = "0.300000" + +g_cntrst = "0.500000" + +GDV_AFTERGLOW_THRESHOLD = "7.5" +// BP = "16" + +glow = "-0.300000" +SIZEH = "7.000000" +SIGMA_H = "2.300000" +halation = "0.2" +h_sharp = "3.000001" +shadowMask = "6.000000" +maskstr = "0.4" +maskDark = "1.000000" + +GDV_DECONVERGENCE_ON = "1.000000" +deconrr = "1.500000" +deconrb = "-1.500000" +deconrry = "1.500000" +deconrby = "-1.500000" +addnoised = "0.140000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Newpixie-Clone__STD__GDV.slangp b/bezel/Mega_Bezel/Presets/Variations/Newpixie-Clone__STD__GDV.slangp new file mode 100644 index 0000000..ca5ed8b --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Newpixie-Clone__STD__GDV.slangp @@ -0,0 +1,33 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" +// HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = "33" +// HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = "33" + +HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = "0.000000" +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = "0.000000" + +HSM_INTERLACE_TRIGGER_RES = "100.000000" +HSM_FAKE_SCANLINE_OPACITY = "70.000000" +HSM_FAKE_SCANLINE_ROLL = "30.000000" + +MDAPT_MODE = "0" + +g_cntrst = "0.500000" + +GDV_AFTERGLOW_THRESHOLD = "7.5" +// BP = "16" + +glow = "-0.300000" +SIZEH = "7.000000" +SIGMA_H = "2.300000" +halation = "0.2" +h_sharp = "3.000001" +shadowMask = "6.000000" +maskstr = "0.4" +maskDark = "1.000000" + +GDV_DECONVERGENCE_ON = "1.000000" +deconrr = "1.500000" +deconrb = "-1.500000" +deconrry = "1.500000" +deconrby = "-1.500000" +addnoised = "0.140000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Reflect-Only__ADV.slangp b/bezel/Mega_Bezel/Presets/Variations/Reflect-Only__ADV.slangp new file mode 100644 index 0000000..9909004 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Reflect-Only__ADV.slangp @@ -0,0 +1,16 @@ +#reference "../Base_CRT_Presets/MBZ__1__ADV__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_BZL_OPACITY = "0.000000" +HSM_BZL_WIDTH = "350.000000" +HSM_BZL_HEIGHT = "200.000000" +HSM_FRM_OPACITY = "0.000000" +HSM_BG_OPACITY = "0.000000" +HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE = "30.000000" +HSM_REFLECT_BLUR_MAX = "40.000000" +HSM_REFLECT_BLUR_FALLOFF_DISTANCE = "500.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Reflect-Only__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/Reflect-Only__STD.slangp new file mode 100644 index 0000000..60ce8ec --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Reflect-Only__STD.slangp @@ -0,0 +1,16 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +NightLightingImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png +FrameTextureImage = ../../shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png + +// Parameters +HSM_BZL_OPACITY = "0.000000" +HSM_BZL_WIDTH = "350.000000" +HSM_BZL_HEIGHT = "200.000000" +HSM_FRM_OPACITY = "0.000000" +HSM_BG_OPACITY = "0.000000" +HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE = "30.000000" +HSM_REFLECT_BLUR_MAX = "40.000000" +HSM_REFLECT_BLUR_FALLOFF_DISTANCE = "500.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Royale-Clone__ADV-GLASS__GDV.slangp b/bezel/Mega_Bezel/Presets/Variations/Royale-Clone__ADV-GLASS__GDV.slangp new file mode 100644 index 0000000..5647d62 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Royale-Clone__ADV-GLASS__GDV.slangp @@ -0,0 +1,42 @@ +#reference "../Base_CRT_Presets/MBZ__2__ADV-GLASS__GDV.slangp" + +// Thanks to BendBombBoom from the Libretro forum for this great preset! + +g_grade_on = "1.000000" +g_vignette = "1.000000" +wp_temperature = "7000.000000" + +LUT_Size1 = "32.000000" +LUT_Size2 = "32.000000" +LUTLOW = "12.000000" +interm = "4.000000" +iscan = "0.100000" +SIZEH = "10.000000" +SIGMA_H = "2.400000" +SIZEV = "1.000000" +SIGMA_V = "0.500000" +SIGMA_VB = "0.550000" +bogus_brightness = "1.000000" +glow = "0.010000" +bloom = "1.000000" +halation = "0.450000" +brightboost = "2.999999" +brightboost1 = "1.250000" +bogus_scanline = "1.000000" +scanline2 = "10.000000" +beam_min = "1.799999" +beam_max = "0.900000" +s_sharp = "0.000000" +smart_ei = "2.000000" +shadowMask = "2.000000" +maskDark = "0.400000" +mcut = "1.550000" +mask_gamma = "1.699999" +slotmask = "0.900000" +slotwidth = "3.000000" +mclip = "0.700000" + +deconrr = "-0.500000" +deconrg = "0.500000" +decons = "0.250000" +deconsmooth = "0.250000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Royale-Clone__ADV__GDV.slangp b/bezel/Mega_Bezel/Presets/Variations/Royale-Clone__ADV__GDV.slangp new file mode 100644 index 0000000..cd745d3 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Royale-Clone__ADV__GDV.slangp @@ -0,0 +1,42 @@ +#reference "../Base_CRT_Presets/MBZ__1__ADV__GDV.slangp" + +// Thanks to BendBombBoom from the Libretro forum for this great preset! + +g_grade_on = "1.000000" +g_vignette = "1.000000" +wp_temperature = "7000.000000" + +LUT_Size1 = "32.000000" +LUT_Size2 = "32.000000" +LUTLOW = "12.000000" +interm = "4.000000" +iscan = "0.100000" +SIZEH = "10.000000" +SIGMA_H = "2.400000" +SIZEV = "1.000000" +SIGMA_V = "0.500000" +SIGMA_VB = "0.550000" +bogus_brightness = "1.000000" +glow = "0.010000" +bloom = "1.000000" +halation = "0.450000" +brightboost = "2.999999" +brightboost1 = "1.250000" +bogus_scanline = "1.000000" +scanline2 = "10.000000" +beam_min = "1.799999" +beam_max = "0.900000" +s_sharp = "0.000000" +smart_ei = "2.000000" +shadowMask = "2.000000" +maskDark = "0.400000" +mcut = "1.550000" +mask_gamma = "1.699999" +slotmask = "0.900000" +slotwidth = "3.000000" +mclip = "0.700000" + +deconrr = "-0.500000" +deconrg = "0.500000" +decons = "0.250000" +deconsmooth = "0.250000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/SharpPixels__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/SharpPixels__STD.slangp new file mode 100644 index 0000000..0104e71 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/SharpPixels__STD.slangp @@ -0,0 +1,5 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +HSM_CRT_CURVATURE_SCALE = "0.000000" +HSM_AB_COMPARE_SHOW_MODE = "1.000000" +HSM_AB_COMPARE_SPLIT_POSITION = "100.000000" \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Smoothed_Antialias__SMOOTH-ADV.slangp b/bezel/Mega_Bezel/Presets/Variations/Smoothed_Antialias__SMOOTH-ADV.slangp new file mode 100644 index 0000000..51ee407 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Smoothed_Antialias__SMOOTH-ADV.slangp @@ -0,0 +1,19 @@ +#reference "../Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp" + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = "100.000000" +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = "100.000000" +HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = "33" +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = "33" +HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY = "1.000000" + +SHARPEN = "0.200000" +HSM_SCALEFX_ON = "1.000000" + +HSM_INTERLACE_TRIGGER_RES = "800.000000" +// HSM_BZL_COLOR_VALUE = 30 +// HSM_AMBIENT_LIGHTING_OPACITY = 98 + +MDAPT_MODE = "1.000000" + +HSM_BG_FILL_MODE = 1 +HSM_BG_SCALE_KEEP_ASPECT = 0 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Smoothed_Horz_Vert__SMOOTH-ADV.slangp b/bezel/Mega_Bezel/Presets/Variations/Smoothed_Horz_Vert__SMOOTH-ADV.slangp new file mode 100644 index 0000000..b0d0381 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Smoothed_Horz_Vert__SMOOTH-ADV.slangp @@ -0,0 +1,23 @@ +#reference "../Base_CRT_Presets/MBZ__0__SMOOTH-ADV__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png +BackgroundVertImage = ../../shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png + +HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = "500.000000" +HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = "500.000000" +HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = "15" +HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = "15" +HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY = "1.000000" + +SHARPEN = "0.200000" +HSM_SCALEFX_ON = "1.000000" + +HSM_INTERLACE_TRIGGER_RES = "800.000000" +HSM_VIEWPORT_VIGNETTE_OPACITY = 0 +HSM_BZL_COLOR_VALUE = 30 +HSM_AMBIENT_LIGHTING_OPACITY = 98 + +MDAPT_MODE = "1.000000" + +HSM_BG_FILL_MODE = 1 +HSM_BG_SCALE_KEEP_ASPECT = 0 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Tube-Effects__Day__ADV.slangp b/bezel/Mega_Bezel/Presets/Variations/Tube-Effects__Day__ADV.slangp new file mode 100644 index 0000000..d7cd1fe --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Tube-Effects__Day__ADV.slangp @@ -0,0 +1,19 @@ +#reference "../Base_CRT_Presets/MBZ__1__ADV__GDV.slangp" + +BackgroundImage = ../../shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png + +HSM_VIEWPORT_VIGNETTE_OPACITY = 0 +HSM_BZL_COLOR_VALUE = 30 +HSM_AMBIENT_LIGHTING_OPACITY = 20 + +HSM_BG_FILL_MODE = 1 +HSM_BG_SCALE_KEEP_ASPECT = 0 + +HSM_TUBE_DIFFUSE_MODE = 1 +HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS = 30 + +HSM_TUBE_STATIC_REFLECTION_IMAGE_ON = 0 +HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY = 2 +HSM_TUBE_STATIC_REFLECTION_IMAGE_SCALE = 120 + + diff --git a/bezel/Mega_Bezel/Presets/Variations/Tube-Effects__Night__ADV.slangp b/bezel/Mega_Bezel/Presets/Variations/Tube-Effects__Night__ADV.slangp new file mode 100644 index 0000000..a5b1501 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Tube-Effects__Night__ADV.slangp @@ -0,0 +1,6 @@ +#reference "Tube-Effects__Day__ADV.slangp" + +HSM_AMBIENT_LIGHTING_OPACITY = 98 + +HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS = 50 + diff --git a/bezel/Mega_Bezel/Presets/Variations/Vector-Horizontal__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/Vector-Horizontal__STD.slangp new file mode 100644 index 0000000..59b68c9 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Vector-Horizontal__STD.slangp @@ -0,0 +1,55 @@ +#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" + +// Thanks to SixWingedFreak from the Libretro forum for these settings + +post_br = "1.300000" +pre_bb = "2.000000" +g_gamma_in = "2.800000" +g_gamma_out = "2.200000" +g_signal_type = "0.000000" +g_crtgamut = "-1.000000" +g_space_out = "-1.000000" +g_cntrst = "0.300000" +g_mid = "0.200000" +g_lift = "0.010000" +wp_temperature = "6504.000000" +glow = "0.200000" +SIZEH = "50.000000" +SIGMA_H = "15.000000" +SIZEV = "50.000000" +SIGMA_V = "15.000000" +bloom = "2.000000" +blendMode = "0.000000" +brightboost = "2.000000" +scanline1 = "4.000000" +scanline2 = "4.000000" +beam_min = "1.100000" +vertmask = "-0.500000" +scangamma = "2.000000" +h_sharp = "3.000000" +shadowMask = "6.000000" +maskstr = "0.400000" +maskDark = "1.000000" +slotmask = "0.500000" +slotmask1 = "0.900000" +slotwidth = "3.000000" +double_slot = "2.000000" + +// HSM_ROTATE_CORE_IMAGE = 0 +HSM_ASPECT_RATIO_MODE = 2 +// HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 200 +// HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 200 +HSM_INTERLACE_TRIGGER_RES = 0 +HSM_FAKE_SCANLINE_OPACITY = 0 +HSM_BZL_HIGHLIGHT = 0.4 +HSM_REFLECT_BLUR_MIN = 0 +HSM_REFLECT_BLUR_MAX = 40 +HSM_REFLECT_GLOBAL_AMOUNT = 140 +HSM_REFLECT_GLOBAL_GAMMA_ADJUST = 1.2 +HSM_REFLECT_DIFFUSED_AMOUNT = 0 +HSM_REFLECT_FULLSCREEN_GLOW = 300 +HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = 1.6 +// GST_GLOW_GRADE = 0.3 +// GDV_GLOW = 0.1 +// GDV_BLOOM = 2 +// GDV_INTERLACE_MODE = 2 \ No newline at end of file diff --git a/bezel/Mega_Bezel/Presets/Variations/Vector-Vertical__STD.slangp b/bezel/Mega_Bezel/Presets/Variations/Vector-Vertical__STD.slangp new file mode 100644 index 0000000..acb53b2 --- /dev/null +++ b/bezel/Mega_Bezel/Presets/Variations/Vector-Vertical__STD.slangp @@ -0,0 +1,3 @@ +#reference "Vector-Horizontal__STD.slangp" + +HSM_ROTATE_CORE_IMAGE = 1 \ No newline at end of file diff --git a/bezel/Mega_Bezel/README.md b/bezel/Mega_Bezel/README.md new file mode 100644 index 0000000..1caacf9 --- /dev/null +++ b/bezel/Mega_Bezel/README.md @@ -0,0 +1,1383 @@ +------------------------------------------------------------------------------------------------------------ +HyperspaceMadness Mega Bezel Shader Readme +------------------------------------------------------------------------------------------------------------ +![Mega Bezel Logo](MegaBezelLogo.png) + +Version 1.0.001 2022-06-24 Rev 1 +---------------------------------------- +---------------------------------------- + +This file is best viewed in a markdown editor/viewer if possible. + +Find more conversation about the shader here: +https://forums.libretro.com/t/hsm-mega-bezel-reflection-shader-feedback-and-updates + + +Github Repo +---------------------------------------- +https://github.com/HyperspaceMadness/Mega_Bezel + +[![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://github.com/HyperspaceMadness/Mega_Bezel) + +---------------------------------------- +Licensing +---------------------------------------- + +Licensing of package components which incude licensing are LGPL3 + +---------------------------------------- +What does it do? +---------------------------------------- + + * Adds an auto-generated bezel around the screen with reflection + * Enable easier use of bezels and more "natural" presentation + * Ease of use for screen scaling and automatic aspect ratio with existing shaders + * Provide a consistent set of enhanced features wrapped around the core crt shaders + * Layering images to add artwork and visual effects + +---------------------------------------- +How does it work? +---------------------------------------- + + * In general there is a background image which fills the screen, then the scaled down game screen with an automatically generated bezel image is drawn on top. + * The bezel and frame you see around the screen is auto generated and not part of the background image + * Additional Images can be layered on top to augment the look + * Most things can be changed to your taste with adjustment of the parameters, so try them out! + + +---------------------------------------- +Installation +---------------------------------------- + +* **You MUST use Retroarch Version 1.9.8 or Later** (It will fail to load on earlier versions) +* If you have previous versions of the Mega Bezel installed: + * Delete the old Mega Bezel stuff from shaders/shaders_slang/bezel +* Inside the .zip is a bezel folder, copy the bezel folder into your Retroarch/shaders/shaders_slang folder + * The final path to the Mega bezel should be `Retroarch/shaders/shaders_slang/bezel/Mega_Bezel` +* If you are using any community packages (including the examples) place them in: + * `Retroarch/shaders/Mega_Bezel_Community_Collections` + * E.G. the examples go here `Retroarch/shaders/Mega_Bezel_Community_Collections/HSM-Mega-Bezel-Examples` +* Set video driver to **Vulcan** + * It will run in **GLCore** but seems faster in **Vulcan** + * Some users have run it with a very long load time in **D3D11** (Not Recommended) + * Restart after changing the video driver +* Open the **Settings** Menu and Set: + * **Video / Scaling / Aspect Ratio** to **Full** + * This will match your monitor aspect aspect ratio + * **Video / Scaling / Integer Scale** to **OFF** + * **Video / Output / Video Rotation** to **Normal** + * **User Interface / Show Advanced Settings** to **ON** + * **Core / Allow Rotation** to **OFF** -- **Important for FB Neo** + * Do this Before loading content +* **Load a preset** in the shaders menu, Mega Bezel shader presets are found in: + * shaders/shaders_slang/bezel/Mega_Bezel/Presets +* When you **save a preset** make sure you have the **Simple Presets** feature set to **ON** + * This will save a preset with a reference to the preset you loaded plus whatever parameter changes you made + * This will keep your presets loading properly when the shader updates in the future + + +---------------------------------------- +Choosing a Preset +---------------------------------------- + + * Presets are named/sorted by performance + * The most flexible and most resource hungry start with index 0. + * As the name's index number increases the performance of the preset improves but but flexibility decreases. + * The presets with the lowest performance requirements are: + * MBZ__3__STD__GDV-MINI - This has a Dynamic Bezel and Reflections + * MBZ__4__STD-NO-REFLECT__GDV-MINI - This Has a Dynamic Bezel but No Reflections + * MBZ__5__POTATO__GDV-MINI - This has no Dynamic Bezel and no Reflections +---------------------------------------- + +Presets in Mega_Bezel / Presets +---------------------------------------- + +- All in the root of the Presets folder use @guest.r's awesome Guest-DrVenom-Advanced CRT shader which is considered the default CRT shader for the Mega Bezel, the only exception to this is the POTATO preset which uses GDV-MINI for performance reasons. + +| |Reflection |Image Layering |Tube Effects |Pre-CRT Chain Preset +|------------------------|------------|---------------|--------------|--------------- +| MBZ__0__SMOOTH-ADV | ✔ | ✔ | ✔ | FULL + ScaleFx UpRes +| MBZ__1__ADV | ✔ | ✔ | ✔ | FULL +| MBZ__2__ADV-GLASS | ✔ | | ✔ | FULL +| MBZ__2__ADV-NO-REFLECT | | ✔ | ✔ | FULL +| MBZ__3__STD | ✔ | ✔ | ✔ | BASIC +| MBZ__3__STD-GLASS | ✔ | | ✔ | BASIC +| MBZ__4__STD-NO-REFLECT | | ✔ | ✔ | BASIC +| MBZ__5__POTATO | | BG ONLY | | MINIMAL +| +**Descriptions:** + + * **Glass** + * Presets which show a blurry reflection in the area around the screen + * **Image Layering** + * Layering of multiple images for background, crt housing, LEDs etc + * Includes the Automatically Generated Bezel & Frame + * **Tube Effects** + * Tube Static Reflection Highlight + * Tube Diffuse Image & Shadow + * Tube Colored Gel + * **Basic Pre-CRT shader chain** + * Fewest passes, but still Includes Grade + * **Full Pre-CRT shader chain** + * Includes Grade, MDAPT & GTU + * **Full + ScaleFx Upres Pre-CRT shader chain** + * Includes Full Pre-CRT shader chain and ScaleFX + * Resolution is tripled in the middle of the chain for ScaleFX + * This requires increased GPU processing + +**Preset Folders in Mega_Bezel / Presets** + + * **Base_CRT_Presets** + - Includes presets using different crt shaders for the screen + - Look here for the LCD preset + + * **Base_CRT_Presets_DREZ** + * Presets which set the resolution at the beginning of the shader chain + * Good for reducing the resolution from the core to native res to use with a crt shader + * Helps working with cores which are outputting at increased internal resolution, e.g. 2x, 4k this creates antialiasing at native res which comes from rendering at a higher resolution then reducing it + + +**HSM Examples Package (Separate additional Package from Mega Bezel)** + + * **Community_CRT_Variations** + - Presets with crt settings created by community members + - Thanks to some of our community members who's settings appear here including @BendBombBoom, @NesGuy, @Sonkun & @Cyberlab + + * **Variations** + * These presets are simple presets referencing one of the presets in the Mega_Bezel folder + * They reference the original preset then have adjusted parameters or texture paths + + * **Experimental** + * **Use at your own risk!** + * These presets are work in progress and are likely to be moved, renamed, dissappear or change behavior at any future release + +---- +**Pre CRT Shader Chain** +---------------------------------------- +---- +| Shader Behavior |SMOOTH-ADV |ADV |STD |POTATO +|----------------------------------------|-------------|------|------|------- +| Reducing Core Resolution | ✔ | ✔ | ✔ | ✔ +| Info Cache | ✔ | ✔ | ✔ | ✔ +| Resolution Text | ✔ | ✔ | ✔ | +| Startup Intro | ✔ | ✔ | ✔ | +| De-Dithering | ✔ | ✔ | | +| Image Sharpening | ✔ | ✔ | ✔ | +| Uprezed Edge Contour Smoothing | ✔ | | | +| Bandwidth Horizontal Blurring (GTU) | ✔ | ✔ | ✔ | +| NTSC Signal Processing (NTSC Adaptive) | ✔ | ✔ | ✔ | ✔ +| Afterglow | ✔ | ✔ | ✔ | ✔ +| Color Signal Processing (Grade) | ✔ | ✔ | ✔ | ✔ +| Interlacing & Downsample Blur | ✔ | ✔ | ✔ | ✔ + +NTSC Processing is only included in NTSC Presets, and GTU Horizontal blurring isincluded in non-NTSC presets + +---------------------------------------- +**Troubleshooting** +---------------------------------------- +--- + + * **If you have difficulties loading the shader** try loading it with the imageviewer core + * **Steps** + * Add the imageviewer core to Retroarch with the online updater + * Open an image with this core + * Load the shader + * If the shader loads correctly then the shader is working. + + * When the shader works in imageviewer, but doesn’t work when using a core, it is probably related to the core, or the graphics card being overwhelmed by resource usage with both the core requirements and the shader requirements + * If it is the core resolution overwhelming the resources, try a STD preset, or a STD-DREZ preset to reduce the resolution used within the shader chain + * If you still have difficulties loading the shader with a specific core, try updating the core + * If you still have difficulties download a new separate version of Retroarch and try it there. Sometimes problems lurk in a random config file which is very hard to track down + * **To see errors** coming from Retroarch you need to set up your logging settings: + * **Logging - Logging Verbosity - ON** + * **Frontend Logging - 0(Debug)** + * **Log to File - Off** + +* These settings will **cause a log window to come up** when you launch, and you should see any Retroarch errors, and shader loading details +--- +**If the Screen is changing size unexpectedly** + + * If the screen changes size when loading a game or switching between different parts of the game e.g. gameplay vs cinematic, this is because of the interaction between the different resolutions the core is outputting on different screens and the shader's integer scale or automatic aspect ratio settings. + +* **How to fix** + + * **Make sure Integer Scale is OFF in the RetroArch Video Settings** + * **If BOTH the HEIGHT and WIDTH of the screen size are changing size** + + * Set the Integer scale mode to OFF (0) + * **If ONLY the WIDTH of the screen is changing size** (the HEIGHT stays constant) + * Set the Aspect Ratio Type to Explicit (1) This will use the explicit aspect ratio number instead of guessing + + * If this solves your issue please consider posting on the thread at the top of this document the issue you had so that we can improve the auto aspect ratio in the future +--- +**If you see artifacts on the game image like circles or interference patterns** + * These artifacts which look like round swirls or circles like tree trunk rings are called a Moiré patterns which happen when a high frequency pattern is sampled at a lower frequency - https://en.wikipedia.org/wiki/Moiré_pattern + + * The base cause of the Moiré pattern is usually the curvature in combination with visible scanlines + +* **How to fix** + * Set **CRT Curvature Scale Multiplier** to 0, This will remove curvature from the game image but leave everything else the same + * Set **Integer Scale Mode** to 1 or 2 + * Make the game screen larger with either **Viewport Zoom** or **Non-Integer Scale %** + * Use a higher resolution monitor if available + +---------------------------------------- +--- + +Bug Reporting +---------------------------------------- + +- **Please post images** of the issue if it is at all visual in nature. This often helps communicate the issue better & quicker, **even if the issue seems simple**. +- Please make sure to **Use the latest version of the shader** when reporting bugs +- If you are having any issues with the shader not loading or crashing please include a log (See above for turning on logs) +- Please include info about your setup + - Preset + - Core and Internal Res 1x, 2x etc? + - GPU + + +----------------------------------------------------------------------------------------------- +---- +Parameter Descriptions +----------------------------------------------------------------------------------------------- + +----------------------------------------------------------------------------------------------- +**[ --- HSM MEGA BEZEL X.X.XXX 20XX-XX-XX --- ]:** - Title, Version, Date + + * **Show Resolution Info** --- Show Resolution info from different aspects of the shader chain with onscreen text + +----------------------------------------------------------------------------------------------- +**[ CRT BRIGHTNESS & GAMMA ]:** + * **Gamma In (Game Embedded Gamma - Gamma Space to Linear) Def 2.4** - The gamma adjustment applied to take the core image and bring it into linear color space. Gamma to Linear Space Decode + * **Gamma Out (Electron Gun Gamma - Linear to Gamma Space) Def 2.4** - The gamma adjustment applied to the CRT shader's linear color output to bring it back into a gamma corrected space. Also known as Linear to Gamma Space Encode + * **Post CRT Brightness** - Brightness adjustment on the CRT color output (Applied in Linear Color Space) + * **Post CRT Brightness Affects Grade Black Level** - As this value is reduced the brightness adjustment amount will be reduced on the black level. So if you set it to a low value there will be almost no increase in brightness on the areas which were black before the black level adjustment. + +----------------------------------------------------------------------------------------------- +**[ GRAPHICS CACHE ]:** + + * **Cache Graphics** + * **0: OFF** - Graphics Layering and Bezel Generation are regenerated every frame + * **1: ON** - Graphics & Bezel are generated once and cached for subsequent frames. The cache auto updates when changes in parameters are detected + * **Cache Update Indicator** + * **0: OFF** - Never show the red dot indicator on screen when the cache updates + * **1: ON** - Appears whenever the graphics are regenerated and cache is updated, when caching is off or if the cache is auto-updated + * **2: ONLY WHEN CACHE OFF** - Indicator does not appear on auto-update, It only appears when caching is off + +----------------------------------------------------------------------------------------------- +**[ GRAPHICS GLOBAL BRIGHTNESS ]:** + * **Graphics Brightness** - Brightness of all graphics and images which are not the CRT Shader + * **Graphics Gamma Adjust** - Gamma adjustment on all graphics and images which are not the CRT Shader to adjust brightness with a gamma curve + +----------------------------------------------------------------------------------------------- +**[ AMBIENT LIGHTING ]:** - Usually used to apply night lighting on all graphics +- **Opacity** + - How much of the ambient lighting darkening effect is applied +- **Hue** + - Shift the hue of the color of the image +- **Value** + - How dark or bright the ambient lighting is +- **Saturation** + - How saturated the night lighting is +- **Scale Mode** + - **VIEW WITH ZOOM** Scale to the full view, but scale with the viewport Zoom + - **FULL** Scale the image to the full window +- **Scale Offset** + - Scale the lighting image +- **Rotate** + - Rotate the lighting image +- **Mirror Horizontal** + - Mirror the ambient lighting image + +----------------------------------------------------------------------------------------------- +**[ VIEWPORT ZOOM ]:** +* **Viewport Zoom** --- Zoom in or out on everything +* **Zoom CRT Mask** --- When this is on and we zoom in the crt phosphor mask will also scale in integer steps +* **Viewport Position X** +* **Viewport Position Y** + +----------------------------------------------------------------------------------------------- +**[ FLIP & ROTATE ]:** + +* **Flip Viewport Vertical** --- Some cores flip the viewport (full monitor area), this flips it back +* **Flip Viewport Horizontal** +* **Flip Core Image Vertical** --- Some cores flip the core image, this flips it back +* **Flip Core Image Horizontal** +* **Rotate CRT Tube** --- Turns the tube 90 degrees counter counter-clockwise + +----------------------------------------------------------------------------------------------- +**[ ASPECT RATIO ]:** + +* **Orientation** --- Should the aspect be tall or wide? This does not rotate the image. + * **0 - Auto** - Chooses vertical vs horizontal based on the core resolution + * **1 - Horizontal** - uses horizontal aspect + * **2 - Vertical** - uses vertical aspect + +* **Type** + * **0 - Auto** - Choose aspect ratio based on an educated guess about the core's resolution + * **1 - Explicit** - Use the aspect ratio from the **Explicit Aspect Ratio** parameter + * **2 - 4:3** - Almost all arcade games are 4:3 + * **3 - 3:2** + * **4 - 16:9** + * **5 - PAR** - The aspect ratio of the core's pixel resolution + * **6 - Full** - The screen will scale to the full viewport + + * **Explicit Aspect Ratio** - Ratio used when [Aspect Ratio] Type is set to Explicit or if Auto is chosen and no matching resolution can be found + +----------------------------------------------------------------------------------------------- +**[ CRT SCREEN SCALING GENERAL ]:** + +- **Integer Scale Mode** + - **0 - Off,** Use Non-Integer Scale + - **1 - ShortAxis Integer Scale On** - for the viewport (monitor) in landscape mode this is the vertical axis, If the screen/tube aspect ratio is vertical then integer scale is used for both horizontal and vertical axes + - **2 - Integer Scale on both axes** + +- **Preset is for Monitor Portrait Mode (Smaller CRT Screen)** + - Turn on if this preset is to be used on monitor in Portrait mode, E.G. if your physical monitor is turned vertical + +**[ INTEGER SCALE ]:** + +- **Base Integer Scale Max Height %** + - The maximum screen height of the default integer scale when integer scale is on + +- **Integer Scale Multiple Offset** + - Adjusts the size of the screen by increasing the multiple of the core resolution (on both axes) when using integer scale, to make the screen larger or smaller + +- **Integer Scale Multiple Offset Long Axis** + - Adds an additional multiple offset but for only the long axis, with a horizontal aspect ratio this is the horizontal axis + +**[ NON-INTEGER SCALE PERCENT ]:** + +- **Non-Integer Scale %** + - If integer scale isn't used, this sets the vertical size of the vertical percentage of the full viewport. The default is 82.97 which corresponds to an exact integer scale of 224p content + +----------------------------------------------------------------------------------------------- +**[ NON INTEGER - PHYSICAL SIZES ]:** + +- **Use Physical Monitor and Tube Sizes for Non-Integer** + - Use these physical sizes instead of the integer scale percentage + +- **Your Monitor's Aspect Ratio** + - The aspect ratio of your physical monitor, most monitors are 1.77 which equates to 16:9 + +- **Your Monitor's Size (Diagonal)** + - The size of your physical monitor + +- **Simulated Tube Size (Diagonal)** + - How big you want the crt screen to be on your monitor + + +----------------------------------------------------------------------------------------------- +**[ NON-INTEGER - AUTOMATIC SCREEN SCALE & PLACEMENT ]:** + +- **Use Image For Automatic Placement (Scale and Y Pos)** + - When on the placement image is inspected to find where to place and scale the screen image +- **Auto Place Horizontal (X Pos)** + - **0 - OFF** Screen placed in the center + - **1 - ON** Tries to place the screen in the center of the hole in the placement image +- **Placement Image Mode: TRANSPARENCY : WHITE ON BLACK** + - What channel of the texture to look at to find the hole in the image, either the transparent part, or a white rectangle on top of a black background + +----------------------------------------------------------------------------------------------- +**[ NON-INTEGER SCALE OFFSET ]:** + +- **Non-Integer Scale Offset** + - Additional scale offset added on top of the non-integer scale, including image placement scale + + +----------------------------------------------------------------------------------------------- +**[ SNAP NON-INTEGER TO INTEGER SCALE ]:** + +- **Snap to Closest Integer Scale** + - Takes the current Non-Integer scale and snaps to the closest integer scale within a tolerance +- **Snap To Closest Integer Scale Tolerance** + - Tolerance of how far away from the current integer scale we will snap to an integer scale + + +----------------------------------------------------------------------------------------------- +**[ POSITION OFFSET ]:** + +- **Position X** - Moves the entire screen and frame left and right +- **Position Y** - Moves the entire screen and frame up and down + + +----------------------------------------------------------------------------------------------- +**[ CROPPING CORE IMAGE ]:** --- +Cropping removes parts of the game image at the edges of the screen which were never meant to be seen. Negative values can add more black area at the edges of the screen + +- **Crop Mode - OFF | CROP BLACK ONLY | CROP ANY** + - **0 - Off,** No Cropping applied + - **1 - Crop Black Only** Only apply the cropping amount within the black areas of the core image + - **2 - Crop Any** Apply full crop amount +- **Crop Zoom %** Add Cropping on all sides at once +- **Crop Overscan Top** +- **Crop Overscan Bottom** +- **Crop Overscan Left** +- **Crop Overscan Right** +- **Black Threshold for 'CROP BLACK ONLY'** - The brightness threshold of the black area to be cropped + + +----------------------------------------------------------------------------------------------- +**[ --- SMOOTHING - SCALEFX - SMOOTH-ADV Presets Only ---- ]:** + +**ScaleFX ON** applies a shape smoothing on the core image and creates a higher resolution smoothed image + - After you turn this on you must increase **Core Res Sampling**, or **Downsample Blur** in the next section to see a difference + - ScaleFX only works well when the it's input is the native res from the core + To see the contour smoothing coming from **ScaleFX** either **Core Res Sampling**, or **Downsample Blur** must be increased from their default value. + +----------------------------------------------------------------------------------------------- +**[ SCANLINE DIRECTION ]:** + +- **Scanline Direction** - Direction of the scanlines + - **0 - Auto** --- Chooses horizontal or vertical scanline direction based on aspect ratio + - **1 - Horizontal** + - **2 - Vertical** + + +----------------------------------------------------------------------------------------------- +**[ CORE RES SAMPLING ]:** + +**Adjusting core res sampling changes how the CRT perceives the core resolution** + e.g. If you use a core with 4X internal resolution you can set core res sampling to 0.25 it be sampled as if it was at 1x resolution + +- **Scanline Direction Multiplier (X-Prescale for H Scanline)** + - Adjust the sampling in direction of the scanlines + - E.G. if the scanlines are horizontal this adjusts sampling along the horizontal axis +- **Scanline Dir Downsample Blur** + - Add blur along the scanline direction +- **Opposite Direction Multiplier (Y Downsample for H Scanline)** + - Adjust the sampling in direction opposite of the scanlines + - E.G. if the scanlines are horizontal this adjusts sampling along the vertical axis +- **Opposite Dir Downsample Blur** + - Add blur along the opposite direction of the scanlines + +----------------------------------------------------------------------------------------------- +**[ INTERLACING From Guest.r :) ]:** + +- **Interlace and Fake Scanlines Trigger Res** + - Resolution where the shader should switch into its interlace or high res content mode. +- **Interlacing Mode: OFF | Normal 1-3 | Interpolation 4-5** + * Default is Mode 4 which gives a result with no scanlines +- **Interlacing Effect Smoothness** +- **Interlacing Scanline Effect** +- **Interlacing (Scanline) Saturation** + +----------------------------------------------------------------------------------------------- +**[ FAKE SCANLINES ]:** + +- **Show Fake Scanlines - OFF | ON | USE TRIGGER RES** +- **Opacity** + - Opacity of scanlines added on top of the crt image. + - These scanlines are not tied to the core image resolution +- **Scan Resolution** +- **Scan Resolution Mode: AUTO (CORE RES) : EXPLICIT** +- **Explicit Scan Resolution** +- **Int Scale Scanlines** +- **Rolling Scanlines** +- **Scanline Curvature** + +----------------------------------------------------------------------------------------------- +**[ CURVATURE ]:** + Applies tube curvature + +- **CURVATURE MODE** + - **0 - Turn Curvature Off** + - **1 - 2D** - Simplest and fastest curvature + - **2 - 2D-CYL** - Simplest and fastest curvature but for a cylindrical tube like a Trinitron + - **3 - 3D Sphere** - Geometric projection from the surface of a sphere to the viewport - Same as CRT-Royale + - **4 - 3D Sphere with adjusted corner mapping** --- Very similar to #1 + - **5 - 3D Cylindrical Mapping** --- Vertically flat curvature like a Trinitron, e.g. PVM or BVM +- **2D Curvature on Long Axis** - Curvature multiple on long axis, for a horizontal aspect ratio this is the horizontal axis +- **2D Curvature on Short Axis** - Curvature multiple on short axis, for a horizontal aspect ratio this is the vertical axis +- **3D Radius** - Radius for the sphere the 3D projection is done on, values from 1-4 then to be useful +- **3D View Distance** - This is the distance of the virtual camera from the Sphere +- **3D Tilt Angle Y** - Vertical Tilt, with split screen this will tilt both screens towards or away from the center +- **CRT Curvature Scale Multiplier** - This allows reducing the curvature of the crt image to reduce Moire artifacts or just give a flat look while the bezel and black edge stays the same + +----------------------------------------------------------------------------------------------- +**[ ANTI-FLICKER ]:** + +Blend parts of the image which flicker on/off repeatedly between frames often used for Character's Shadow, giving a blended result. + +- **Anti-Flicker ON** --- Turn the effect ON / OFF +- **Luma Difference Threshold** + - Brightness difference required before the colors will be blended + +----------------------------------------------------------------------------------------------- +**[ A/B SPLITSCREEN COMPARE ]:** + +- **Show: CRT SHADER | ORIGINAL** + - Switch between showing the raw game image or the complete CRT image +- **Compare Area: LEFT | RIGHT | TOP | BOTTOM** + - Which part of the screen should we show the comparison image +- **Splitscreen Position** + - Shift the split in the middle of the screen towards the one side or the other +- **Freeze CRT Tube (Freeze Left, New changes on Right)** + - Freeze an image of the CRT tube at the current time on one side of the screen, while the area on the other side keeps updating to user changes +- **Freeze Graphics (Freeze Left, New changes on Right)** + - Freeze an image of the Graphics at the current time ion one side of the screen, while the area on the other side keeps updating to user changes + +----------------------------------------------------------------------------------------------- +**[ SCREEN VIGNETTE ]:** + +- **Use Vignette** + - Fade out the game screen as we move away from the center of the screen +- **Amount (Strength)** - Overall Darkness +- **Corner Amount (Power)** - Darkeness towards the edges +- **Show Vignette in Reflection** - Darken the reflection or not + + +----------------------------------------------------------------------------------------------- +**[ MONOCHROME ]:** --- Have the screen act as if it is a monochrome CRT + +- **Monochrome Color:** + - **0: OFF** + - **1: BLACK & WHITE** + - **1: AMBER** + - **1: GREEN** + +- **Monochrome Gamma** +- **Monochrome Hue Offset** +- **Monochrome Saturation** + +----------------------------------------------------------------------------------------------- +**[ TUBE DIFFUSE IMAGE ]:** + +The color/texture of the tube which appears behind the CRT image +- **Tube Diffuse Color** + - 0: Black - Game image is shown over 100% black + - 1: Image - Shows an grayish image of crt tube with lighting + - 2: Transparent - See through the CRT tube to the background +- **Opacity** + - Opacity of the tube background, With opacity of 0 you will see through to the background, good for things like Tron's Deadly Discs +- **Colorize On** - Colorize the image +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** + - A multiplier on the amount of global ambient lighting applied +- **Scale** +- **Scale X** +- **Empty Tube Thickness** + - Amount of Empty tube around the game image +- **Empty Tube Thicknes X Scale** + - Amount of Empty tube around the game image horizontally + +----------------------------------------------------------------------------------------------- +**[ TUBE SHADOW IMAGE ]:** + +Adds a shadow on top of the tube diffuse image and colored gel +- **Tube Shadow Image - OFF | ON** + - Apply a shadow on the top of the tube diffuse coloring +- **Opacity** + - Opacity of the shadow, and how dark the shadow is +- **Position X** +- **Position Y** +- **Scale X** +- **Scale Y** - Scales shadow from the top of the tube +- **Curvature Scale** - How much curvature is applied to the shadow, more curvature has the effect of making it look like the light is higher relative to the tube/bezel + + +----------------------------------------------------------------------------------------------- +**[ TUBE STATIC REFLECTION IMAGE ]:** +- **Use Tube Static Reflection Image - OFF | ON** --- Apply the effect or not +- **Opacity** --- This is the shine on the tube which imitates reflection from the environment +- **Ambient Lighting Multiplier** --- How much of the global ambient lighting image to apply, default is 100 +- **Scale** --- Scales the tube reflection image from the center of the tube + + +----------------------------------------------------------------------------------------------- +**[ TUBE COLORED GEL IMAGE ]:** + Colored effect added on top of the CRT image to tint it + +- **Use Tube Colored Gel** - Apply the image or not +- **Dual Screen Visibility** - Which screens to show the colored Gel + - 0: Both Screens + - 1: Only the First Screen + - 2: Only the Second Screen +- **Multiply Blend Amount** - Image applied like a colored gel in photography + - Used to make vector games which output black and white colored, E.G Battlezone +- **Additive Blend Amount** - Image applied as a brightening of the tube area + - Used to add color to the screen as if it was the gel being diffusely lit from outside the monitor +- **Normal Blend Amount** - Used for the more opaque parts of a gel image like for the Vectrex +- **Normal Blend Brightness** - Brightness for these more opaque parts +- **Normal Blend Transparency Threshold** - Adjusts at what transparency of the image the area should be fully transparent +- **Ambient Lighting Multiplier** - How much of the global ambient lighting to apply +- **Scale** - Scale the colored gel image +- **Flip Horizontal** - Flip the colored gel image Horizontally +- **Flip Vertical** - Flip the colored gel image Vertically +- **Show CRT on Top of Colored Gel Normal** - Put the CRT image on top of the gel image so it is not color shifted or obscured. + + +----------------------------------------------------------------------------------------------- +**[ SCREEN BLACK EDGE ]:** + +- **Show Black Edge** --- Show the black edge at the edge of the tube + - 0: Don't show any black edge + - 1: Show the black edge overtop the tube diffuse and gel +- **Global Corner Radius** --- Global radius of all corners before their own multipliers are applied +- **Black Edge Corner Radius Scale** --- the roundness of the corner of the screen area +- **Black Edge Sharpness** --- Blends the edge of the game screen image to black, lower values will fade the edge +- **Black Edge Curvature Scale Multiplier** --- How much the black edge will follow the screen curvature +- **Black Edge Thickness** --- How thick the black edge is on the edge of the tube + - Set this to 0 or less to remove the black edge +- **Black Edge Thickness X Scale** --- Scale the thickness on the left and right edge + +----------------------------------------------------------------------------------------------- +**[ DUAL SCREEN ]:** + +- **Dual Screen Mode** + - **0 - OFF** - Single Screen + - **1 - VERTICAL** - Split into 2 screens one on the top and one on the bottom + - **2 - HORIZONTAL** - Split into 2 screens one on the left and one on the right + +- **Core Image Split Mode** + - **0 - AUTO** - Split in the same direction as the dual screen mode + - **1 - VERTICAL** + - **2 - HORIZONTAL** +- **Core Image Split Offset** + - Adjusts where we split the core image into two + - This is an offset in pixels from the center + the screen + - Value in Pixels +- **Viewport Split Offset** + - Sets where the viewport split placed. The split defines the area where one screen or the other appears + - Value is a percentage from the center of the screen +- **Scale Screens from Center of Split** + - 0 - OFF - The screens will scale their center + - 1 - ON - The screens will scale from the split position rather than from their own centers +- **Position Offset Between Screens** + - Positive values move screens apart + - Negative values move screens closer to each other +- **2nd Screen Aspect Ratio Mode** + - 0 - Use the same Aspect ratio as the first Screen + - 1 - PAR (Uses the square pixel aspect of the bottom screen's resolution) +- **2nd Screen Use Independent Scale** + - Don't affect the second screen with the scale of the first +- **2nd Screen Scale Offset** + - Increase or Decrease scale of second screen +- **2nd Screen Pos X** + - Move the second screen Horizontally +- **2nd Screen Pos Y** + - Move the second screen Vertically +- **2nd Screen Crop Zoom %** +- **2nd Screen Crop Overscan Top** +- **2nd Screen Crop Overscan Bottom** +- **2nd Screen Crop Overscan Left** +- **2nd Screen Crop Overscan Right** + +----------------------------------------------------------------------------------------------- +**[ REFLECTION POSITION & SCALE ]:** + +- **Screen Reflection Scale** + - Scales the reflection from the center + - With a larger scale, the image from the screen will appear without mirroring, like the Big Blur preset +- **Screen Reflection Pos X** + - Shift the reflection left or right +- **Screen Reflection Pos Y** + - Shift the reflection up or down + + +----------------------------------------------------------------------------------------------- +**[ BEZEL INDEPENDENT SCALE & CURVATURE ]:** + +- **Use Independent Scale & Curvature** + - Scale the bezel independent of the screen +- **Independent Scale** + - Scale of the bezel when scale from image is not used + - Base scale for the bezel default is 82.97 which is the same as the default screen size +- **Use Independent Curvature** --- Define curvature separately from the screen +- **Independent Curvature X** --- Horizontal curvature for the bezel when independent +- **Independent Curvature Y** --- Vertical curvature for the bezel when independent + +----------------------------------------------------------------------------------------------- +**[ BEZEL GENERAL ]:** + +- **Opacity** + - At 100 the bezel is fully visible + +- **Blend Mode** + - **0 - Off** + - **1 - Normal Blending** + - **2 - Additive Blending** - Added on as added with a projector + - **3 - Multiply Blending** - Image is applied by darkening the under layer + +- **Width** + - Thickness of the bezel on the sides of the tube, default is 125 + +- **Height** + - Thickness of the bezel on the top and bottom of the tube, default is 100 + +- **Scale Offset** + - Scale offset of the Bezel & Frame from its default position + +- **Inner Curvature Scale Multiplier** + - How much the bezel's curvature follows the tube curvature + +- **Inner Corner Radius Scale** - Def 50 + - Roundness of the inner corner of the bezel, it is a multiplier of the roundness of the screen corner + - 100 gives you the same roundness as the screen corner + +- **Inner Edge Thickness** + - Thickness of edge of inner, default 100 + +- **Inner Edge Sharpness** - Def 90 + +- **Outer Corner Radius Scale** - Def 100 + - Roundness of the inner corner of the bezel, it is a multiplier of the roundness of the screen corner + - 100 gives you the same roundness as the screen corner + +- **Outer Curvature Scale** + - Amount of curvature on the outside of the bezel it is a multiplier of the roundness of the screen corner + - Default is 0 which gives a straight edge of the outside of the bezel + +- **Outer Edge Position Y** + - This moves the outer edge of the bezel and the frame up and down + +- **Brightness** + - Brightness of the bezel, the default is 30 so only 30% brightness + +- **Highlight** + - The highlight or shininess in the middle of the bezel + +- **Opacity of Shadow from Bezel on Tube** + - How much of a darkness from the bezel onto the illuminated screen + - Only visible when the black ring around the screen is reduced so that the bezel is almost on top of the screen + +----------------------------------------------------------------------------------------------- +**[ BEZEL COLOR ]:** + +- **Hue** + - The hue or "color" of the bezel E.G. Blue vs Orange +- **Saturation** + - How saturated or strong the color is +- **Value/Brightness** + - The brightness of the color, default is 10 which is 10% +- **Noise** + - Noise or speckles in the color, default is 30 + +----------------------------------------------------------------------------------------------- +**[ FRAME COLOR ]:** + +- **Use Inependent Frame Color** + - 0 by default, when turned on it uses a different color than the bezel color +- **Hue** + - The hue or "color" of the bezel and frame E.G. Blue vs Orange +- **Saturation** + - How saturated or strong the color is +- **Value/Brightness** + - The brightness of the color, default is 10 which is 10% +- **Noise** + - Noise or speckles in the color, default is 30 + +----------------------------------------------------------------------------------------------- +**[ FRAME GENERAL ]:** + +- **Opacity** + - Opacity of the frame default is 100 which means it is fully visible +- **Texture Overlay Opacity (Highlight)** + - Opacity of the texture applied on top of base color of the frame + - The default texture is a white highlight and so adds a highlight effect to the frame giving it a bit more dimension +- **Texture Overlay Blend Mode** - Default is 2 so it is additive + - **0 - Off** + - **1 - Normal Blending** + - **2 - Additive Blending** - Added on as added with a projector + - **3 - Multiply Blending** - Applied by darkening what is underneath +- **Inner Edge Thickness** + - Thickness of the inner edge of the frame +- **Inner Corner Radius Scale** + - Roundness of the inner corner, +- **Frame Thickness** + - Base thickness of the frame +- **Frame Thickness Scale X** + - Adjusts the frame thickness of frame at the left and right +- **Frame Outer Pos Y** + - Shift the outside of the frame up and down which can make the top of the frame larger than the bottom or vice versa +- **Frame Outer Curvature Scale** + - Curvature of the outside of the frame, at 100 it will match the curvature of the inside of the frame +- **Outer Corner Radius** + - Roundness of the frame outer corner +- **Outer Edge Thickness** + - Thickness of the shading on the outer edge +- **Outer Edge Shading** + - Controls the darkness of the shading on the outer edge +- **Shadow Opacity** + - Controls the darkness of the shadow under and around the frame +- **Shadow Width** + - Controls how wide the shadow is around the frame + +----------------------------------------------------------------------------------------------- +**[ REFLECTION ]:** + +- **Blend Mode** - How the reflection is applied to the layer underneath Default is 2 + - **0 - Off** - The layer is not shown + - **1 - Normal Blending** + - **2 - Additive Blending** - Applied additively to brighten what's underneath +- **Mask** - Mask the reflection with the area inside the: + - **0 - ALL** - Whole viewport + - **1 - Screen** - Illuminated area of the tube + - **2 - Tube** + - **2 - Bezel and Inward** - Bezel and inward + - **3 - Bezel** + - **4 - Bezel +** - Bezel and outward + - **5 - Frame** + - **6 - Frame +** - Frame and outward + - **7 - Background** - Outside the frame +- **Global Amount** + - Overall multiplier on the amount of reflection shown +- **Global Gamma Adjust** + - Gamma adjustment on the reflection, allows you to reduce the amount of reflection in dark areas, or reduce contrast in the reflections +- **Direct Reflection** + - Amount of the most detailed reflection shown +- **Diffused Reflection** + - Amount of a very blurry and diffused reflection shown, helps blend between the main reflection to make a more natural effect +- **FullScreen Glow** + - Amount of a very diffused reflection shown which mimics lighting from the overall brightness of the screen +- **FullScreen Glow Gamma** + - Adjust the gamma of the full screen glow, this has the effect of controlling how bright the screen needs to be to see the fullscreen glow effect +- **Bezel Inner Edge Amount** + - How much reflection on the small inner edge right at the outside of the tube +- **Bezel Inner Edge Fullscreen Glow** + - Same as above but a non-directional glow from all over the screen +- **Frame Inner Edge Amount** +- **Frame Inner Edge Sharpness** + - How soft or sharp the reflection is at the inner edge of the frame + +----------------------------------------------------------------------------------------------- +**[ REFLECTION FADE ]:** + +- **Fade Amount** + - At 100 the reflection fades out as it comes away from the screen, at 0 the reflection does not fade and is full strength everywhere +- **Radial Fade Width** + - The distance away from the sides of the screen where the reflection to completely fades out +- **Radial Fade Height** + - The distance away from the top and bottom of the screen where the reflection to completely fades out +- **Lateral Outer Fade Position** + - When the reflection fades out towards the corners, for example on the bottom bezel the reflection fades out towards the left and right. The position where the fade starts. +- **Lateral Outer Fade Distance** + - For the lateral fade the distance for it to fade out +- **Viewport Vignette (For Glass Presets)** + - Adds a vignette over the entire viewport to darken the areas as it goes towards the edges used to darken the reflection in the glass preset + +----------------------------------------------------------------------------------------------- +**[ REFLECTION CORNER ]:** + +- **Corner Fade** + - How much should the corner fade out +- **Corner Fade Distance** + - The distance from the corner where the reflection fully fades out +- **Corner Inner Spread** + - How much the inner corner reflection spreads out +- **Corner Outer Spread** + - How much the outer corner reflection spreads out +- **Corner Rotation Offset Top** + - Adjust the rotation of the highlight in the top corners +- **Corner Rotation Offset Bottom** + - Adjust the rotation of the highlight in the bottom corners +- **Corner Spread Falloff** + - Controls the profile of the falloff, small values make falloff faster near the center. + +----------------------------------------------------------------------------------------------- +**[ REFLECTION BLUR ]:** + +- **Blur Samples - 0 for OFF** + - Default is 12 +- **Min Blur** + - What is the least amount of blur in the reflection this is nearest the screen +- **Max Blur** + - The highest amount of blur in the reflection, this is the farther away from the screen + +----------------------------------------------------------------------------------------------- +**[ REFLECTION NOISE ]:** + +- **Noise Amount** + - How much noise seen in the reflection, gives the effect of the scattered reflection of a slightly textured surface +- **Noise Samples (0 for OFF)** + - How many samples taken for the effect, more samples the smoother the effect, fewer samples makes the surface look more like it has little bumps in it +- **Sample Distance** + - What is the farthest distance away from the point being drawn where the scattered sample come from + +----------------------------------------------------------------------------------------------- +**[ GLASS BORDER ]:** + +- **Glass Border ON (Glass Preset Only)** + - Changes the appearance of the reflection to look like the glass effect, this is here for technical reasons, not very useful to change interactively + + + + +## **POTATO Presets Only** + +----------------------------------------------------------------------------------------------- +**[ POTATO BACKGROUND IMAGE LAYER ]:** + +- **Background Blend Mode** - Default is Additive + + - **OFF** - Image is not applied + - **NORMAL** + - **ADD** - Adds the image as if it is being projected on top + - **MULTIPLY** - Image is applied as if it was a colored plastic film + +- **Opacity** + +- **Brightness** + +- **Show Background** + + - **0 - UNDER SCREEN** - Background is applied under the screen and Since the default blend mode is additive this gives a backdrop effect. E.G. Tron's Deadly Discs + - **1 - OVER SCREEN** - Background is applied on top of the screen + + + +## **GLASS Presets Only** + +----------------------------------------------------------------------------------------------- +**[ GLASS BACKGROUND IMAGE ]:** + +- **Background Image Opacity** + +- **Background Blend Mode** - Default is Additive + + - **Off** - Image is not applied + + - **Normal** + + - **Additive** - Adds the image as if it is being projected on top + + - **Multiply** - Image is applied as if it was a colored plastic film + + +----------------------------------------------------------------------------------------------- +**[ LAYER ORDER ]:** + +Layer order adjusts the order in which the layers are composited or "layered" on top of each other, the index 0 is the bottom or base layer. If two layers are given the same index they fall back to being composited in the order seen here. + +- **Background Image** +- **Viewport Vignette** +- **LED Image** +- **Device Image** +- **CRT Screen** +- **Decal Image** +- **Cabinet Glass Image** +- **Top Image** + +----------------------------------------------------------------------------------------------- +**[ CUTOUT ]:** + +Used to cut a rectangular area from the layers, for example cutting out the hole in the bezel art + +- **Scale Mode** + - Controls if this layer's scaling follows another layer + - **0 - Full** - Scale to the viewport + - **1 - Tube** - Follow the Tube Scaling + - **2 - Bezel** - Follow the Bezel Scaling + - **3 - Background** - Follow the Background Image Scaling + - **4 - Bezel Image** - Follow the Bezel Image Scaling + - **5 - Decal Image** - Follow the Decal Image Scaling +- **Scale** + - Scales cutout in both directions +- **Scale X** + - Scales cutout horizontally +- **Position Y** + - Moves the cutout vertically +- **Corner Radius - Def 0** + - Rounds the corner of the cutout + +----------------------------------------------------------------------------------------------- +**[ MASK DEBUG ]:** + +- **Mask** - Show the mask as a semi transparent color for the: + + - **-1 - Cut Out** + - **0 - ALL** - Whole viewport + - **1 - Screen** - Illuminated area of the tube + - **2 - Tube** + - **2 - Bezel and Inward** - Bezel and inward + - **3 - Bezel** + - **4 - Bezel +** - Bezel and outward + - **5 - Frame** + - **6 - Frame +** - Frame and outward + - **7 - Background** - Outside the frame + + + +## ***Common Layer Parameters*** + + *Many parameters which repeated from layer to layer, their description is shown here* + +- ***Opacity*** + - *Opacity multiplier of the layer being applied. 0 means we will not see the layer because it is fully transparent* + +- ***Colorize On*** - Turns on the Colorization +- ***Hue*** - The hue adjustement, eg more blue vs red +- ***Saturation*** +- ***Brightness*** + - *Adjust Brightness of the Layer, 100 is no change* +- ***Gamma*** + +- ***Ambient Lighting Multiplier*** + - How much of the global ambient lighting to add to the layer + +- ***Apply Ambient Lighting in ADD Blend Mode*** + - By default when a layer is in ADD mode ambient lighting is not applied to the image, this works well for things like LEDs + - When **Apply Ambient Lighting in ADD Blend Mode** is set to 1 the ambient lighting will be applied when in ADD blend mode + +- ***Blend Mode*** *- How the image is applied to the layer underneath Default is 1: Normal Blending* + + - ***0 - Off*** *- The layer is not shown* + - ***1 - Normal Blending*** + - ***2 - Additive Blending*** *- Applied additively to brighten what's underneath* + - ***3 - Multiply Blending*** *- Applied to as a darkening of what is underneath* + +- ***Source Matte Color*** + - *Controls how the image transparency is interpreted based on the matte color used when the image was stored (what color the image is blended with in the transparent area).* + - *Used to remove white fringing on the edges around transparent areas.* + - ***0 - Black*** + - *The color in the transparent area was black*. Technically this is called Premultiplied alpha. + - ***1 - White*** + - *The color in the transparent area was white, Use this if you see white fringing on the edges of the transparency where there should be none.* + - ***2 - None*** + - *The image was not blended with any matte color, the only transparency info is in the alpha channel* + +- **Mask** - Mask the layer with the area inside the: + - ***0 - ALL*** *- Whole viewport* + - ***1 - Screen*** *- Illuminated area of the tube* + - ***2 - Tube*** *- Inside the tube + - ***2 - Bezel and Inward*** *- Bezel and inward* + - ***3 - Bezel*** *- Bezel + - ***4 - Bezel +*** *- Bezel and outward* + - ***5 - Frame*** *- Frame + - ***6 - Frame +*** *- Frame and outward* + - ***7 - Background*** *- Outside the frame* + +- ***Cutout Mask*** + - ***0 - OFF*** *- Don't cut out any area of the layer* + - ***1 - ON*** *- Make the area of the layer INSIDE the cutout mask transparent* + - ***2 - Invert*** *- Make the area of the layer OUTSIDE the cutout mask transparent* + +- ***Dual Screen Visibility*** - Where to show this image + - ***0 - Show on Both Screens*** + - ***1 - Show only on Screen 1*** + - ***2 - Show only on Screen 2*** + +- ***Inherit Scale*** + - *Controls if this layer follows another layer's scaling* + - ***Full / Fullscreen*** *- Scale to the viewport* + - ***Tube*** *- Follow the Tube Scaling* + - ***Bezel*** *- Follow the Bezel Scaling* + - ***Background*** *- Follow the Background Image Scaling* + - ***Bezel Image*** *- Follow the Bezel Image Scaling* + - ***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 + +- **Scale Aspect (Mode)** + - Controls how the texture's aspect reacts to the inherited scale + - **0 - INHERIT FROM SCALE MODE** --- The texture's aspect will scale as what it follows is scaled + - **1 - USE TEXURE ASPECT** --- The layer's image stays the same aspect as what it follows is scaled + + - **Example:** + - If the scale mode was **Tube** and **USE TEXURE ASPECT** was on, regardless of the aspect of the tube the layer's image would stay the aspect ratio of the image. + - If it is set to **INHERIT FROM SCALE MODE** the layer's image will react to the tube's changes in horizontal aspect.* + +- **Image Fill Mode** + - **0 - STRETCH** --- Stretch the image across the whole area + - **1 - SPLIT HORIZONTAL** --- Splits the image in the center and slide it out until it hits the outer edge + +- **Scale** --- *Scales image layer equally in both directions* +- **Scale X** --- *Scales image layer horizontally* +- **Position X** --- *Moves the image layer horizontally* +- **Position Y** --- *Moves the image layer vertically* +- **Mipmapping Blend Bias** --- *Adjusts the sharpness of the image* + + + +----------------------------------------------------------------------------------------------- +**[ BACKGROUND LAYER ]:** + +- **Opacity** +- **Colorize On** +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** +- **Ambient Lighting in ADD Mode** +- **Blend Mode** +- **Source Matte Color** +- **Mask** +- **Cutout Mask** +- **Dual Screen Visibility** +- **Inherit Scale** + - **0 - FullScreen** + - **1 - Tube** + - **2 - Bezel** +- **Inherit Scale** +- **Zoom FULL Scale Mode** +- **Scale Aspect** +- **Scale** +- **Scale X** +- **Position X** +- **Position Y** +- **Mirror Wrap** + - When ON the image is wrapped when we draw out of the texture bounds +- **Mipmapping Blend Bias** + +----------------------------------------------------------------------------------------------- +**[ VIEWPORT VIGNETTE LAYER ]:** + +- **Opacity** +- **Mask** +- **Cutout Mask** +- **Inherit Scale** + - **0 - Full** + - **1 - Background** + - **2 - Tube** + - **3 - Bezel** +- **Scale** +- **Scale X** +- **Position Y** + +----------------------------------------------------------------------------------------------- +**[ LED LAYER ]:** + +- **Opacity** +- **Colorize On** +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** +- **Ambient Lighting in ADD Mode** +- **Blend Mode** +- **Source Matte Color** +- **Mask** +- **Cutout Mask** +- **Dual Screen Visibility** +- **Inherit Scale** + - **0 - FullScreen** + - **1 - Tube** + - **2 - Bezel** + - **3 - BG** + - **4 - Device** +- **Inherit Scale** +- **Zoom FULL Scale Mode** +- **Scale Aspect** +- **Scale** +- **Scale X** +- **Position X** +- **Position Y** +- **Mipmapping Blend Bias** + +----------------------------------------------------------------------------------------------- +**[ DEVICE IMAGE LAYER ]:** + +- **Opacity** +- **Colorize On** +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** +- **Ambient Lighting in ADD Mode** +- **Blend Mode** +- **Source Matte Color** +- **Mask** +- **Cutout Mask** +- **Dual Screen Visibility** +- **Inherit Scale** + - **0 - FullScreen** + - **1 - Tube** + - **2 - Bezel** + - **3 - BG** +- **Inherit Scale** +- **Zoom FULL Scale Mode** +- **Scale Aspect** +- **Scale** +- **Scale X** +- **Position X** +- **Position Y** +- **Mipmapping Blend Bias** + +----------------------------------------------------------------------------------------------- +**[ DECAL LAYER ]:** + +- **Opacity** +- **Colorize On** +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** +- **Ambient Lighting in ADD Mode** +- **Blend Mode** +- **Source Matte Color** +- **Mask** +- **Cutout Mask** +- **Dual Screen Visibility** +- **Inherit Scale** + - **0 - FullScreen** + - **1 - Tube** + - **2 - Bezel** + - **3 - BG** + - **4 - Device** +- **Inherit Scale** +- **Zoom FULL Scale Mode** +- **Scale Aspect** +- **Scale** +- **Scale X** +- **Position X** +- **Position Y** +- **Mipmapping Blend Bias** + +----------------------------------------------------------------------------------------------- +**[ CABINET OR CABINET GLASS LAYER ]:** + +- **Opacity** +- **Colorize On** +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** +- **Ambient Lighting in ADD Mode** +- **Blend Mode** +- **Source Matte Color** +- **Mask** +- **Cutout Mask** +- **Dual Screen Visibility** +- **Inherit Scale** + - **0 - FullScreen** + - **1 - Tube** + - **2 - Bezel** + - **3 - BG** + - **4 - Device** + - **4 - Decal** +- **Inherit Scale** +- **Zoom FULL Scale Mode** +- **Scale Aspect** +- **Scale** +- **Scale X** +- **Position X** +- **Position Y** +- **Mipmapping Blend Bias** + + + +----------------------------------------------------------------------------------------------- +**[ TOP EXTRA LAYER ]:** + +- **Opacity** +- **Colorize On** +- **Hue Offset** +- **Saturation** +- **Brightness** +- **Gamma Adjust** +- **Ambient Lighting Multiplier** +- **Ambient Lighting in ADD Mode** +- **Blend Mode** +- **Source Matte Color** +- **Mask** +- **Cutout Mask** +- **Dual Screen Visibility** +- **Inherit Scale** + - **0 - FullScreen** + - **1 - Tube** + - **2 - Bezel** + - **3 - BG** + - **4 - Device** + - **4 - Decal** +- **Inherit Scale** +- **Zoom FULL Scale Mode** +- **Scale Aspect** +- **Scale** +- **Scale X** +- **Position X** +- **Position Y** +- **Mirror Wrap** + - When drawing past the edges of the texture use mirror wrapping +- **Mipmapping Blend Bias** + + +----------------------------------------------------------------------------------------------- +**[ INTRO SEQUENCE ]:** + + Animation sequence which plays when the content starts up, animation times are in frames. The frame rate for most games 60 fps + +- **Show Intro** + - 0 - OFF + - 1 - When Content Loads + - 2 - Repeat +- **Speed** + - Overall speed of the entire intro. 1 is full speed + +----------------------------------------------------------------------------------------------- +**[ INTRO LOGO ]:** + +- **Logo Blend Mode** + - 0 - Off + - 1 - Normal Blending + - 2 - Additive Blending - Added on as added with a projector + - 3 - Multiply Blending - Image is applied by darkening the under layer +- **Logo Over Solid Color** + - 0 - Off - The Logo is layered under the solid color + - 1 - ON - The Logo is layered over the solid color +- **Logo Height (0 for exact resolution)** +- **Logo Res X** + - X Resolution of the logo image +- **Logo Res Y** + - Y Resolution of the logo image +- **Logo Placement ** + - 0 - Middle + - 1 - Top Left + - 2 - Top Right + - 3 - Bottom Left + - 4 - Bottom Right +- **Logo Wait Before Start Frames** + - How many frames before it starts to fade in +- **Logo Fade In Frames** + - How many frames to fade in +- **Logo Hold Frames** + - How many frames to hold the image at full opacity before the fade out starts +- **Logo Fade Out Frames** + - How many frames to fade out + +----------------------------------------------------------------------------------------------- +**[ INTRO SOLID COLOR ]:** + +- **Solid Color Blend Mode** + - 0 - Off + - 1 - Normal Blending + - 2 - Additive Blending - Added on as added with a projector + - 3 - Multiply Blending - Image is applied by darkening the under layer +- **Solid Color Hue** +- **Solid Color Saturation** +- **Solid Color Value** +- **Solid Color Hold Frames** + - How many frames to hold the solid color +- **Solid Color Fade Out Frames** + - How many frames to fade out + + **[ INTRO STATIC NOISE ]:** + +- **Static Noise Blend Mode** + - **0 - Off** + - **1 - Normal Blending** + - **2 - Additive Blending** - Added on as added with a projector + - **3 - Multiply Blending** - Image is applied by darkening the under layer +- **Static Noise Hold Frames** + - How many frames to hold the static noise +- **Static Noise Fade Out Frames** + - How many frames to fade out + +----------------------------------------------------------------------------------------------- +**[ INTRO SOLID BLACK ]:** + +- **Solid Black Hold Frames** + - How many frames to hold the solid black before the fade out starts +- **Solid Black Fade Out Frames** + - How many frames to fade out + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/ShaderTodo.txt b/bezel/Mega_Bezel/shaders/HyperspaceMadness/ShaderTodo.txt new file mode 100644 index 0000000..e2f8efa --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/ShaderTodo.txt @@ -0,0 +1,202 @@ +![Mega_Bezel_Logo|512x256, 75%](upload://6PNkvcMF9Go9Wnk6OJXfYR1opXI.png) + +Mega Bezel is updated to V 1.0.001 2022-06-24 Rev 1 + +Changes: + * Mega Bezel V1 +---------------------------------------------------- +--- V1 TODO --------------------------------------- +---------------------------------------------------- + * Megatron HDR Combination at end of chain + * Fix Tube Diffuse Shadow in 3D Curvature + * Add .params #reference to with all parameters commented out + + * Bezel shadow on Potato Tube / Game Image + * Check out Colorize Behavior on DMG-01 (Colored Gameboy) + +---------------------------------------------------- +--- Examples -------------------------------------- +---------------------------------------------------- + * Punch Out - Dual Screen + * Vector Preset + + + +---------------------------------------------------- +--- Post V1 --------------------------------------- +---------------------------------------------------- + * Auto Rotate + * Investigate Higher Ambient Light Multiplier on BG + * Original scaling mode to deal with black final viewport in Parallel RDP in both mupen and Parallel cores. + * Compensate for Negative Crop, + * User crop values should be relative to original core image, not core image + negative crop area + * Missing inner Edge static shading? + * Guess White/Black Matting? + * Auto Shadow for image Layers above screen + * Mega Back Light a la philips Hue/Ambient + * Night light single glow - Place Glows + * Fix Corner Shading + * Double Bezel + * Swap option for Blurry vs Sharp Tube Reflection + * Add NTSC Adaptive Preset? + * Add Variations CRT Royale Glass & Advanced + * Do some more OrionsAngel Presets with new Mega_Bezel + * Add option for core res fake scanlines + * Add Rewind Effect? + * Black Edges should be driven by bezel not screen? (Right now bezel overlaps the screen with no black line) + * When in interlacing mode for vertical opposite mult should do something + * Fix bright area of screen showing outside the black line when bezel is hidden + Update Docs & add some notes about GDV & Grade + * Rotate Dual Screen + * Adjust Black adjustment so it affects not just black, Falloff? Tweak Afterglow? + * Modulate Range on top of Hue & Value? + * Logo Position offset? + * LCD behavior when reaching resolution limit + * Local vs FullScreen Blur on Corner reflection? + * Shadow from Cutout? + * Large Slotmask Bitmap Mask + * Do Hylian Sync Version + + + +---------------------------------------------------- +--- Independent Shader Stuff for Main Repo -------- +---------------------------------------------------- + * Add Test_Max_Resources to Repo + * Make Resolution text shader it's own pass for Repo + * Show Original Res, Previous Pass Res, Next Pass Res, Viewport + * Move Resolution Debug to be top justified + + * Gameboy + * Fix DMG Shader + * Fix Low Contrast Issue + * Multiple palettes including Custom for Gameboy + * Add Gameboy Palettes https://www.deviantart.com/thewolfbunny/gallery/69987002/game-boy-palettes + + * Independent Bezel Scaling not the same as non-int scale + * Why? Maybe only in Portrait Res? + * Outer reflection corner radius should be independent when in independent mode + * See why very inner edge seems not affected by reflection mask + * Startup Animation - Sprite Sheet + + * Frame Shading + * Shading on frame interior edge? + * Frame Inner edge static lighter line + * Frame Interior Edge thickness + * Fix shading with rounded outer corner + * Frame shadow should follow corner radius + + * Integer Scale Guides? + * Reflection fade option to have reflection come to 100% at inner frame boundary so you can have a glass like effect outside the bezel + * Per Layer Scaling of Cutout? + * Noise Sampling on Tube Highlight + * When reflection is off still see inner bezel edge reflection + * Guess Resolution for Core Sampling Multiplier?, Set target vertical downsampled resolution, try to get multiple. + * Reflection on Control Panel and Speaker Panel + + * Put Torridgristle LUT back in for blue skys? + + * Scanlines + * Get GTU to respect scanline direction + * Color Management/Correction + * Brightness balance the presets so they are consistent, some are currently brighter than others + * Add some standard deconvergence which can be used with the rolling scanlines + * Reflection on areas outside the frame, e.g. Arcade Speaker Panel and Control Panel + * Optimize presets using non-float frame buffers + * Independent frame scaling? + + + + +Documentation + Troubleshooting + New install of retroarch + Turn all overlays off + I have rings, wavy distortions (Moire) + +Moire + The Waves you are seeing are called a Moire effect, it’s the same effect you see through a screen door sometimes. + It is caused by using a crt shader with scanlines and tube curvature and made worse when the resolution is limited. It is a thorny problem , and sometimes hard to get rid of at 1080, it is much less of a problem at 4k. + Things which can help/fix the problem + Reducing strength of scanlines, + Reducing or curvature or setting it to 0 will definitely fix it. + If you keep using curvature using Integer scale in the shader parameters can sometimes help. + + If making own presets reference from crt-Base presets + +Old Megabezel https://github.com/HyperspaceMadness/shaders_slang/tree/adf6dc3c0f09db11ebf4fbcf85098ac8232acfcc + + + + +---------------------------------------------------- +--- Retroarch Features ----------------------------- +---------------------------------------------------- + + * Append (Prepend) Shader Preset - to add a shader preset to the beginning of the chain + * Fix edit shader in UI - Changes are currently lost or need to apply twice + * Fix loss of current parameter values when retroarch goes from full screen to window + * Fix saving with same name with different capitalization creates self reference + * Shaders folder as a path token, e.g. "[shaders]/shaders_slang/" [shaders_dir]? + * Hide Parameters + * Add Core Provided Aspect as Uniform + + * Stop Reloading Shader multiple times on Save (Keep optional param) + + * Choose Textures in UI + * Shader Textures in Sub Menu - Add ability to set texture overrides in retroarch UI + * Shader Passes in Sub Menu + + * Dropdowns for indexed parameters? + * Multiple references in one file for adding passes and parameter overrides + * Edit Multiple References in UI vs Shader Passes, Discreetly change between Simple and Full + + * Onscreen Display of current shader preset + * Reload Last Preset + + * Next/Previous Shader does not work well if shader was loaded as Game preset + * Sometimes uses different directories, probably related to shader_path in live shader rather than originally loaded preset + + * Pass Scaling Types + * Original scaling Type + * MaxAbsolute scaling type? + * If res is lower don't scale if larger scale to this res, good for PSX Upscaling + * Would avoid people crashing with internal resolution multiple + + * Add "Timer" uniform variable vec4(total-count, count-since-shader-load, oscillator[1,0,1,0,1,...], [unknown/undefined]) + * Unknown could be frames since direction change, good for rewind effect + + * Replace Text, for shader type, game & core, content directory + * core_name + * game_name + * [shadertype], [gamename], [corename], [contentdirectory] + * Check textures and use default if not found + + * Check for alias used multiple times appears as semantic error now + * global.x is semantic error if x not in global + * GIF support + * Fix Size, only works for textures in DX11, 12, not Vulkan + + Super Glow HighFX Version?, manage brightness + + +Questions for Survey + + + +* Old Perf Numbers before Caching +* Performance of Base presets at 3840x2160 on Nvidia RTX2060: + * ADVANCED - 78 FPS - No comparable old preset + * GLASS - 150 FPS - Old Glass Preset 128 FPS + * STANDARD - 135 FPS - Old Full Preset 140 FPS + * STANDARD-HD-CORE - 105 FPS + * BASIC-BORDER-WITH-REFLECTION - 175 FPS - Old Reflect Only Preset 165 FPS + * BASIC-BORDER - 295 FPS - Old Screen Scale Preset 370 FPS + +* Performance on HD-CORE E.G. 1920x1080: + * ADVANCED - 60 FPS + * ADVANCED-HD-CORE - 70 FPS + * STANDARD - 85 FPS + * STANDARD-HD-CORE - 100 FPS + * BASIC-BORDER-WITH-REFLECTION - 126 FPS + * BASIC-BORDER - 180 FPS \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang new file mode 100644 index 0000000..4d82a74 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-dogway/hsm-grade.slang @@ -0,0 +1,987 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" + +layout(push_constant) uniform Push +{ + float g_gamma_in; + float g_gamma_out; + float g_signal_type; + float g_crtgamut; + float g_space_out; + float g_hue_degrees; + float g_I_SHIFT; + float g_Q_SHIFT; + float g_I_MUL; + float g_Q_MUL; + float g_lum_fix; + // float g_vignette; + // float g_vstr; + // float g_vpower; + float g_sat; + float g_vibr; + float g_lum; + float g_cntrst; + float g_mid; + float g_lift; + float blr; + float blg; + float blb; + float wlr; + float wlg; + float wlb; + float rg; + float rb; + float gr; + float gb; + float br; + float bg; +} params; + +// layout(std140, set = 0, binding = 0) uniform UBO +// { +// mat4 MVP; +// vec4 SourceSize; +// vec4 OriginalSize; +// vec4 OutputSize; +// uint FrameCount; +// float g_grade_on; +// float wp_temperature; +// float g_satr; +// float g_satg; +// float g_satb; +// // float LUT_Size1; +// // float LUT1_toggle; +// // float LUT_Size2; +// // float LUT2_toggle; +// } global; + +/* + Grade + > Ubershader grouping some monolithic color related shaders: + ::color-mangler (hunterk), ntsc color tuning knobs (Doriphor), white_point (hunterk, Dogway), RA Reshade LUT. + > and the addition of: + ::analogue color emulation, phosphor gamut, color space + TRC support, vibrance, HUE vs SAT, vignette (shared by Syh), black level, rolled gain and sigmoidal contrast. + + Author: Dogway + License: Public domain + + **Thanks to those that helped me out keep motivated by continuous feedback and bug reports: + **Syh, Nesguy, hunterk, and the libretro forum members. + + + ######################################...PRESETS...####################################### + ########################################################################################## + ### ### + ### PAL ### + ### Phosphor: EBU (#3) (or an EBU T3213 based CRT phosphor gamut) ### + ### WP: D65 (6504K) (in practice more like ~7500K) ### + ### TRC: 2.8 SMPTE-C Gamma ### + ### Saturation: -0.02 ### + ### ### + ### NTSC-U ### + ### Phosphor: P22/SMPTE-C (#1 #-1)(or a SMPTE-C based CRT phosphor gamut) ### + ### WP: D65 (6504K) (in practice more like ~7500K) ### + ### TRC: 2.22 SMPTE-C Gamma (in practice more like 2.35-2.55) ### + ### ### + ### NTSC-J (Default) ### + ### Phosphor: NTSC-J (#2) (or a NTSC-J based CRT phosphor gamut) ### + ### WP: 9300K+27MPCD (8942K) (CCT from x:0.281 y:0.311) ### + ### TRC: 2.22 SMPTE-C Gamma (in practice more like 2.35-2.55) ### + ### ### + ### *Despite the standard of 2.22, a more faithful approximation to CRT... ### + ### ...is to use a gamma (SMPTE-C type) with a value of 2.35-2.55. ### + ### ### + ### ### + ########################################################################################## + ########################################################################################## +*/ + + +#pragma parameter DG_TITLE "[ --- COLOR CORRECTION - GRADE --- ]:" 0 0 0 1 + +#pragma parameter g_grade_on " Grade ON" 1 0 1 1 +#pragma parameter DG_SIGNAL_GAMMA_TITLE "[ GAMMA ]:" 0 0 0 1 +#pragma parameter g_gamma_in " Game Embedded Gamma" 2.222 1.80 3.0 0.05 +#pragma parameter g_gamma_out " CRT Electron Gun Gamma" 2.50 1.80 3.0 0.05 + +#pragma parameter DG_SIGNAL_COLOR_SPACE_TITLE "[ SIGNAL & COLOR SPACE ]:" 0 0 0 1 +#pragma parameter g_signal_type " Signal Type (0:RGB 1:Composite)" 1.0 0.0 1.0 1.0 +// Phosphor was changed from 2 to 1 to look similar to the input by default +#pragma parameter g_crtgamut " CRT Phosphor Gamut - 1:NTSC-U | 2:NTSC-J | 3:PAL" 2.0 -4.0 3.0 1.0 +#pragma parameter g_space_out " Display Color Space -1:709 | 0:sRGB | DCI | 2020 | Adobe" 0.0 -1.0 3.0 1.0 + +#pragma parameter g_hue_degrees " Hue (Composite Only)" 0.0 -360.0 360.0 1.0 + +#pragma parameter DG_SIGNAL_PROCESS_TITLE "[ COLOR SIGNAL PROCESS ]:" 0 0 0 1 +#pragma parameter g_I_SHIFT " I/U Shift" 0.0 -0.2 0.2 0.01 +#pragma parameter g_Q_SHIFT " Q/V Shift" 0.0 -0.2 0.2 0.01 +#pragma parameter g_I_MUL " I/U Multiplier" 1.0 0.0 2.0 0.01 +#pragma parameter g_Q_MUL " Q/V Multiplier" 1.0 0.0 2.0 0.01 + +#pragma parameter DG_BRIGHTNESS_TITLE "[ BRIGHTNESS & CONTRAST ]:" 0 0 0 1 +#pragma parameter g_lum_fix " Sega Luma Fix" 0.0 0.0 1.0 1.0 +#pragma parameter g_lum " Brightness" 0.0 -0.5 1.0 0.01 +#pragma parameter g_cntrst " Contrast" 0.0 -1.0 1.0 0.05 +#pragma parameter g_mid " Contrast Pivot" 0.5 0.0 1.0 0.01 +#pragma parameter g_lift " Black Level (Adds Scanlines Over Black)" 0.0 -0.5 0.5 0.05 + +// #pragma parameter DG_VIGNETTE_TITLE "[ VIGNETTE ]:" 0 0 0 1 +// #pragma parameter g_vignette " Use Vignette" 0.0 0.0 1.0 1.0 +// #pragma parameter g_vstr " Amount (Strength)" 40.0 0.0 98.0 2.0 +// #pragma parameter g_vpower " Corner Amount (Power)" 26 0.0 200 2 + +#pragma parameter DG_COLOR_TEMP_TITLE "[ COLOR TEMP & HUE ]:" 0 0 0 1 +// Color temp changed to 7000 (Used to be 6500) because this seems to be better for the default crt phosphor gamut of NTSC-J +#pragma parameter wp_temperature " White Point" 6500.0 5000.0 12000.0 100.0 +#pragma parameter g_sat " Saturation" 0.0 -1.0 2.0 0.01 +#pragma parameter g_vibr " Dullness/Vibrance" 0.0 -1.0 1.0 0.05 + +#pragma parameter DG_HUE_VS_SAT_TITLE "[ HUE VS SATURATION ]:" 0 0 0 1 +#pragma parameter g_satr " Hue vs Sat Red" 0.0 -1.0 1.0 0.01 +#pragma parameter g_satg " Hue vs Sat Green" 0.0 -1.0 1.0 0.01 +#pragma parameter g_satb " Hue vs Sat Blue" 0.0 -1.0 1.0 0.01 + +#pragma parameter DG_BLACKTINT_TITLE "[ BLACK TINT ]:" 0 0 0 1 +#pragma parameter blr " Black-Red Tint" 0.0 0.0 1.0 0.01 +#pragma parameter blg " Black-Green Tint" 0.0 0.0 1.0 0.01 +#pragma parameter blb " Black-Blue Tint" 0.0 0.0 1.0 0.01 + +#pragma parameter DG_WHITETINT_TITLE "[ WHITE TINT ]:" 0 0 0 1 +#pragma parameter wlr " White-Red Tint" 1.0 0.0 2.0 0.01 +#pragma parameter wlg " White-Green Tint" 1.0 0.0 2.0 0.01 +#pragma parameter wlb " White-Blue Tint" 1.0 0.0 2.0 0.01 + +#pragma parameter DG_REDTINT_TITLE "[ RED TINT ]:" 0 0 0 1 +#pragma parameter rg " Red-Green Tint" 0.0 -1.0 1.0 0.005 +#pragma parameter rb " Red-Blue Tint" 0.0 -1.0 1.0 0.005 + +#pragma parameter DG_GREENTINT_TITLE "[ GREEN TINT ]:" 0 0 0 1 +#pragma parameter gr " Green-Red Tint" 0.0 -1.0 1.0 0.005 +#pragma parameter gb " Green-Blue Tint" 0.0 -1.0 1.0 0.005 + +#pragma parameter DG_BLUETINT_TITLE "[ BLUE TINT ]:" 0 0 0 1 +#pragma parameter br " Blue-Red Tint" 0.0 -1.0 1.0 0.005 +#pragma parameter bg " Blue-Green Tint" 0.0 -1.0 1.0 0.005 +// #pragma parameter LUT_Size1 " LUT Size 1" 16.0 8.0 64.0 16.0 +// #pragma parameter LUT1_toggle " LUT 1 Toggle" 0.0 0.0 1.0 1.0 +// #pragma parameter LUT_Size2 " LUT Size 2" 64.0 0.0 64.0 16.0 +// #pragma parameter LUT2_toggle " LUT 2 Toggle" 0.0 0.0 1.0 1.0 + +#define g_grade_on global.g_grade_on +#define M_PI 3.1415926535897932384626433832795 +#define gamma_in params.g_gamma_in +#define gamma_out params.g_gamma_out +#define signal params.g_signal_type +#define crtgamut params.g_crtgamut +#define SPC params.g_space_out +#define hue_degrees params.g_hue_degrees +#define I_SHIFT params.g_I_SHIFT +#define Q_SHIFT params.g_Q_SHIFT +#define I_MUL params.g_I_MUL +#define Q_MUL params.g_Q_MUL +#define lum_fix params.g_lum_fix +// #define vignette params.g_vignette +// #define vstr (1 - params.g_vstr / 100) * 50 +// #define vpower params.g_vpower / 100 +#define g_sat params.g_sat +#define vibr params.g_vibr +#define satr global.g_satr +#define satg global.g_satg +#define satb global.g_satb +#define lum params.g_lum +#define cntrst params.g_cntrst +#define mid params.g_mid +#define lift params.g_lift +#define blr params.blr +#define blg params.blg +#define blb params.blb +#define wlr params.wlr +#define wlg params.wlg +#define wlb params.wlb +#define rg params.rg +#define rb params.rb +#define gr params.gr +#define gb params.gb +#define br params.br +#define bg params.bg + +#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 = 1) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 2) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 3) uniform sampler2D Source; +// HSM Removed +// layout(set = 0, binding = 3) uniform sampler2D SamplerLUT1; +// layout(set = 0, binding = 4) uniform sampler2D SamplerLUT2; + + +///////////////////////// Color Space Transformations ////////////////////////// + + + +vec3 XYZ_to_RGB(vec3 XYZ, float CSPC){ + + // to sRGB + const mat3x3 sRGB = mat3x3( + 3.24081254005432130, -0.969243049621582000, 0.055638398975133896, + -1.53730857372283940, 1.875966310501098600, -0.204007431864738460, + -0.49858659505844116, 0.041555050760507584, 1.057129383087158200); + + // to DCI-P3 -D65- + const mat3x3 DCIP3 = mat3x3( + 2.49339652061462400, -0.82948720455169680, 0.035850685089826584, + -0.93134605884552000, 1.76266026496887200, -0.076182708144187930, + -0.40269458293914795, 0.023624641820788383, 0.957014024257659900); + + // to Rec.2020 + const mat3x3 rec2020 = mat3x3( + 1.71660947799682620, -0.66668272018432620, 0.017642205581068993, + -0.35566213726997375, 1.61647748947143550, -0.042776308953762054, + -0.25336012244224550, 0.01576850563287735, 0.942228555679321300); + + // to AdobeRGB + const mat3x3 Adobe = mat3x3( + 2.0415899753570557, -0.96924000978469850, 0.013439999893307686, + -0.5650100111961365, 1.87597000598907470, -0.118359997868537900, + -0.3447299897670746, 0.04156000167131424, 1.015169978141784700); + + return (CSPC == 3.0) ? Adobe * XYZ : (CSPC == 2.0) ? rec2020 * XYZ : (CSPC == 1.0) ? DCIP3 * XYZ : sRGB * XYZ; +} + +vec3 RGB_to_XYZ(vec3 RGB, float CSPC){ + + // from sRGB + const mat3x3 sRGB = mat3x3( + 0.41241079568862915, 0.21264933049678802, 0.019331756979227066, + 0.35758456587791443, 0.71516913175582890, 0.119194857776165010, + 0.18045382201671600, 0.07218152284622192, 0.950390160083770800); + + // from DCI-P3 -D65- + const mat3x3 DCIP3 = mat3x3( + 0.48659050464630127, 0.22898375988006592, 0.00000000000000000, + 0.26566821336746216, 0.69173991680145260, 0.04511347413063049, + 0.19819043576717377, 0.07927616685628891, 1.04380297660827640); + + // from Rec.2020 + const mat3x3 rec2020 = mat3x3( + 0.63697350025177000, 0.24840137362480164, 0.00000000000000000, + 0.15294560790061950, 0.67799961566925050, 0.04253686964511871, + 0.11785808950662613, 0.03913172334432602, 1.06084382534027100); + + // from AdobeRGB + const mat3x3 Adobe = mat3x3( + 0.57666999101638790, 0.2973400056362152, 0.02703000046312809, + 0.18556000292301178, 0.6273599863052368, 0.07068999856710434, + 0.18822999298572540, 0.0752900019288063, 0.9913399815559387); + + return (CSPC == 3.0) ? Adobe * RGB : (CSPC == 2.0) ? rec2020 * RGB : (CSPC == 1.0) ? DCIP3 * RGB : sRGB * RGB; +} + + +vec3 XYZtoYxy(vec3 XYZ){ + + float XYZrgb = XYZ.r+XYZ.g+XYZ.b; + float Yxyg = (XYZrgb <= 0.0) ? 0.3805 : XYZ.r / XYZrgb; + float Yxyb = (XYZrgb <= 0.0) ? 0.3769 : XYZ.g / XYZrgb; + return vec3(XYZ.g, Yxyg, Yxyb); +} + +vec3 YxytoXYZ(vec3 Yxy){ + + float Xs = Yxy.r * (Yxy.g/Yxy.b); + float Xsz = (Yxy.r <= 0.0) ? 0.0 : 1.0; + vec3 XYZ = vec3(Xsz,Xsz,Xsz) * vec3(Xs, Yxy.r, (Xs/Yxy.g)-Xs-Yxy.r); + return XYZ; +} + +///////////////////////// White Point Mapping ///////////////////////// +// +// +// PAL: D65 NTSC-U: D65 NTSC-J: CCT NTSC-J NTSC-FCC: C +// PAL: 6504K NTSC-U: 6504K NTSC-J: 8942K NTSC-FCC: 6780K +// 0.3127 0.3290 0.3127 0.3290 0.281 0.311 0.310 0.316 + +vec3 wp_adjust(float temperature, vec3 color){ + + float temp3 = pow(10.,3.) / temperature; + float temp6 = pow(10.,6.) / pow(temperature, 2.); + float temp9 = pow(10.,9.) / pow(temperature, 3.); + + vec3 wp = vec3(1.); + + wp.x = (temperature <= 7000.) ? 0.244063 + 0.09911 * temp3 + 2.9678 * temp6 - 4.6070 * temp9 : \ + 0.237040 + 0.24748 * temp3 + 1.9018 * temp6 - 2.0064 * temp9 ; + + wp.y = -3.000 * pow(wp.x,2.) + 2.870 * wp.x - 0.275; + wp.z = 1. - wp.x - wp.y; + + const mat3x3 CAT02 = mat3x3( + 0.7328, 0.4296, -0.1624, + -0.70360, 1.6975, 0.0061, + 0.003, -0.0136, 0.9834); + + vec3 fw_trans = (vec3(wp.x/wp.y,1.,wp.z/wp.y) * CAT02) / (vec3(0.95045,1.,1.088917) * CAT02) ; + + return color.xyz * fw_trans.xyz ; + +} + +//////////////////////////////////////////////////////////////////////////////// + + +// Monitor Curve Functions: https://github.com/ampas/aces-dev +//---------------------------------------------------------------------- + + +float moncurve_f( float color, float gamma, float offs) +{ + // Forward monitor curve + color = clamp(color, 0.0, 1.0); + float fs = (( gamma - 1.0) / offs) * pow( offs * gamma / ( ( gamma - 1.0) * ( 1.0 + offs)), gamma); + float xb = offs / ( gamma - 1.0); + + color = ( color > xb) ? pow( ( color + offs) / ( 1.0 + offs), gamma) : color * fs; + return color; +} + + +vec3 moncurve_f_f3( vec3 color, float gamma, float offs) +{ + color.r = moncurve_f( color.r, gamma, offs); + color.g = moncurve_f( color.g, gamma, offs); + color.b = moncurve_f( color.b, gamma, offs); + return color.rgb; +} + + +float moncurve_r( float color, float gamma, float offs) +{ + // Reverse monitor curve + color = clamp(color, 0.0, 1.0); + float yb = pow( offs * gamma / ( ( gamma - 1.0) * ( 1.0 + offs)), gamma); + float rs = pow( ( gamma - 1.0) / offs, gamma - 1.0) * pow( ( 1.0 + offs) / gamma, gamma); + + color = ( color > yb) ? ( 1.0 + offs) * pow( color, 1.0 / gamma) - offs : color * rs; + return color; +} + + +vec3 moncurve_r_f3( vec3 color, float gamma, float offs) +{ + color.r = moncurve_r( color.r, gamma, offs); + color.g = moncurve_r( color.g, gamma, offs); + color.b = moncurve_r( color.b, gamma, offs); + return color.rgb; +} + + +//-------------------------- Luma Functions ---------------------------- + + +// Performs better in gamma encoded space +float contrast_sigmoid(float color, float cont, float pivot){ + + cont = pow(cont + 1., 3.); + + float knee = 1. / (1. + exp(cont * pivot)); + float shldr = 1. / (1. + exp(cont * (pivot - 1.))); + + color = (1. / (1. + exp(cont * (pivot - color))) - knee) / (shldr - knee); + + return color; +} + + +// Performs better in gamma encoded space +float contrast_sigmoid_inv(float color, float cont, float pivot){ + + cont = pow(cont - 1., 3.); + + float knee = 1. / (1. + exp (cont * pivot)); + float shldr = 1. / (1. + exp (cont * (pivot - 1.))); + + color = pivot - log(1. / (color * (shldr - knee) + knee) - 1.) / cont; + + return color; +} + + +float rolled_gain(float color, float gain){ + + float gx = abs(gain) + 0.001; + float anch = (gain > 0.0) ? 0.5 / (gx / 2.0) : 0.5 / gx; + color = (gain > 0.0) ? color * ((color - anch) / (1 - anch)) : color * ((1 - anch) / (color - anch)) * (1 - gain); + + return color; +} + + +vec4 rolled_gain_v4(vec4 color, float gain){ + + color.r = rolled_gain(color.r, gain); + color.g = rolled_gain(color.g, gain); + color.b = rolled_gain(color.b, gain); + + return vec4(color.rgb, 1.0); +} + + +float SatMask(float color_r, float color_g, float color_b) +{ + float max_rgb = max(color_r, max(color_g, color_b)); + float min_rgb = min(color_r, min(color_g, color_b)); + float msk = clamp((max_rgb - min_rgb) / (max_rgb + min_rgb), 0.0, 1.0); + return msk; +} + + +// This shouldn't be necessary but it seems some undefined values can +// creep in and each GPU vendor handles that differently. This keeps +// all values within a safe range +vec3 mixfix(vec3 a, vec3 b, float c) +{ + return (a.z < 1.0) ? mix(a, b, c) : a; +} + + +vec4 mixfix_v4(vec4 a, vec4 b, float c) +{ + return (a.z < 1.0) ? mix(a, b, c) : a; +} + + +//---------------------- Range Expansion/Compression ------------------- + + +// to Studio Swing/Broadcast Safe/SMPTE legal/Limited Range +vec3 PCtoTV(vec3 col, float luma_swing, float Umax, float Vmax, float max_swing, bool rgb_in) +{ + col *= 255.; + Umax = (max_swing == 1.0) ? Umax * 224. : Umax * 239.; + Vmax = (max_swing == 1.0) ? Vmax * 224. : Vmax * 239.; + + col.x = (luma_swing == 1.0) ? ((col.x * 219.) / 255.) + 16. : col.x; + col.y = (rgb_in == true) ? ((col.y * 219.) / 255.) + 16. : (((col.y - 128.) * (Umax * 2.)) / 255.) + Umax; + col.z = (rgb_in == true) ? ((col.z * 219.) / 255.) + 16. : (((col.z - 128.) * (Vmax * 2.)) / 255.) + Vmax; + return col.xyz / 255.; +} + + +// to Full Swing/Full Range +vec3 TVtoPC(vec3 col, float luma_swing, float Umax, float Vmax, float max_swing, bool rgb_in) +{ + col *= 255.; + Umax = (max_swing == 1.0) ? Umax * 224. : Umax * 239.; + Vmax = (max_swing == 1.0) ? Vmax * 224. : Vmax * 239.; + + float colx = (luma_swing == 1.0) ? ((col.x - 16.) / 219.) * 255. : col.x; + float coly = (rgb_in == true) ? ((col.y - 16.) / 219.) * 255. : (((col.y - Umax) / (Umax * 2.)) * 255.) + 128.; + float colz = (rgb_in == true) ? ((col.z - 16.) / 219.) * 255. : (((col.z - Vmax) / (Vmax * 2.)) * 255.) + 128.; + return vec3(colx,coly,colz) / 255.; +} + + +//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/ + + +//--------------------- ITU-R BT.470/601 (M) (1953) -------------------- + + +// FCC (Sanctioned) YIQ matrix +vec3 RGB_FCC(vec3 col) + { + const mat3 conv_mat = mat3( + 0.299996928307425, 0.590001575542717, 0.110001496149858, + 0.599002392519453, -0.277301256521204, -0.321701135998249, + 0.213001700342824, -0.525101205289350, 0.312099504946526); + + return col.rgb * conv_mat; + } + +// FCC (Sanctioned) YIQ matrix (inverse) +vec3 FCC_RGB(vec3 col) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.946882217090069, 0.623556581986143, + 1.0000000, -0.274787646298978, -0.635691079187380, + 1.0000000, -1.108545034642030, 1.709006928406470); + + return col.rgb * conv_mat; + } + + +//--------------------- SMPTE RP 145 (C), 170M (1987) ------------------ + + +vec3 RGB_YIQ(vec3 col) + { + const mat3 conv_mat = mat3( + 0.2990, 0.5870, 0.1140, + 0.5959, -0.2746, -0.3213, + 0.2115, -0.5227, 0.3112); + + return col.rgb * conv_mat; + } + +vec3 YIQ_RGB(vec3 col) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.956, 0.619, + 1.0000000, -0.272, -0.647, + 1.0000000, -1.106, 1.703); + + return col.rgb * conv_mat; + } + +//----------------------- ITU-R BT.470/601 (B/G) ----------------------- + + +vec3 r601_YUV(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.299000, 0.587000, 0.114000, + -0.147407, -0.289391, 0.436798, + 0.614777, -0.514799, -0.099978); + + return RGB.rgb * conv_mat; + } + +vec3 YUV_r601(vec3 RGB) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.00000000000000000, 1.14025080204010000, + 1.0000000, -0.39393067359924316, -0.58080917596817020, + 1.0000000, 2.02839756011962900, -0.00000029356581166); + + return RGB.rgb * conv_mat; + } + +// Custom - not Standard +vec3 YUV_r709(vec3 YUV) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.0000000000000000, 1.14025092124938960, + 1.0000000, -0.2047683298587799, -0.33895039558410645, + 1.0000001, 2.0283975601196290, 0.00000024094399364); + + return YUV.rgb * conv_mat; + } + +// Custom - not Standard +vec3 r709_YUV(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.2126000, 0.715200, 0.0722000, + -0.1048118, -0.3525936, 0.4574054, + 0.6905498, -0.6272304, -0.0633194); + + return RGB.rgb * conv_mat; + } + + +//------------------------- SMPTE-240M Y’PbPr -------------------------- + + +// Umax 0.886 +// Vmax 0.700 +// RGB to YPbPr -full to limited range- with Rec.601 primaries +vec3 r601_YCC(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.299, 0.587, 0.114, + -0.16873589164785553047, -0.33126410835214446953, 0.500, + 0.500, -0.41868758915834522111, -0.08131241084165477889); + + return RGB.rgb * conv_mat; + } + +// YPbPr to RGB -limited to full range- with Rec.601 primaries +vec3 YCC_r601(vec3 YUV) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.000, 1.402, + 1.0000000, -0.34413628620102214651, -0.71413628620102214651, + 1.0000000, 1.772, 0.000); + + return YUV.rgb * conv_mat; + } + +// Umax 0.53890924768269023496443198965294 +// Vmax 0.63500127000254000508001016002032 +// RGB to YPbPr -full range in-gamut- with Rec.709 primaries +vec3 r709_YCC(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.2126, 0.7152, 0.0722, + -0.11457210605733994395, -0.38542789394266005605, 0.5000, + 0.5000, -0.45415290830581661163, -0.04584709169418338837); + + return RGB.rgb * conv_mat; + } + +// YPbPr to RGB -full range in-gamut- with Rec.709 primaries +vec3 YCC_r709(vec3 YUV) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.00000000000000000000, 1.5748, + 1.0000000, -0.18732427293064876957, -0.46812427293064876957, + 1.0000000, 1.8556, 0.00000000000000000000); + + return YUV.rgb * conv_mat; + } + + +//------------------------- IPT -------------------------- + + +const mat3 LMS = +mat3( + 0.4002, 0.7076, -0.0808, +-0.2263, 1.1653, 0.0457, + 0.0, 0.0, 0.9182); + +const mat3 IPT = +mat3( + 0.4000, 0.4000, 0.2000, + 4.4550, -4.8510, 0.3960, + 0.8056, 0.3572, -1.1628); + + + +//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/ + + +// ITU-R BT.470/601 (M) (proof of concept, actually never used) +// SMPTE 170M-1999 +// NTSC-FCC 1953 Standard Phosphor (use with temperature C: 6780K) +const mat3 NTSC_FCC_transform = +mat3( + 0.60699284076690670, 0.2989666163921356, 0.00000000000000000, + 0.17344850301742554, 0.5864211320877075, 0.06607561558485031, + 0.20057128369808197, 0.1146121546626091, 1.11746847629547120); + +// ITU-R BT.470/601 (M) +// Conrac 7211N19 CRT Phosphor +const mat3 Conrac_transform = +mat3( + 0.55842006206512450, 0.28580552339553833, 0.03517606481909752, + 0.20613566040992737, 0.63714659214019780, 0.09369802474975586, + 0.18589359521865845, 0.07704800367355347, 0.96004259586334230); + +// NTSC-J (use with D93 white point) +// Sony Trinitron KV-20M20 +const mat3 Sony20_20_transform = +mat3( + 0.33989441394805910, 0.18490256369113922, 0.019034087657928467, + 0.33497872948646545, 0.71182984113693240, 0.149544075131416320, + 0.22866378724575043, 0.10326752066612244, 1.143318891525268600); + +// SMPTE-C - Measured Average Phosphor (1979-1994) +const mat3 P22_transform = +mat3( + 0.4665636420249939, 0.25661000609397890, 0.005832045804709196, + 0.3039233088493347, 0.66820019483566280, 0.105618737637996670, + 0.1799621731042862, 0.07518967241048813, 0.977465748786926300); + +// SMPTE RP 145-1994 (SMPTE-C), 170M-1999 +// SMPTE-C - Standard Phosphor (Rec.601 NTSC) +const mat3 SMPTE_transform = +mat3( + 0.39354196190834045, 0.21238772571086884, 0.01874009333550930, + 0.36525884270668030, 0.70106136798858640, 0.11193416267633438, + 0.19164848327636720, 0.08655092865228653, 0.95824241638183590); + +// SMPTE RP 145-1994 (SMPTE-C), 170M-1999 +// NTSC-J - Standard Phosphor (https://web.archive.org/web/20130413104152/http://arib.or.jp/english/html/overview/doc/4-TR-B09v1_0.pdf) +const mat3 NTSC_J_transform = +mat3( + 0.39603787660598755, 0.22429330646991730, 0.02050681784749031, + 0.31201449036598206, 0.67417418956756590, 0.12814880907535553, + 0.24496731162071228, 0.10153251141309738, 1.26512730121612550); + +// ITU-R BT.470/601 (B/G) +// EBU Tech.3213-E PAL - Standard Phosphor for Studio Monitors +const mat3 EBU_transform = +mat3( + 0.43194326758384705, 0.22272075712680817, 0.020247340202331543, + 0.34123489260673523, 0.70600330829620360, 0.129433929920196530, + 0.17818950116634370, 0.07127580046653748, 0.938464701175689700); + + + + +//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/ + + + + + +void main() +{ + +// Retro Sega Systems: Genesis, 32x, CD and Saturn 2D had color palettes designed in TV levels to save on transformations. + float lum_exp = (lum_fix == 1.0) ? (255./239.) : 1.; + + //HSM Added + vec4 src_rgba = texture(Source, vTexCoord.xy); + + vec3 src = src_rgba.rgb * lum_exp; + + if (g_grade_on == 0) + { + FragColor = src_rgba; + return; + } + +// Assumes framebuffer in Rec.601 with baked gamma +// make a YUV * NTSC Phosphor option too and a FCC * NTSC phosphor + vec3 col = (crtgamut == 3.0) ? r601_YUV(src) : \ + (crtgamut == 2.0) ? RGB_YIQ(src) : \ + (crtgamut == -3.0) ? RGB_FCC(src) : \ + (crtgamut == -4.0) ? RGB_FCC(src) : \ + RGB_YIQ(src) ; + + +// Clipping Logic / Gamut Limiting + vec2 UVmax = (crtgamut == 3.0) ? vec2(0.436798, 0.614777) : \ + (crtgamut == -4.0) ? vec2(0.599002392519453, 0.52510120528935) : \ + (crtgamut == -3.0) ? vec2(0.599002392519453, 0.52510120528935) : \ + vec2(0.5959, 0.5227) ; + + col = clamp(col.xyz, vec3(0.0, -UVmax.x, -UVmax.y), vec3(1.0, UVmax.x, UVmax.y)); + + + col = (crtgamut == 3.0) ? col : \ + (crtgamut == 2.0) ? col : \ + (crtgamut == -3.0) ? PCtoTV(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + (crtgamut == -4.0) ? PCtoTV(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + PCtoTV(col, 1.0, UVmax.x, UVmax.y, 1.0, false) ; + + +// YIQ/YUV Analogue Color Controls (HUE + Color Shift + Color Burst) + float hue_radians = hue_degrees * (M_PI / 180.0); + float hue = atan(col.z, col.y) + hue_radians; + float chroma = sqrt(col.z * col.z + col.y * col.y); + col = vec3(col.x, chroma * cos(hue), chroma * sin(hue)); + + col.y = (mod((col.y + 1.0) + I_SHIFT, 2.0) - 1.0) * I_MUL; + col.z = (mod((col.z + 1.0) + Q_SHIFT, 2.0) - 1.0) * Q_MUL; + + +// Back to RGB + col = (crtgamut == 3.0) ? col : \ + (crtgamut == 2.0) ? col : \ + (crtgamut == -3.0) ? TVtoPC(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + (crtgamut == -4.0) ? TVtoPC(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + TVtoPC(col, 1.0, UVmax.x, UVmax.y, 1.0, false) ; + + col = (crtgamut == 3.0) ? YUV_r601(col) : \ + (crtgamut == 2.0) ? YIQ_RGB(col) : \ + (crtgamut == -3.0) ? FCC_RGB(col) : \ + (crtgamut == -4.0) ? FCC_RGB(col) : \ + YIQ_RGB(col) ; + +// Gamut Limiting + col = r601_YCC(clamp(col, 0., 1.)); + col = (signal == 0.0) ? src : YCC_r601(clamp(col, vec3(0.0, -.886,-.700), vec3(1.0, .886,.700))); + + +//_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \ + + +// Developer baked CRT gamma (2.20 - 2.25) + col = moncurve_f_f3(col, gamma_in, 0.099); + +// CRT Phosphor Gamut + mat3 m_in; + + if (crtgamut == -4.0) { m_in = NTSC_FCC_transform; } else + if (crtgamut == -3.0) { m_in = Conrac_transform; } else + if (crtgamut == -2.0) { m_in = Sony20_20_transform; } else + if (crtgamut == -1.0) { m_in = SMPTE_transform; } else + if (crtgamut == 1.0) { m_in = P22_transform; } else + if (crtgamut == 2.0) { m_in = NTSC_J_transform; } else + if (crtgamut == 3.0) { m_in = EBU_transform; } + + vec3 gamut = m_in*col; + +// White Point Mapping + vec3 wp = (crtgamut == -4.0) ? wp_adjust(global.wp_temperature - (6404. - 6504.), gamut) : \ + (crtgamut == -3.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + (crtgamut == -2.0) ? wp_adjust(global.wp_temperature - (7600. - 6504.), gamut) : \ + (crtgamut == -1.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + (crtgamut == 1.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + (crtgamut == 2.0) ? wp_adjust(global.wp_temperature - (7400. - 6504.), gamut) : \ + (crtgamut == 3.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + wp_adjust(global.wp_temperature, gamut) ; + + vec3 adj = clamp(XYZ_to_RGB(wp, SPC), 0., 1.); + + +// Guest Emulated CRT Electron Gun gamma (2.35 - 2.50) (phosphor gamma brings it up back to ~2.222) + adj = moncurve_r_f3(crtgamut == 0.0 ? col : adj, pow(gamma_in, 2.) / gamma_out, 0.099); + + +/* HSM Removed +// Look LUT - (in SPC space) + float red = (adj.r * (global.LUT_Size1 - 1.0) + 0.4999) / (global.LUT_Size1 * global.LUT_Size1); + float green = (adj.g * (global.LUT_Size1 - 1.0) + 0.4999) / global.LUT_Size1; + float blue1 = (floor(adj.b * (global.LUT_Size1 - 1.0)) / global.LUT_Size1) + red; + float blue2 = (ceil(adj.b * (global.LUT_Size1 - 1.0)) / global.LUT_Size1) + red; + float mixer = clamp(max((adj.b - blue1) / (blue2 - blue1), 0.0), 0.0, 32.0); + vec3 color1 = texture(SamplerLUT1, vec2(blue1, green)).rgb; + vec3 color2 = texture(SamplerLUT1, vec2(blue2, green)).rgb; + vec3 vcolor = (global.LUT1_toggle == 0.0) ? adj : mixfix(color1, color2, mixer); +*/ + +// HSM Added +vec3 vcolor = adj; + +// OETF - Opto-Electronic Transfer Function (Rec.709 does a Dim to Dark Surround adaptation) + vcolor = (SPC == 3.0) ? clamp(pow(vcolor, vec3(563./256.)), 0., 1.) : \ + (SPC == 2.0) ? moncurve_f_f3(vcolor, 2.20 + 0.022222, 0.0993) : \ + (SPC == 1.0) ? clamp(pow(vcolor, vec3(2.20 + 0.40)), 0., 1.) : \ + (SPC == 0.0) ? moncurve_f_f3(vcolor, 2.20 + 0.20, 0.0550) : \ + clamp(pow(pow(vcolor, vec3(1./1.019264)), vec3(2.20 + 0.20)), 0., 1.) ; + + + vcolor = RGB_to_XYZ(vcolor, SPC); + + +// Sigmoidal Contrast + vec3 Yxy = XYZtoYxy(vcolor); + float toGamma = clamp(moncurve_r(Yxy.r, 2.40, 0.055), 0., 1.); + toGamma = (Yxy.r > 0.5) ? contrast_sigmoid_inv(toGamma, 2.3, 0.5) : toGamma; + float sigmoid = (cntrst > 0.0) ? contrast_sigmoid(toGamma, cntrst, mid) : contrast_sigmoid_inv(toGamma, cntrst, mid); + vec3 contrast = vec3(moncurve_f(sigmoid, 2.40, 0.055), Yxy.g, Yxy.b); + vec3 XYZsrgb = clamp(XYZ_to_RGB(YxytoXYZ(contrast), SPC), 0., 1.); + contrast = (cntrst == 0.0) ? XYZ_to_RGB(vcolor, SPC) : XYZsrgb; + + +// Vignetting & Black Level +/* HSM Removed + vec2 vpos = vTexCoord*(global.OriginalSize.xy/global.SourceSize.xy); +*/ + + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + vec2 derezed_size = HSM_GetNegativeCropAddedSize(); + vec2 cur_pixel_pos = vTexCoord * derezed_size; + vec2 cropped_size = HSM_ROTATE_CORE_IMAGE > 0.5 ? vec2(CROPPED_ROTATED_SIZE.y, CROPPED_ROTATED_SIZE.x) : CROPPED_ROTATED_SIZE; + vec2 raw_size = HSM_ROTATE_CORE_IMAGE > 0.5 ? vec2(ROTATED_CORE_PREPPED_SIZE.y, ROTATED_CORE_PREPPED_SIZE.x) : ROTATED_CORE_PREPPED_SIZE; + vec2 sample_start_area = HSM_ROTATE_CORE_IMAGE > 0.5 ? vec2(SAMPLE_AREA_START_PIXEL_COORD.y, SAMPLE_AREA_START_PIXEL_COORD.x) : SAMPLE_AREA_START_PIXEL_COORD; + vec2 pos_in_cropped_coords = (cur_pixel_pos - sample_start_area) / cropped_size; + pos_in_cropped_coords = (pos_in_cropped_coords - 0.5) * (1 - 2 * MAX_NEGATIVE_CROP) + 0.5; + + vec2 vpos = pos_in_cropped_coords; + + // if (vignette > 0.5) + // { + // vpos = (vpos - 0.5) / (1 - 2 * MAX_NEGATIVE_CROP + 0.01) + 0.5; + // vpos *= 1.0 - vpos.xy; + // float vig = vpos.x * vpos.y * vstr; + // vig = min(pow(vig, vpower), 1.0); + // contrast *= (vignette == 1.0) ? vig : 1.0; + // } + + float adjusted_lift = (1 - HSM_POST_CRT_BRIGHTNESS_AFFECT_BLACK_LEVEL) * lift / HSM_POST_CRT_BRIGHTNESS + HSM_POST_CRT_BRIGHTNESS_AFFECT_BLACK_LEVEL * lift; + + contrast += (adjusted_lift / 20.0) * (1.0 - contrast); + + +// RGB Related Transforms + vec4 screen = vec4(max(contrast, 0.0), 1.0); + float sat = g_sat + 1.0; + + // r g b alpha ; alpha does nothing for our purposes + mat4 color = mat4(wlr, rg, rb, 0.0, //red tint + gr, wlg, gb, 0.0, //green tint + br, bg, wlb, 0.0, //blue tint + blr/20., blg/20., blb/20., 0.0); //black tint + + + vec3 coeff = (SPC == 3.0) ? vec3(0.29734000563621520, 0.62735998630523680, 0.07529000192880630) : \ + (SPC == 2.0) ? vec3(0.24840137362480164, 0.67799961566925050, 0.03913172334432602) : \ + (SPC == 1.0) ? vec3(0.22898375988006592, 0.69173991680145260, 0.07927616685628891) : \ + vec3(0.21264933049678802, 0.71516913175582890, 0.07218152284622192) ; + + + mat3 adjust = mat3((1.0 - sat) * coeff.x + sat, (1.0 - sat) * coeff.x, (1.0 - sat) * coeff.x, + (1.0 - sat) * coeff.y, (1.0 - sat) * coeff.y + sat, (1.0 - sat) * coeff.y, + (1.0 - sat) * coeff.z, (1.0 - sat) * coeff.z, (1.0 - sat) * coeff.z + sat); + + + screen = clamp(rolled_gain_v4(screen, clamp(lum, -0.49, 0.99)), 0., 1.); + screen = color * screen; + +// HUE vs SAT + vec3 src_h = RGB_to_XYZ(screen.rgb, SPC) * LMS; + src_h.x = src_h.x >= 0.0 ? pow(src_h.x, 0.43) : -pow(-src_h.x, 0.43); + src_h.y = src_h.y >= 0.0 ? pow(src_h.y, 0.43) : -pow(-src_h.y, 0.43); + src_h.z = src_h.z >= 0.0 ? pow(src_h.z, 0.43) : -pow(-src_h.z, 0.43); + + src_h.xyz *= IPT; + + float hue_at = atan(src_h.z, src_h.y); + chroma = sqrt(src_h.z * src_h.z + src_h.y * src_h.y); + + float hue_radians_r = -40.0 * (M_PI / 180.0); + float hue_r = chroma * cos(hue_at + hue_radians_r) * 2.; + + float hue_radians_g = 230.0 * (M_PI / 180.0); + float hue_g = chroma * cos(hue_at + hue_radians_g) * 2.; + + float hue_radians_b = 100.0 * (M_PI / 180.0); + float hue_b = chroma * cos(hue_at + hue_radians_b) * 2.; + + float msk = dot(clamp(vec3(hue_r, hue_g, hue_b), 0., 1.), vec3(satr, satg, satb)*(-1.)); + src_h = mixfix(screen.rgb, vec3(dot(coeff, screen.rgb)), msk); + + float sat_msk = (vibr < 0.0) ? 1.0 - abs(SatMask(src_h.x, src_h.y, src_h.z) - 1.0) * abs(vibr) : \ + 1.0 - (SatMask(src_h.x, src_h.y, src_h.z) * vibr) ; + + src_h = mixfix(src_h, clamp(adjust * src_h, 0., 1.), clamp(sat_msk, 0., 1.)); + + +// EOTF - Electro-Optical Transfer Function (Rec.709 does a Dim to Dark Surround adaptation) + vec3 TRC = (SPC == 3.0) ? clamp(pow(src_h, vec3(1./(563./256.))), 0., 1.) : \ + (SPC == 2.0) ? moncurve_r_f3(src_h, 2.20 + 0.022222, 0.0993) : \ + (SPC == 1.0) ? clamp(pow(src_h, vec3(1./(2.20 + 0.40))), 0., 1.) : \ + (SPC == 0.0) ? moncurve_r_f3(src_h, 2.20 + 0.20, 0.0550) : \ + clamp(pow(pow(src_h, vec3(1.019264)), vec3(1./(2.20 + 0.20))), 0., 1.) ; + + /* HSM Removed +// Technical LUT - (in SPC space) + float red_2 = (TRC.r * (global.LUT_Size2 - 1.0) + 0.4999) / (global.LUT_Size2 * global.LUT_Size2); + float green_2 = (TRC.g * (global.LUT_Size2 - 1.0) + 0.4999) / global.LUT_Size2; + float blue1_2 = (floor(TRC.b * (global.LUT_Size2 - 1.0)) / global.LUT_Size2) + red_2; + float blue2_2 = (ceil(TRC.b * (global.LUT_Size2 - 1.0)) / global.LUT_Size2) + red_2; + float mixer_2 = clamp(max((TRC.b - blue1_2) / (blue2_2 - blue1_2), 0.0), 0.0, 32.0); + vec3 color1_2 = texture(SamplerLUT2, vec2(blue1_2, green_2)).rgb; + vec3 color2_2 = texture(SamplerLUT2, vec2(blue2_2, green_2)).rgb; + vec3 LUT2_output = mixfix(color1_2, color2_2, mixer_2); + + LUT2_output = (global.LUT2_toggle == 0.0) ? TRC : LUT2_output; + + + FragColor = vec4(LUT2_output, 1.0); + */ + FragColor = vec4(TRC, src_rgba.a); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang new file mode 100644 index 0000000..2178d69 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_horiz.slang @@ -0,0 +1,49 @@ +#version 450 + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; +} global; + +#include "hsm-crt-easymode-blur_params.inc" + +#define kernel(x) exp(-GLOW_FALLOFF * (x) * (x)) + +#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() +{ + vec3 col = vec3(0.0); + float dx = params.SourceSize.z; + + 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/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_params.inc new file mode 100644 index 0000000..5f7cfd7 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_params.inc @@ -0,0 +1,4 @@ +// Higher value, more centered glow. +// Lower values might need more taps. +#define GLOW_FALLOFF 0.35 +#define TAPS 4 diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang new file mode 100644 index 0000000..bb1d1bd --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-blur_vert.slang @@ -0,0 +1,49 @@ +#version 450 + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; +} global; + +#include "hsm-crt-easymode-blur_params.inc" + +#define kernel(x) exp(-GLOW_FALLOFF * (x) * (x)) + +#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() +{ + vec3 col = vec3(0.0); + float dy = params.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/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation-basic-border.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation-basic-border.slang new file mode 100644 index 0000000..88f0ddc --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation-basic-border.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-basic-params.inc" +#include "hsm-crt-easymode-halation.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.inc new file mode 100644 index 0000000..406cecf --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.inc @@ -0,0 +1,352 @@ +/* +CRT Shader by EasyMode with addition of scaling functions from hsm-mega-screen-scale +License: GPL + +Addition of hsm-mega-screen-scale by HyperspaceMadness remimcgill@hotmail.com +*/ + +layout(push_constant) uniform Push +{ + // HSM Removed + // float GAMMA_OUTPUT; + float ESM_SHARPNESS_H; + float ESM_SHARPNESS_V; + float ESM_MASK_TYPE; + float ESM_MASK_STRENGTH_MIN; + float ESM_MASK_STRENGTH_MAX; + float ESM_MASK_SIZE; + float ESM_SCANLINE_STRENGTH_MIN; + float ESM_SCANLINE_STRENGTH_MAX; + float ESM_SCANLINE_BEAM_MIN; + float ESM_SCANLINE_BEAM_MAX; + // HSM Removed + // float GEOM_CURVATURE; + // float GEOM_WARP; + // float GEOM_CORNER_SIZE; + // float GEOM_CORNER_SMOOTH; + float ESM_INTERLACING_TOGGLE; + float ESM_HALATION; + float ESM_DIFFUSION; + float ESM_BRIGHTNESS; +} params; + +// HSM Removed +// #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_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 +#pragma parameter ESM_SCANLINE_BEAM_MAX " Beam Max." 1.0 0.25 5.0 0.05 + +#pragma parameter ESM_SHARPNESS_TITLE "[ SHARPNESS ]:" 0 0 0 1 +#pragma parameter ESM_SHARPNESS_H " Horizontal" 0.6 0.0 1.0 0.05 +#pragma parameter ESM_SHARPNESS_V " Vertical" 1.0 0.0 1.0 0.05 + +#pragma parameter ESM_MASK_TITLE "[ MASK ]:" 0 0 0 1 +#pragma parameter ESM_MASK_TYPE " Type" 4.0 0.0 7.0 1.0 +#pragma parameter ESM_MASK_SIZE " Size - 0:Auto, 1:2K, 2:4K" 0 0 100 1 +#pragma parameter ESM_MASK_STRENGTH_MIN " Strength Min." 0.2 0.0 0.5 0.01 +#pragma parameter ESM_MASK_STRENGTH_MAX " Strength Max." 0.2 0.0 0.5 0.01 + +#pragma parameter ESM_GLOW_TITLE "[ GLOW ]:" 0 0 0 1 +#pragma parameter ESM_HALATION " Halation" 0.03 0.0 1.0 0.01 +#pragma parameter ESM_DIFFUSION " Diffusion" 0.0 0.0 1.0 0.01 +#pragma parameter ESM_BRIGHTNESS " Brightness" 0.73 0.0 2.0 0.01 + +// HSM Removed +// #pragma parameter GEOM_CURVATURE "Geom Curvature" 0.0 0.0 0.1 0.01 +// #pragma parameter GEOM_WARP "Geom Warp" 0.0 0.0 0.1 0.01 +// #pragma parameter GEOM_CORNER_SIZE "Geom Corner Size" 0.0 0.0 0.1 0.01 +// #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 +/* Removed the following +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + uint FrameCount; + vec4 OriginalSize; + vec4 ORIG_LINEARIZEDSize; +} global; +*/ + +/* + CRT Shader by EasyMode + License: GPL +*/ + +#define FIX(c) max(abs(c), 1e-5) +#define PI 3.141592653589 + +// HSM Removed +// #define TEX2D(c) texture(tex, c) + +// HSM Added +#define TEX2D(c) HSM_GetCroppedTexSample(tex, c) + +float curve_distance(float x, float sharp) +{ + float x_step = step(0.5, x); + float curve = 0.5 - sqrt(0.25 - (x - x_step) * (x - x_step)) * sign(0.5 - x); + + return mix(x, curve, sharp); +} + +mat4x4 get_color_matrix(sampler2D tex, vec2 co, vec2 dx) +{ + return mat4x4(TEX2D(co - dx), TEX2D(co), TEX2D(co + dx), TEX2D(co + 2.0 * dx)); +} + +vec4 filter_lanczos(vec4 coeffs, mat4x4 color_matrix) +{ + vec4 col = color_matrix * coeffs; + vec4 sample_min = min(color_matrix[1], color_matrix[2]); + vec4 sample_max = max(color_matrix[1], color_matrix[2]); + + col = clamp(col, sample_min, sample_max); + + return col; +} + +vec3 get_scanline_weight(float pos, float beam, float strength) +{ + float weight = 1.0 - pow(cos(pos * 2.0 * PI) * 0.5 + 0.5, beam); + + weight = weight * strength * 2.0 + (1.0 - strength); + + return vec3(weight); +} + +/* HSM Removed +vec2 curve_coordinate(vec2 co, float curvature) +{ + vec2 curve = vec2(curvature, curvature * 0.75); + vec2 co2 = co + co * curve - curve / 2.0; + vec2 co_weight = vec2(co.y, co.x) * 2.0 - 1.0; + + co = mix(co, co2, co_weight * co_weight); + + return co; +} + +float get_corner_weight(vec2 co, vec2 corner, float smoothfunc) +{ + float corner_weight; + + co = min(co, vec2(1.0) - co) * vec2(1.0, 0.75); + co = (corner - min(co, corner)); + corner_weight = clamp((corner.x - sqrt(dot(co, co))) * smoothfunc, 0.0, 1.0); + corner_weight = mix(1.0, corner_weight, ceil(corner.x)); + + return corner_weight; +} +*/ + +#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 = 1) uniform sampler2D Source; + +layout(set = 0, binding = 2) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 3) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 4) uniform sampler2D LinearizePass; + +void main() +{ + /* HSM Removed + vec2 tex_size = global.SourceSize.xy; + */ + + // TODO implement Cropping + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + vec2 tex_size = CROPPED_ROTATED_SIZE_WITH_RES_MULT; + // End Addition + + vec2 midpoint = vec2(0.5, 0.5); + float scan_offset = 0.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) + { + tex_size.y *= 0.5; + + if (mod(timer, 2.0) > 0.0) + { + midpoint.y = 0.75; + scan_offset = 0.5; + } + 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); + Not sure why params.GEOM_WARP was used for the main coordinate and params.GEOM_CURVATURE was used for the corner + */ + + // HSM Added + + + vec2 co = SCREEN_COORD; + vec2 screen_coord = co; + vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(screen_coord); + vec2 xy = HSM_GetMirrorWrappedCoord(screen_curved_coord); + + // HSM Removed + // float corner_weight = 1; + + vec2 dx = vec2(1.0 / tex_size.x, 0.0); + vec2 dy = vec2(0.0, 1.0 / tex_size.y); + vec2 pix_co = xy * tex_size - midpoint; + vec2 tex_co = (floor(pix_co) + midpoint) / tex_size; + vec2 dist = fract(pix_co); + float curve_x, curve_y; + vec3 col, col2, diff; + + curve_x = curve_distance(dist.x, params.ESM_SHARPNESS_H * params.ESM_SHARPNESS_H); + curve_y = curve_distance(dist.y, params.ESM_SHARPNESS_V * params.ESM_SHARPNESS_V); + + vec4 coeffs_x = PI * vec4(1.0 + curve_x, curve_x, 1.0 - curve_x, 2.0 - curve_x); + vec4 coeffs_y = PI * vec4(1.0 + curve_y, curve_y, 1.0 - curve_y, 2.0 - curve_y); + + coeffs_x = FIX(coeffs_x); + coeffs_x = 2.0 * sin(coeffs_x) * sin(coeffs_x / 2.0) / (coeffs_x * coeffs_x); + coeffs_x /= dot(coeffs_x, vec4(1.0)); + + coeffs_y = FIX(coeffs_y); + coeffs_y = 2.0 * sin(coeffs_y) * sin(coeffs_y / 2.0) / (coeffs_y * coeffs_y); + coeffs_y /= dot(coeffs_y, vec4(1.0)); + + mat4x4 color_matrix; + + color_matrix[0] = filter_lanczos(coeffs_x, get_color_matrix(LinearizePass, tex_co - dy, dx)); + color_matrix[1] = filter_lanczos(coeffs_x, get_color_matrix(LinearizePass, tex_co, dx)); + color_matrix[2] = filter_lanczos(coeffs_x, get_color_matrix(LinearizePass, tex_co + dy, dx)); + color_matrix[3] = filter_lanczos(coeffs_x, get_color_matrix(LinearizePass, tex_co + 2.0 * dy, dx)); + + col = filter_lanczos(coeffs_y, color_matrix).rgb; + diff = HSM_GetCroppedTexSample(Source, xy).rgb; + + float rgb_max = max(col.r, max(col.g, col.b)); + + /* HSM Removed + float sample_offset = (global.SourceSize.y * global.OutputSize.w) * 0.5; + */ + + // HSM Added the Following + float sample_offset = (tex_size.y * global.OutputSize.w * SCREEN_SCALE.y) * 0.5; + // End Addition + + float scan_pos = xy.y * tex_size.y + scan_offset; + float scan_strength = mix(params.ESM_SCANLINE_STRENGTH_MAX, params.ESM_SCANLINE_STRENGTH_MIN, rgb_max); + float scan_beam = clamp(rgb_max * params.ESM_SCANLINE_BEAM_MAX, params.ESM_SCANLINE_BEAM_MIN, params.ESM_SCANLINE_BEAM_MAX); + vec3 scan_weight = vec3(0.0); + + float mask_colors; + float mask_dot_width; + float mask_dot_height; + float mask_stagger; + float mask_dither; + vec4 mask_config; + + if (params.ESM_MASK_TYPE == 1) mask_config = vec4(2.0, 1.0, 1.0, 0.0); + else if (params.ESM_MASK_TYPE == 2) mask_config = vec4(3.0, 1.0, 1.0, 0.0); + else if (params.ESM_MASK_TYPE == 3) mask_config = vec4(2.1, 1.0, 1.0, 0.0); + else if (params.ESM_MASK_TYPE == 4) mask_config = vec4(3.1, 1.0, 1.0, 0.0); + else if (params.ESM_MASK_TYPE == 5) mask_config = vec4(2.0, 1.0, 1.0, 1.0); + else if (params.ESM_MASK_TYPE == 6) mask_config = vec4(3.0, 2.0, 1.0, 3.0); + else if (params.ESM_MASK_TYPE == 7) mask_config = vec4(3.0, 2.0, 2.0, 3.0); + + mask_colors = floor(mask_config.x); + mask_dot_width = mask_config.y; + mask_dot_height = mask_config.z; + mask_stagger = mask_config.w; + mask_dither = fract(mask_config.x) * 10.0; + + /* HSM Removed + vec2 mod_fac = floor(vTexCoord * global.OutputSize.xy * global.SourceSize.xy / (global.SourceSize.xy * vec2(params.ESM_MASK_SIZE, mask_dot_height * params.ESM_MASK_SIZE))); + */ + + // HSM Added + // HSM Added + float final_mask_size = params.ESM_MASK_SIZE; + // If using automatic Mask Size + if (final_mask_size < 0.5) + { + final_mask_size = (global.FinalViewportSize.x + global.FinalViewportSize.y) / 3 > 1900 ? 2 : 1; + } + + vec2 mod_fac = floor(SCREEN_COORD * global.OutputSize.xy * SCREEN_SCALE * tex_size.xy / (tex_size.xy * vec2(final_mask_size, mask_dot_height * final_mask_size))); + // End Addition + + int dot_no = int(mod((mod_fac.x + mod(mod_fac.y, 2.0) * mask_stagger) / mask_dot_width, mask_colors)); + float dither = mod(mod_fac.y + mod(floor(mod_fac.x / mask_colors), 2.0), 2.0); + + float mask_strength = mix(params.ESM_MASK_STRENGTH_MAX, params.ESM_MASK_STRENGTH_MIN, rgb_max); + float mask_dark, mask_bright, mask_mul; + vec3 mask_weight; + + mask_dark = 1.0 - mask_strength; + mask_bright = 1.0 + mask_strength * 2.0; + + if (dot_no == 0) mask_weight = mix(vec3(mask_bright, mask_bright, mask_bright), vec3(mask_bright, mask_dark, mask_dark), mask_colors - 2.0); + else if (dot_no == 1) mask_weight = mix(vec3(mask_dark, mask_dark, mask_dark), vec3(mask_dark, mask_bright, mask_dark), mask_colors - 2.0); + else mask_weight = vec3(mask_dark, mask_dark, mask_bright); + + if (dither > 0.9) mask_mul = mask_dark; + else mask_mul = mask_bright; + + mask_weight *= mix(1.0, mask_mul, mask_dither); + mask_weight = mix(vec3(1.0), mask_weight, clamp(params.ESM_MASK_TYPE, 0.0, 1.0)); + + col2 = (col * mask_weight); + col2 *= params.ESM_BRIGHTNESS; + + scan_weight = get_scanline_weight(scan_pos - sample_offset, scan_beam, scan_strength); + col = clamp(col2 * scan_weight, 0.0, 1.0); + scan_weight = get_scanline_weight(scan_pos, scan_beam, scan_strength); + col += clamp(col2 * scan_weight, 0.0, 1.0); + scan_weight = get_scanline_weight(scan_pos + sample_offset, scan_beam, scan_strength); + col += clamp(col2 * scan_weight, 0.0, 1.0); + col /= 3.0; + + /* HSM Removed + col *= vec3(corner_weight); + col += diff * mask_weight * params.ESM_HALATION * vec3(corner_weight); + col += diff * params.ESM_DIFFUSION * vec3(corner_weight); + col = pow(col, vec3(1.0 / params.GAMMA_OUTPUT)); + */ + + // HSM Added + col += diff * mask_weight * params.ESM_HALATION; + col += diff * params.ESM_DIFFUSION; + + FragColor = vec4(col, 1); + + // HSM add output gamma + FragColor = HSM_Delinearize(FragColor, HSM_GAMMA_OUT_CRT); + // End Addition +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang new file mode 100644 index 0000000..626973e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-halation.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-crt-easymode-halation.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang new file mode 100644 index 0000000..9422769 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-easymode/hsm-crt-easymode-threshold.slang @@ -0,0 +1,37 @@ +#version 450 + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + +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 LinearizePass; + +void main() +{ +vec3 diff = clamp(texture(Source, vTexCoord).rgb - texture(LinearizePass, vTexCoord).rgb, 0.0, 1.0); + FragColor = vec4(diff, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/config.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/config.h new file mode 100644 index 0000000..99925e4 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/config.h @@ -0,0 +1,5 @@ +#pragma parameter GTU_TITLE "[ --- TV PROCESS GTU --- ]:" 0 0 0.01 0.01 +#pragma parameter GTU_ON " GTU ON" 0 0 1 1 +#pragma parameter compositeConnection " Composite Connection Enable" 0.0 0.0 1.0 1.0 + +#define FIXNUM 6 \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang new file mode 100644 index 0000000..ccfbaa8 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass1.slang @@ -0,0 +1,58 @@ +#version 450 + +layout(push_constant) uniform Push +{ + vec4 OutputSize; + vec4 OriginalSize; + vec4 SourceSize; + float GTU_ON; + float compositeConnection; +} params; + + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; +} global; + +//////////////////////////////////////////////////////// +// GTU version 0.50 +// Author: aliaspider - aliaspider@gmail.com +// License: GPLv3 +//////////////////////////////////////////////////////// + +#include "config.h" + +#define RGB_to_YIQ mat3x3( 0.299 , 0.595716 , 0.211456 , 0.587 , -0.274453 , -0.522591 , 0.114 , -0.321263 , 0.311135 ) + +#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() +{ + vec4 c = texture(Source, vTexCoord); + // If GTU is off return the color from the last pass + if (params.GTU_ON < 1) + { + FragColor = c; + return; + } + + if(params.compositeConnection > 0.0) + c.rgb = c.rgb * RGB_to_YIQ; + FragColor = c; +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang new file mode 100644 index 0000000..3460839 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-gtu/hsm-gtu-pass2.slang @@ -0,0 +1,100 @@ +#version 450 + +layout(push_constant) uniform Push +{ + vec4 OutputSize; + vec4 OriginalSize; + vec4 SourceSize; + float GTU_ON; + float signalResolution; + float signalResolutionI; + float signalResolutionQ; + float compositeConnection; +} params; + +#pragma parameter signalResolution " Signal Resolution Y" 256.0 16.0 1024.0 16.0 +#pragma parameter signalResolutionI " Signal Resolution I" 83.0 1.0 350.0 2.0 +#pragma parameter signalResolutionQ " Signal Resolution Q" 25.0 1.0 350.0 2.0 + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; +} global; + +//////////////////////////////////////////////////////// +// GTU version 0.50 +// Author: aliaspider - aliaspider@gmail.com +// License: GPLv3 +//////////////////////////////////////////////////////// + +#include "config.h" + +#define YIQ_to_RGB mat3x3( 1.0 , 1.0 , 1.0 , 0.9563 , -0.2721 , -1.1070 , 0.6210 , -0.6474 , 1.7046 ) +#define pi 3.14159265358 +#define a(x) abs(x) +#define d(x,b) (pi*b*min(a(x)+0.5,1.0/b)) +#define e(x,b) (pi*b*min(max(a(x)-0.5,-1.0/b),1.0/b)) +#define STU(x,b) ((d(x,b)+sin(d(x,b))-e(x,b)-sin(e(x,b)))/(2.0*pi)) +//#define X(i) (offset-(i)) +#define GETC (texture(Source, vec2(vTexCoord.x - X * params.SourceSize.z, vTexCoord.y)).rgb) + +#define VAL_composite vec3((c.x*STU(X,(params.signalResolution * params.SourceSize.z))),(c.y*STU(X,(params.signalResolutionI * params.SourceSize.z))),(c.z*STU(X,(params.signalResolutionQ * params.SourceSize.z)))) +#define VAL (c*STU(X,(params.signalResolution * params.SourceSize.z))) + +#define PROCESS(i) X=(offset-(i));c=GETC;tempColor+=VAL; +#define PROCESS_composite(i) X=(offset-(i));c=GETC;tempColor+=VAL_composite; + +#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() +{ + // If GTU is off return the color from the last pass + if (params.GTU_ON < 1) + { + FragColor = texture(Source, vTexCoord); + return; + } + + float offset = fract((vTexCoord.x * params.SourceSize.x) - 0.5); + vec3 tempColor = vec3(0.0); + float X; + vec3 c; + float range; + if (params.compositeConnection > 0.0) + range=ceil(0.5+params.SourceSize.x/min(min(params.signalResolution,params.signalResolutionI),params.signalResolutionQ)); + else + range=ceil(0.5+params.SourceSize.x/params.signalResolution); + + float i; + if(params.compositeConnection > 0.0){ + for (i=-range;i 0.0) + tempColor=clamp(tempColor * YIQ_to_RGB,0.0,1.0); + else + tempColor=clamp(tempColor,0.0,1.0); + + // tempColor=clamp(tempColor,0.0,1.0); + FragColor = vec4(tempColor, 1.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/grade/hsm-pre-shaders-afterglow-grade.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/grade/hsm-pre-shaders-afterglow-grade.slang new file mode 100644 index 0000000..37b2764 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/grade/hsm-pre-shaders-afterglow-grade.slang @@ -0,0 +1,1001 @@ +#version 450 + +#include "../../hsm/common/hsm-globals-and-screen-scale-params.inc" + +layout(push_constant) uniform Push +{ + float g_gamma_in; + float g_gamma_out; + float g_signal_type; + float g_crtgamut; + float g_space_out; + float g_hue_degrees; + float g_I_SHIFT; + float g_Q_SHIFT; + float g_I_MUL; + float g_Q_MUL; + float g_lum_fix; + float g_vignette; + float g_vstr; + float g_vpower; + float g_sat; + float g_vibr; + float g_lum; + float g_cntrst; + float g_mid; + float g_lift; + float blr; + float blg; + float blb; + float wlr; + float wlg; + float wlb; + float rg; + float rb; + float gr; + float gb; + float br; + float bg; +} params; + +// layout(std140, set = 0, binding = 0) uniform UBO +// { +// mat4 MVP; +// vec4 SourceSize; +// vec4 OriginalSize; +// vec4 OutputSize; +// uint FrameCount; +// float g_grade_on; +// float wp_temperature; +// float g_satr; +// float g_satg; +// float g_satb; +// // float LUT_Size1; +// // float LUT1_toggle; +// // float LUT_Size2; +// // float LUT2_toggle; +// } global; + +/* + Grade + > Ubershader grouping some monolithic color related shaders: + ::color-mangler (hunterk), ntsc color tuning knobs (Doriphor), white_point (hunterk, Dogway), RA Reshade LUT. + > and the addition of: + ::analogue color emulation, phosphor gamut, color space + TRC support, vibrance, HUE vs SAT, vignette (shared by Syh), black level, rolled gain and sigmoidal contrast. + + Author: Dogway + License: Public domain + + **Thanks to those that helped me out keep motivated by continuous feedback and bug reports: + **Syh, Nesguy, hunterk, and the libretro forum members. + + + ######################################...PRESETS...####################################### + ########################################################################################## + ### ### + ### PAL ### + ### Phosphor: EBU (#3) (or an EBU T3213 based CRT phosphor gamut) ### + ### WP: D65 (6504K) (in practice more like ~7500K) ### + ### TRC: 2.8 SMPTE-C Gamma ### + ### Saturation: -0.02 ### + ### ### + ### NTSC-U ### + ### Phosphor: P22/SMPTE-C (#1 #-1)(or a SMPTE-C based CRT phosphor gamut) ### + ### WP: D65 (6504K) (in practice more like ~7500K) ### + ### TRC: 2.22 SMPTE-C Gamma (in practice more like 2.35-2.55) ### + ### ### + ### NTSC-J (Default) ### + ### Phosphor: NTSC-J (#2) (or a NTSC-J based CRT phosphor gamut) ### + ### WP: 9300K+27MPCD (8942K) (CCT from x:0.281 y:0.311) ### + ### TRC: 2.22 SMPTE-C Gamma (in practice more like 2.35-2.55) ### + ### ### + ### *Despite the standard of 2.22, a more faithful approximation to CRT... ### + ### ...is to use a gamma (SMPTE-C type) with a value of 2.35-2.55. ### + ### ### + ### ### + ########################################################################################## + ########################################################################################## +*/ + + +#pragma parameter AS " Afterglow Strength" 0.20 0.0 0.60 0.01 +#define AS global.AS +#pragma parameter asat " Afterglow saturation" 0.33 0.0 1.0 0.01 +#define asat global.asat + + +#pragma parameter DG_TITLE "[ --- COLOR CORRECTION - GRADE --- ]:" 0 0 0 1 + +#pragma parameter g_grade_on " Grade ON" 1 0 1 1 +#pragma parameter DG_SIGNAL_GAMMA_TITLE "[ GRADE - GAMMA ]:" 0 0 0 1 +#pragma parameter g_gamma_in " Game Embedded Gamma" 2.222 1.80 3.0 0.05 +#pragma parameter g_gamma_out " CRT Electron Gun Gamma" 2.50 1.80 3.0 0.05 + +#pragma parameter DG_SIGNAL_COLOR_SPACE_TITLE "[ GRADE - SIGNAL & COLOR SPACE ]:" 0 0 0 1 +#pragma parameter g_signal_type " Signal Type (0:RGB 1:Composite)" 1.0 0.0 1.0 1.0 +// Phosphor was changed from 2 to 1 to look similar to the input by default +#pragma parameter g_crtgamut " CRT Phosphor Gamut - 1:NTSC-U | 2:NTSC-J | 3:PAL" 2.0 -4.0 3.0 1.0 +#pragma parameter g_space_out " Display Color Space -1:709 | 0:sRGB | DCI | 2020 | Adobe" 0.0 -1.0 3.0 1.0 + +#pragma parameter g_hue_degrees " Hue (Composite Only)" 0.0 -360.0 360.0 1.0 + +#pragma parameter DG_SIGNAL_PROCESS_TITLE "[ GRADE - COLOR SIGNAL PROCESS ]:" 0 0 0 1 +#pragma parameter g_I_SHIFT " I/U Shift" 0.0 -0.2 0.2 0.01 +#pragma parameter g_Q_SHIFT " Q/V Shift" 0.0 -0.2 0.2 0.01 +#pragma parameter g_I_MUL " I/U Multiplier" 1.0 0.0 2.0 0.01 +#pragma parameter g_Q_MUL " Q/V Multiplier" 1.0 0.0 2.0 0.01 + +#pragma parameter DG_BRIGHTNESS_TITLE "[ GRADE - BRIGHTNESS & CONTRAST ]:" 0 0 0 1 +#pragma parameter g_lum_fix " Sega Luma Fix" 0.0 0.0 1.0 1.0 +#pragma parameter g_lum " Brightness" 0.0 -0.5 1.0 0.01 +#pragma parameter g_cntrst " Contrast" 0.0 -1.0 1.0 0.05 +#pragma parameter g_mid " Contrast Pivot" 0.5 0.0 1.0 0.01 +#pragma parameter g_lift " Black Level" 0.0 -0.5 0.5 0.01 + +#pragma parameter DG_VIGNETTE_TITLE "[ GRADE - VIGNETTE ]:" 0 0 0 1 +#pragma parameter g_vignette " Use Vignette" 0.0 0.0 1.0 1.0 +#pragma parameter g_vstr " Amount (Strength)" 40.0 0.0 98.0 2.0 +#pragma parameter g_vpower " Corner Amount (Power)" 26 0.0 200 2 + +#pragma parameter DG_COLOR_TEMP_TITLE "[ GRADE - COLOR TEMP & HUE ]:" 0 0 0 1 +// Color temp changed to 7000 (Used to be 6500) because this seems to be better for the default crt phosphor gamut of NTSC-J +#pragma parameter wp_temperature " White Point" 6500.0 5000.0 12000.0 100.0 +#pragma parameter g_sat " Saturation" 0.0 -1.0 2.0 0.01 +#pragma parameter g_vibr " Dullness/Vibrance" 0.0 -1.0 1.0 0.05 + +#pragma parameter DG_HUE_VS_SAT_TITLE "[ GRADE - HUE VS SATURATION ]:" 0 0 0 1 +#pragma parameter g_satr " Hue vs Sat Red" 0.0 -1.0 1.0 0.01 +#pragma parameter g_satg " Hue vs Sat Green" 0.0 -1.0 1.0 0.01 +#pragma parameter g_satb " Hue vs Sat Blue" 0.0 -1.0 1.0 0.01 + +#pragma parameter DG_BLACKTINT_TITLE "[ GRADE - BLACK TINT ]:" 0 0 0 1 +#pragma parameter blr " Black-Red Tint" 0.0 0.0 1.0 0.01 +#pragma parameter blg " Black-Green Tint" 0.0 0.0 1.0 0.01 +#pragma parameter blb " Black-Blue Tint" 0.0 0.0 1.0 0.01 + +#pragma parameter DG_WHITETINT_TITLE "[ GRADE - WHITE TINT ]:" 0 0 0 1 +#pragma parameter wlr " White-Red Tint" 1.0 0.0 2.0 0.01 +#pragma parameter wlg " White-Green Tint" 1.0 0.0 2.0 0.01 +#pragma parameter wlb " White-Blue Tint" 1.0 0.0 2.0 0.01 + +#pragma parameter DG_REDTINT_TITLE "[ GRADE - RED TINT ]:" 0 0 0 1 +#pragma parameter rg " Red-Green Tint" 0.0 -1.0 1.0 0.005 +#pragma parameter rb " Red-Blue Tint" 0.0 -1.0 1.0 0.005 + +#pragma parameter DG_GREENTINT_TITLE "[ GRADE - GREEN TINT ]:" 0 0 0 1 +#pragma parameter gr " Green-Red Tint" 0.0 -1.0 1.0 0.005 +#pragma parameter gb " Green-Blue Tint" 0.0 -1.0 1.0 0.005 + +#pragma parameter DG_BLUETINT_TITLE "[ GRADE - BLUE TINT ]:" 0 0 0 1 +#pragma parameter br " Blue-Red Tint" 0.0 -1.0 1.0 0.005 +#pragma parameter bg " Blue-Green Tint" 0.0 -1.0 1.0 0.005 +// #pragma parameter LUT_Size1 " LUT Size 1" 16.0 8.0 64.0 16.0 +// #pragma parameter LUT1_toggle " LUT 1 Toggle" 0.0 0.0 1.0 1.0 +// #pragma parameter LUT_Size2 " LUT Size 2" 64.0 0.0 64.0 16.0 +// #pragma parameter LUT2_toggle " LUT 2 Toggle" 0.0 0.0 1.0 1.0 + +#define g_grade_on global.g_grade_on +#define M_PI 3.1415926535897932384626433832795 +#define gamma_in params.g_gamma_in +#define gamma_out params.g_gamma_out +#define signal params.g_signal_type +#define crtgamut params.g_crtgamut +#define SPC params.g_space_out +#define hue_degrees params.g_hue_degrees +#define I_SHIFT params.g_I_SHIFT +#define Q_SHIFT params.g_Q_SHIFT +#define I_MUL params.g_I_MUL +#define Q_MUL params.g_Q_MUL +#define lum_fix params.g_lum_fix +#define vignette params.g_vignette +#define vstr (1 - params.g_vstr / 100) * 50 +#define vpower params.g_vpower / 100 +#define g_sat params.g_sat +#define vibr params.g_vibr +#define satr global.g_satr +#define satg global.g_satg +#define satb global.g_satb +#define lum params.g_lum +#define cntrst params.g_cntrst +#define mid params.g_mid +#define lift params.g_lift +#define blr params.blr +#define blg params.blg +#define blb params.blb +#define wlr params.wlr +#define wlg params.wlg +#define wlb params.wlb +#define rg params.rg +#define rb params.rb +#define gr params.gr +#define gb params.gb +#define br params.br +#define bg params.bg + +#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 = 1) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 2) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 3) uniform sampler2D Source; +layout(set = 0, binding = 4) uniform sampler2D PreCRTPass; +layout(set = 0, binding = 5) uniform sampler2D AfterglowPass; +// HSM Removed +// layout(set = 0, binding = 3) uniform sampler2D SamplerLUT1; +// layout(set = 0, binding = 4) uniform sampler2D SamplerLUT2; + + +///////////////////////// Color Space Transformations ////////////////////////// + + + +vec3 XYZ_to_RGB(vec3 XYZ, float CSPC){ + + // to sRGB + const mat3x3 sRGB = mat3x3( + 3.24081254005432130, -0.969243049621582000, 0.055638398975133896, + -1.53730857372283940, 1.875966310501098600, -0.204007431864738460, + -0.49858659505844116, 0.041555050760507584, 1.057129383087158200); + + // to DCI-P3 -D65- + const mat3x3 DCIP3 = mat3x3( + 2.49339652061462400, -0.82948720455169680, 0.035850685089826584, + -0.93134605884552000, 1.76266026496887200, -0.076182708144187930, + -0.40269458293914795, 0.023624641820788383, 0.957014024257659900); + + // to Rec.2020 + const mat3x3 rec2020 = mat3x3( + 1.71660947799682620, -0.66668272018432620, 0.017642205581068993, + -0.35566213726997375, 1.61647748947143550, -0.042776308953762054, + -0.25336012244224550, 0.01576850563287735, 0.942228555679321300); + + // to AdobeRGB + const mat3x3 Adobe = mat3x3( + 2.0415899753570557, -0.96924000978469850, 0.013439999893307686, + -0.5650100111961365, 1.87597000598907470, -0.118359997868537900, + -0.3447299897670746, 0.04156000167131424, 1.015169978141784700); + + return (CSPC == 3.0) ? Adobe * XYZ : (CSPC == 2.0) ? rec2020 * XYZ : (CSPC == 1.0) ? DCIP3 * XYZ : sRGB * XYZ; +} + +vec3 RGB_to_XYZ(vec3 RGB, float CSPC){ + + // from sRGB + const mat3x3 sRGB = mat3x3( + 0.41241079568862915, 0.21264933049678802, 0.019331756979227066, + 0.35758456587791443, 0.71516913175582890, 0.119194857776165010, + 0.18045382201671600, 0.07218152284622192, 0.950390160083770800); + + // from DCI-P3 -D65- + const mat3x3 DCIP3 = mat3x3( + 0.48659050464630127, 0.22898375988006592, 0.00000000000000000, + 0.26566821336746216, 0.69173991680145260, 0.04511347413063049, + 0.19819043576717377, 0.07927616685628891, 1.04380297660827640); + + // from Rec.2020 + const mat3x3 rec2020 = mat3x3( + 0.63697350025177000, 0.24840137362480164, 0.00000000000000000, + 0.15294560790061950, 0.67799961566925050, 0.04253686964511871, + 0.11785808950662613, 0.03913172334432602, 1.06084382534027100); + + // from AdobeRGB + const mat3x3 Adobe = mat3x3( + 0.57666999101638790, 0.2973400056362152, 0.02703000046312809, + 0.18556000292301178, 0.6273599863052368, 0.07068999856710434, + 0.18822999298572540, 0.0752900019288063, 0.9913399815559387); + + return (CSPC == 3.0) ? Adobe * RGB : (CSPC == 2.0) ? rec2020 * RGB : (CSPC == 1.0) ? DCIP3 * RGB : sRGB * RGB; +} + + +vec3 XYZtoYxy(vec3 XYZ){ + + float XYZrgb = XYZ.r+XYZ.g+XYZ.b; + float Yxyg = (XYZrgb <= 0.0) ? 0.3805 : XYZ.r / XYZrgb; + float Yxyb = (XYZrgb <= 0.0) ? 0.3769 : XYZ.g / XYZrgb; + return vec3(XYZ.g, Yxyg, Yxyb); +} + +vec3 YxytoXYZ(vec3 Yxy){ + + float Xs = Yxy.r * (Yxy.g/Yxy.b); + float Xsz = (Yxy.r <= 0.0) ? 0.0 : 1.0; + vec3 XYZ = vec3(Xsz,Xsz,Xsz) * vec3(Xs, Yxy.r, (Xs/Yxy.g)-Xs-Yxy.r); + return XYZ; +} + +///////////////////////// White Point Mapping ///////////////////////// +// +// +// PAL: D65 NTSC-U: D65 NTSC-J: CCT NTSC-J NTSC-FCC: C +// PAL: 6504K NTSC-U: 6504K NTSC-J: 8942K NTSC-FCC: 6780K +// 0.3127 0.3290 0.3127 0.3290 0.281 0.311 0.310 0.316 + +vec3 wp_adjust(float temperature, vec3 color){ + + float temp3 = pow(10.,3.) / temperature; + float temp6 = pow(10.,6.) / pow(temperature, 2.); + float temp9 = pow(10.,9.) / pow(temperature, 3.); + + vec3 wp = vec3(1.); + + wp.x = (temperature <= 7000.) ? 0.244063 + 0.09911 * temp3 + 2.9678 * temp6 - 4.6070 * temp9 : \ + 0.237040 + 0.24748 * temp3 + 1.9018 * temp6 - 2.0064 * temp9 ; + + wp.y = -3.000 * pow(wp.x,2.) + 2.870 * wp.x - 0.275; + wp.z = 1. - wp.x - wp.y; + + const mat3x3 CAT02 = mat3x3( + 0.7328, 0.4296, -0.1624, + -0.70360, 1.6975, 0.0061, + 0.003, -0.0136, 0.9834); + + vec3 fw_trans = (vec3(wp.x/wp.y,1.,wp.z/wp.y) * CAT02) / (vec3(0.95045,1.,1.088917) * CAT02) ; + + return color.xyz * fw_trans.xyz ; + +} + +//////////////////////////////////////////////////////////////////////////////// + + +// Monitor Curve Functions: https://github.com/ampas/aces-dev +//---------------------------------------------------------------------- + + +float moncurve_f( float color, float gamma, float offs) +{ + // Forward monitor curve + color = clamp(color, 0.0, 1.0); + float fs = (( gamma - 1.0) / offs) * pow( offs * gamma / ( ( gamma - 1.0) * ( 1.0 + offs)), gamma); + float xb = offs / ( gamma - 1.0); + + color = ( color > xb) ? pow( ( color + offs) / ( 1.0 + offs), gamma) : color * fs; + return color; +} + + +vec3 moncurve_f_f3( vec3 color, float gamma, float offs) +{ + color.r = moncurve_f( color.r, gamma, offs); + color.g = moncurve_f( color.g, gamma, offs); + color.b = moncurve_f( color.b, gamma, offs); + return color.rgb; +} + + +float moncurve_r( float color, float gamma, float offs) +{ + // Reverse monitor curve + color = clamp(color, 0.0, 1.0); + float yb = pow( offs * gamma / ( ( gamma - 1.0) * ( 1.0 + offs)), gamma); + float rs = pow( ( gamma - 1.0) / offs, gamma - 1.0) * pow( ( 1.0 + offs) / gamma, gamma); + + color = ( color > yb) ? ( 1.0 + offs) * pow( color, 1.0 / gamma) - offs : color * rs; + return color; +} + + +vec3 moncurve_r_f3( vec3 color, float gamma, float offs) +{ + color.r = moncurve_r( color.r, gamma, offs); + color.g = moncurve_r( color.g, gamma, offs); + color.b = moncurve_r( color.b, gamma, offs); + return color.rgb; +} + + +//-------------------------- Luma Functions ---------------------------- + + +// Performs better in gamma encoded space +float contrast_sigmoid(float color, float cont, float pivot){ + + cont = pow(cont + 1., 3.); + + float knee = 1. / (1. + exp(cont * pivot)); + float shldr = 1. / (1. + exp(cont * (pivot - 1.))); + + color = (1. / (1. + exp(cont * (pivot - color))) - knee) / (shldr - knee); + + return color; +} + + +// Performs better in gamma encoded space +float contrast_sigmoid_inv(float color, float cont, float pivot){ + + cont = pow(cont - 1., 3.); + + float knee = 1. / (1. + exp (cont * pivot)); + float shldr = 1. / (1. + exp (cont * (pivot - 1.))); + + color = pivot - log(1. / (color * (shldr - knee) + knee) - 1.) / cont; + + return color; +} + + +float rolled_gain(float color, float gain){ + + float gx = abs(gain) + 0.001; + float anch = (gain > 0.0) ? 0.5 / (gx / 2.0) : 0.5 / gx; + color = (gain > 0.0) ? color * ((color - anch) / (1 - anch)) : color * ((1 - anch) / (color - anch)) * (1 - gain); + + return color; +} + + +vec4 rolled_gain_v4(vec4 color, float gain){ + + color.r = rolled_gain(color.r, gain); + color.g = rolled_gain(color.g, gain); + color.b = rolled_gain(color.b, gain); + + return vec4(color.rgb, 1.0); +} + + +float SatMask(float color_r, float color_g, float color_b) +{ + float max_rgb = max(color_r, max(color_g, color_b)); + float min_rgb = min(color_r, min(color_g, color_b)); + float msk = clamp((max_rgb - min_rgb) / (max_rgb + min_rgb), 0.0, 1.0); + return msk; +} + + +// This shouldn't be necessary but it seems some undefined values can +// creep in and each GPU vendor handles that differently. This keeps +// all values within a safe range +vec3 mixfix(vec3 a, vec3 b, float c) +{ + return (a.z < 1.0) ? mix(a, b, c) : a; +} + + +vec4 mixfix_v4(vec4 a, vec4 b, float c) +{ + return (a.z < 1.0) ? mix(a, b, c) : a; +} + + +//---------------------- Range Expansion/Compression ------------------- + + +// to Studio Swing/Broadcast Safe/SMPTE legal/Limited Range +vec3 PCtoTV(vec3 col, float luma_swing, float Umax, float Vmax, float max_swing, bool rgb_in) +{ + col *= 255.; + Umax = (max_swing == 1.0) ? Umax * 224. : Umax * 239.; + Vmax = (max_swing == 1.0) ? Vmax * 224. : Vmax * 239.; + + col.x = (luma_swing == 1.0) ? ((col.x * 219.) / 255.) + 16. : col.x; + col.y = (rgb_in == true) ? ((col.y * 219.) / 255.) + 16. : (((col.y - 128.) * (Umax * 2.)) / 255.) + Umax; + col.z = (rgb_in == true) ? ((col.z * 219.) / 255.) + 16. : (((col.z - 128.) * (Vmax * 2.)) / 255.) + Vmax; + return col.xyz / 255.; +} + + +// to Full Swing/Full Range +vec3 TVtoPC(vec3 col, float luma_swing, float Umax, float Vmax, float max_swing, bool rgb_in) +{ + col *= 255.; + Umax = (max_swing == 1.0) ? Umax * 224. : Umax * 239.; + Vmax = (max_swing == 1.0) ? Vmax * 224. : Vmax * 239.; + + float colx = (luma_swing == 1.0) ? ((col.x - 16.) / 219.) * 255. : col.x; + float coly = (rgb_in == true) ? ((col.y - 16.) / 219.) * 255. : (((col.y - Umax) / (Umax * 2.)) * 255.) + 128.; + float colz = (rgb_in == true) ? ((col.z - 16.) / 219.) * 255. : (((col.z - Vmax) / (Vmax * 2.)) * 255.) + 128.; + return vec3(colx,coly,colz) / 255.; +} + + +//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/ + + +//--------------------- ITU-R BT.470/601 (M) (1953) -------------------- + + +// FCC (Sanctioned) YIQ matrix +vec3 RGB_FCC(vec3 col) + { + const mat3 conv_mat = mat3( + 0.299996928307425, 0.590001575542717, 0.110001496149858, + 0.599002392519453, -0.277301256521204, -0.321701135998249, + 0.213001700342824, -0.525101205289350, 0.312099504946526); + + return col.rgb * conv_mat; + } + +// FCC (Sanctioned) YIQ matrix (inverse) +vec3 FCC_RGB(vec3 col) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.946882217090069, 0.623556581986143, + 1.0000000, -0.274787646298978, -0.635691079187380, + 1.0000000, -1.108545034642030, 1.709006928406470); + + return col.rgb * conv_mat; + } + + +//--------------------- SMPTE RP 145 (C), 170M (1987) ------------------ + + +vec3 RGB_YIQ(vec3 col) + { + const mat3 conv_mat = mat3( + 0.2990, 0.5870, 0.1140, + 0.5959, -0.2746, -0.3213, + 0.2115, -0.5227, 0.3112); + + return col.rgb * conv_mat; + } + +vec3 YIQ_RGB(vec3 col) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.956, 0.619, + 1.0000000, -0.272, -0.647, + 1.0000000, -1.106, 1.703); + + return col.rgb * conv_mat; + } + +//----------------------- ITU-R BT.470/601 (B/G) ----------------------- + + +vec3 r601_YUV(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.299000, 0.587000, 0.114000, + -0.147407, -0.289391, 0.436798, + 0.614777, -0.514799, -0.099978); + + return RGB.rgb * conv_mat; + } + +vec3 YUV_r601(vec3 RGB) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.00000000000000000, 1.14025080204010000, + 1.0000000, -0.39393067359924316, -0.58080917596817020, + 1.0000000, 2.02839756011962900, -0.00000029356581166); + + return RGB.rgb * conv_mat; + } + +// Custom - not Standard +vec3 YUV_r709(vec3 YUV) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.0000000000000000, 1.14025092124938960, + 1.0000000, -0.2047683298587799, -0.33895039558410645, + 1.0000001, 2.0283975601196290, 0.00000024094399364); + + return YUV.rgb * conv_mat; + } + +// Custom - not Standard +vec3 r709_YUV(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.2126000, 0.715200, 0.0722000, + -0.1048118, -0.3525936, 0.4574054, + 0.6905498, -0.6272304, -0.0633194); + + return RGB.rgb * conv_mat; + } + + +//------------------------- SMPTE-240M Y�PbPr -------------------------- + + +// Umax 0.886 +// Vmax 0.700 +// RGB to YPbPr -full to limited range- with Rec.601 primaries +vec3 r601_YCC(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.299, 0.587, 0.114, + -0.16873589164785553047, -0.33126410835214446953, 0.500, + 0.500, -0.41868758915834522111, -0.08131241084165477889); + + return RGB.rgb * conv_mat; + } + +// YPbPr to RGB -limited to full range- with Rec.601 primaries +vec3 YCC_r601(vec3 YUV) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.000, 1.402, + 1.0000000, -0.34413628620102214651, -0.71413628620102214651, + 1.0000000, 1.772, 0.000); + + return YUV.rgb * conv_mat; + } + +// Umax 0.53890924768269023496443198965294 +// Vmax 0.63500127000254000508001016002032 +// RGB to YPbPr -full range in-gamut- with Rec.709 primaries +vec3 r709_YCC(vec3 RGB) + { + const mat3 conv_mat = mat3( + 0.2126, 0.7152, 0.0722, + -0.11457210605733994395, -0.38542789394266005605, 0.5000, + 0.5000, -0.45415290830581661163, -0.04584709169418338837); + + return RGB.rgb * conv_mat; + } + +// YPbPr to RGB -full range in-gamut- with Rec.709 primaries +vec3 YCC_r709(vec3 YUV) + { + const mat3 conv_mat = mat3( + 1.0000000, 0.00000000000000000000, 1.5748, + 1.0000000, -0.18732427293064876957, -0.46812427293064876957, + 1.0000000, 1.8556, 0.00000000000000000000); + + return YUV.rgb * conv_mat; + } + + +//------------------------- IPT -------------------------- + + +const mat3 LMS = +mat3( + 0.4002, 0.7076, -0.0808, +-0.2263, 1.1653, 0.0457, + 0.0, 0.0, 0.9182); + +const mat3 IPT = +mat3( + 0.4000, 0.4000, 0.2000, + 4.4550, -4.8510, 0.3960, + 0.8056, 0.3572, -1.1628); + + + +//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/ + + +// ITU-R BT.470/601 (M) (proof of concept, actually never used) +// SMPTE 170M-1999 +// NTSC-FCC 1953 Standard Phosphor (use with temperature C: 6780K) +const mat3 NTSC_FCC_transform = +mat3( + 0.60699284076690670, 0.2989666163921356, 0.00000000000000000, + 0.17344850301742554, 0.5864211320877075, 0.06607561558485031, + 0.20057128369808197, 0.1146121546626091, 1.11746847629547120); + +// ITU-R BT.470/601 (M) +// Conrac 7211N19 CRT Phosphor +const mat3 Conrac_transform = +mat3( + 0.55842006206512450, 0.28580552339553833, 0.03517606481909752, + 0.20613566040992737, 0.63714659214019780, 0.09369802474975586, + 0.18589359521865845, 0.07704800367355347, 0.96004259586334230); + +// NTSC-J (use with D93 white point) +// Sony Trinitron KV-20M20 +const mat3 Sony20_20_transform = +mat3( + 0.33989441394805910, 0.18490256369113922, 0.019034087657928467, + 0.33497872948646545, 0.71182984113693240, 0.149544075131416320, + 0.22866378724575043, 0.10326752066612244, 1.143318891525268600); + +// SMPTE-C - Measured Average Phosphor (1979-1994) +const mat3 P22_transform = +mat3( + 0.4665636420249939, 0.25661000609397890, 0.005832045804709196, + 0.3039233088493347, 0.66820019483566280, 0.105618737637996670, + 0.1799621731042862, 0.07518967241048813, 0.977465748786926300); + +// SMPTE RP 145-1994 (SMPTE-C), 170M-1999 +// SMPTE-C - Standard Phosphor (Rec.601 NTSC) +const mat3 SMPTE_transform = +mat3( + 0.39354196190834045, 0.21238772571086884, 0.01874009333550930, + 0.36525884270668030, 0.70106136798858640, 0.11193416267633438, + 0.19164848327636720, 0.08655092865228653, 0.95824241638183590); + +// SMPTE RP 145-1994 (SMPTE-C), 170M-1999 +// NTSC-J - Standard Phosphor (https://web.archive.org/web/20130413104152/http://arib.or.jp/english/html/overview/doc/4-TR-B09v1_0.pdf) +const mat3 NTSC_J_transform = +mat3( + 0.39603787660598755, 0.22429330646991730, 0.02050681784749031, + 0.31201449036598206, 0.67417418956756590, 0.12814880907535553, + 0.24496731162071228, 0.10153251141309738, 1.26512730121612550); + +// ITU-R BT.470/601 (B/G) +// EBU Tech.3213-E PAL - Standard Phosphor for Studio Monitors +const mat3 EBU_transform = +mat3( + 0.43194326758384705, 0.22272075712680817, 0.020247340202331543, + 0.34123489260673523, 0.70600330829620360, 0.129433929920196530, + 0.17818950116634370, 0.07127580046653748, 0.938464701175689700); + + + + +//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/ + + + + + +void main() +{ + + // Guest.r Addition + vec4 imgColor = texture(PreCRTPass, vTexCoord.xy); + vec4 aftglow = texture(AfterglowPass, vTexCoord.xy); + + float w = 1.0-aftglow.w; + + float l = length(aftglow.rgb); + aftglow.rgb = AS*w*normalize(pow(aftglow.rgb + 0.01, vec3(asat)))*l; + // End Addition + +// Retro Sega Systems: Genesis, 32x, CD and Saturn 2D had color palettes designed in TV levels to save on transformations. + float lum_exp = (lum_fix == 1.0) ? (255./239.) : 1.; + + //HSM / Guest.r Added + vec3 src = imgColor.rgb * lum_exp; + // End Addition + + if (g_grade_on == 0) + { + FragColor = imgColor; + return; + } + +// Assumes framebuffer in Rec.601 with baked gamma +// make a YUV * NTSC Phosphor option too and a FCC * NTSC phosphor + vec3 col = (crtgamut == 3.0) ? r601_YUV(src) : \ + (crtgamut == 2.0) ? RGB_YIQ(src) : \ + (crtgamut == -3.0) ? RGB_FCC(src) : \ + (crtgamut == -4.0) ? RGB_FCC(src) : \ + RGB_YIQ(src) ; + + +// Clipping Logic / Gamut Limiting + vec2 UVmax = (crtgamut == 3.0) ? vec2(0.436798, 0.614777) : \ + (crtgamut == -4.0) ? vec2(0.599002392519453, 0.52510120528935) : \ + (crtgamut == -3.0) ? vec2(0.599002392519453, 0.52510120528935) : \ + vec2(0.5959, 0.5227) ; + + col = clamp(col.xyz, vec3(0.0, -UVmax.x, -UVmax.y), vec3(1.0, UVmax.x, UVmax.y)); + + + col = (crtgamut == 3.0) ? col : \ + (crtgamut == 2.0) ? col : \ + (crtgamut == -3.0) ? PCtoTV(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + (crtgamut == -4.0) ? PCtoTV(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + PCtoTV(col, 1.0, UVmax.x, UVmax.y, 1.0, false) ; + + +// YIQ/YUV Analogue Color Controls (HUE + Color Shift + Color Burst) + float hue_radians = hue_degrees * (M_PI / 180.0); + float hue = atan(col.z, col.y) + hue_radians; + float chroma = sqrt(col.z * col.z + col.y * col.y); + col = vec3(col.x, chroma * cos(hue), chroma * sin(hue)); + + col.y = (mod((col.y + 1.0) + I_SHIFT, 2.0) - 1.0) * I_MUL; + col.z = (mod((col.z + 1.0) + Q_SHIFT, 2.0) - 1.0) * Q_MUL; + + +// Back to RGB + col = (crtgamut == 3.0) ? col : \ + (crtgamut == 2.0) ? col : \ + (crtgamut == -3.0) ? TVtoPC(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + (crtgamut == -4.0) ? TVtoPC(col, 1.0, UVmax.x, UVmax.y, 1.0, false) : \ + TVtoPC(col, 1.0, UVmax.x, UVmax.y, 1.0, false) ; + + col = (crtgamut == 3.0) ? YUV_r601(col) : \ + (crtgamut == 2.0) ? YIQ_RGB(col) : \ + (crtgamut == -3.0) ? FCC_RGB(col) : \ + (crtgamut == -4.0) ? FCC_RGB(col) : \ + YIQ_RGB(col) ; + +// Gamut Limiting + col = r601_YCC(clamp(col, 0., 1.)); + col = (signal == 0.0) ? src : YCC_r601(clamp(col, vec3(0.0, -.886,-.700), vec3(1.0, .886,.700))); + + +//_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \ + + +// Developer baked CRT gamma (2.20 - 2.25) + col = moncurve_f_f3(col, gamma_in, 0.099); + +// CRT Phosphor Gamut + mat3 m_in; + + if (crtgamut == -4.0) { m_in = NTSC_FCC_transform; } else + if (crtgamut == -3.0) { m_in = Conrac_transform; } else + if (crtgamut == -2.0) { m_in = Sony20_20_transform; } else + if (crtgamut == -1.0) { m_in = SMPTE_transform; } else + if (crtgamut == 1.0) { m_in = P22_transform; } else + if (crtgamut == 2.0) { m_in = NTSC_J_transform; } else + if (crtgamut == 3.0) { m_in = EBU_transform; } + + vec3 gamut = m_in*col; + +// White Point Mapping + vec3 wp = (crtgamut == -4.0) ? wp_adjust(global.wp_temperature - (6404. - 6504.), gamut) : \ + (crtgamut == -3.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + (crtgamut == -2.0) ? wp_adjust(global.wp_temperature - (7600. - 6504.), gamut) : \ + (crtgamut == -1.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + (crtgamut == 1.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + (crtgamut == 2.0) ? wp_adjust(global.wp_temperature - (7400. - 6504.), gamut) : \ + (crtgamut == 3.0) ? wp_adjust(global.wp_temperature - (6504. - 6504.), gamut) : \ + wp_adjust(global.wp_temperature, gamut) ; + + vec3 adj = clamp(XYZ_to_RGB(wp, SPC), 0., 1.); + + +// Guest Emulated CRT Electron Gun gamma (2.35 - 2.50) (phosphor gamma brings it up back to ~2.222) + adj = moncurve_r_f3(crtgamut == 0.0 ? col : adj, pow(gamma_in, 2.) / gamma_out, 0.099); + + +/* HSM Removed +// Look LUT - (in SPC space) + float red = (adj.r * (global.LUT_Size1 - 1.0) + 0.4999) / (global.LUT_Size1 * global.LUT_Size1); + float green = (adj.g * (global.LUT_Size1 - 1.0) + 0.4999) / global.LUT_Size1; + float blue1 = (floor(adj.b * (global.LUT_Size1 - 1.0)) / global.LUT_Size1) + red; + float blue2 = (ceil(adj.b * (global.LUT_Size1 - 1.0)) / global.LUT_Size1) + red; + float mixer = clamp(max((adj.b - blue1) / (blue2 - blue1), 0.0), 0.0, 32.0); + vec3 color1 = texture(SamplerLUT1, vec2(blue1, green)).rgb; + vec3 color2 = texture(SamplerLUT1, vec2(blue2, green)).rgb; + vec3 vcolor = (global.LUT1_toggle == 0.0) ? adj : mixfix(color1, color2, mixer); +*/ + +// HSM Added +vec3 vcolor = adj; + +// OETF - Opto-Electronic Transfer Function (Rec.709 does a Dim to Dark Surround adaptation) + vcolor = (SPC == 3.0) ? clamp(pow(vcolor, vec3(563./256.)), 0., 1.) : \ + (SPC == 2.0) ? moncurve_f_f3(vcolor, 2.20 + 0.022222, 0.0993) : \ + (SPC == 1.0) ? clamp(pow(vcolor, vec3(2.20 + 0.40)), 0., 1.) : \ + (SPC == 0.0) ? moncurve_f_f3(vcolor, 2.20 + 0.20, 0.0550) : \ + clamp(pow(pow(vcolor, vec3(1./1.019264)), vec3(2.20 + 0.20)), 0., 1.) ; + + + vcolor = RGB_to_XYZ(vcolor, SPC); + + +// Sigmoidal Contrast + vec3 Yxy = XYZtoYxy(vcolor); + float toGamma = clamp(moncurve_r(Yxy.r, 2.40, 0.055), 0., 1.); + toGamma = (Yxy.r > 0.5) ? contrast_sigmoid_inv(toGamma, 2.3, 0.5) : toGamma; + float sigmoid = (cntrst > 0.0) ? contrast_sigmoid(toGamma, cntrst, mid) : contrast_sigmoid_inv(toGamma, cntrst, mid); + vec3 contrast = vec3(moncurve_f(sigmoid, 2.40, 0.055), Yxy.g, Yxy.b); + vec3 XYZsrgb = clamp(XYZ_to_RGB(YxytoXYZ(contrast), SPC), 0., 1.); + contrast = (cntrst == 0.0) ? XYZ_to_RGB(vcolor, SPC) : XYZsrgb; + + +// Vignetting & Black Level +/* HSM Removed + vec2 vpos = vTexCoord*(global.OriginalSize.xy/global.SourceSize.xy); +*/ + + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + vec2 derezed_size = HSM_GetNegativeCropAddedSize(); + vec2 cur_pixel_pos = vTexCoord * derezed_size; + vec2 cropped_size = HSM_ROTATE_CORE_IMAGE > 0.5 ? vec2(CROPPED_ROTATED_SIZE.y, CROPPED_ROTATED_SIZE.x) : CROPPED_ROTATED_SIZE; + vec2 raw_size = HSM_ROTATE_CORE_IMAGE > 0.5 ? vec2(ROTATED_CORE_PREPPED_SIZE.y, ROTATED_CORE_PREPPED_SIZE.x) : ROTATED_CORE_PREPPED_SIZE; + vec2 sample_start_area = HSM_ROTATE_CORE_IMAGE > 0.5 ? vec2(SAMPLE_AREA_START_PIXEL_COORD.y, SAMPLE_AREA_START_PIXEL_COORD.x) : SAMPLE_AREA_START_PIXEL_COORD; + vec2 pos_in_cropped_coords = (cur_pixel_pos - sample_start_area) / cropped_size; + pos_in_cropped_coords = (pos_in_cropped_coords - 0.5) * (1 - 2 * MAX_NEGATIVE_CROP) + 0.5; + + vec2 vpos = pos_in_cropped_coords; + + if (vignette > 0.5) + { + vpos = (vpos - 0.5) / (1 - 2 * MAX_NEGATIVE_CROP + 0.01) + 0.5; + vpos *= 1.0 - vpos.xy; + float vig = vpos.x * vpos.y * vstr; + vig = min(pow(vig, vpower), 1.0); + contrast *= (vignette == 1.0) ? vig : 1.0; + } + contrast += (lift / 20.0) * (1.0 - contrast); + + +// RGB Related Transforms + vec4 screen = vec4(max(contrast, 0.0), 1.0); + float sat = g_sat + 1.0; + + // r g b alpha ; alpha does nothing for our purposes + mat4 color = mat4(wlr, rg, rb, 0.0, //red tint + gr, wlg, gb, 0.0, //green tint + br, bg, wlb, 0.0, //blue tint + blr/20., blg/20., blb/20., 0.0); //black tint + + + vec3 coeff = (SPC == 3.0) ? vec3(0.29734000563621520, 0.62735998630523680, 0.07529000192880630) : \ + (SPC == 2.0) ? vec3(0.24840137362480164, 0.67799961566925050, 0.03913172334432602) : \ + (SPC == 1.0) ? vec3(0.22898375988006592, 0.69173991680145260, 0.07927616685628891) : \ + vec3(0.21264933049678802, 0.71516913175582890, 0.07218152284622192) ; + + + mat3 adjust = mat3((1.0 - sat) * coeff.x + sat, (1.0 - sat) * coeff.x, (1.0 - sat) * coeff.x, + (1.0 - sat) * coeff.y, (1.0 - sat) * coeff.y + sat, (1.0 - sat) * coeff.y, + (1.0 - sat) * coeff.z, (1.0 - sat) * coeff.z, (1.0 - sat) * coeff.z + sat); + + + screen = clamp(rolled_gain_v4(screen, clamp(lum, -0.49, 0.99)), 0., 1.); + screen = color * screen; + +// HUE vs SAT + vec3 src_h = RGB_to_XYZ(screen.rgb, SPC) * LMS; + src_h.x = src_h.x >= 0.0 ? pow(src_h.x, 0.43) : -pow(-src_h.x, 0.43); + src_h.y = src_h.y >= 0.0 ? pow(src_h.y, 0.43) : -pow(-src_h.y, 0.43); + src_h.z = src_h.z >= 0.0 ? pow(src_h.z, 0.43) : -pow(-src_h.z, 0.43); + + src_h.xyz *= IPT; + + float hue_at = atan(src_h.z, src_h.y); + chroma = sqrt(src_h.z * src_h.z + src_h.y * src_h.y); + + float hue_radians_r = -40.0 * (M_PI / 180.0); + float hue_r = chroma * cos(hue_at + hue_radians_r) * 2.; + + float hue_radians_g = 230.0 * (M_PI / 180.0); + float hue_g = chroma * cos(hue_at + hue_radians_g) * 2.; + + float hue_radians_b = 100.0 * (M_PI / 180.0); + float hue_b = chroma * cos(hue_at + hue_radians_b) * 2.; + + float msk = dot(clamp(vec3(hue_r, hue_g, hue_b), 0., 1.), vec3(satr, satg, satb)*(-1.)); + src_h = mixfix(screen.rgb, vec3(dot(coeff, screen.rgb)), msk); + + float sat_msk = (vibr < 0.0) ? 1.0 - abs(SatMask(src_h.x, src_h.y, src_h.z) - 1.0) * abs(vibr) : \ + 1.0 - (SatMask(src_h.x, src_h.y, src_h.z) * vibr) ; + + src_h = mixfix(src_h, clamp(adjust * src_h, 0., 1.), clamp(sat_msk, 0., 1.)); + + +// EOTF - Electro-Optical Transfer Function (Rec.709 does a Dim to Dark Surround adaptation) + vec3 TRC = (SPC == 3.0) ? clamp(pow(src_h, vec3(1./(563./256.))), 0., 1.) : \ + (SPC == 2.0) ? moncurve_r_f3(src_h, 2.20 + 0.022222, 0.0993) : \ + (SPC == 1.0) ? clamp(pow(src_h, vec3(1./(2.20 + 0.40))), 0., 1.) : \ + (SPC == 0.0) ? moncurve_r_f3(src_h, 2.20 + 0.20, 0.0550) : \ + clamp(pow(pow(src_h, vec3(1.019264)), vec3(1./(2.20 + 0.20))), 0., 1.) ; + + /* HSM Removed +// Technical LUT - (in SPC space) + float red_2 = (TRC.r * (global.LUT_Size2 - 1.0) + 0.4999) / (global.LUT_Size2 * global.LUT_Size2); + float green_2 = (TRC.g * (global.LUT_Size2 - 1.0) + 0.4999) / global.LUT_Size2; + float blue1_2 = (floor(TRC.b * (global.LUT_Size2 - 1.0)) / global.LUT_Size2) + red_2; + float blue2_2 = (ceil(TRC.b * (global.LUT_Size2 - 1.0)) / global.LUT_Size2) + red_2; + float mixer_2 = clamp(max((TRC.b - blue1_2) / (blue2_2 - blue1_2), 0.0), 0.0, 32.0); + vec3 color1_2 = texture(SamplerLUT2, vec2(blue1_2, green_2)).rgb; + vec3 color2_2 = texture(SamplerLUT2, vec2(blue2_2, green_2)).rgb; + vec3 LUT2_output = mixfix(color1_2, color2_2, mixer_2); + + LUT2_output = (global.LUT2_toggle == 0.0) ? TRC : LUT2_output; + + + FragColor = vec4(LUT2_output, 1.0); + */ + FragColor = vec4(TRC + aftglow.rgb, imgColor.a); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/guest-extras/hsm-g-sharp_resampler.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/guest-extras/hsm-g-sharp_resampler.slang new file mode 100644 index 0000000..defb663 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/guest-extras/hsm-g-sharp_resampler.slang @@ -0,0 +1,147 @@ +#version 450 + +/* + G-sharp resampler - dynamic range, resizable + + Copyright (C) 2020 - 2021 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. + + Anti-Ringing inspired by Hyllian + +*/ + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float GSHARP_ON; + float SIGMA_HV; + float HSHARP0; + float HAR; + float SHAR; +} params; + +#pragma parameter GSHARP_TITLE "[ G-SHARP RESAMPLER ]:" 0 0 0.01 0.01 + +#pragma parameter GSHARP_ON " G-SHARP ON" 0 0 1 1 +#define GSHARP_ON params.GSHARP_ON + +#pragma parameter HSHARP0 " Filter Range" 1.2 1.0 6.0 0.1 +#define HSHARP0 params.HSHARP0 + +#pragma parameter SIGMA_HV " Gaussian Blur Sigma" 0.75 0.1 7.0 0.05 +#define SIGMA_HV params.SIGMA_HV + +#pragma parameter SHAR " Sharpness Definition" 0.5 0.0 2.0 0.05 +#define SHAR params.SHAR + +#pragma parameter HAR " Anti-Ringing" 0.5 0.0 1.0 0.10 +#define HAR params.HAR + +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; + +#define COMPAT_TEXTURE(c,d) texture(c,d) +#define SourceSize params.SourceSize + +float invsqrsigma_h = 1.0/(2.0*SIGMA_HV*SIGMA_HV); + +float gaussian(float x, float y) +{ + return exp(-(x*x + y*y)*invsqrsigma_h); +} + +void main() +{ + if (GSHARP_ON == 0) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec2 f = fract(SourceSize.xy * vTexCoord.xy); + f = 0.5 - f; + vec2 tex = floor(SourceSize.xy * vTexCoord)*SourceSize.zw + 0.5*SourceSize.zw; + vec2 dx = vec2(SourceSize.z, 0.0); + vec2 dy = vec2(0.0, SourceSize.w); + + vec3 colorx = 0.0.xxx; + vec3 colory = 0.0.xxx; + float wx, wy; + float wsumx = 0.0; + float wsumy = 0.0; + vec3 pixel; + float x; + + vec3 xcmax = 0.0.xxx; + vec3 xcmin = 1.0.xxx; + + float sharp = gaussian(HSHARP0, 0.0); + float maxsharp = 0.07; + float FPR = HSHARP0; + float fpx = 1.0; + + float LOOPSIZE = ceil(2.0*FPR); + float y = -LOOPSIZE; + + do + { + x = -LOOPSIZE; + + do + { + pixel = COMPAT_TEXTURE(Source, tex + x*dx + y*dy).rgb; + + wx = gaussian(x+f.x, y+f.y) - sharp; + fpx = (sqrt(dot(vec2(x+f.x,y+f.y),vec2(x+f.x,y+f.y)))-FPR)/FPR; + if (((x*x) + (y*y)) < 1.25*FPR) { xcmax = max(xcmax, pixel); xcmin = min(xcmin, pixel); } + if (wx < 0.0) wx = clamp(wx, mix(-maxsharp, 0.0, pow(abs(fpx), SHAR)), 0.0); + colorx = colorx + wx * pixel; + wsumx = wsumx + wx; + x = x + 1.0; + + } while (x <= LOOPSIZE); + + y = y + 1.0; + + } while (y <= LOOPSIZE); + + vec3 color = colorx/wsumx; + + color = mix(clamp(color, 0.0, 1.0), clamp(color, xcmin, xcmax), HAR); + + FragColor = vec4(color, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang new file mode 100644 index 0000000..54a1318 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-afterglow0.slang @@ -0,0 +1,81 @@ +#version 450 + +/* + Phosphor Afterglow Shader pass 0 + + Copyright (C) 2020 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 +{ + float GDV_AFTERGLOW_THRESHOLD; + float PR, PG, PB; +} params; + +#pragma parameter GDV_GDV_ADV_TITLE "[ --- GUEST-DrVenom Advanced --- ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter bogus_afterglow "[ AFTERGLOW ]:" 0.0 0.0 1.0 1.0 +#pragma parameter GDV_AFTERGLOW_THRESHOLD " Threshold ( Afterglow Appears Under Threshold )" 0.5 0.0 100 0.5 +#pragma parameter PR " Persistence Red -- PR" 0.32 0.0 0.50 0.01 +#pragma parameter PG " Persistence Green -- PG" 0.32 0.0 0.50 0.01 +#pragma parameter PB " Persistence Blue -- PB" 0.32 0.0 0.50 0.01 + +#define GDV_AFTERGLOW_THRESHOLD params.GDV_AFTERGLOW_THRESHOLD / 100 +#define PR params.PR +#define PG params.PG +#define PB params.PB + +#define COMPAT_TEXTURE(c,d) texture(c,d) + +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 PreCRTPass; +layout(set = 0, binding = 3) uniform sampler2D AfterglowPassFeedback; + +#define TEX0 vTexCoord + + +void main() +{ + vec3 color = COMPAT_TEXTURE(PreCRTPass, TEX0.xy).rgb; + vec3 accumulate = COMPAT_TEXTURE(AfterglowPassFeedback, TEX0.xy).rgb; + + float w = 1.0; + if ((color.r + color.g + color.b < GDV_AFTERGLOW_THRESHOLD)) { w = 0.0; } + + vec3 result = mix( max(mix(color, accumulate, 0.49 + vec3(PR, PG, PB))- 3.0/255.0, 0.0), color, w); + + FragColor = vec4(result, w); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang new file mode 100644 index 0000000..eeecfa1 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-avg-lum.slang @@ -0,0 +1,111 @@ +#version 450 + +/* + Average Luminance Shader + + Copyright (C) 2018-2020 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. + + Thanks to HunterK for the mipmap hint. :D +*/ + +layout(push_constant) uniform Push +{ + uint FrameCount; + vec4 SourceSize; + float lsmooth; +} params; + +// #pragma parameter lsmooth "Raster Bloom Effect Smoothing" 0.70 0.50 0.99 0.01 + +// #define lsmooth params.lsmooth + +#define lsmooth 0.7 + +#define COMPAT_TEXTURE(c,d) texture(c,d) +#define SourceSize params.SourceSize +#define TEX0 vTexCoord + +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 * 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 AvgLumPassFeedback; + +// Reference: http://www.compuphase.com/cmetric.htm +// Reference: ScaleFX, author Sp00kyFox + +float dist(vec3 A, vec3 B) +{ + float r = 0.5 * (A.r + B.r); + vec3 d = A - B; + vec3 c = vec3(2. + r, 4., 3. - r); + + return sqrt(dot(c*d, d)) / 3.; +} + +void main() +{ + float m = max(log2(SourceSize.x), log2(SourceSize.y)); + m = floor(max(m, 1.0))-1.0; + + vec2 dx = vec2(1.0/SourceSize.x, 0.0); + vec2 dy = vec2(0.0, 1.0/SourceSize.y); + vec2 y2 = 2.0*dy; + vec2 x2 = 2.0*dx; + + float ltotal = 0.0; + + ltotal+= length(textureLod(Source, vec2(0.3, 0.3), m).rgb); + ltotal+= length(textureLod(Source, vec2(0.3, 0.7), m).rgb); + ltotal+= length(textureLod(Source, vec2(0.7, 0.3), m).rgb); + ltotal+= length(textureLod(Source, vec2(0.7, 0.7), m).rgb); + + ltotal*=0.25; + + ltotal = pow(0.577350269 * ltotal, 0.70); + + float lhistory = texture(AvgLumPassFeedback, vec2(0.5,0.5)).a; + + ltotal = mix(ltotal, lhistory, lsmooth); + + vec3 l1 = COMPAT_TEXTURE(Source, TEX0.xy ).rgb; + vec3 r1 = COMPAT_TEXTURE(Source, TEX0.xy +dx ).rgb; + vec3 l2 = COMPAT_TEXTURE(Source, TEX0.xy -dx ).rgb; + vec3 r2 = COMPAT_TEXTURE(Source, TEX0.xy +x2 ).rgb; + + float c1 = dist(l2,l1); + float c2 = dist(l1,r1); + float c3 = dist(r2,r1); + + FragColor = vec4(c1,c2,c3,ltotal); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang new file mode 100644 index 0000000..ab4adc4 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-bloom_horizontal.slang @@ -0,0 +1,111 @@ +#version 450 + +/* + Gaussian blur - horizontal pass, dynamic range, resizable + + Copyright (C) 2020 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 LinearizePassSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float SIZEHB; + float SIGMA_HB; +} params; + +#pragma parameter bogus_bloom "[ BLOOM & HALATION ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter bloom " Bloom Strength -- bloom" 0.0 -2.0 2.0 0.05 +#define bloom params.bloom // bloom effect + +#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 +#define bloom_dist global.bloom_dist // bloom effect distribution + +#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 +#define halation params.halation // halation effect + +#pragma parameter SIZEHB " Horizontal Radius ( Num Samples ) -- SIZEHB" 3.0 1.0 50.0 1.0 +#define SIZEHB params.SIZEHB + +#pragma parameter SIGMA_HB " Horizontal Sigma ( Spread ) -- SIGMA_HB" 0.75 0.25 15.0 0.05 +#define SIGMA_HB params.SIGMA_HB + + +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 LinearizePass; + +#define COMPAT_TEXTURE(c,d) texture(c,d) + +float invsqrsigma = 1.0/(2.0*SIGMA_HB*SIGMA_HB); + +float gaussian(float x) +{ + return exp(-x*x*invsqrsigma); +} + +void main() +{ + vec4 SourceSize1 = params.OriginalSize; + float f = fract(SourceSize1.x * vTexCoord.x); + f = 0.5 - f; + vec2 tex = floor(SourceSize1.xy * vTexCoord)*SourceSize1.zw + 0.5*SourceSize1.zw; + vec4 color = vec4(0.0); + vec2 dx = vec2(SourceSize1.z, 0.0); + + float w; + float wsum = 0.0; + vec4 pixel; + float n = -SIZEHB; + + do + { + pixel = COMPAT_TEXTURE(LinearizePass, tex + n*dx); + w = gaussian(n+f); + pixel.a = max(max(pixel.r, pixel.g),pixel.b); + pixel.a*=pixel.a*pixel.a; + color = color + w * pixel; + wsum = wsum + w; + n = n + 1.0; + + } while (n <= SIZEHB); + + color = color / wsum; + + FragColor = vec4(color.rgb, pow(color.a, 0.333333)); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang new file mode 100644 index 0000000..8f7fc8c --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-bloom_vertical.slang @@ -0,0 +1,101 @@ +#version 450 + +/* + Gaussian blur - vertical pass, dynamic range, resizable + + Copyright (C) 2020 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 SIZEVB; + float SIGMA_VB; +} params; + + +#pragma parameter SIZEVB " Vertical Radius ( Num Samples ) -- SIZEVB" 3.0 1.0 50.0 1.0 +#define SIZEVB params.SIZEVB + +#pragma parameter SIGMA_VB " Vertical Sigma ( Spread ) -- SIGMA_VB" 0.60 0.25 15.0 0.05 +#define SIGMA_VB params.SIGMA_VB + +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; + +#define COMPAT_TEXTURE(c,d) texture(c,d) + +float invsqrsigma = 1.0/(2.0*SIGMA_VB*SIGMA_VB); + +float gaussian(float x) +{ + return exp(-x*x*invsqrsigma); +} + +void main() +{ + vec4 SourceSize1 = params.SourceSize; + SourceSize1.yw = params.OriginalSize.yw; + + float f = fract(SourceSize1.y * vTexCoord.y); + f = 0.5 - f; + vec2 tex = floor(SourceSize1.xy * vTexCoord)*SourceSize1.zw + 0.5*SourceSize1.zw; + vec4 color = vec4(0.0); + vec2 dy = vec2(0.0, SourceSize1.w); + + float w; + float wsum = 0.0; + vec4 pixel; + float n = -SIZEVB; + + do + { + pixel = COMPAT_TEXTURE(Source, tex + n*dy); + w = gaussian(n+f); + pixel.a*=pixel.a*pixel.a; + color = color + w * pixel; + wsum = wsum + w; + n = n + 1.0; + + } while (n <= SIZEVB); + + color = color / wsum; + + FragColor = vec4(color.rgb, pow(color.a, 0.175)); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini-potato.slang new file mode 100644 index 0000000..595aee5 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini-potato.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-potato-params.inc" +#include "hsm-crt-dariusg-gdv-mini.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.inc new file mode 100644 index 0000000..856ca94 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.inc @@ -0,0 +1,330 @@ +/* + 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 + + 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 brightboost; + float saturation; + float scanline; + float beam_min; + float beam_max; + float h_sharp; + float shadowMask; + float masksize; + float mcut; + float maskDark; + float maskLight; + float CGWG; +} params; + +// Parameter lines go here: +#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 +#define brightboost params.brightboost + +#pragma parameter saturation " Saturation adjustment -- saturation" 1.1 0.1 2.0 0.05 +#define saturation params.saturation + +#pragma parameter scanline " Scanline Adjust -- scanline" 8 1 12 1 +#define scanline params.scanline + +#pragma parameter beam_min " Scanline Dark -- beam_min" 1.7 0.5 3 0.05 +#define beam_min params.beam_min + +#pragma parameter beam_max " Scanline Bright -- beam_max" 2.1 0.5 3 0.05 +#define beam_max params.beam_max + +#pragma parameter h_sharp " Horizontal Sharpness -- h_sharp" 2 1 5 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 +#define shadowMask params.shadowMask + +#pragma parameter masksize " CRT Mask Size (2.0 is nice in 4k) -- masksize" 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 +#define mcut params.mcut + +#pragma parameter maskDark " Lottes maskDark" 0.5 0.0 2 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 +#define CGWG params.CGWG + +#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 = 1) in float maskFade; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 1) uniform sampler2D Source; + +layout(set = 0, binding = 2) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 3) uniform sampler2D InfoCachePassFeedback; + +float sw(float x, float l) +{ + float d = x; + float bm = scanline; + float b = mix(beam_min,beam_max,l); + d = exp2(-bm*pow(d,b)); + return d; +} + +// Shadow mask (1-4 from PD CRT Lottes shader). +vec3 Mask(vec2 pos, vec3 c) +{ + // HSM Added + float final_mask_size = masksize; + + // If using automatic Mask Size + if (masksize < 0.5) + final_mask_size = (global.FinalViewportSize.x + global.FinalViewportSize.y) / 3 > 1900 ? 2 : 1; + + final_mask_size = max(1, floor(((1 - HSM_VIEWPORT_ZOOM_MASK) + HSM_VIEWPORT_ZOOM_MASK * VIEWPORT_SCALE.y) * final_mask_size + 0.2)); + + pos = floor(pos / final_mask_size); + vec3 mask = vec3(maskDark, maskDark, maskDark); + + // No mask + if (shadowMask == -1.0) + { + mask = vec3(1.0); + } + + // Phosphor. + else if (shadowMask == 0.0) + { + pos.x = fract(pos.x*0.5); + float mc = 1.0 - CGWG; + if (pos.x < 0.5) { mask.r = 1.1; mask.g = mc; mask.b = 1.1; } + else { mask.r = mc; mask.g = 1.1; mask.b = mc; } + } + + // Very compressed TV style shadow mask. + else if (shadowMask == 1.0) + { + 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 = maskDark; + + pos.x = fract(pos.x/3.0); + + if (pos.x < 0.333) mask.r = maskLight; + else if (pos.x < 0.666) mask.g = maskLight; + else mask.b = maskLight; + + mask*=line; + } + + // Aperture-grille. + else if (shadowMask == 2.0) + { + pos.x = fract(pos.x/3.0); + + if (pos.x < 0.333) mask.r = maskLight; + else if (pos.x < 0.666) mask.g = maskLight; + else mask.b = maskLight; + } + + // Stretched VGA style shadow mask (same as prior shaders). + else if (shadowMask == 3.0) + { + pos.x += pos.y*3.0; + pos.x = fract(pos.x/6.0); + + if (pos.x < 0.333) mask.r = maskLight; + else if (pos.x < 0.666) mask.g = maskLight; + else mask.b = maskLight; + } + + // VGA style shadow mask. + else if (shadowMask == 4.0) + { + pos.xy = floor(pos.xy*vec2(1.0, 0.5)); + pos.x += pos.y*3.0; + pos.x = fract(pos.x/6.0); + + if (pos.x < 0.333) mask.r = maskLight; + else if (pos.x < 0.666) mask.g = maskLight; + else mask.b = maskLight; + } + + // Alternate mask 5 + else if (shadowMask == 5.0) + { + float mx = max(max(c.r,c.g),c.b); + vec3 maskTmp = vec3( min( 1.25*max(mx-mcut,0.0)/(1.0-mcut) ,maskDark + 0.2*(1.0-maskDark)*mx)); + float adj = 0.80*maskLight - 0.5*(0.80*maskLight - 1.0)*mx + 0.75*(1.0-mx); + mask = maskTmp; + pos.x = fract(pos.x/2.0); + if (pos.x < 0.5) + { mask.r = adj; + mask.b = adj; + } + else mask.g = adj; + } + + // Alternate mask 6 + else if (shadowMask == 6.0) + { + float mx = max(max(c.r,c.g),c.b); + vec3 maskTmp = vec3( min( 1.33*max(mx-mcut,0.0)/(1.0-mcut) ,maskDark + 0.225*(1.0-maskDark)*mx)); + float adj = 0.80*maskLight - 0.5*(0.80*maskLight - 1.0)*mx + 0.75*(1.0-mx); + mask = maskTmp; + pos.x = fract(pos.x/3.0); + if (pos.x < 0.333) mask.r = adj; + else if (pos.x < 0.666) mask.g = adj; + else mask.b = adj; + } + + // Alternate mask 7 + else if (shadowMask == 7.0) + { + float mc = 1.0 - CGWG; + float mx = max(max(c.r,c.g),c.b); + float maskTmp = min(1.6*max(mx-mcut,0.0)/(1.0-mcut) , mc); + mask = vec3(maskTmp); + pos.x = fract(pos.x/2.0); + if (pos.x < 0.5) mask = vec3(1.0 + 0.6*(1.0-mx)); + } + else if (shadowMask == 8.0) + { + float line = maskLight; + float odd = 0.0; + + if (fract(pos.x/4.0) < 0.5) + odd = 1.0; + if (fract((pos.y + odd)/2.0) < 0.5) + line = maskDark; + + pos.x = fract(pos.x/2.0); + + if (pos.x < 0.5) {mask.r = maskLight; mask.b = maskLight;} + else mask.g = maskLight; + mask*=line; + } + return mask; +} + +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(SCREEN_COORD, + SCREEN_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 (cache_bounds_coord.x < -0.01 || cache_bounds_coord.x > 1.01 || cache_bounds_coord.y < -0.01 || cache_bounds_coord.y > 1.01) + { + FragColor = vec4(0); + return; + } + + vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(SCREEN_COORD); + vec2 pos = HSM_GetMirrorWrappedCoord(screen_curved_coord); + + // HSM Added + vec4 SourceSize = vec4(CROPPED_ROTATED_SIZE_WITH_RES_MULT, 1/CROPPED_ROTATED_SIZE_WITH_RES_MULT); + + vec2 ps = SourceSize.zw; + vec2 OGL2Pos = pos * SourceSize.xy; + vec2 fp = fract(OGL2Pos); + vec2 dx = vec2(ps.x,0.0); + vec2 dy = vec2(0.0, ps.y); + + vec2 pC4 = floor(OGL2Pos) * ps + 0.5*ps; + + // Reading the texels + vec3 ul = HSM_GetCroppedTexSample(Source, pC4 ).xyz; ul*=ul; + vec3 ur = HSM_GetCroppedTexSample(Source, pC4 + dx).xyz; ur*=ur; + vec3 dl = HSM_GetCroppedTexSample(Source, pC4 + dy).xyz; dl*=dl; + vec3 dr = HSM_GetCroppedTexSample(Source, pC4 + ps).xyz; dr*=dr; + + float lx = fp.x; lx = pow(lx, h_sharp); + float rx = 1.0 - fp.x; rx = pow(rx, h_sharp); + + vec3 color1 = (ur*lx + ul*rx)/(lx+rx); + vec3 color2 = (dr*lx + dl*rx)/(lx+rx); + +// calculating scanlines + + float f = fp.y; + float luma1 = length(color1)*0.57735; + float luma2 = length(color2)*0.57735; + + 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); + + // TODO Add adjust to take into acount Gamma IN + color = pow(color, vec3(1.0 / (DEFAULT_SRGB_GAMMA * GAMMA_INPUT / HSM_GAMMA_OUT_CRT))); + // color = pow(color, vec3(1.0/(DEFAULT_SRGB_GAMMA * GAMMA_INPUT / (0.9 * HSM_GAMMA_OUT_CRT)))); + + float l = length(color); + color = normalize(pow(color, vec3(saturation,saturation,saturation)))*l; + color = pow(color, vec3(DEFAULT_SRGB_GAMMA / HSM_GAMMA_OUT_CRT)); + + FragColor = vec4(color, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang new file mode 100644 index 0000000..4535a18 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-dariusg-gdv-mini.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "hsm-crt-dariusg-gdv-mini.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-no-reflect.slang new file mode 100644 index 0000000..12c40bd --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-no-reflect.slang @@ -0,0 +1,5 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-crt-guest-advanced.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.inc new file mode 100644 index 0000000..f156cef --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.inc @@ -0,0 +1,189 @@ +/* + CRT - Guest - NTSC - Pass1 + + Copyright (C) 2018-2022 guest(r) - guest.r@gmail.com + + Incorporates many good ideas and suggestions from Dr. Venom. + I would also like give thanks to many Libretro forums members for continuous feedback, suggestions and caring about the shader. + + 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 SIGMA_HOR; + float HSHARPNESS; + float S_SHARP; + float HARNG; + float HSHARP; + float prescalex; + float prescaley; + float spike; + float internal_res; +} params; + +#pragma parameter bogus_filtering "[ FILTERING OPTIONS ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter HSHARPNESS " Horizontal Filter Range -- HSHARPNESS" 1.5 1.0 8.0 0.125 +#define HSHARPNESS params.HSHARPNESS + +#pragma parameter SIGMA_HOR " Horizontal Blur Sigma -- SIGMA_HOR" 0.90 0.1 7.0 0.05 +#define SIGMA_HOR params.SIGMA_HOR + +#pragma parameter S_SHARP " Substractive Sharpness -- S_SHARP" 0.9 0.0 2.0 0.10 +#define S_SHARP params.S_SHARP + +#pragma parameter HSHARP " Sharpness Definition -- HSHARP" 1.2 0.0 2.0 0.10 +#define HSHARP params.HSHARP + +#pragma parameter HARNG " Substractive Sharpness Ringing -- HARNG" 0.4 0.0 4.0 0.10 +#define HARNG params.HARNG + +#pragma parameter spike " Scanline Spike Removal -- spike" 1.0 0.0 2.0 0.10 +#define spike params.spike + +#pragma parameter prescalex " Prescale-X Factor (for xBR...pre-shader) -- prescalex" 1.0 1.0 4.0 1.0 // Joint parameter with main pass, values must match +#define prescalex params.prescalex // prescale-x factor + +/// HSM Removed +// #define COMPAT_TEXTURE(c,d) texture(c,d) + +// HSM Added +#define COMPAT_TEXTURE(c,d) HSM_GetCroppedTexSample(c,d) +// End Addition + +#define TEX0 vTexCoord + +#define OutputSize params.OutputSize +#define gl_FragCoord (vTexCoord * OutputSize.xy) + +#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 LinearizePass; +layout(set = 0, binding = 3) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 4) uniform sampler2D InfoCachePassFeedback; + +float invsqrsigma = 1.0/(2.0*SIGMA_HOR*SIGMA_HOR); + +float gaussian(float x) +{ + return exp(-x*x*invsqrsigma); +} + +void main() +{ + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + +// 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(SCREEN_COORD, + SCREEN_SCALE, + TUBE_SCALE, + SCREEN_ASPECT, + false, + BEZEL_OUTSIDE_SCALE, + BEZEL_OUTSIDE_COORD, + BEZEL_OUTSIDE_CURVED_COORD, + FRAME_OUTSIDE_CURVED_COORD); +#endif +#endif + + /* HSM Removed + vec4 SourceSize = params.OriginalSize * vec4(2.0*prescalex, 1.0, 0.5/prescalex, 1.0); + */ + // HSM Added + vec4 SourceSize = vec4(CROPPED_ROTATED_SIZE_WITH_RES_MULT, 1 / CROPPED_ROTATED_SIZE_WITH_RES_MULT) * vec4(2.0*prescalex, 1.0, 0.5/prescalex, 1.0); + + float f = fract(SourceSize.x * vTexCoord.x); + f = 0.5 - f; + vec2 tex = floor(SourceSize.xy * vTexCoord)*SourceSize.zw + 0.5*SourceSize.zw; + vec3 color = 0.0.xxx; + float scolor = 0.0; + vec2 dx = vec2(SourceSize.z, 0.0); + + float w = 0.0; + float swsum = 0.0; + float wsum = 0.0; + vec3 pixel; + + float hsharpness = HSHARPNESS; + vec3 cmax = 0.0.xxx; + vec3 cmin = 1.0.xxx; + float sharp = gaussian(hsharpness) * S_SHARP; + float maxsharp = 0.20; + float FPR = hsharpness; + float fpx = 0.0; + float sp = 0.0; + float sw = 0.0; + + float ts = 0.025; + vec3 luma = vec3(0.2126, 0.7152, 0.0722); + + float LOOPSIZE = ceil(2.0*FPR); + float CLAMPSIZE = round(2.0*LOOPSIZE/3.0); + + float n = -LOOPSIZE; + + do + { + pixel = COMPAT_TEXTURE(LinearizePass, tex + n*dx).rgb; + sp = max(max(pixel.r,pixel.g),pixel.b); + + w = gaussian(n+f) - sharp; + fpx = abs(n+f-sign(n)*FPR)/FPR; + if (abs(n) <= CLAMPSIZE) { cmax = max(cmax, pixel); cmin = min(cmin, pixel); } + if (w < 0.0) w = clamp(w, mix(-maxsharp, 0.0, pow(fpx, HSHARP)), 0.0); + + color = color + w * pixel; + wsum = wsum + w; + + sw = max(w, 0.0) * (dot(pixel,luma) + ts); + scolor = scolor + sw * sp; + swsum = swsum + sw; + + n = n + 1.0; + + } while (n <= LOOPSIZE); + + color = color / wsum; + scolor = scolor / swsum; + + color = clamp(mix(clamp(color, cmin, cmax), color, HARNG), 0.0, 1.0); + + scolor = clamp(mix(max(max(color.r, color.g),color.b), scolor, spike), 0.0, 1.0); + + FragColor = vec4(color, scolor); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang new file mode 100644 index 0000000..b80fa36 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass1.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "hsm-crt-guest-advanced-ntsc-pass1.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang new file mode 100644 index 0000000..2922f71 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-no-reflect.slang @@ -0,0 +1,5 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-crt-guest-advanced-ntsc-pass2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-potato.slang new file mode 100644 index 0000000..1293ed7 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2-potato.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-potato-params.inc" +#include "hsm-crt-guest-advanced-ntsc-pass2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.inc new file mode 100644 index 0000000..e6c8ef7 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.inc @@ -0,0 +1,455 @@ +/* + CRT - Guest - Advanced - NTSC + + Copyright (C) 2018-2022 guest(r) - guest.r@gmail.com + + Incorporates many good ideas and suggestions from Dr. Venom. + I would also like give thanks to many Libretro forums members for continuous feedback, suggestions and caring about the shader. + + 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 +{ + float IOS, OS, BLOOM, brightboost, brightboost1, gsl, scanline1, scanline2, beam_min, beam_max, beam_size, + h_sharp, s_sharp, warpX, warpY, glow, shadowMask, masksize, vertmask, ring; +} params; + +// layout(std140, set = 0, binding = 0) uniform UBO +// { +// mat4 MVP; +// vec4 SourceSize; +// vec4 OriginalSize; +// vec4 OutputSize; +// uint FrameCount; +// float bloom; +// float halation; +// float scans; +// float gamma_c; +// float gamma_out; +// float overscanX; +// float overscanY; +// float intres; +// float prescalex; +// float c_shape; +// float blendMode; +// float scangamma; +// float rolling_scan; +// float sborder; +// float scan_falloff; +// float bloom_dist; +// } global; + + +#pragma parameter bogus_brightness "[ BRIGHTNESS SETTINGS ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter glow " Glow Strength -- glow" 0.08 -2.0 2.0 0.01 +#define glow global.glow // Glow Strength + +#pragma parameter bloom " Bloom Strength -- bloom" 0.0 -2.0 2.0 0.05 +#define bloom global.bloom // bloom effect + +#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 +#define bloom_dist global.bloom_dist // bloom effect distribution + +#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 +#define halation global.halation // halation effect + +#pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02 +#define gamma_c global.gamma_c // adjust brightness + +#pragma parameter brightboost " Bright Boost Dark Pixels -- brightboost" 1.40 0.25 10.0 0.05 +#define brightboost global.brightboost // adjust brightness + +#pragma parameter brightboost1 " Bright Boost Bright Pixels -- brightboost1" 1.10 0.25 3.00 0.025 +#define brightboost1 global.brightboost1 // adjust brightness + +#pragma parameter bogus_scanline "[ SCANLINE OPTIONS ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter gsl " Scanline Type -- gsl" 0.0 -1.0 2.0 1.0 +#define gsl global.gsl // Alternate scanlines + +#pragma parameter scanline1 " Scanline Beam Shape Center -- scanline1" 6.0 -20.0 20.0 0.5 +#define scanline1 global.scanline1 // scanline param, vertical sharpness + +#pragma parameter scanline2 " Scanline Beam Shape Edges -- scanline2" 8.0 0.0 70.0 1.0 +#define scanline2 global.scanline2 // scanline param, vertical sharpness + +#pragma parameter beam_min " Scanline Shape Dark Pixels -- beam_min" 1.30 0.25 5 0.05 +#define beam_min global.beam_min // dark area beam min - narrow + +#pragma parameter beam_max " Scanline Shape Bright Pixels -- beam_max" 1.00 0.4 3.5 0.025 +#define beam_max global.beam_max // bright area beam max - wide + +#pragma parameter beam_size " Increased Bright Scanline Beam -- beam_size" 0.60 0.0 1.0 0.05 +#define beam_size global.beam_size // increased max. beam size + +#pragma parameter vertmask " Scanline Color Deconvergence -- vertmask" 0.0 -1.0 1.0 0.1 +#define vertmask global.vertmask // Scanline deconvergence colors + +#pragma parameter scans " Scanline Saturation / Mask Falloff -- scans" 0.60 0.0 2.5 0.05 +#define scans global.scans // scanline saturation + +#pragma parameter scan_falloff " Scanline Falloff -- scan_falloff" 1.0 0.25 2.0 0.05 +#define scan_falloff global.scan_falloff // scanline falloff + +#pragma parameter scangamma " Scanline Gamma -- scangamma" 2.40 0.5 5.0 0.05 +#define scangamma global.scangamma + +#pragma parameter rolling_scan " Rolling Scanlines -- rolling_scan" 0.0 -1.0 1.0 0.01 +#define rolling_scan global.rolling_scan // rolling scanlines + +// #pragma parameter bogus_screen "[ SCREEN OPTIONS ]: " 0.0 0.0 1.0 1.0 + +// #pragma parameter intres " Internal Resolution Y: 224p/240p, 1.5...y-dowsample" 0.0 0.0 6.0 0.5 // Joint parameter with linearize pass, values must match + +// #pragma parameter IOS " Integer Scaling: Odd:Y, Even:'X'+Y" 0.0 0.0 4.0 1.0 +// #define IOS params.IOS // Smart Integer Scaling + +// #pragma parameter OS " R. Bloom Overscan Mode" 1.0 0.0 2.0 1.0 +// #define OS params.OS // Do overscan + +// #pragma parameter BLOOM " Raster bloom %" 0.0 0.0 20.0 1.0 +// #define BLOOM params.BLOOM // Bloom overscan percentage + +// #pragma parameter warpX " CurvatureX (default 0.03)" 0.0 0.0 0.25 0.01 +// #define warpX params.warpX // Curvature X + +// #pragma parameter warpY " CurvatureY (default 0.04)" 0.0 0.0 0.25 0.01 +// #define warpY params.warpY // Curvature Y + +// #pragma parameter c_shape " Curvature Shape" 0.25 0.05 0.60 0.05 +// #define c_shape global.c_shape // curvature shape + +// #pragma parameter overscanX " Overscan X original pixels" 0.0 -200.0 200.0 1.0 +// #define overscanX global.overscanX // OverscanX pixels + +// #pragma parameter overscanY " Overscan Y original pixels" 0.0 -200.0 200.0 1.0 +// #define overscanY global.overscanY // OverscanY pixels + +// #pragma parameter prescalex " Prescale-X Factor (for xBR...pre-shader)" 1.0 1.0 4.0 1.0 +// #define prescalex global.prescalex // prescale-x factor + + +/// HSM Removed +// #define COMPAT_TEXTURE(c,d) texture(c,d) + +// HSM Added +#define COMPAT_TEXTURE(c,d) HSM_GetCroppedTexSample(c,d) +// End Addition + +#define TEX0 vTexCoord + +#define OutputSize global.OutputSize +#define gl_FragCoord (vTexCoord * OutputSize.xy) + +#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 LinearizePass; +layout(set = 0, binding = 3) uniform sampler2D AvgLumPass; +layout(set = 0, binding = 4) uniform sampler2D Pass1; +layout(set = 0, binding = 6) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 7) uniform sampler2D InfoCachePassFeedback; + +#define eps 1e-8 + +float st(float x) +{ + return exp2(-10.0*x*x); +} + +float st1(float x) +{ + return exp2(-7.0*x*x); +} + +float sw0(float x, float color, float scanline) +{ + float tmp = mix(beam_min, beam_max, color); + float ex = x*tmp; + ex = (gsl > -0.5) ? ex*ex : mix(ex*ex, ex*ex*ex, 0.4); + return exp2(-scanline*ex); +} + +float sw1(float x, float color, float scanline) +{ + x = mix (x, beam_min*x, max(x-0.4*color,0.0)); + float tmp = mix(1.2*beam_min, beam_max, color); + float ex = x*tmp; + return exp2(-scanline*ex*ex); +} + +float sw2(float x, float color, float scanline) +{ + float tmp = mix((2.5-0.5*color)*beam_min, beam_max, color); + tmp = mix(beam_max, tmp, pow(x, color+0.3)); + float ex = x*tmp; + return exp2(-scanline*ex*ex); +} + +/* HSM Removed +vec2 Warp(vec2 pos) +{ + pos = pos*2.0-1.0; + pos = mix(pos, vec2(pos.x*inversesqrt(1.0-c_shape*pos.y*pos.y), pos.y*inversesqrt(1.0-c_shape*pos.x*pos.x)), vec2(warpX, warpY)/c_shape); + return pos*0.5 + 0.5; +} + +vec2 Overscan(vec2 pos, float dx, float dy){ + pos=pos*2.0-1.0; + pos*=vec2(dx,dy); + return pos*0.5+0.5; +} +*/ + +vec3 gc(vec3 c) +{ + float mc = max(max(c.r,c.g),c.b); + float mg = pow(mc, 1.0/gamma_c); + return c * mg/(mc + eps); +} + + +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(SCREEN_COORD, + SCREEN_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 Removed + vec4 SourceSize = params.OriginalSize * vec4(2.0*prescalex, 1.0, 0.5/prescalex, 1.0); + + float f = fract(SourceSize.x * vTexCoord.x); + f = 0.5 - f; + vec2 tex = floor(SourceSize.xy * vTexCoord)*SourceSize.zw + 0.5*SourceSize.zw; + */ + + // HSM Added + vec4 SourceSize = vec4(CROPPED_ROTATED_SIZE_WITH_RES_MULT, 1 / CROPPED_ROTATED_SIZE_WITH_RES_MULT); + + SourceSize*= vec4(2.0, 1.0, 0.5, 1.0); + + float lum = COMPAT_TEXTURE(AvgLumPass, vec2(0.5,0.5)).a; + + float gamma_in = 1.0/COMPAT_TEXTURE(LinearizePass, vec2(0.25,0.25)).a; + float intera = COMPAT_TEXTURE(LinearizePass, vec2(0.75,0.25)).a; + bool interb = (intera < 0.5); + + /* HSM Removed + float SourceY = SourceSize.y; + float sy = 1.0; + if (global.intres == 0.5) sy = SourceY/224.0; else + if (global.intres == 1.0) sy = SourceY/240.0; else + if (global.intres > 1.25) sy = global.intres; + SourceSize*=vec4(1.0, 1.0/sy, 1.0, sy); + + // Calculating texel coordinates + + vec2 texcoord = TEX0.xy; + */ + // HSM Added + vec2 texcoord = HSM_GetCurvedCoord(SCREEN_COORD, HSM_CRT_CURVATURE_SCALE, SCREEN_ASPECT); + texcoord = HSM_GetMirrorWrappedCoord(texcoord); + // End Addition + + /* HSM Removed + if (IOS > 0.0 && !interb){ + vec2 ofactor = OutputSize.xy/SourceSize.xy; + vec2 intfactor = (IOS < 2.5) ? floor(ofactor) : ceil(ofactor); + vec2 diff = ofactor/intfactor; + float scan = diff.y; + texcoord = Overscan(texcoord, scan, scan); + if (IOS == 1.0 || IOS == 3.0) texcoord = vec2(TEX0.x, texcoord.y); + } + + float factor = 1.00 + (1.0-0.5*OS)*BLOOM/100.0 - lum*BLOOM/100.0; + texcoord = Overscan(texcoord, factor, factor); + + texcoord = Overscan(texcoord, (SourceSize.x - overscanX)/SourceSize.x, (SourceSize.y - overscanY)/SourceSize.y); + + vec2 pos = Warp(texcoord); + vec2 pos0 = Warp(TEX0.xy); + */ + + // HSM Added + vec2 screen_curved_coord = HSM_GetCurvedCoord(SCREEN_COORD, HSM_CRT_CURVATURE_SCALE, SCREEN_ASPECT); + vec2 pos = HSM_GetMirrorWrappedCoord(screen_curved_coord); + + + vec2 coffset = vec2(0.5, 0.5); + + vec2 ps = SourceSize.zw; + vec2 OGL2Pos = pos * SourceSize.xy - coffset; + vec2 fp = fract(OGL2Pos); + + vec2 dx = vec2(ps.x,0.0); + vec2 dy = vec2(0.0, ps.y); + + // Reading the texels + + float f = fp.y; + + vec2 pC4 = floor(OGL2Pos) * ps + 0.5*ps; + pC4.x = pos.x; + if (interb) pC4.y = pos.y; + + vec3 color1 = COMPAT_TEXTURE(Pass1, pC4 ).rgb; + vec3 scolor1 = COMPAT_TEXTURE(Pass1, pC4 ).aaa; + + if(!interb) color1 = pow(color1, vec3(scangamma/gamma_in)); + + pC4+=dy; + + vec3 color2 = COMPAT_TEXTURE(Pass1, pC4 ).rgb; + vec3 scolor2 = COMPAT_TEXTURE(Pass1, pC4 ).aaa; + + if(!interb) color2 = pow(color2, vec3(scangamma/gamma_in)); + + vec3 ctmp = color1; float w3 = 1.0; vec3 color = color1; + vec3 one = vec3(1.0); + +if (!interb) +{ + // calculating scanlines + + float shape1 = mix(scanline1, scanline2, f); + float shape2 = mix(scanline1, scanline2, 1.0-f); + + float wt1 = st(f); + float wt2 = st(1.0-f); + + vec3 color00 = color1*wt1 + color2*wt2; + vec3 scolor0 = scolor1*wt1 + scolor2*wt2; + + ctmp = color00/(wt1+wt2); + vec3 sctmp = scolor0/(wt1+wt2); + + float wf1, wf2; + + vec3 cref1 = mix(sctmp, scolor1, beam_size); float creff1 = pow(max(max(cref1.r,cref1.g),cref1.b), scan_falloff); + vec3 cref2 = mix(sctmp, scolor2, beam_size); float creff2 = pow(max(max(cref2.r,cref2.g),cref2.b), scan_falloff); + + float f1 = f; + float f2 = 1.0-f; + + float scanpix = SourceSize.x/OutputSize.x; + + f1 = fract(f1 + rolling_scan*float(global.FrameCount)*scanpix); + f2 = 1.0 - f1; + + if (gsl < 0.5) { wf1 = sw0(f1,creff1,shape1); wf2 = sw0(f2,creff2,shape2);} else + if (gsl == 1.0) { wf1 = sw1(f1,creff1,shape1); wf2 = sw1(f2,creff2,shape2);} else + { wf1 = sw2(f1,creff1,shape1); wf2 = sw2(f2,creff2,shape2);} + + if ((wf1 + wf2) > 1.0) { float wtmp = 1.0/(wf1+wf2); wf1*=wtmp; wf2*=wtmp; } + + // Scanline saturation application + + vec3 w1 = vec3(wf1); vec3 w2 = vec3(wf2); + w3 = wf1+wf2; + + float mc1 = max(max(color1.r,color1.g),color1.b) + eps; + float mc2 = max(max(color2.r,color2.g),color2.b) + eps; + + cref1 = color1 / mc1; cref1=cref1*cref1; cref1*=cref1; + cref2 = color2 / mc2; cref2=cref2*cref2; cref2*=cref2; + + w1 = max( mix(w1*mix(one, cref1, scans), w1, wf1*min((1.0+0.15*scans), 1.2)), 0.0); w1 = min(w1*color1, mc1)/(color1 + eps); + w2 = max( mix(w2*mix(one, cref2, scans), w2, wf2*min((1.0+0.15*scans), 1.2)), 0.0); w2 = min(w2*color2, mc2)/(color2 + eps); + + // Scanline Deconvergence + + vec3 cd1 = one; vec3 cd2 = one; float vm = sqrt(abs(vertmask)); + + float v_high1 = 1.0 + 0.3*vm; + float v_high2 = 1.0 + 0.6*vm; + float v_low = 1.0 - vm; + + float ds1 = min(max(1.0-w3*w3, 2.5*f1), 1.0); + float ds2 = min(max(1.0-w3*w3, 2.5*f2), 1.0); + + if (vertmask < 0.0) + { + cd1 = mix(one, vec3(v_high2, v_low, v_low), ds1); + cd2 = mix(one, vec3(v_low, v_high1, v_high1), ds2); + } + else + { + cd1 = mix(one, vec3(v_high1, v_low, v_high1), ds1); + cd2 = mix(one, vec3(v_low, v_high2, v_low), ds2); + } + + color = gc(color1)*w1*cd1 + gc(color2)*w2*cd2; + + if (abs(rolling_scan) > 0.005) + { + wt1 = st1(f); + wt2 = st1(1.0-f); + color00 = (color1*wt1 + color2*wt2)/(wt1+wt2); + color = gc(color00) * mix(w1+w2, w3.xxx, max(wf1,wf2)); + } + + color = min(color, 1.0); +} + + if (interb) + { + color = gc(color1); + } + + float colmx = pow(max(max(ctmp.r,ctmp.g),ctmp.b), 1.40/gamma_in); + + if(!interb) color = pow( color, vec3(gamma_in/scangamma) ); + + FragColor = vec4(color, colmx); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang new file mode 100644 index 0000000..f4a4b94 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc-pass2.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "hsm-crt-guest-advanced-ntsc-pass2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc.slang new file mode 100644 index 0000000..03a877b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-ntsc.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "hsm-crt-guest-advanced.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-potato.slang new file mode 100644 index 0000000..bf06b62 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced-potato.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-potato-params.inc" +#include "hsm-crt-guest-advanced.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.inc new file mode 100644 index 0000000..ac97558 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.inc @@ -0,0 +1,589 @@ +/* + CRT - Guest - Advanced + + Copyright (C) 2018-2022 guest(r) - guest.r@gmail.com + + Incorporates many good ideas and suggestions from Dr. Venom. + I would also like give thanks to many Libretro forums members for continuous feedback, suggestions and caring about the shader. + + 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. + +*/ + +// All parameter uniform values are in hsm-globals.inc + + +#pragma parameter bogus_brightness "[ BRIGHTNESS SETTINGS ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter glow " Glow Strength -- glow" 0.08 -2.0 2.0 0.01 +#define glow global.glow // Glow Strength + +#pragma parameter bloom " Bloom Strength -- bloom" 0.0 -2.0 2.0 0.05 +#define bloom global.bloom // bloom effect + +#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 +#define bloom_dist global.bloom_dist // bloom effect distribution + +#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 +#define halation global.halation // halation effect + +#pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02 +#define gamma_c global.gamma_c // adjust brightness + +#pragma parameter brightboost " Bright Boost Dark Pixels -- brightboost" 1.40 0.25 10.0 0.05 +#define brightboost global.brightboost // adjust brightness + +#pragma parameter brightboost1 " Bright Boost Bright Pixels -- brightboost1" 1.10 0.25 3.00 0.025 +#define brightboost1 global.brightboost1 // adjust brightness + +#pragma parameter bogus_scanline "[ SCANLINE OPTIONS ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter gsl " Scanline Type -- gsl" 0.0 -1.0 2.0 1.0 +#define gsl global.gsl // Alternate scanlines + +#pragma parameter scanline1 " Scanline Beam Shape Center -- scanline1" 6.0 -20.0 20.0 0.5 +#define scanline1 global.scanline1 // scanline param, vertical sharpness + +#pragma parameter scanline2 " Scanline Beam Shape Edges -- scanline2" 8.0 0.0 70.0 1.0 +#define scanline2 global.scanline2 // scanline param, vertical sharpness + +#pragma parameter beam_min " Scanline Shape Dark Pixels -- beam_min" 1.30 0.25 5 0.05 +#define beam_min global.beam_min // dark area beam min - narrow + +#pragma parameter beam_max " Scanline Shape Bright Pixels -- beam_max" 1.00 0.4 3.5 0.025 +#define beam_max global.beam_max // bright area beam max - wide + +#pragma parameter beam_size " Increased Bright Scanline Beam -- beam_size" 0.60 0.0 1.0 0.05 +#define beam_size global.beam_size // increased max. beam size + +#pragma parameter vertmask " Scanline Color Deconvergence -- vertmask" 0.0 -1.0 1.0 0.1 +#define vertmask global.vertmask // Scanline deconvergence colors + +#pragma parameter scans " Scanline Saturation / Mask Falloff -- scans" 0.60 0.0 2.5 0.05 +#define scans global.scans // scanline saturation + +#pragma parameter scan_falloff " Scanline Falloff -- scan_falloff" 1.0 0.25 2.0 0.05 +#define scan_falloff global.scan_falloff // scanline falloff + +#pragma parameter spike " Scanline Spike Removal -- spike" 1.0 0.0 2.0 0.10 +#define spike global.spike + +#pragma parameter rolling_scan " Rolling Scanlines -- rolling_scan" 0.0 -1.0 1.0 0.01 +#define rolling_scan global.rolling_scan // rolling scanlines + +#pragma parameter bogus_filtering "[ FILTERING OPTIONS ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter h_sharp " Horizontal sharpness -- h_sharp" 5.20 0.20 15.0 0.10 +#define h_sharp global.h_sharp // pixel sharpness + +#pragma parameter s_sharp " Substractive sharpness (1.0 recommended) -- s_sharp" 0.80 0.0 1.5 0.10 +#define s_sharp global.s_sharp // substractive sharpness + +#pragma parameter ring " Substractive sharpness Ringing -- ring" 0.8 0.0 4.0 0.1 +#define ring global.ring // substractive sharpness ringing + +#pragma parameter smart_ei " Smart Edges Effect Strength -- smart_ei" 0.0 0.0 0.75 0.01 +#define smart_ei global.smart_ei // smart edge handling + +#pragma parameter ei_limit " Smart Edges Effect Strength Limit -- ei_limit" 0.25 0.0 0.75 0.01 +#define ei_limit global.ei_limit // smart edge handling + +#pragma parameter sth " Smart Edges Smoothing Threshold -- sth" 0.23 0.0 1.0 0.01 +#define sth global.sth // corner size + +// #pragma parameter bogus_screen "[ SCREEN OPTIONS ]: " 0.0 0.0 1.0 1.0 + +// #pragma parameter intres " Internal Resolution Y: 224p/240p, 1.5...y-dowsample" 0.0 0.0 6.0 0.5 // Joint parameter with linearize pass, values must match + +// #pragma parameter TATE " TATE Mode" 0.0 0.0 1.0 1.0 +// #define TATE params.TATE // Screen orientation + +// #pragma parameter IOS " Integer Scaling: Odd:Y, Even:'X'+Y" 0.0 0.0 4.0 1.0 +// #define IOS params.IOS // Smart Integer Scaling + +// #pragma parameter OS " R. Bloom Overscan Mode" 1.0 0.0 2.0 1.0 +// #define OS params.OS // Do overscan + +// #pragma parameter BLOOM " Raster bloom %" 0.0 0.0 20.0 1.0 +// #define BLOOM params.BLOOM // Bloom overscan percentage + +// #pragma parameter warpX " CurvatureX (default 0.03)" 0.0 0.0 0.25 0.01 +// #define warpX params.warpX // Curvature X + +// #pragma parameter warpY " CurvatureY (default 0.04)" 0.0 0.0 0.25 0.01 +// #define warpY params.warpY // Curvature Y + +// #pragma parameter c_shape " Curvature Shape" 0.25 0.05 0.60 0.05 +// #define c_shape global.c_shape // curvature shape + +// #pragma parameter overscanX " Overscan X original pixels" 0.0 -200.0 200.0 1.0 +// #define overscanX global.overscanX // OverscanX pixels + +// #pragma parameter overscanY " Overscan Y original pixels" 0.0 -200.0 200.0 1.0 +// #define overscanY global.overscanY // OverscanY pixels + +// #pragma parameter prescalex " Prescale-X Factor (for xBR...pre-shader)" 1.0 1.0 4.0 1.0 +// #define prescalex global.prescalex // prescale-x factor + +/* HSM Removed + #define COMPAT_TEXTURE(c,d) texture(c,d) +*/ + +// HSM Added +#define COMPAT_TEXTURE(c,d) HSM_GetCroppedTexSample(c,d) +// End Addition + +// #define TEX0 vTexCoord + +#define OutputSize global.OutputSize +#define gl_FragCoord (vTexCoord * OutputSize.xy) + +#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 LinearizePass; +layout(set = 0, binding = 3) uniform sampler2D AvgLumPass; +layout(set = 0, binding = 4) uniform sampler2D PrePass; + +// HSM Added +layout(set = 0, binding = 6) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 7) uniform sampler2D InfoCachePassFeedback; + +#define eps 1e-10 + +float st(float x) +{ + return exp2(-10.0*x*x); +} + +float st1(float x) +{ + return exp2(-7.0*x*x); +} + +float sw0(float x, float color, float scanline) +{ + float tmp = mix(beam_min, beam_max, color); + float ex = x*tmp; + ex = (gsl > -0.5) ? ex*ex : mix(ex*ex, ex*ex*ex, 0.4); + return exp2(-scanline*ex); +} + +float sw1(float x, float color, float scanline) +{ + x = mix (x, beam_min*x, max(x-0.4*color,0.0)); + float tmp = mix(1.2*beam_min, beam_max, color); + float ex = x*tmp; + return exp2(-scanline*ex*ex); +} + +float sw2(float x, float color, float scanline) +{ + float tmp = mix((2.5-0.5*color)*beam_min, beam_max, color); + tmp = mix(beam_max, tmp, pow(x, color+0.3)); + float ex = x*tmp; + return exp2(-scanline*ex*ex); +} + +/* HSM Removed +vec2 Warp(vec2 pos) +{ + pos = pos*2.0-1.0; + pos = mix(pos, vec2(pos.x*inversesqrt(1.0-c_shape*pos.y*pos.y), pos.y*inversesqrt(1.0-c_shape*pos.x*pos.x)), vec2(warpX, warpY)/c_shape); + return pos*0.5 + 0.5; +} + +vec2 Overscan(vec2 pos, float dx, float dy){ + pos=pos*2.0-1.0; + pos*=vec2(dx,dy); + return pos*0.5+0.5; +} +*/ + +vec3 gc(vec3 c) +{ + float mc = max(max(c.r,c.g),c.b); + float mg = pow(mc, 1.0/gamma_c); + return c * mg/(mc + eps); +} + +void main() +{ + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + bool ntsc_processing_on = false; + #ifdef IS_NTSC + ntsc_processing_on = true; + #endif + + 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(SCREEN_COORD, + SCREEN_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; + } + + float TATE = USE_VERTICAL_SCANLINES; + + /* HSM Removed + vec4 SourceSize = global.OriginalSize * vec4(prescalex, 1.0, 1.0/prescalex, 1.0); + */ + + // HSM Added + vec4 SourceSize = vec4(CROPPED_ROTATED_SIZE_WITH_RES_MULT, 1/CROPPED_ROTATED_SIZE_WITH_RES_MULT); + + + float lum = COMPAT_TEXTURE(AvgLumPass, vec2(0.5,0.5)).a; + + float gamma_in = 1.0/COMPAT_TEXTURE(LinearizePass, vec2(0.25,0.25)).a; + float intera = COMPAT_TEXTURE(LinearizePass, vec2(0.75,0.25)).a; + bool interb = (intera < 0.5); + bool notate = (TATE < 0.5); + + if (USE_VERTICAL_SCANLINES > 0.5 && interb) + notate = true; + + /* HSM Removed + float SourceY = mix(SourceSize.y, SourceSize.x, TATE); + float sy = 1.0; + if (global.intres == 0.5) sy = SourceY/224.0; else + if (global.intres == 1.0) sy = SourceY/240.0; else + if (global.intres > 1.25) sy = global.intres; + if (notate) SourceSize*=vec4(1.0, 1.0/sy, 1.0, sy); else SourceSize*=vec4(1.0/sy, 1.0, sy, 1.0); + + // Calculating texel coordinates + + vec2 texcoord = TEX0.xy; + if (IOS > 0.0 && !interb){ + vec2 ofactor = OutputSize.xy/SourceSize.xy; + vec2 intfactor = (IOS < 2.5) ? floor(ofactor) : ceil(ofactor); + vec2 diff = ofactor/intfactor; + float scan = mix(diff.y, diff.x, TATE); + texcoord = Overscan(texcoord, scan, scan); + if (IOS == 1.0 || IOS == 3.0) texcoord = mix(vec2(TEX0.x, texcoord.y), vec2(texcoord.x, TEX0.y), TATE); + } + + float factor = 1.00 + (1.0-0.5*OS)*BLOOM/100.0 - lum*BLOOM/100.0; + texcoord = Overscan(texcoord, factor, factor); + + texcoord = Overscan(texcoord, (global.OriginalSize.x - overscanX)/global.OriginalSize.x, (global.OriginalSize.y - overscanY)/global.OriginalSize.y); + + vec2 pos = Warp(texcoord); + */ + + // HSM Added + vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(SCREEN_COORD); + vec2 pos = HSM_GetMirrorWrappedCoord(screen_curved_coord); + + bool smarte = (smart_ei > 0.01); // smart edge interpolation on / off + + vec2 coffset = vec2(0.5, 0.5); + + vec2 ps = SourceSize.zw; + vec2 OGL2Pos = pos * SourceSize.xy - coffset; + vec2 fp = fract(OGL2Pos); + + vec2 dx = vec2(ps.x,0.0); + vec2 dy = vec2(0.0, ps.y); + + // Reading the texels + vec2 x2 = 2.0*dx; + vec2 y2 = 2.0*dy; + + vec2 offx = dx; + vec2 off2 = x2; + vec2 offy = dy; + float fpx = fp.x; + if(!notate) + { + offx = dy; + off2 = y2; + offy = dx; + fpx = fp.y; + } + float f = (notate) ? fp.y : fp.x; + + vec2 pC4 = floor(OGL2Pos) * ps + 0.5*ps; + + if (interb) pC4.y = pos.y; + + float zero = exp2(-h_sharp); + float sharp1 = s_sharp * zero; + + /* HSM Removed + float fdivider = min(prescalex, 2.0); + */ + + // HSM Added + float fdivider = min((1 - USE_VERTICAL_SCANLINES) * HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR + + USE_VERTICAL_SCANLINES * HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR, + 2.0); + // End Addition + + float wl3 = (2.0 + fpx)/fdivider; + float wl2 = (1.0 + fpx)/fdivider; + float wl1 = ( fpx)/fdivider; + float wr1 = (1.0 - fpx)/fdivider; + float wr2 = (2.0 - fpx)/fdivider; + float wr3 = (3.0 - fpx)/fdivider; + + wl3*=wl3; wl3 = exp2(-h_sharp*wl3); + wl2*=wl2; wl2 = exp2(-h_sharp*wl2); + wl1*=wl1; wl1 = exp2(-h_sharp*wl1); + wr1*=wr1; wr1 = exp2(-h_sharp*wr1); + wr2*=wr2; wr2 = exp2(-h_sharp*wr2); + wr3*=wr3; wr3 = exp2(-h_sharp*wr3); + + float fp1 = 1.-fpx; + + float twl3 = max(wl3 - sharp1, 0.0); + float twl2 = max(wl2 - sharp1, mix(-0.12, 0.0, 1.0-fp1*fp1)); + float twl1 = max(wl1 - sharp1, 0.0); + float twr1 = max(wr1 - sharp1, 0.0); + float twr2 = max(wr2 - sharp1, mix(-0.12, 0.0, 1.0-fpx*fpx)); + float twr3 = max(wr3 - sharp1, 0.0); + + bool sharp = (sharp1 > 0.0); + + vec3 c1, c2; + + if (smarte) + { + twl3 = 0.0; twr3 = 0.0; + c1 = COMPAT_TEXTURE(AvgLumPass, pC4 ).xyz; + c2 = COMPAT_TEXTURE(AvgLumPass, pC4 + offy).xyz; + c1 = max(c1 - sth, 0.0); + c2 = max(c2 - sth, 0.0); + } + + vec3 l3, l2, l1, r1, r2, r3, sl2, sl1, sr1, sr2, color1, color2, colmin, colmax; + + l3 = COMPAT_TEXTURE(LinearizePass, pC4 -off2).rgb; + l2 = COMPAT_TEXTURE(LinearizePass, pC4 -offx).rgb; + l1 = COMPAT_TEXTURE(LinearizePass, pC4 ).rgb; + r1 = COMPAT_TEXTURE(LinearizePass, pC4 +offx).rgb; + r2 = COMPAT_TEXTURE(LinearizePass, pC4 +off2).rgb; + r3 = COMPAT_TEXTURE(LinearizePass, pC4 +offx+off2).rgb; + + colmin = min(min(l1,r1), min(l2,r2)); + colmax = max(max(l1,r1), max(l2,r2)); + + if (smarte) + { + float pc = min(smart_ei*c1.y, ei_limit); + float pl = min(smart_ei*max(c1.y,c1.x), ei_limit); + float pr = min(smart_ei*max(c1.y,c1.z), ei_limit); + twl1 = max(wl1-pc, 0.01*wl1); twr1 = max(wr1-pc, 0.01*wr1); + twl2 = max(wl2-pl, 0.01*wl2); twr2 = max(wr2-pr, 0.01*wr2); + } + + color1 = (l3*twl3 + l2*twl2 + l1*twl1 + r1*twr1 + r2*twr2 + r3*twr3)/(twl3+twl2+twl1+twr1+twr2+twr3); + + if (sharp) color1 = clamp(mix(clamp(color1, colmin, colmax), color1, ring), 0.0, 1.0); + + float ts = 0.025; + vec3 luma = vec3(0.2126, 0.7152, 0.0722); + + float lm2 = max(max(l2.r,l2.g),l2.b); + float lm1 = max(max(l1.r,l1.g),l1.b); + float rm1 = max(max(r1.r,r1.g),r1.b); + float rm2 = max(max(r2.r,r2.g),r2.b); + + float swl2 = max(twl2, 0.0) * (dot(l2,luma) + ts); + float swl1 = twl1 * (dot(l1,luma) + ts); + float swr1 = twr1 * (dot(r1,luma) + ts); + float swr2 = max(twr2, 0.0) * (dot(r2,luma) + ts); + + float fscolor1 = (lm2*swl2 + lm1*swl1 + rm1*swr1 + rm2*swr2)/(swl2+swl1+swr1+swr2); + vec3 scolor1 = vec3(clamp(mix(max(max(color1.r,color1.g),color1.b), fscolor1, spike), 0.0, 1.0)); + + vec3 scolor2; + + if (!interb) +{ + pC4+=offy; + + l3 = COMPAT_TEXTURE(LinearizePass, pC4 -off2).rgb; + l2 = COMPAT_TEXTURE(LinearizePass, pC4 -offx).rgb; + l1 = COMPAT_TEXTURE(LinearizePass, pC4 ).rgb; + r1 = COMPAT_TEXTURE(LinearizePass, pC4 +offx).rgb; + r2 = COMPAT_TEXTURE(LinearizePass, pC4 +off2).rgb; + r3 = COMPAT_TEXTURE(LinearizePass, pC4 +offx+off2).rgb; + + colmin = min(min(l1,r1), min(l2,r2)); + colmax = max(max(l1,r1), max(l2,r2)); + + if (smarte) + { + float pc = min(smart_ei*c2.y, ei_limit); + float pl = min(smart_ei*max(c2.y,c2.x), ei_limit); + float pr = min(smart_ei*max(c2.y,c2.z), ei_limit); + twl1 = max(wl1-pc, 0.01*wl1); twr1 = max(wr1-pc, 0.01*wr1); + twl2 = max(wl2-pl, 0.01*wl2); twr2 = max(wr2-pr, 0.01*wr2); + } + + color2 = (l3*twl3 + l2*twl2 + l1*twl1 + r1*twr1 + r2*twr2 + r3*twr3)/(twl3+twl2+twl1+twr1+twr2+twr3); + + if (sharp) color2 = clamp(mix(clamp(color2, colmin, colmax), color2, ring), 0.0, 1.0); + + lm2 = max(max(l2.r,l2.g),l2.b); + lm1 = max(max(l1.r,l1.g),l1.b); + rm1 = max(max(r1.r,r1.g),r1.b); + rm2 = max(max(r2.r,r2.g),r2.b); + + swl2 = max(twl2, 0.0) * (dot(l2,luma) + ts); + swl1 = twl1 * (dot(l1,luma) + ts); + swr1 = twr1 * (dot(r1,luma) + ts); + swr2 = max(twr2, 0.0) * (dot(r2,luma) + ts); + + float fscolor2 = (lm2*swl2 + lm1*swl1 + rm1*swr1 + rm2*swr2)/(swl2+swl1+swr1+swr2); + scolor2 = vec3(clamp(mix(max(max(color2.r,color2.g),color2.b), fscolor2, spike), 0.0, 1.0)); +} + + vec3 ctmp = color1; float w3 = 1.0; vec3 color = color1; + vec3 one = vec3(1.0); + +if (!interb) +{ + // calculating scanlines + + float shape1 = mix(scanline1, scanline2, f); + float shape2 = mix(scanline1, scanline2, 1.0-f); + + float wt1 = st(f); + float wt2 = st(1.0-f); + + vec3 color00 = color1*wt1 + color2*wt2; + vec3 scolor0 = scolor1*wt1 + scolor2*wt2; + + ctmp = color00/(wt1+wt2); + vec3 sctmp = scolor0/(wt1+wt2); + + float wf1, wf2; + + vec3 cref1 = mix(sctmp, scolor1, beam_size); float creff1 = pow(max(max(cref1.r,cref1.g),cref1.b), scan_falloff); + vec3 cref2 = mix(sctmp, scolor2, beam_size); float creff2 = pow(max(max(cref2.r,cref2.g),cref2.b), scan_falloff); + + float f1 = f; + float f2 = 1.0-f; + + /* HSM Removed + float scanpix = mix(SourceSize.x/OutputSize.x, SourceSize.y/OutputSize.y, float(notate)); + */ + + // HSM Added + float scanpix = mix(SourceSize.x/(SCREEN_SCALE.x * OutputSize.x), SourceSize.y/(SCREEN_SCALE.y * OutputSize.y), float(notate)); + + f1 = fract(f1 + rolling_scan*float(global.FrameCount)*scanpix); + f2 = 1.0 - f1; + + if (gsl < 0.5) { wf1 = sw0(f1,creff1,shape1); wf2 = sw0(f2,creff2,shape2);} else + if (gsl == 1.0) { wf1 = sw1(f1,creff1,shape1); wf2 = sw1(f2,creff2,shape2);} else + { wf1 = sw2(f1,creff1,shape1); wf2 = sw2(f2,creff2,shape2);} + + if ((wf1 + wf2) > 1.0) { float wtmp = 1.0/(wf1+wf2); wf1*=wtmp; wf2*=wtmp; } + + // Scanline saturation application + + vec3 w1 = vec3(wf1); vec3 w2 = vec3(wf2); + w3 = wf1+wf2; + + float mc1 = max(max(color1.r,color1.g),color1.b) + eps; + float mc2 = max(max(color2.r,color2.g),color2.b) + eps; + + cref1 = color1 / mc1; cref1=cref1*cref1; cref1*=cref1; + cref2 = color2 / mc2; cref2=cref2*cref2; cref2*=cref2; + + w1 = max( mix(w1*mix(one, cref1, scans), w1, wf1*min((1.0+0.15*scans), 1.2)), 0.0); w1 = min(w1*color1, mc1)/(color1 + eps); + w2 = max( mix(w2*mix(one, cref2, scans), w2, wf2*min((1.0+0.15*scans), 1.2)), 0.0); w2 = min(w2*color2, mc2)/(color2 + eps); + + // Scanline Deconvergence + + vec3 cd1 = one; vec3 cd2 = one; float vm = sqrt(abs(vertmask)); + + float v_high1 = 1.0 + 0.3*vm; + float v_high2 = 1.0 + 0.6*vm; + float v_low = 1.0 - vm; + + float ds1 = min(max(1.0-w3*w3, 2.5*f1), 1.0); + float ds2 = min(max(1.0-w3*w3, 2.5*f2), 1.0); + + if (vertmask < 0.0) + { + cd1 = mix(one, vec3(v_high2, v_low, v_low), ds1); + cd2 = mix(one, vec3(v_low, v_high1, v_high1), ds2); + } + else + { + cd1 = mix(one, vec3(v_high1, v_low, v_high1), ds1); + cd2 = mix(one, vec3(v_low, v_high2, v_low), ds2); + } + + color = gc(color1)*w1*cd1 + gc(color2)*w2*cd2; + + if (abs(rolling_scan) > 0.005) + { + wt1 = st1(f); + wt2 = st1(1.0-f); + color00 = (color1*wt1 + color2*wt2)/(wt1+wt2); + color = gc(color00) * mix(w1+w2, w3.xxx, max(wf1,wf2)); + } + + color = min(color, 1.0); +} + + if (interb) + { + color = gc(color1); + } + + float colmx = pow(max(max(ctmp.r,ctmp.g),ctmp.b), 1.40/gamma_in); + + // TODO Don't add gamma, output from pass should be linear + // color = pow(color, vec3(1.0/gamma_out)); + + FragColor = vec4(color, colmx); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang new file mode 100644 index 0000000..03a877b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-crt-guest-advanced.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "hsm-crt-guest-advanced.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang new file mode 100644 index 0000000..e59dd5a --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-custom-fast-sharpen.slang @@ -0,0 +1,96 @@ +#version 450 + +/* + Fast Sharpen Shader + + Copyright (C) 2005 - 2019 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 SHARPEN, CONTR, DETAILS; + float SHARPEN_ON; +} params; + +#pragma parameter SHARPEN_TITLE "[ --- FAST SHARPEN - GUEST.R --- ]:" 0.00 0.0 2.00 0.05 +// #pragma parameter SHARPEN_ON " Sharpen ON" 0 0 1 1 +// #define SHARPEN_ON params.SHARPEN_ON +#define SHARPEN_ON 1 + +#pragma parameter SHARPEN " Sharpen Strength" 0.00 0.0 4.00 0.10 +#pragma parameter CONTR " Amount of Sharpening" 0.05 0.0 0.25 0.01 +#pragma parameter DETAILS " Details Sharpened" 1.00 0.0 1.00 0.05 + +#define SHARPEN params.SHARPEN +#define CONTR params.CONTR +#define DETAILS params.DETAILS + +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; + +void main() +{ + if ( SHARPEN_ON < 0.5 ) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec2 g01 = vec2(-1.0, 0.0)*params.SourceSize.zw; + vec2 g21 = vec2( 1.0, 0.0)*params.SourceSize.zw; + + vec3 c01 = texture(Source, vTexCoord + g01).rgb; + vec3 c21 = texture(Source, vTexCoord + g21).rgb; + vec3 c11 = texture(Source, vTexCoord ).rgb; + + vec3 b11 = 0.5*(c01+c21); + + float contrast = max(max(c11.r,c11.g),c11.b); + contrast = mix(2.0*CONTR, CONTR, contrast); + + vec3 mn1 = min(c01,c21); mn1 = min(mn1,c11*(1.0-contrast)); + vec3 mx1 = max(c01,c21); mx1 = max(mx1,c11*(1.0+contrast)); + + vec3 dif = pow(mx1-mn1+0.0001, vec3(0.75,0.75,0.75)); + vec3 sharpen = mix(vec3(SHARPEN*DETAILS), vec3(SHARPEN), dif); + + c11 = clamp(mix(c11,b11,-sharpen), mn1,mx1); + + FragColor = vec4(c11,1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-no-reflect.slang new file mode 100644 index 0000000..5fc0d12 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-no-reflect.slang @@ -0,0 +1,5 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-deconvergence.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-potato.slang new file mode 100644 index 0000000..aff240e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence-potato.slang @@ -0,0 +1,5 @@ +#version 450 + +#define IS_POTATO_PRESET +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-deconvergence.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.inc new file mode 100644 index 0000000..64cf8a4 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.inc @@ -0,0 +1,770 @@ +/* + CRT - Guest - Advanced + + Copyright (C) 2018-2022 guest(r) - guest.r@gmail.com + + Incorporates many good ideas and suggestions from Dr. Venom. + I would also like give thanks to many Libretro forums members for continuous feedback, suggestions and caring about the shader. + + 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. + +*/ + +#pragma parameter bogus_brightness "[ BRIGHTNESS SETTINGS ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter glow " Glow Strength -- glow" 0.08 -2.0 2.0 0.01 +#define glow global.glow // Glow Strength + +#pragma parameter bloom " Bloom Strength -- bloom" 0.0 -2.0 2.0 0.05 +#define bloom global.bloom // bloom effect + +#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 +#define bloom_dist global.bloom_dist // bloom effect distribution + +#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 +#define halation global.halation // halation effect + +#pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02 +#define gamma_c global.gamma_c // adjust brightness + +#pragma parameter brightboost " Bright Boost Dark Pixels -- brightboost" 1.40 0.25 10.0 0.05 +#define brightboost global.brightboost // adjust brightness + +#pragma parameter brightboost1 " Bright Boost Bright Pixels -- brightboost1" 1.10 0.25 3.00 0.025 +#define brightboost1 global.brightboost1 // adjust brightness + +// #pragma parameter bogus_screen "[ SCREEN OPTIONS ]: " 0.0 0.0 1.0 1.0 + +// #pragma parameter TATE " TATE Mode" 0.0 0.0 1.0 1.0 +// #define TATE global.TATE // Screen orientation + +// #pragma parameter TATE " TATE Mode" 0.0 0.0 1.0 1.0 +// #define TATE params.TATE // Screen orientation + +// #pragma parameter IOS " Integer Scaling: Odd:Y, Even:'X'+Y" 0.0 0.0 4.0 1.0 +// #define IOS params.IOS // Smart Integer Scaling + +// #pragma parameter OS " R. Bloom Overscan Mode" 1.0 0.0 2.0 1.0 +// #define OS params.OS // Do overscan + +// #pragma parameter BLOOM " Raster bloom %" 0.0 0.0 20.0 1.0 +// #define BLOOM params.BLOOM // Bloom overscan percentage + +// #pragma parameter csize " Corner Size" 0.0 0.0 0.25 0.005 +// #define csize params.csize // corner size + +// #pragma parameter bsize1 " Border Size" 0.01 0.0 3.0 0.01 +// #define bsize1 params.bsize1 // border Size + +// #pragma parameter sborder " Border Intensity" 0.75 0.25 2.0 0.05 +// #define sborder global.sborder // border intensity + +#pragma parameter gdv_humbar_title "[ HUM BAR ]: " 0.0 0.0 0.1 0.1 + +#pragma parameter barspeed " Hum Bar Speed" 50.0 5.0 200.0 1.0 + +#pragma parameter barintensity " Hum Bar Intensity" 0.0 -1.0 1.0 0.01 + +#pragma parameter bardir " Hum Bar Direction - -1:AUTO | VERTICAL | HORIZ" -1.0 -1.0 1.0 1.0 + +// #pragma parameter warpX " CurvatureX (default 0.03)" 0.0 0.0 0.25 0.01 +// #define warpX global.warpX // Curvature X + +// #pragma parameter warpY " CurvatureY (default 0.04)" 0.0 0.0 0.25 0.01 +// #define warpY global.warpY // Curvature Y + +// #pragma parameter c_shape " Curvature Shape" 0.25 0.05 0.60 0.05 +// #define c_shape global.c_shape // curvature shape + +// #pragma parameter overscanX " Overscan X original pixels" 0.0 -200.0 200.0 1.0 +// #define overscanX global.overscanX // OverscanX pixels + +// #pragma parameter overscanY " Overscan Y original pixels" 0.0 -200.0 200.0 1.0 +// #define overscanY global.overscanY // OverscanY pixels + +// #pragma parameter prescalex " Prescale-X Factor (for xBR...pre-shader)" 1.0 1.0 4.0 1.0 +// #define prescalex global.prescalex // prescale-x factor + +#pragma parameter bogus_masks "[ CRT MASK OPTIONS ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter shadowMask "CRT Mask: -1:None|0:CGWG|1-4:Lottes|5-12:Trinitrn -- shadowMask" 0.0 -1.0 12.0 1.0 +#define shadowMask global.shadowMask // Mask Style + +#pragma parameter masksize " Mask Size - 0:Auto | 2K | 4k -- masksize" 0.0 0.0 4 1.0 +#define masksize global.masksize // Mask Size + +#pragma parameter maskstr " Mask Strength (0, 5-12) -- maskstr" 0.3 -0.5 1.0 0.025 +#define maskstr global.maskstr // CGWG Mask Strength + +#pragma parameter mcut " Mask 5-12 Low Strength -- mcut" 1.10 0.0 2.0 0.05 +#define mcut global.mcut // Mask 5-9 cutoff + +#pragma parameter maskDark " Mask 1-4 Lottes maskDark" 0.5 0.0 2.0 0.05 +#define maskDark global.maskDark // Dark "Phosphor" + +#pragma parameter maskLight " Mask 1-4 Lottes maskLight" 1.5 0.0 2.0 0.05 +#define maskLight global.maskLight // Light "Phosphor" + +#pragma parameter mshift " Mask Shift/Stagger" 0.0 -8.0 8.0 1.0 +#define mshift global.mshift // mask 'line' shift/stagger + +#pragma parameter mask_layout " Mask Layout: RGB or BGR (check LCD panel) -- mask_layout" 0.0 0.0 1.0 1.0 +#define mask_layout global.mask_layout // mask layout: RGB or BGR + +#pragma parameter mask_gamma " Mask Gamma -- mask_gamma" 2.40 1.0 5.0 0.05 +#define mask_gamma global.mask_gamma // Mask application gamma + +#pragma parameter slotmask " Slot Mask Strength Bright Pixels -- slotmask" 0.0 0.0 1.0 0.05 +#define slotmask global.slotmask // Slot Mask ON/OFF + +#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 +#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" 0.0 0.0 4.0 1.0 +#define slotms global.slotms // Slot Mask Size + +#pragma parameter mclip " Keep Mask effect with clipping -- mclip" 0.50 0.0 1.0 0.05 +#define mclip global.mclip + +// #pragma parameter gamma_out "Gamma out" 2.4 1.0 5.0 0.05 +#define gamma_out HSM_GAMMA_OUT_CRT // output gamma + + + +#pragma parameter bogus_deconvergence11 "[ HORIZONTAL/VERTICAL DECONVERGENCE ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter GDV_DECONVERGENCE_ON " Use Deconvergence" 0 0 1 1 +#define GDV_DECONVERGENCE_ON global.GDV_DECONVERGENCE_ON + +#pragma parameter dctypex " Type X : 0.0 - static, other - dynamic -- dctypex" 0.0 0.0 0.75 0.05 + +#pragma parameter dctypey " Type Y : 0.0 - static, other - dynamic -- dctypey" 0.0 0.0 0.75 0.05 + +#pragma parameter deconrr " Horizontal Red Range -- deconrr" 1.0 -15.0 15.0 0.25 + +#pragma parameter deconrg " Horizontal Green Range -- deconrg" 0.0 -15.0 15.0 0.25 + +#pragma parameter deconrb " Horizontal Blue Range -- deconrb" -1.0 -15.0 15.0 0.25 + +#pragma parameter deconrry " Vertical Red Range -- deconrry" 1.0 -15.0 15.0 0.25 + +#pragma parameter deconrgy " Vertical Green Range -- deconrgy" 0.0 -15.0 15.0 0.25 + +#pragma parameter deconrby " Vertical Blue Range -- deconrby" -1.0 -15.0 15.0 0.25 + +#pragma parameter decons " Strength -- decons" 1 0 3.0 0.10 + +#pragma parameter noise_title "[ NOISE ]: " 0.0 0.0 1.0 1.0 + +#pragma parameter GDV_NOISE_ON " Noise ON" 0 0 1 1 + +#pragma parameter addnoised " Add Noise" 0.2 -1.0 1.0 0.02 + +#pragma parameter noiseresd " Noise Resolution" 2.0 1.0 10.0 1.0 + +#pragma parameter noisetype " Noise Type: Colored, Luma" 0.0 0.0 1.0 1.0 + +// #pragma parameter post_br " Post CRT Brightness" 1.0 0.25 5.0 0.01 + + +#define COMPAT_TEXTURE(c,d) texture(c,d) +#define TEX0 vTexCoord + +#define OutputSize global.OutputSize +#define gl_FragCoord (vTexCoord * OutputSize.xy) + +#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 LinearizePass; +layout(set = 0, binding = 3) uniform sampler2D AvgLumPass; +layout(set = 0, binding = 4) uniform sampler2D GlowPass; +layout(set = 0, binding = 5) uniform sampler2D BloomPass; + +/* HSM Removed - Only used for vignette +layout(set = 0, binding = 6) uniform sampler2D PrePass; +*/ + +layout(set = 0, binding = 7) uniform sampler2D Source; + +// HSM Added +layout(set = 0, binding = 8) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 9) uniform sampler2D InfoCachePassFeedback; + +#define eps 1e-10 + +// Shadow mask (1-4 from PD CRT Lottes shader). + +vec3 Mask(vec2 pos, float mx) +{ + // HSM Added + float final_mask_size = masksize; + + // If using automatic Mask Size + if (masksize < 0.5) + final_mask_size = (global.FinalViewportSize.x + global.FinalViewportSize.y) / 3 > 1900 ? 2 : 1; + + final_mask_size = max(1, floor(((1 - HSM_VIEWPORT_ZOOM_MASK) + HSM_VIEWPORT_ZOOM_MASK * VIEWPORT_SCALE.y) * final_mask_size + 0.2)); + + +/* HSM Removed + vec2 pos0 = pos; + pos.y = floor(pos.y/masksize); + float next_line = float(fract(pos.y*0.5) > 0.25); + pos0.x = (mshift > -0.25) ? (pos0.x + next_line * mshift) : (pos0.x + pos.y * mshift); + pos = floor(pos0/masksize); +*/ + + vec2 pos0 = pos; + pos.y = floor(pos.y/final_mask_size); + float next_line = float(fract(pos.y*0.5) > 0.25); + pos0.x = (mshift > -0.25) ? (pos0.x + next_line * mshift) : (pos0.x + pos.y * mshift); + pos = floor(pos0 / final_mask_size); + // End HSM Added + + /* HSM Removed + pos = floor(pos/masksize); + */ + + vec3 mask = vec3(maskDark, maskDark, maskDark); + vec3 one = vec3(1.0); + float dark_compensate = mix(max( clamp( mix (mcut, maskstr, mx),0.0, 1.0) - 0.4, 0.0) + 1.0, 1.0, mx); + float mc = 1.0 - max(maskstr, 0.0); + + // No mask + if (shadowMask == -1.0) + { + mask = vec3(1.0); + } + + // Phosphor. + else if (shadowMask == 0.0) + { + 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; } + } + + // Very compressed TV style shadow mask. + else if (shadowMask == 1.0) + { + float line = maskLight; + float odd = 0.0; + + if (fract(pos.x/6.0) < 0.49) + odd = 1.0; + if (fract((pos.y + odd)/2.0) < 0.49) + line = maskDark; + + pos.x = fract(pos.x/3.0); + + if (pos.x < 0.3) mask.r = maskLight; + else if (pos.x < 0.6) mask.g = maskLight; + else mask.b = maskLight; + + mask*=line; + } + + // Aperture-grille. + else if (shadowMask == 2.0) + { + pos.x = fract(pos.x/3.0); + + if (pos.x < 0.3) mask.r = maskLight; + else if (pos.x < 0.6) mask.g = maskLight; + else mask.b = maskLight; + } + + // Stretched VGA style shadow mask (same as prior shaders). + else if (shadowMask == 3.0) + { + pos.x += pos.y*3.0; + pos.x = fract(pos.x/6.0); + + if (pos.x < 0.3) mask.r = maskLight; + else if (pos.x < 0.6) mask.g = maskLight; + else mask.b = maskLight; + } + + // VGA style shadow mask. + else if (shadowMask == 4.0) + { + pos.xy = floor(pos.xy*vec2(1.0, 0.5)); + pos.x += pos.y*3.0; + pos.x = fract(pos.x/6.0); + + if (pos.x < 0.3) mask.r = maskLight; + else if (pos.x < 0.6) mask.g = maskLight; + else mask.b = maskLight; + } + + // Trinitron mask 5 + else if (shadowMask == 5.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x/2.0); + if (pos.x < 0.49) + { mask.r = 1.0; + mask.b = 1.0; + } + else mask.g = 1.0; + mask = clamp(mix( mix(one, mask, mcut), mix(one, mask, maskstr), mx), 0.0, 1.0) * dark_compensate; + } + + // Trinitron mask 6 + else if (shadowMask == 6.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x/3.0); + if (pos.x < 0.3) mask.r = 1.0; + else if (pos.x < 0.6) 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; + } + + // BW Trinitron mask 7 + else if (shadowMask == 7.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x/2.0); + if (pos.x < 0.49) + { mask = 0.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; + } + + // BW Trinitron mask 8 + else if (shadowMask == 8.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x/3.0); + if (pos.x < 0.3) mask = 0.0.xxx; + 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; + } + + // Magenta - Green - Black mask + else if (shadowMask == 9.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x/3.0); + if (pos.x < 0.3) mask = 0.0.xxx; + 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; + } + + // RGBX + else if (shadowMask == 10.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x * 0.25); + if (pos.x < 0.2) mask = 0.0.xxx; + else if (pos.x < 0.4) mask.r = 1.0; + 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; + } + + // 4k mask + else if (shadowMask == 11.0) + { + mask = vec3(0.0); + pos.x = fract(pos.x * 0.25); + if (pos.x < 0.2) mask.r = 1.0; + else if (pos.x < 0.4) mask.rg = 1.0.xx; + 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; + } + + // RRGGBBX mask + else + { + mask = vec3(0.0); + pos.x = floor(mod(pos.x,7.0)); + if (pos.x < 1.0) mask = 0.0.xxx; + else if (pos.x < 3.0) mask.r = 1.0; + else if (pos.x < 5.0) 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; + } + + return mask; +} + +float SlotMask(vec2 pos, float m) +{ + if ((slotmask + slotmask1) == 0.0) return 1.0; + else + { + // HSM Added + float final_mask_size = slotms; + // If using automatic Mask Size + if (slotms < 0.5) + final_mask_size = (global.FinalViewportSize.x + global.FinalViewportSize.y) / 3 > 1900 ? 2 : 1; + + final_mask_size = max(1, floor(((1 - HSM_VIEWPORT_ZOOM_MASK) + HSM_VIEWPORT_ZOOM_MASK * VIEWPORT_SCALE.y) * final_mask_size + 0.2)); + + pos = floor(pos / final_mask_size); + // End HSM Added + + /* HSM Removed + pos = floor(pos/slotms); + */ + float mlen = slotwidth*2.0; + float px = fract(pos.x/mlen); + float py = floor(fract(pos.y/(2.0*double_slot))*2.0*double_slot); + float slot_dark = mix(1.0-slotmask1, 1.0-slotmask, m); + float slot = 1.0; + if (py == 0.0 && px < 0.5) slot = slot_dark; else + if (py == double_slot && px >= 0.5) slot = slot_dark; + + return slot; + } +} + +/* HSM Removed +vec2 Warp(vec2 pos) +{ + pos = pos*2.0-1.0; + pos = mix(pos, vec2(pos.x*inversesqrt(1.0-c_shape*pos.y*pos.y), pos.y*inversesqrt(1.0-c_shape*pos.x*pos.x)), vec2(warpX, warpY)/c_shape); + return pos*0.5 + 0.5; +} + +vec2 Overscan(vec2 pos, float dx, float dy){ + pos=pos*2.0-1.0; + pos*=vec2(dx,dy); + return pos*0.5+0.5; +} +*/ + +float humbar(float pos) +{ + if (global.barintensity == 0.0) return 1.0; else + { + pos = (global.barintensity >= 0.0) ? pos : (1.0-pos); + pos = fract(pos + mod(float(global.FrameCount),global.barspeed)/(global.barspeed-1.0)); + pos = (global.barintensity < 0.0) ? pos : (1.0-pos); + return (1.0-global.barintensity) + global.barintensity*pos; + } +} + + +/* HSM Removed +float corner(vec2 pos) { + vec2 b = vec2(bsize1, bsize1) * vec2(1.0, OutputSize.x/OutputSize.y) * 0.05; + pos = clamp(pos, 0.0, 1.0); + pos = abs(2.0*(pos - 0.5)); + float csize1 = mix(400.0, 7.0, pow(4.0*csize, 0.10)); + float crn = dot(pow(pos, csize1.xx), vec2(1.0, OutputSize.y/OutputSize.x)); + crn = (csize == 0.0) ? max(pos.x, pos.y) : pow(crn, 1.0/csize1); + pos = max(pos, crn); + vec2 res = (bsize1 == 0.0) ? 1.0.xx : mix(0.0.xx, 1.0.xx, smoothstep(1.0.xx, 1.0.xx-b, sqrt(pos))); + res = pow(res, sborder.xx); + return sqrt(res.x*res.y); +} +*/ + +vec3 plant (vec3 tar, float r) +{ + float t = max(max(tar.r,tar.g),tar.b) + 0.00001; + return tar * r / t; +} + +vec3 declip(vec3 c, float b) +{ + float m = max(max(c.r,c.g),c.b); + if (m > b) c = c*b/m; + return c; +} + +// noise function: +// Dedicated to the public domain. +// If you want a real license, you may consider this MIT/BSD/CC0/WTFPL-licensed (take your pick). +// Adapted from ChuckNorris - shadertoy: https://www.shadertoy.com/view/XtK3Dz + +vec3 noise(vec3 v){ + if (global.addnoised < 0.0) v.z = -global.addnoised; else v.z = mod(v.z,6001.0)/1753.0; + // ensure reasonable range + v = fract(v) + fract(v*1e4) + fract(v*1e-4); + // seed + v += vec3(0.12345, 0.6789, 0.314159); + // more iterations => more random + v = fract(v*dot(v, v)*123.456); + v = fract(v*dot(v, v)*123.456); + v = fract(v*dot(v, v)*123.456); + v = fract(v*dot(v, v)*123.456); + return v; +} + +void fetch_pixel (inout vec3 c, inout vec3 b, vec2 coord, vec2 bcoord) +{ + float stepx = OutputSize.z; + float stepy = OutputSize.w; + + float ds = global.decons; + + vec2 dx = vec2(stepx, 0.0); + vec2 dy = vec2(0.0, stepy); + + float posx = 2.0*coord.x - 1.0; + float posy = 2.0*coord.y - 1.0; + + if (global.dctypex > 0.025) + { + posx = sign(posx)*pow(abs(posx), 1.05-global.dctypex); + dx = posx * dx; + } + + if (global.dctypey > 0.025) + { + + posy = sign(posy)*pow(abs(posy), 1.05-global.dctypey); + dy = posy * dy; + } + + // if (global.dctypex > 0.025 || global.dctypey > 0.025) ds *= sqrt(posx*posx*sign(global.dctypex) + posy*posy*sign(global.dctypey)); + + vec2 rc = global.deconrr * dx + global.deconrry*dy; + vec2 gc = global.deconrg * dx + global.deconrgy*dy; + vec2 bc = global.deconrb * dx + global.deconrby*dy; + + float r1 = COMPAT_TEXTURE(Source, coord + rc).r; + float g1 = COMPAT_TEXTURE(Source, coord + gc).g; + float b1 = COMPAT_TEXTURE(Source, coord + bc).b; + + vec3 d = vec3(r1, g1, b1); + c = clamp(mix(c, d, ds), 0.0, 1.0); + + /* HSM Removed + r1 = COMPAT_TEXTURE(BloomPass, bcoord + rc).r; + g1 = COMPAT_TEXTURE(BloomPass, bcoord + gc).g; + b1 = COMPAT_TEXTURE(BloomPass, bcoord + bc).b; + */ + + // HSM Added + r1 = HSM_GetCroppedTexSample(BloomPass, bcoord + rc).r; + g1 = HSM_GetCroppedTexSample(BloomPass, bcoord + gc).g; + b1 = HSM_GetCroppedTexSample(BloomPass, bcoord + bc).b; + + d = vec3(r1, g1, b1); + b = clamp(mix(b, d, ds), 0.0, 1.0); +} + + +void main() +{ + + /* HSM Removed + vec4 SourceSize = global.OriginalSize * vec4(prescalex, 1.0, 1.0/prescalex, 1.0); + */ + + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + vec2 SourceSize = CROPPED_ROTATED_SIZE_WITH_RES_MULT; + float TATE = USE_VERTICAL_SCANLINES; + + 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(SCREEN_COORD, + SCREEN_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 (cache_bounds_coord.x < -0.01 || cache_bounds_coord.x > 1.01 || cache_bounds_coord.y < -0.01 || cache_bounds_coord.y > 1.01) + { + FragColor = vec4(0); + return; + } + + float lum = COMPAT_TEXTURE(AvgLumPass, vec2(0.5,0.5)).a; + + float gamma_in = 1.0/COMPAT_TEXTURE(LinearizePass, vec2(0.25,0.25)).a; + float intera = COMPAT_TEXTURE(LinearizePass, vec2(0.75,0.25)).a; + bool interb = (intera < 0.5); + bool notate = (TATE < 0.5); + + /* HSM Removed + // Calculating texel coordinates + + vec2 texcoord = TEX0.xy; + if (IOS > 0.0){ + vec2 ofactor = OutputSize.xy/SourceSize.xy; + vec2 intfactor = (IOS < 2.5) ? floor(ofactor) : ceil(ofactor); + vec2 diff = ofactor/intfactor; + float scan = mix(diff.y, diff.x, TATE); + texcoord = Overscan(texcoord, scan, scan); + if (IOS == 1.0 || IOS == 3.0) texcoord = mix(vec2(TEX0.x, texcoord.y), vec2(texcoord.x, TEX0.y), TATE); + } + + float factor = 1.00 + (1.0-0.5*OS)*BLOOM/100.0 - lum*BLOOM/100.0; + texcoord = Overscan(texcoord, factor, factor); + + texcoord = Overscan(texcoord, (global.OriginalSize.x - overscanX)/global.OriginalSize.x, (global.OriginalSize.y - overscanY)/global.OriginalSize.y); + */ + + vec2 pos1 = TEX0.xy; + + + /* HSM Removed + vec2 pos = Warp(texcoord); + vec2 pos0 = Warp(TEX0.xy); + */ + + // HSM Added + vec2 screen_curved_coord = HSM_GetCurvedCoord(SCREEN_COORD, HSM_CRT_CURVATURE_SCALE, SCREEN_ASPECT); + vec2 pos = HSM_GetMirrorWrappedCoord(screen_curved_coord); + vec2 pos0 = pos; + + vec3 color0 = COMPAT_TEXTURE(Source,pos1).rgb; + float c0 = max(max(color0.r, color0.g),color0.b); + + // color and bloom fetching + vec3 color = COMPAT_TEXTURE(Source,pos1).rgb; + vec3 Bloom = HSM_GetCroppedTexSample(BloomPass, pos).rgb; + + // HSM Added + if (GDV_DECONVERGENCE_ON > 0.5) + fetch_pixel(color, Bloom, pos1, pos); + + float cm = max(max(color.r,color.g),color.b); + float mx1 = COMPAT_TEXTURE(Source, pos1 ).a; + float colmx = max(mx1, cm); + float w3 = min((c0 + 0.0005) / (pow(colmx, gamma_in/1.4) + 0.0005), 1.0); + + vec2 dx = mix(vec2(0.001, 0.0), vec2(0.0, 0.001), TATE); + float mx0 = COMPAT_TEXTURE(Source, pos1 - dx).a; + float mx2 = COMPAT_TEXTURE(Source, pos1 + dx).a; + float mx = max(max(mx0,mx1),max(mx2,cm)); + + vec3 one = vec3(1.0); + + // Apply Mask + + vec3 orig1 = color; + vec3 cmask = one; + + vec2 maskcoord = gl_FragCoord.yx * 1.000001; + if (notate) maskcoord = maskcoord.yx; + + float smask = SlotMask(maskcoord, mx); + cmask*= Mask(maskcoord, mx); + + if (mask_layout > 0.5) cmask = cmask.rbg; + + color = pow(color, vec3(mask_gamma/gamma_in)); + color = color*cmask; + color = min(color,1.0); + color = color*smask; + color = pow(color, vec3(gamma_in/mask_gamma)); + + cmask = min(cmask*smask, 1.0); + + float bb = mix(brightboost, brightboost1, colmx); + if (interb) bb = (abs(intera-0.5)<0.1) ? pow(0.80*bb, 0.65) : pow(bb, 0.70); + color*=bb; + +/* HSM Removed + vec3 Glow = COMPAT_TEXTURE(GlowPass, pos).rgb; + vec3 Ref = COMPAT_TEXTURE(LinearizePass, pos).rgb; + float maxb = COMPAT_TEXTURE(BloomPass, pos).a; + float vig = COMPAT_TEXTURE(PrePass, clamp(pos, 0.0+0.5*global.OriginalSize.zw, 1.0-0.5*global.OriginalSize.zw)).a; +*/ + + vec3 Glow = HSM_GetCroppedTexSample(GlowPass, pos).rgb; + vec3 Ref = HSM_GetCroppedTexSample(LinearizePass, pos).rgb; + float maxb = COMPAT_TEXTURE(BloomPass, pos).a; + + vec3 Bloom1 = Bloom; + + if (bloom < -0.01) Bloom1 = plant(Bloom, maxb); + + Bloom1 = min(Bloom1*(orig1+color), max(0.5*(colmx + orig1 - color),0.001*Bloom1)); + Bloom1 = 0.5*(Bloom1 + mix(Bloom1, mix(colmx*orig1, Bloom1, 0.5), 1.0-color)); + + Bloom1 = Bloom1 * mix(1.0, 2.0-colmx, bloom_dist); + + color = color + abs(bloom) * Bloom1; + + color = min(color, mix(one, cmask, mclip)); + + if (!interb) color = declip(color, mix(1.0, w3, 0.6)); else w3 = 1.0; + + if (halation > 0.01) { + Bloom = mix(0.5*(Bloom + Bloom*Bloom), 0.75*Bloom*Bloom, colmx); + color = color + 2.0*max((maxb+maxb*maxb-0.5*max(max(Ref.r,Ref.g),Ref.b)),0.25)*mix(1.0,w3,0.5*colmx)*mix(one,cmask,0.6)*Bloom*halation; } + + + Glow = mix(Glow, 0.25*color, 0.7*colmx); + if (glow >= 0.0) color = color + 0.5*Glow*glow; else { cmask*=cmask; cmask*=cmask; color = color + (-glow)*cmask*Glow; } + + /* HSM Removed + color = min(color, 1.0); + */ + + color = pow(color, vec3(1.0/gamma_out)); + + float rc = 0.6*sqrt(max(max(color.r, color.g), color.b))+0.4; + + + if (global.GDV_NOISE_ON > 0.5) + { + vec3 noise0 = noise(vec3(floor(OutputSize.xy * vTexCoord / global.noiseresd), float(global.FrameCount))); + if (global.noisetype < 0.5) color = mix(color, noise0, 0.25*abs(global.addnoised) * rc); + else color = min(color * mix(1.0, 1.5*noise0.x, 0.5*abs(global.addnoised)), 1.0); + } + + /* HSM Removed + FragColor = vec4(color*vig*humbar(mix(pos.y, pos.x, global.bardir))*global.post_br*corner(pos0), 1.0); + */ + + // HSM Added + float adjusted_bardir = global.bardir < 0 ? TATE : global.bardir; + color.rgb *= humbar(mix(pos.y, pos.x, adjusted_bardir)); + FragColor = vec4(color, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang new file mode 100644 index 0000000..a795b89 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-deconvergence.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "hsm-deconvergence.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang new file mode 100644 index 0000000..842ab24 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_horizontal.slang @@ -0,0 +1,105 @@ +#version 450 + +/* + Gaussian blur - horizontal pass, dynamic range, resizable + + Copyright (C) 2020 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 LinearizePassSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float glow; + float SIZEH; + float SIGMA_H; +} params; + +#pragma parameter GDV_GDV_ADV_TITLE_2 "[ --- GUEST-DrVenom Advanced --- ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter bogus_glow "[ GLOW ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter glow " Glow Strength -- glow" 0.08 -2.0 2.0 0.01 +#define glow params.glow // Glow Strength + +#pragma parameter SIZEH " Horizontal Radius (Num Samples) -- SIZEH" 6.0 1.0 50.0 1.0 +#define SIZEH params.SIZEH + +#pragma parameter SIGMA_H " Horizontal Sigma ( Spread ) -- SIGMA_H" 1.20 0.20 15.0 0.10 +#define SIGMA_H params.SIGMA_H + +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 LinearizePass; + +#define COMPAT_TEXTURE(c,d) texture(c,d) + +float invsqrsigma = 1.0/(2.0*SIGMA_H*SIGMA_H); + +float gaussian(float x) +{ + return exp(-x*x*invsqrsigma); +} + +void main() +{ + vec4 SourceSize1 = params.OriginalSize; + float f = fract(SourceSize1.x * vTexCoord.x); + f = 0.5 - f; + vec2 tex = floor(SourceSize1.xy * vTexCoord)*SourceSize1.zw + 0.5*SourceSize1.zw; + vec3 color = vec3(0.0); + vec2 dx = vec2(SourceSize1.z, 0.0); + + float w; + float wsum = 0.0; + vec3 pixel; + float n = -SIZEH; + + do + { + pixel = COMPAT_TEXTURE(LinearizePass, tex + n*dx).rgb; + w = gaussian(n+f); + color = color + w * pixel; + wsum = wsum + w; + n = n + 1.0; + + } while (n <= SIZEH); + + color = color / wsum; + + FragColor = vec4(color, 1.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang new file mode 100644 index 0000000..2853eae --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-gaussian_vertical.slang @@ -0,0 +1,98 @@ +#version 450 + +/* + Gaussian blur - vertical pass, dynamic range, resizable + + Copyright (C) 2020 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 SIZEV; + float SIGMA_V; +} params; + + +#pragma parameter SIZEV " Vertical Radius (Num Samples) -- SIZEV" 6.0 1.0 50.0 1.0 +#define SIZEV params.SIZEV + +#pragma parameter SIGMA_V " Vertical Sigma ( Spread ) -- SIGMA_V" 1.20 0.20 15.0 0.10 +#define SIGMA_V params.SIGMA_V + +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; + +#define COMPAT_TEXTURE(c,d) texture(c,d) + +float invsqrsigma = 1.0/(2.0*SIGMA_V*SIGMA_V); + +float gaussian(float x) +{ + return exp(-x*x*invsqrsigma); +} + +void main() +{ + vec4 SourceSize1 = vec4(params.SourceSize.x, params.OriginalSize.y, params.SourceSize.z, params.OriginalSize.w); + float f = fract(SourceSize1.y * vTexCoord.y); + f = 0.5 - f; + vec2 tex = floor(SourceSize1.xy * vTexCoord)*SourceSize1.zw + 0.5*SourceSize1.zw; + vec3 color = vec3(0.0); + vec2 dy = vec2(0.0, SourceSize1.w); + + float w; + float wsum = 0.0; + vec3 pixel; + float n = -SIZEV; + + do + { + pixel = COMPAT_TEXTURE(Source, tex + n*dy).rgb; + w = gaussian(n+f); + color = color + w * pixel; + wsum = wsum + w; + n = n + 1.0; + + } while (n <= SIZEV); + + color = color / wsum; + + FragColor = vec4(color, 1.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang new file mode 100644 index 0000000..4cc1bba --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-interlace-and-linearize.slang @@ -0,0 +1,255 @@ +#version 450 + +/* + Interlacing + + Copyright (C) 2020 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. + +*/ + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" + +layout(push_constant) uniform Push +{ + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + +// float GAMMA_INPUT; +// float inter; +// float interm; +// float inters; +// float iscan; +// float intres; +// float downsample_level; +// float prescalex; +} params; + + +/* +layout(std140, set = 0, binding = 0) uniform UBO +{ + vec4 SourceSize; + mat4 MVP; +} global; + + +// #pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.05 +*/ + +/* +// #pragma parameter bogus_interlacing "[ INTERLACING OPTIONS ]: " 0.0 0.0 0.0 1.0 + +// #pragma parameter inter " Interlace Trigger Resolution :" 350.0 0.0 800.0 25.0 +// #define inter params.inter // interlace resolution + +// #pragma parameter interm " Interlace Mode: OFF, Normal 1-3, Interpolation 4-5" 1.0 0.0 5.0 1.0 +*/ +#define interm HSM_INTERLACE_MODE // interlace mode + +/* +// #pragma parameter inters " Interlacing Effect Smoothness" 0.0 0.0 0.5 0.05 // Joint parameter with main pass, values must match +*/ +#define inters HSM_INTERLACE_EFFECT_SMOOTHNESS_INTERS // interlacing effect smoothing + +/* +// #pragma parameter iscan " Interlacing Scanline Effect" 0.20 0.0 1.0 0.05 +*/ +#define iscan HSM_INTERLACE_SCANLINE_EFFECT // interlacing effect scanlining + +/* +// #pragma parameter intres " Internal Resolution Y: 224p/240p, 1.5...y-dowsample" 0.0 0.0 6.0 0.5 // Joint parameter with main pass, values must match + +// #define intres params.intres // interlace resolution + +// #pragma parameter downsample_levelx " Downsampling-X (High-res content, pre-scalers)" 0.0 0.0 2.0 0.25 +*/ +#define downsample_level HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR // downsample level + +// #pragma parameter downsample_levely " Downsampling-Y (High-res content, pre-scalers)" 0.0 0.0 2.0 0.25 + + +// #pragma parameter prescalex " Prescale-X Factor (for xBR...pre-shader)" 1.0 1.0 4.0 1.0 // Joint parameter with main pass, values must match +// #define prescalex params.prescalex // prescale-x factor + +#pragma parameter iscans " Interlacing (Scanline) Saturation" 0.25 0 1 0.05 +#define iscans global.iscans + +bool use_vert_scanlines_bool = false; +#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 = 1) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 2) uniform sampler2D InfoCachePassFeedback; +layout(set = 0, binding = 3) uniform sampler2D PrePass; +layout(set = 0, binding = 4) uniform sampler2D NegativeCropAddedPass; + +#define COMPAT_TEXTURE(c,d) texture(c,d) + + +vec3 plant (vec3 tar, float r) +{ + float t = max(max(tar.r,tar.g),tar.b) + 0.00001; + return tar * r / t; +} + +// TODO need to adjust downsample +vec3 fetch_pixel(vec2 coord) +{ + vec2 prescale_tex_size = textureSize(NegativeCropAddedPass, 0); + + vec2 dx = vec2(1 / prescale_tex_size.x, 0.0) * HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR; + vec2 dy = vec2(0.0, 1 / prescale_tex_size.y) * HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR; + + if (use_vert_scanlines_bool) + { + dx = vec2(1 / prescale_tex_size.x, 0.0) * HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR; + dy = vec2(0.0, 1 / prescale_tex_size.y) * HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR; + } + + vec2 d1 = dx + dy; + vec2 d2 = dx - dy; + + float sum = 15.0; + vec3 result = 3.0*COMPAT_TEXTURE(PrePass, coord ).rgb + + 2.0*COMPAT_TEXTURE(PrePass, coord + dx).rgb + + 2.0*COMPAT_TEXTURE(PrePass, coord - dx).rgb + + 2.0*COMPAT_TEXTURE(PrePass, coord + dy).rgb + + 2.0*COMPAT_TEXTURE(PrePass, coord - dy).rgb + + COMPAT_TEXTURE(PrePass, coord + d1).rgb + + COMPAT_TEXTURE(PrePass, coord - d1).rgb + + COMPAT_TEXTURE(PrePass, coord + d2).rgb + + COMPAT_TEXTURE(PrePass, coord - d2).rgb; + + return result/sum; +} + + +void main() +{ + /* HSM Removed + vec3 c1 = COMPAT_TEXTURE(PrePass, vTexCoord).rgb; + vec3 c2 = COMPAT_TEXTURE(PrePass, vTexCoord + vec2(0.0, params.OriginalSize.w)).rgb; + */ + + vec3 c1 = vec3(0); + vec3 c2 = vec3(0); + + // HSM Added + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + use_vert_scanlines_bool = (USE_VERTICAL_SCANLINES > 0.5); + + // HSM Added + if (HSM_ROTATE_CORE_IMAGE > 0.5) + { + use_vert_scanlines_bool = !use_vert_scanlines_bool; + } + + vec2 rotated_derezed_size = HSM_GetRotatedDerezedSize(); + + float derezed_opposite_dir_res = use_vert_scanlines_bool ? rotated_derezed_size.x : rotated_derezed_size.y; + float derezed_scaled_opposite_dir_res = derezed_opposite_dir_res * HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR; + + float orig_opposite_dir_res = use_vert_scanlines_bool ? ROTATED_CORE_PREPPED_SIZE.x : ROTATED_CORE_PREPPED_SIZE.y; + float scaled_opposite_dir_res = orig_opposite_dir_res * HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR; + + float orig_scanline_dir_res = use_vert_scanlines_bool ? ROTATED_CORE_PREPPED_SIZE.y : ROTATED_CORE_PREPPED_SIZE.x; + + float tex_coord_scan_dir = use_vert_scanlines_bool ? vTexCoord.x : vTexCoord.y; + + vec2 downsample_offset = vec2(0, 1 / orig_opposite_dir_res / NEGATIVE_CROP_EXPAND_MULTIPLIER ); + + if (use_vert_scanlines_bool) + downsample_offset = vec2(1 / orig_opposite_dir_res / NEGATIVE_CROP_EXPAND_MULTIPLIER, 0 ); + + if ((HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR + HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR) > 0.0) + { + c1 = fetch_pixel(vTexCoord); + c2 = fetch_pixel(vTexCoord + downsample_offset); + } + else + { + c1 = COMPAT_TEXTURE(PrePass, vTexCoord).rgb; + c2 = COMPAT_TEXTURE(PrePass, vTexCoord + downsample_offset).rgb; + } + vec3 c = c1; + + float intera = 1.0; + float gamma_in = clamp(GAMMA_INPUT, 1.0, 5.0); + + float m1 = max(max(c1.r,c1.g),c1.b); + float m2 = max(max(c2.r,c2.g),c2.b); + vec3 df = abs(c1-c2); + + float d = max(max(df.r,df.g),df.b); + if (interm == 2.0) d = mix(0.1*d,10.0*d, step(m1/(m2+0.0001),m2/(m1+0.0001))); + + float r = m1; + + /* HSM Removed + float yres_div = 1.0; if (intres > 1.25) yres_div = intres; + + if (inter < params.OriginalSize.y/yres_div && interm > 0.5 && intres != 1.0 && intres != 0.5) + */ + + // HSM Added + if (HSM_INTERLACE_TRIGGER_RES <= derezed_scaled_opposite_dir_res && interm > 0.5) + { + intera = 0.25; + + /* HSM Removed + float line_no = clamp(floor(mod(params.OriginalSize.y*vTexCoord.y, 2.0)), 0.0, 1.0); + */ + + // HSM Added + float line_no = clamp( floor( mod( orig_opposite_dir_res * tex_coord_scan_dir, 2.0 ) ), 0.0, 1.0 ); + float frame_no = clamp(floor(mod(float(params.FrameCount),2.0)), 0.0, 1.0); + float ii = abs(line_no-frame_no); + + if (interm < 3.5) + { + c2 = plant(mix(c2, c2*c2, iscans), max(max(c2.r,c2.g),c2.b)); + r = clamp(max(m1*ii, (1.0-iscan)*min(m1,m2)), 0.0, 1.0); + c = plant( mix(mix(c1,c2, min(mix(m1, 1.0-m2, min(m1,1.0-m1))/(d+0.00001),1.0)), c1, ii), r); + if (interm == 3.0) c = (1.0-0.5*iscan)*mix(c2, c1, ii); + intera = 0.0; + } + if (interm == 4.0) { c = plant(mix(c, c*c, 0.5*iscans), max(max(c.r,c.g),c.b)); intera = 0.45; } + if (interm == 5.0) { c = mix(c2, c1, 0.5); c = plant(mix(c, c*c, 0.5*iscans), max(max(c.r,c.g),c.b)); intera = 0.45; } + } + c = pow(c, vec3(gamma_in)); + + // if (USE_VERTICAL_SCANLINES > 0.5) + // intera = 1; + + if (vTexCoord.x > 0.5) gamma_in = intera; else gamma_in = 1.0/gamma_in; + + FragColor = vec4(c, gamma_in); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang new file mode 100644 index 0000000..2d66ae5 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm-pre-shaders-afterglow.slang @@ -0,0 +1,381 @@ +#version 450 + +/* + CRT Advanced Afterglow, color altering + + Copyright (C) 2019-2021 guest(r) and Dr. Venom + + 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 TNTC; + float LS; + float LUTLOW, LUTBR; + float CP, CS; + float WP; + float wp_saturation; + float AS, sat; + float BP; + // float vigstr; + // float vigdef; + float sega_fix; + float pre_bb; + float contr; +} params; + +#pragma parameter AS " Afterglow Strength -- AS" 0.20 0.0 0.60 0.01 +#define AS params.AS + +#pragma parameter sat " Afterglow Saturation -- sat" 0.33 0.0 1.0 0.01 +#define sat params.sat + +// #pragma parameter BP " Brighten Black (For Scanlines on Black) -- BP" 0.0 0.0 100.0 1.0 + +#pragma parameter bogus_color "[ COLOR TWEAKS ]:" 0.0 0.0 1.0 1.0 + +#pragma parameter CS " Display Gamut: sRGB, Modern, DCI, Adobe, Rec.2020 -- CS" 0.0 0.0 4.0 1.0 +#pragma parameter CP " CRT Profile: EBU | P22 | SMPTE-C | Philips | Trin. -- CP" 0.0 -1.0 5.0 1.0 + +#define CP params.CP +#define CS params.CS + +#pragma parameter TNTC " LUT Colors: Trin. | InvTrin. | NEC Mult. | NTSC -- TNTC" 0.0 0.0 4.0 1.0 +#define TNTC params.TNTC + +#pragma parameter LS " LUT Size -- LS" 32.0 32.0 64.0 32.0 +#define LS params.LS + +#define LUTLOW 5.0 // "Fix LUT Dark - Range" from 0.0 to 50.0 - RGB singletons + +#define LUTBR 1.0 // "Fix LUT Brightness" from 0.0 to 1.0 + +#pragma parameter WP " Color Temperature % -- wp" 0.0 -100.0 100.0 5.0 + +#pragma parameter wp_saturation " Saturation Adjustment -- wp_saturation" 1.0 0.0 2.0 0.05 + +#pragma parameter pre_bb " Brightness Adjustment" 1.0 0.0 2.0 0.01 + +#pragma parameter contr " Contrast Adjustment" 0.0 -1.0 1.0 0.05 + +#pragma parameter sega_fix " Sega Brightness Fix" 0.0 0.0 1.0 1.0 + +// #pragma parameter vigstr " Vignette Strength" 0.0 0.0 2.0 0.025 + +// #pragma parameter vigdef " Vignette Definition" 7.0 0.4 15.0 0.2 + +#define WP params.WP +#define wp_saturation params.wp_saturation +#define BP 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 PreCRTPass; +layout(set = 0, binding = 3) uniform sampler2D AfterglowPass; +layout(set = 0, binding = 4) uniform sampler2D SamplerLUT1; +layout(set = 0, binding = 5) uniform sampler2D SamplerLUT2; +layout(set = 0, binding = 6) uniform sampler2D SamplerLUT3; +layout(set = 0, binding = 7) uniform sampler2D SamplerLUT4; + +#define COMPAT_TEXTURE(c,d) texture(c,d) + + +// Color profile matrices + +const mat3 Profile0 = +mat3( + 0.412391, 0.212639, 0.019331, + 0.357584, 0.715169, 0.119195, + 0.180481, 0.072192, 0.950532 +); + +const mat3 Profile1 = +mat3( + 0.430554, 0.222004, 0.020182, + 0.341550, 0.706655, 0.129553, + 0.178352, 0.071341, 0.939322 +); + +const mat3 Profile2 = +mat3( + 0.396686, 0.210299, 0.006131, + 0.372504, 0.713766, 0.115356, + 0.181266, 0.075936, 0.967571 +); + +const mat3 Profile3 = +mat3( + 0.393521, 0.212376, 0.018739, + 0.365258, 0.701060, 0.111934, + 0.191677, 0.086564, 0.958385 +); + +const mat3 Profile4 = +mat3( + 0.392258, 0.209410, 0.016061, + 0.351135, 0.725680, 0.093636, + 0.166603, 0.064910, 0.850324 +); + +const mat3 Profile5 = +mat3( + 0.377923, 0.195679, 0.010514, + 0.317366, 0.722319, 0.097826, + 0.207738, 0.082002, 1.076960 +); + +const mat3 ToSRGB = +mat3( + 3.240970, -0.969244, 0.055630, +-1.537383, 1.875968, -0.203977, +-0.498611, 0.041555, 1.056972 +); + +const mat3 ToModern = +mat3( + 2.791723, -0.894766, 0.041678, +-1.173165, 1.815586, -0.130886, +-0.440973, 0.032000, 1.002034 +); + +const mat3 ToDCI = +mat3( + 2.725394, -0.795168, 0.041242, +-1.018003, 1.689732, -0.087639, +-0.440163, 0.022647, 1.100929 +); + +const mat3 ToAdobe = +mat3( + 2.041588, -0.969244, 0.013444, +-0.565007, 1.875968, -0.11836, +-0.344731, 0.041555, 1.015175 +); + +const mat3 ToREC = +mat3( + 1.716651, -0.666684, 0.017640, +-0.355671, 1.616481, -0.042771, +-0.253366, 0.015769, 0.942103 +); + +// Color temperature matrices + +const mat3 D65_to_D55 = mat3 ( + 0.4850339153, 0.2500956126, 0.0227359648, + 0.3488957224, 0.6977914447, 0.1162985741, + 0.1302823568, 0.0521129427, 0.6861537456); + + +const mat3 D65_to_D93 = mat3 ( + 0.3412754080, 0.1759701322, 0.0159972847, + 0.3646170520, 0.7292341040, 0.1215390173, + 0.2369894093, 0.0947957637, 1.2481442225); + + +vec3 fix_lut(vec3 lutcolor, vec3 ref) +{ + float r = length(ref); + float l = length(lutcolor); + float m = max(max(ref.r,ref.g),ref.b); + ref = normalize(lutcolor + 0.0000001) * mix(r, l, pow(m,1.25)); + return mix(lutcolor, ref, LUTBR); +} + +vec2 ctransform (vec2 inputc) +{ + return vec2( inputc.x * sqrt(1.0 - 0.5*inputc.y*inputc.y), inputc.y * sqrt(1.0 - 0.5*inputc.x*inputc.x)); +} + +/* HSM Removed +float vignette (vec2 coords) +{ + vec2 ccoords = ctransform(2.0*(coords-0.5)); + ccoords = ccoords * ccoords; + float vstr = sqrt(ccoords.x+ccoords.y); + vstr = pow(vstr, params.vigdef); + return max(mix(1.0, 1.0-vstr, params.vigstr), 0.0); +} +*/ + +vec3 plant (vec3 tar, float r) +{ + float t = max(max(tar.r,tar.g),tar.b) + 0.00001; + return tar * r / t; +} + +float contrast(float x) +{ + float y = 2.0*x-1.0; + y = (sin(y*1.57079632679)+1.0)*0.5; + return mix(x, y, params.contr); +} + +void main() +{ + vec4 imgColor = COMPAT_TEXTURE(PreCRTPass, vTexCoord.xy); + vec4 aftglow = COMPAT_TEXTURE(AfterglowPass, vTexCoord.xy); + + float w = 1.0-aftglow.w; + + float l = length(aftglow.rgb); + aftglow.rgb = AS*w*normalize(pow(aftglow.rgb + 0.01, vec3(sat)))*l; + float bp = w * BP/255.0; + + imgColor.rgb = imgColor.rgb * params.pre_bb; + + // Retro Sega Systems: Genesis, 32x, CD and Saturn 2D had color palettes designed in TV levels to save on transformations. + if (params.sega_fix > 0.5) imgColor.rgb = imgColor.rgb * (255.0 / 239.0); + + imgColor.rgb = min(imgColor.rgb, 1.0); + + vec3 color = imgColor.rgb; + + if (int(TNTC) == 0) + { + color.rgb = imgColor.rgb; + } + else + { + float lutlow = LUTLOW/255.0; float invLS = 1.0/LS; + vec3 lut_ref = imgColor.rgb + lutlow*(1.0 - pow(imgColor.rgb, 0.333.xxx)); + float lutb = lut_ref.b * (1.0-0.5*invLS); + lut_ref.rg = lut_ref.rg * (1.0-invLS) + 0.5*invLS; + float tile1 = ceil (lutb * (LS-1.0)); + float tile0 = max(tile1 - 1.0, 0.0); + float f = fract(lutb * (LS-1.0)); if (f == 0.0) f = 1.0; + vec2 coord0 = vec2(tile0 + lut_ref.r, lut_ref.g)*vec2(invLS, 1.0); + vec2 coord1 = vec2(tile1 + lut_ref.r, lut_ref.g)*vec2(invLS, 1.0); + vec4 color1, color2, res; + + if (int(TNTC) == 1) + { + color1 = COMPAT_TEXTURE(SamplerLUT1, coord0); + color2 = COMPAT_TEXTURE(SamplerLUT1, coord1); + res = mix(color1, color2, f); + } + else if (int(TNTC) == 2) + { + color1 = COMPAT_TEXTURE(SamplerLUT2, coord0); + color2 = COMPAT_TEXTURE(SamplerLUT2, coord1); + res = mix(color1, color2, f); + } + else if (int(TNTC) == 3) + { + color1 = COMPAT_TEXTURE(SamplerLUT3, coord0); + color2 = COMPAT_TEXTURE(SamplerLUT3, coord1); + res = mix(color1, color2, f); + } + else if (int(TNTC) == 4) + { + color1 = COMPAT_TEXTURE(SamplerLUT4, coord0); + color2 = COMPAT_TEXTURE(SamplerLUT4, coord1); + res = mix(color1, color2, f); + } + + res.rgb = fix_lut (res.rgb, imgColor.rgb); + + color = mix(imgColor.rgb, res.rgb, min(TNTC,1.0)); + } + + vec3 c = clamp(color, 0.0, 1.0); + + float p; + mat3 m_out; + + if (CS == 0.0) { p = 2.2; m_out = ToSRGB; } else + if (CS == 1.0) { p = 2.2; m_out = ToModern; } else + if (CS == 2.0) { p = 2.6; m_out = ToDCI; } else + if (CS == 3.0) { p = 2.2; m_out = ToAdobe; } else + if (CS == 4.0) { p = 2.4; m_out = ToREC; } + + color = pow(c, vec3(p)); + + mat3 m_in = Profile0; + + if (CP == 0.0) { m_in = Profile0; } else + if (CP == 1.0) { m_in = Profile1; } else + if (CP == 2.0) { m_in = Profile2; } else + if (CP == 3.0) { m_in = Profile3; } else + if (CP == 4.0) { m_in = Profile4; } else + if (CP == 5.0) { m_in = Profile5; } + + color = m_in*color; + color = m_out*color; + + color = clamp(color, 0.0, 1.0); + + color = pow(color, vec3(1.0/p)); + + if (CP == -1.0) color = c; + + vec3 scolor1 = plant(pow(color, vec3(wp_saturation)), max(max(color.r,color.g),color.b)); + float luma = dot(color, vec3(0.299, 0.587, 0.114)); + vec3 scolor2 = mix(vec3(luma), color, wp_saturation); + color = (wp_saturation > 1.0) ? scolor1 : scolor2; + + color = plant(color, contrast(max(max(color.r,color.g),color.b))); + + p = 2.2; + + color = pow(color, vec3(p)); + + color = clamp(color, 0.0, 1.0); + + vec3 warmer = D65_to_D55*color; + warmer = ToSRGB*warmer; + + vec3 cooler = D65_to_D93*color; + cooler = ToSRGB*cooler; + + float m = abs(WP)/100.0; + + vec3 comp = (WP < 0.0) ? cooler : warmer; + + color = mix(color, comp, m); + color = pow(max(color, 0.0), vec3(1.0/p)); + + color = color + aftglow.rgb + bp; + + /* HSM Removed + FragColor = vec4(color, vignette(vTexCoord.xy)); + */ + + // HSM Added (Vignette added in post crt processing) + FragColor = vec4(color, 0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm_crt-guest-advanced-release-version.txt b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm_crt-guest-advanced-release-version.txt new file mode 100644 index 0000000..0e175c2 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/hsm_crt-guest-advanced-release-version.txt @@ -0,0 +1 @@ +crt-guest-advanced-2022-06-18-release1 \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png new file mode 100644 index 0000000..ea93bda Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/inv-trinitron-lut.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png new file mode 100644 index 0000000..d18e00d Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/nec-lut.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png new file mode 100644 index 0000000..ef7e883 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/ntsc-lut.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png new file mode 100644 index 0000000..d38bdd7 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/lut/trinitron-lut.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang new file mode 100644 index 0000000..3ad7927 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass1.slang @@ -0,0 +1,155 @@ +#version 450 + +// NTSC-Adaptive +// based on Themaister's NTSC shader + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 DerezedPassSize; + vec4 OutputSize; + vec4 OriginalSize; + vec4 SourceSize; + uint FrameCount; + 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.25 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 + + +#define PI 3.14159265 + +#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 vec2 pix_no; +layout(location = 2) out float phase; +layout(location = 3) out float BRIGHTNESS; +layout(location = 4) out float SATURATION; +layout(location = 5) out float FRINGING; +layout(location = 6) out float ARTIFACTING; +layout(location = 7) out float CHROMA_MOD_FREQ; +layout(location = 8) out float MERGE; + +void main() +{ + float res = min(global.ntsc_scale, 1.0); + float OriginalSize = global.DerezedPassSize.x; + gl_Position = global.MVP * Position; + vTexCoord = TexCoord; + pix_no = TexCoord * global.SourceSize.xy * (res * global.OutputSize.xy / global.SourceSize.xy); + phase = (global.ntsc_phase < 1.5) ? ((OriginalSize > 300.0) ? 2.0 : 3.0) : ((global.ntsc_phase > 2.5) ? 3.0 : 2.0); + + CHROMA_MOD_FREQ = (phase < 2.5) ? (4.0 * PI / 15.0) : (PI / 3.0); + ARTIFACTING = (global.quality > -0.5) ? global.quality : global.cust_artifacting; + FRINGING = (global.quality > -0.5) ? global.quality : global.cust_fringing; + SATURATION = global.ntsc_sat; + BRIGHTNESS = global.ntsc_bright; + + MERGE = (int(global.quality) == 2 || phase < 2.5) ? 0.0 : 1.0; + MERGE = (int(global.quality) == -1) ? global.ntsc_fields : MERGE; +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 1) in vec2 pix_no; +layout(location = 2) in float phase; +layout(location = 3) in float BRIGHTNESS; +layout(location = 4) in float SATURATION; +layout(location = 5) in float FRINGING; +layout(location = 6) in float ARTIFACTING; +layout(location = 7) in float CHROMA_MOD_FREQ; +layout(location = 8) in float MERGE; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D Source; + +#define mix_mat mat3(BRIGHTNESS, FRINGING, FRINGING, ARTIFACTING, 2.0 * SATURATION, 0.0, ARTIFACTING, 0.0, 2.0 * SATURATION) + +const mat3 yiq2rgb_mat = mat3( + 1.0, 0.956, 0.6210, + 1.0, -0.2720, -0.6474, + 1.0, -1.1060, 1.7046); + +vec3 yiq2rgb(vec3 yiq) +{ + return yiq * yiq2rgb_mat; +} + +const mat3 yiq_mat = mat3( + 0.2989, 0.5870, 0.1140, + 0.5959, -0.2744, -0.3216, + 0.2115, -0.5229, 0.3114 +); + +vec3 rgb2yiq(vec3 col) +{ + return col * yiq_mat; +} + +void main() +{ + float res = global.ntsc_scale; + vec3 col = texture(Source, vTexCoord).rgb; + vec3 yiq = rgb2yiq(col); + float lum = yiq.x; + + vec3 yiq2 = yiq; + vec3 yiqs = yiq; + vec3 yiqz = yiq; + + float mod1 = 2.0; + float mod2 = 3.0; + +if (MERGE > 0.5) +{ + float chroma_phase2 = (phase < 2.5) ? PI * (mod(pix_no.y, mod1) + mod(global.FrameCount+1, 2.)) : 0.6667 * PI * (mod(pix_no.y, mod2) + mod(global.FrameCount+1, 2.)); + float mod_phase2 = chroma_phase2 + pix_no.x * CHROMA_MOD_FREQ; + float i_mod2 = cos(mod_phase2); + float q_mod2 = sin(mod_phase2); + yiq2.yz *= vec2(i_mod2, q_mod2); // Modulate. + yiq2 *= mix_mat; // Cross-talk. + yiq2.yz *= vec2(i_mod2, q_mod2); // Demodulate. + + if (res > 1.025) + { + mod_phase2 = chroma_phase2 + pix_no.x * CHROMA_MOD_FREQ * res; + i_mod2 = cos(mod_phase2); + q_mod2 = sin(mod_phase2); + yiqs.yz *= vec2(i_mod2, q_mod2); // Modulate. + yiq2.x = dot(yiqs, mix_mat[0]); // Cross-talk. + } +} + + float chroma_phase = (phase < 2.5) ? PI * (mod(pix_no.y, mod1) + mod(global.FrameCount, 2.)) : 0.6667 * PI * (mod(pix_no.y, mod2) + mod(global.FrameCount, 2.)); + float mod_phase = chroma_phase + pix_no.x * CHROMA_MOD_FREQ; + + float i_mod = cos(mod_phase); + float q_mod = sin(mod_phase); + + yiq.yz *= vec2(i_mod, q_mod); // Modulate. + yiq *= mix_mat; // Cross-talk. + yiq.yz *= vec2(i_mod, q_mod); // Demodulate. + + if (res > 1.025) + { + mod_phase = chroma_phase + pix_no.x * CHROMA_MOD_FREQ * res; + i_mod = cos(mod_phase); + q_mod = sin(mod_phase); + yiqz.yz *= vec2(i_mod, q_mod); // Modulate. + yiq.x = dot(yiqz, mix_mat[0]); // Cross-talk. + } + + yiq = (MERGE < 0.5) ? yiq : 0.5*(yiq+yiq2); + + FragColor = vec4(yiq, lum); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang new file mode 100644 index 0000000..e439886 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass2.slang @@ -0,0 +1,286 @@ +#version 450 + +// NTSC-Adaptive +// based on Themaister's NTSC shader + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 DerezedPassSize; + vec4 OutputSize; + vec4 OriginalSize; + vec4 SourceSize; + float ntsc_scale; + float ntsc_phase; + float auto_res; +} global; + +#pragma parameter ntsc_scale " NTSC Resolution Scaling" 1.0 0.20 2.25 0.01 +#pragma parameter ntsc_phase " NTSC Phase: Auto | 2 phase | 3 phase" 1.0 1.0 3.0 1.0 + +#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 - vec2(0.5 / global.SourceSize.x, 0.0); // Compensate for decimate-by-2. +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D Source; + +vec3 fetch_offset(float offset, float one_x) +{ + return texture(Source, vTexCoord + vec2((offset) * (one_x), 0.0)).xyz; +} + +const mat3 yiq2rgb_mat = mat3( + 1.0, 0.956, 0.6210, + 1.0, -0.2720, -0.6474, + 1.0, -1.1060, 1.7046); + +vec3 yiq2rgb(vec3 yiq) +{ + return yiq * yiq2rgb_mat; +} + +const mat3 yiq_mat = mat3( + 0.2989, 0.5870, 0.1140, + 0.5959, -0.2744, -0.3216, + 0.2115, -0.5229, 0.3114 +); + +vec3 rgb2yiq(vec3 col) +{ + return col * yiq_mat; +} + +const int TAPS_2_phase = 32; +const float luma_filter_2_phase[33] = float[33]( + -0.000174844, + -0.000205844, + -0.000149453, + -0.000051693, + 0.000000000, + -0.000066171, + -0.000245058, + -0.000432928, + -0.000472644, + -0.000252236, + 0.000198929, + 0.000687058, + 0.000944112, + 0.000803467, + 0.000363199, + 0.000013422, + 0.000253402, + 0.001339461, + 0.002932972, + 0.003983485, + 0.003026683, + -0.001102056, + -0.008373026, + -0.016897700, + -0.022914480, + -0.021642347, + -0.008863273, + 0.017271957, + 0.054921920, + 0.098342579, + 0.139044281, + 0.168055832, + 0.178571429); + +const float chroma_filter_2_phase[33] = float[33]( + 0.001384762, + 0.001678312, + 0.002021715, + 0.002420562, + 0.002880460, + 0.003406879, + 0.004004985, + 0.004679445, + 0.005434218, + 0.006272332, + 0.007195654, + 0.008204665, + 0.009298238, + 0.010473450, + 0.011725413, + 0.013047155, + 0.014429548, + 0.015861306, + 0.017329037, + 0.018817382, + 0.020309220, + 0.021785952, + 0.023227857, + 0.024614500, + 0.025925203, + 0.027139546, + 0.028237893, + 0.029201910, + 0.030015081, + 0.030663170, + 0.031134640, + 0.031420995, + 0.031517031); + +const int TAPS_3_phase = 24; +const float luma_filter_3_phase[25] = float[25]( + -0.000012020, + -0.000022146, + -0.000013155, + -0.000012020, + -0.000049979, + -0.000113940, + -0.000122150, + -0.000005612, + 0.000170516, + 0.000237199, + 0.000169640, + 0.000285688, + 0.000984574, + 0.002018683, + 0.002002275, + -0.000909882, + -0.007049081, + -0.013222860, + -0.012606931, + 0.002460860, + 0.035868225, + 0.084016453, + 0.135563500, + 0.175261268, + 0.190176552); + +const float chroma_filter_3_phase[25] = float[25]( + -0.000118847, + -0.000271306, + -0.000502642, + -0.000930833, + -0.001451013, + -0.002064744, + -0.002700432, + -0.003241276, + -0.003524948, + -0.003350284, + -0.002491729, + -0.000721149, + 0.002164659, + 0.006313635, + 0.011789103, + 0.018545660, + 0.026414396, + 0.035100710, + 0.044196567, + 0.053207202, + 0.061590275, + 0.068803602, + 0.074356193, + 0.077856564, + 0.079052396); + +void main() +{ + float res = global.ntsc_scale; + float OriginalSize = global.DerezedPassSize.x; + float one_x = global.SourceSize.z / res; + vec3 signal = vec3(0.0); + float phase = (global.ntsc_phase < 1.5) ? ((OriginalSize > 300.0) ? 2.0 : 3.0) : ((global.ntsc_phase > 2.5) ? 3.0 : 2.0); + + if(phase < 2.5) + { + vec3 sums = fetch_offset(0.0 - 32.0, one_x) + fetch_offset(32.0 - 0.0, one_x); + signal += sums * vec3(luma_filter_2_phase[0], chroma_filter_2_phase[0], chroma_filter_2_phase[0]); + sums = fetch_offset(1.0 - 32.0, one_x) + fetch_offset(32.0 - 1.0, one_x); + signal += sums * vec3(luma_filter_2_phase[1], chroma_filter_2_phase[1], chroma_filter_2_phase[1]); + sums = fetch_offset(2.0 - 32.0, one_x) + fetch_offset(32.0 - 2.0, one_x); + signal += sums * vec3(luma_filter_2_phase[2], chroma_filter_2_phase[2], chroma_filter_2_phase[2]); + sums = fetch_offset(3.0 - 32.0, one_x) + fetch_offset(32.0 - 3.0, one_x); + signal += sums * vec3(luma_filter_2_phase[3], chroma_filter_2_phase[3], chroma_filter_2_phase[3]); + sums = fetch_offset(4.0 - 32.0, one_x) + fetch_offset(32.0 - 4.0, one_x); + signal += sums * vec3(luma_filter_2_phase[4], chroma_filter_2_phase[4], chroma_filter_2_phase[4]); + sums = fetch_offset(5.0 - 32.0, one_x) + fetch_offset(32.0 - 5.0, one_x); + signal += sums * vec3(luma_filter_2_phase[5], chroma_filter_2_phase[5], chroma_filter_2_phase[5]); + sums = fetch_offset(6.0 - 32.0, one_x) + fetch_offset(32.0 - 6.0, one_x); + signal += sums * vec3(luma_filter_2_phase[6], chroma_filter_2_phase[6], chroma_filter_2_phase[6]); + sums = fetch_offset(7.0 - 32.0, one_x) + fetch_offset(32.0 - 7.0, one_x); + signal += sums * vec3(luma_filter_2_phase[7], chroma_filter_2_phase[7], chroma_filter_2_phase[7]); + sums = fetch_offset(8.0 - 32.0, one_x) + fetch_offset(32.0 - 8.0, one_x); + signal += sums * vec3(luma_filter_2_phase[8], chroma_filter_2_phase[8], chroma_filter_2_phase[8]); + sums = fetch_offset(9.0 - 32.0, one_x) + fetch_offset(32.0 - 9.0, one_x); + signal += sums * vec3(luma_filter_2_phase[9], chroma_filter_2_phase[9], chroma_filter_2_phase[9]); + sums = fetch_offset(10.0 - 32.0, one_x) + fetch_offset(32.0 - 10.0, one_x); + signal += sums * vec3(luma_filter_2_phase[10], chroma_filter_2_phase[10], chroma_filter_2_phase[10]); + sums = fetch_offset(11.0 - 32.0, one_x) + fetch_offset(32.0 - 11.0, one_x); + signal += sums * vec3(luma_filter_2_phase[11], chroma_filter_2_phase[11], chroma_filter_2_phase[11]); + sums = fetch_offset(12.0 - 32.0, one_x) + fetch_offset(32.0 - 12.0, one_x); + signal += sums * vec3(luma_filter_2_phase[12], chroma_filter_2_phase[12], chroma_filter_2_phase[12]); + sums = fetch_offset(13.0 - 32.0, one_x) + fetch_offset(32.0 - 13.0, one_x); + signal += sums * vec3(luma_filter_2_phase[13], chroma_filter_2_phase[13], chroma_filter_2_phase[13]); + sums = fetch_offset(14.0 - 32.0, one_x) + fetch_offset(32.0 - 14.0, one_x); + signal += sums * vec3(luma_filter_2_phase[14], chroma_filter_2_phase[14], chroma_filter_2_phase[14]); + sums = fetch_offset(15.0 - 32.0, one_x) + fetch_offset(32.0 - 15.0, one_x); + signal += sums * vec3(luma_filter_2_phase[15], chroma_filter_2_phase[15], chroma_filter_2_phase[15]); + sums = fetch_offset(16.0 - 32.0, one_x) + fetch_offset(32.0 - 16.0, one_x); + signal += sums * vec3(luma_filter_2_phase[16], chroma_filter_2_phase[16], chroma_filter_2_phase[16]); + sums = fetch_offset(17.0 - 32.0, one_x) + fetch_offset(32.0 - 17.0, one_x); + signal += sums * vec3(luma_filter_2_phase[17], chroma_filter_2_phase[17], chroma_filter_2_phase[17]); + sums = fetch_offset(18.0 - 32.0, one_x) + fetch_offset(32.0 - 18.0, one_x); + signal += sums * vec3(luma_filter_2_phase[18], chroma_filter_2_phase[18], chroma_filter_2_phase[18]); + sums = fetch_offset(19.0 - 32.0, one_x) + fetch_offset(32.0 - 19.0, one_x); + signal += sums * vec3(luma_filter_2_phase[19], chroma_filter_2_phase[19], chroma_filter_2_phase[19]); + sums = fetch_offset(20.0 - 32.0, one_x) + fetch_offset(32.0 - 20.0, one_x); + signal += sums * vec3(luma_filter_2_phase[20], chroma_filter_2_phase[20], chroma_filter_2_phase[20]); + sums = fetch_offset(21.0 - 32.0, one_x) + fetch_offset(32.0 - 21.0, one_x); + signal += sums * vec3(luma_filter_2_phase[21], chroma_filter_2_phase[21], chroma_filter_2_phase[21]); + sums = fetch_offset(22.0 - 32.0, one_x) + fetch_offset(32.0 - 22.0, one_x); + signal += sums * vec3(luma_filter_2_phase[22], chroma_filter_2_phase[22], chroma_filter_2_phase[22]); + sums = fetch_offset(23.0 - 32.0, one_x) + fetch_offset(32.0 - 23.0, one_x); + signal += sums * vec3(luma_filter_2_phase[23], chroma_filter_2_phase[23], chroma_filter_2_phase[23]); + sums = fetch_offset(24.0 - 32.0, one_x) + fetch_offset(32.0 - 24.0, one_x); + signal += sums * vec3(luma_filter_2_phase[24], chroma_filter_2_phase[24], chroma_filter_2_phase[24]); + sums = fetch_offset(25.0 - 32.0, one_x) + fetch_offset(32.0 - 25.0, one_x); + signal += sums * vec3(luma_filter_2_phase[25], chroma_filter_2_phase[25], chroma_filter_2_phase[25]); + sums = fetch_offset(26.0 - 32.0, one_x) + fetch_offset(32.0 - 26.0, one_x); + signal += sums * vec3(luma_filter_2_phase[26], chroma_filter_2_phase[26], chroma_filter_2_phase[26]); + sums = fetch_offset(27.0 - 32.0, one_x) + fetch_offset(32.0 - 27.0, one_x); + signal += sums * vec3(luma_filter_2_phase[27], chroma_filter_2_phase[27], chroma_filter_2_phase[27]); + sums = fetch_offset(28.0 - 32.0, one_x) + fetch_offset(32.0 - 28.0, one_x); + signal += sums * vec3(luma_filter_2_phase[28], chroma_filter_2_phase[28], chroma_filter_2_phase[28]); + sums = fetch_offset(29.0 - 32.0, one_x) + fetch_offset(32.0 - 29.0, one_x); + signal += sums * vec3(luma_filter_2_phase[29], chroma_filter_2_phase[29], chroma_filter_2_phase[29]); + sums = fetch_offset(30.0 - 32.0, one_x) + fetch_offset(32.0 - 30.0, one_x); + signal += sums * vec3(luma_filter_2_phase[30], chroma_filter_2_phase[30], chroma_filter_2_phase[30]); + sums = fetch_offset(31.0 - 32.0, one_x) + fetch_offset(32.0 - 31.0, one_x); + signal += sums * vec3(luma_filter_2_phase[31], chroma_filter_2_phase[31], chroma_filter_2_phase[31]); + + signal += texture(Source, vTexCoord).xyz * + vec3(luma_filter_2_phase[TAPS_2_phase], chroma_filter_2_phase[TAPS_2_phase], chroma_filter_2_phase[TAPS_2_phase]); + } + else if(phase > 2.5) + { + for (int i = 0; i < TAPS_3_phase; i++) + { + float offset = float(i); + + vec3 sums = fetch_offset(offset - float(TAPS_3_phase), one_x) + + fetch_offset(float(TAPS_3_phase) - offset, one_x); + signal += sums * vec3(luma_filter_3_phase[i], chroma_filter_3_phase[i], chroma_filter_3_phase[i]); + } + signal += texture(Source, vTexCoord).xyz * + vec3(luma_filter_3_phase[TAPS_3_phase], chroma_filter_3_phase[TAPS_3_phase], chroma_filter_3_phase[TAPS_3_phase]); + } + + signal.x = clamp(signal.x, -1.0, 1.0); + vec3 rgb = signal; + + FragColor = vec4(rgb, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang new file mode 100644 index 0000000..c9b4ba9 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-guest/ntsc/hsm-ntsc-pass3.slang @@ -0,0 +1,122 @@ +#version 450 + +// NTSC-Adaptive +// based on Themaister's NTSC shader + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 OutputSize; + vec4 OriginalSize; + vec4 SourceSize; + vec4 DerezedPassSize; + float ntsc_sharp; + float ntsc_shape; + 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 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 - vec2(0.25 / global.SourceSize.x, 0.0); // Compensate for decimate-by-2. +} + +#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 NPass1; +layout(set = 0, binding = 4) uniform sampler2D PrePass0; + +float fetch_offset(float offset, float one_x) +{ + return texture(NPass1, vTexCoord + vec2((offset) * (one_x), 0.0)).x; +} + +const mat3 yiq2rgb_mat = mat3( + 1.0, 0.956, 0.6210, + 1.0, -0.2720, -0.6474, + 1.0, -1.1060, 1.7046); + +vec3 yiq2rgb(vec3 yiq) +{ + return yiq * yiq2rgb_mat; +} + +const mat3 yiq_mat = mat3( + 0.2989, 0.5870, 0.1140, + 0.5959, -0.2744, -0.3216, + 0.2115, -0.5229, 0.3114 +); + +vec3 rgb2yiq(vec3 col) +{ + return col * yiq_mat; +} + + +void main() +{ + vec2 offsetx = vec2(0.5 * global.DerezedPassSize.z, 0.0); + vec2 texcoord = vTexCoord + vec2(0.25 * global.SourceSize.z, 0.0); + + vec3 l1 = texture(Source, texcoord + offsetx).xyz; + vec3 l2 = texture(Source, texcoord - offsetx).xyz; + vec3 l3 = texture(Source, texcoord + 0.50*offsetx).xyz; + vec3 l4 = texture(Source, texcoord - 0.50*offsetx).xyz; + vec3 ref = texture(Source, texcoord).xyz; + + float lum1 = texture(NPass1, vTexCoord).a; + float lum2 = max(ref.x, 0.0); + + float dif = max(max(abs(l1.x-l2.x), abs(l1.y-l2.y)), max(abs(l1.z-l2.z), abs(l1.x*l1.x-l2.x*l2.x))); + float dff = max(max(abs(l3.x-l4.x), abs(l3.y-l4.y)), max(abs(l3.z-l4.z), abs(l3.x*l3.x-l4.x*l4.x))); + + float lc = (1.0-smoothstep(0.10, 0.20, abs(lum2-lum1)))*pow(dff, 0.125); + + float sweight = smoothstep(0.05-0.03*lc, 0.45 - 0.40*lc, dif); + + vec3 signal = ref; + + if (abs(global.ntsc_sharp) > -0.1) + { + float lummix = mix(lum2, lum1, 0.1*abs(global.ntsc_sharp)); + float lm1 = mix(lum2*lum2, lum1*lum1, 0.1*abs(global.ntsc_sharp)); lm1 = sqrt(lm1); + float lm2 = mix(sqrt(lum2), sqrt(lum1), 0.1*abs(global.ntsc_sharp)); lm2 = lm2*lm2; + + float k1 = abs(lummix - lm1) + 0.00001; + float k2 = abs(lummix - lm2) + 0.00001; + + lummix = min((k2*lm1 + k1*lm2)/(k1+k2), 1.0); + + signal.x = mix(lum2, lummix, smoothstep(0.25, 0.4, pow(dff, 0.125))); + signal.x = min(signal.x, max(global.ntsc_shape*signal.x, lum2)); + } + else signal.x = clamp(signal.x, -1.0, 1.0); + + vec3 rgb = signal; + if (global.ntsc_sharp < -0.1) + { + rgb.x = mix(ref.x, rgb.x, sweight); + } + + rgb = clamp(yiq2rgb(rgb), 0.0, 1.0); + + if (global.blendMode < 0.5) + { + vec3 orig = texture(PrePass0, vTexCoord).rgb; + rgb = normalize(rgb + 0.00001) * min(length(rgb), length(orig)); + } + + FragColor = vec4(rgb, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-gba-color.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-gba-color.slang new file mode 100644 index 0000000..91cdb53 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-gba-color.slang @@ -0,0 +1,83 @@ +#version 450 + +layout(push_constant) uniform Push +{ + float darken_screen; +} params; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 OutputSize; + vec4 OriginalSize; + vec4 SourceSize; +} global; + +/* + Shader Modified: Pokefan531 + Color Mangler + Author: hunterk + License: Public domain +*/ +// Shader that replicates the LCD dynamics from a GameBoy Advance + +// #pragma parameter darken_screen "Darken Screen" 0.5 -0.25 1.5 0.05 + +#define darken_screen 0 +#define target_gamma 2.2 +#define display_gamma 2.2 +#define sat 1.0 +#define lum 1.0 +#define contrast 1.0 +#define blr 0.0 +#define blg 0.0 +#define blb 0.0 +#define r 0.86 +#define g 0.66 +#define b 0.81 +#define rg 0.11 +#define rb 0.1325 +#define gr 0.19 +#define gb 0.0575 +#define br -0.05 +#define bg 0.23 +#define overscan_percent_x 0.0 +#define overscan_percent_y 0.0 + +#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() +{ + vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma + darken_screen)).rgba; + vec4 avglum = vec4(0.5); + screen = mix(screen, avglum, (1.0 - contrast)); + + // r g b black +mat4 color = mat4(r, rg, rb, 0.0, //red channel + gr, g, gb, 0.0, //green channel + br, bg, b, 0.0, //blue channel + blr, blg, blb, 0.0); //alpha channel; these numbers do nothing for our purposes. + +mat4 adjust = mat4((1.0 - sat) * 0.3086 + sat, (1.0 - sat) * 0.3086, (1.0 - sat) * 0.3086, 1.0, +(1.0 - sat) * 0.6094, (1.0 - sat) * 0.6094 + sat, (1.0 - sat) * 0.6094, 1.0, +(1.0 - sat) * 0.0820, (1.0 - sat) * 0.0820, (1.0 - sat) * 0.0820 + sat, 1.0, +0.0, 0.0, 0.0, 1.0); + color *= adjust; + screen = clamp(screen * lum, 0.0, 1.0); + screen = color * screen; + FragColor = pow(screen, vec4(1.0 / (display_gamma))); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2-basic-border.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2-basic-border.slang new file mode 100644 index 0000000..60e2e70 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2-basic-border.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-basic-params.inc" +#include "hsm-lcd-grid-v2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.inc new file mode 100644 index 0000000..0e2c643 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.inc @@ -0,0 +1,158 @@ + +layout(push_constant) uniform Push +{ + float LCD_RSUBPIX_R; + float LCD_RSUBPIX_G; + float LCD_RSUBPIX_B; + float LCD_GSUBPIX_R; + float LCD_GSUBPIX_G; + float LCD_GSUBPIX_B; + float LCD_BSUBPIX_R; + float LCD_BSUBPIX_G; + float LCD_BSUBPIX_B; + float LCD_GAIN; + float LCD_GAMMA; + float LCD_BLACK_LEVEL; + float LCD_AMBIENT; + float LCD_BGR; +} param; + +#pragma parameter LCD_TITLE "[ --- LCD GRID V2 --- ]:" 0 0 0.01 0.01 +#pragma parameter LCD_SUBPIX_TITLE "[ SUBPIXEL COLORS ]:" 0 0 0.01 0.01 +#pragma parameter LCD_RSUBPIX_R " Colour of R subpixel: R" 0.75 0.0 1.0 0.01 +#pragma parameter LCD_RSUBPIX_G " Colour of R subpixel: G" 0.0 0.0 1.0 0.01 +#pragma parameter LCD_RSUBPIX_B " Colour of R subpixel: B" 0.0 0.0 1.0 0.01 +#pragma parameter LCD_GSUBPIX_R " Colour of G subpixel: R" 0.0 0.0 1.0 0.01 +#pragma parameter LCD_GSUBPIX_G " Colour of G subpixel: G" 0.75 0.0 1.0 0.01 +#pragma parameter LCD_GSUBPIX_B " Colour of G subpixel: B" 0.0 0.0 1.0 0.01 +#pragma parameter LCD_BSUBPIX_R " Colour of B subpixel: R" 0.0 0.0 1.0 0.01 +#pragma parameter LCD_BSUBPIX_G " Colour of B subpixel: G" 0.0 0.0 1.0 0.01 +#pragma parameter LCD_BSUBPIX_B " Colour of B subpixel: B" 0.75 0.0 1.0 0.01 +#pragma parameter LCD_BRIGHT_TITLE "[ BRIGHTNESS & GAMMA ]:" 0 0 0.01 0.01 +#pragma parameter LCD_GAIN " Gain" 1.75 0.5 2.0 0.05 +#pragma parameter LCD_GAMMA " LCD Gamma" 2.5 0.5 5.0 0.1 +#pragma parameter LCD_AMBIENT " Ambient" 0.0 0.0 25 0.1 +#pragma parameter LCD_BGR " BGR LCD Sub Pixel Order" 0 0 1 1 + +#define outgamma 2.2 + + + +#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(set = 0, binding = 1) uniform sampler2D IntroPass; +layout(set = 0, binding = 2) uniform sampler2D Source; + +layout(set = 0, binding = 3) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 4) uniform sampler2D InfoCachePassFeedback; + +layout(location = 0) out vec4 FragColor; + +vec3 fetch_offset(sampler2D in_sampler, vec2 coord, vec2 offset) +{ + offset = vec2(0); + vec2 texel_size = 1 / CROPPED_ROTATED_SIZE; + vec2 pixel_coord = SAMPLE_AREA_START_PIXEL_COORD + coord * CROPPED_ROTATED_SIZE + offset; + vec2 raw_coord = pixel_coord / ROTATED_CORE_PREPPED_SIZE; + + + vec3 out_rgb = HSM_GetCroppedTexSample(in_sampler, coord + offset * texel_size).rgb; + out_rgb = pow(vec3(param.LCD_GAIN) * out_rgb, vec3(param.LCD_GAMMA)); + out_rgb += vec3(param.LCD_AMBIENT / 100); + return out_rgb; +} + +// integral of (1 - x^2 - x^4 + x^6)^2 +float coeffs_x[7] = float[](1.0, -2.0/3.0, -1.0/5.0, 4.0/7.0, -1.0/9.0, -2.0/11.0, 1.0/13.0); +// integral of (1 - 2x^4 + x^6)^2 +float coeffs_y[7] = float[](1.0, 0.0, -4.0/5.0, 2.0/7.0, 4.0/9.0, -4.0/11.0, 1.0/13.0); + +float intsmear_func(float z, float coeffs[7]) +{ + float z2 = z*z; + float zn = z; + float ret = 0.0; + for (int i = 0; i < 7; i++) { + ret += zn*coeffs[i]; + zn *= z2; + } + return ret; +} + +float intsmear(float x, float dx, float d, float coeffs[7]) +{ + float zl = clamp((x-dx*0.5)/d,-1.0,1.0); + float zh = clamp((x+dx*0.5)/d,-1.0,1.0); + return d * ( intsmear_func(zh,coeffs) - intsmear_func(zl,coeffs) )/dx; +} + +void main() +{ + // HSM Added + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + 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; + // End Addition + + vec2 range = global.OutputSize.zw / SCREEN_SCALE; + + vec3 cred = pow(vec3(param.LCD_RSUBPIX_R, param.LCD_RSUBPIX_G, param.LCD_RSUBPIX_B), vec3(outgamma)); + vec3 cgreen = pow(vec3(param.LCD_GSUBPIX_R, param.LCD_GSUBPIX_G, param.LCD_GSUBPIX_B), vec3(outgamma)); + vec3 cblue = pow(vec3(param.LCD_BSUBPIX_R, param.LCD_BSUBPIX_G, param.LCD_BSUBPIX_B), vec3(outgamma)); + + ivec2 tli = ivec2(floor(curved_coord/texelSize-vec2(0.4999))); + + vec3 lcol, rcol; + float subpix = (curved_coord.x/texelSize.x - 0.4999 - float(tli.x))*3.0 - 0.33; + float rsubpix = range.x/texelSize.x * 3.0; + + lcol = vec3(intsmear(subpix+1.0, rsubpix, 1.5, coeffs_x), + intsmear(subpix , rsubpix, 1.5, coeffs_x), + intsmear(subpix-1.0, rsubpix, 1.5, coeffs_x)); + rcol = vec3(intsmear(subpix-2.0, rsubpix, 1.5, coeffs_x), + intsmear(subpix-3.0, rsubpix, 1.5, coeffs_x), + intsmear(subpix-4.0, rsubpix, 1.5, coeffs_x)); + + if (param.LCD_BGR > 0.5) { + lcol.rgb = lcol.bgr; + rcol.rgb = rcol.bgr; + } + + float tcol, bcol; + subpix = curved_coord.y/texelSize.y - 0.4999 - float(tli.y); + rsubpix = range.y/texelSize.y; + tcol = intsmear(subpix ,rsubpix, 0.63, coeffs_y); + bcol = intsmear(subpix-1.0,rsubpix, 0.63, coeffs_y); + + vec3 topLeftColor = fetch_offset(Source, curved_coord, ivec2(-1, -1)) * lcol * vec3(tcol); + vec3 bottomRightColor = fetch_offset(Source, curved_coord, ivec2( 1, 1)) * rcol * vec3(bcol); + vec3 bottomLeftColor = fetch_offset(Source, curved_coord, ivec2(-1, 1)) * lcol * vec3(bcol); + vec3 topRightColor = fetch_offset(Source, curved_coord, ivec2( 1, -1)) * rcol * vec3(tcol); + + vec3 averageColor = topLeftColor + bottomRightColor + bottomLeftColor + topRightColor; + + averageColor = mat3(cred, cgreen, cblue) * averageColor; + + // HSM Added + FragColor = vec4(averageColor, 1); + + // HSM add output gamma + FragColor = HSM_Delinearize(FragColor, HSM_GAMMA_OUT_CRT); + // End Addition +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang new file mode 100644 index 0000000..70aabde --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-lcd-cgwg/hsm-lcd-grid-v2.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-lcd-grid-v2.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/README.md b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/README.md new file mode 100644 index 0000000..2f9983e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/README.md @@ -0,0 +1,15 @@ +# mdapt v2.8 - merge dithering and pseudo transparency + +## Introduction + +In many old arcade or console games you will find dithering effects which are there to compensate for platform weaknesses like missing transparency support or small color palettes. This works well since back then the monitors (CRTs) had scanline bleeding and other certain features which merged the dithering through the display technology. But nowadays every pixel will displayed perfectly so dithering won't look like it should be. + +There are already shaders out there who are trying to simulate how a CRT displays an image. mdapt though goes a different way and tries to detect dithering patterns by analyzing the relation between neighbored pixels. This way only these specific parts of the image are blended. The resulting image (still in the original resolution) is now a good base for further scaling with advanced algorithms (like xBR) which on there own usually have a hard time with dithering. + +## Algorithm + +mdapt can detect two basic dithering patterns. Checkerboard (CB) and vertical lines (VL). It actually doesn't matter of how many colors the pattern consists and mdapt doesn't use difference thresholds to determinie similarity at all. The algorithm just looks for regular "up and downs" between the pixels. There will always be errors though since the dithering process itself is lossy and not invertible. But mdapt tries to balance it by checking if there are enough detections in one local area. + +## Usage + +In RetroArch's shader options load one of the provided .cgp files. There are several configuration parameters which you can use via the parameter submenu. \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang new file mode 100644 index 0000000..15bd09f --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass0.slang @@ -0,0 +1,107 @@ +#version 450 + +/* + Merge Dithering and Pseudo Transparency Shader v2.8 - Pass 0 + by Sp00kyFox, 2014 + + Neighbor analysis via color metric and dot product of the difference vectors. + +*/ + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float MODE; + float PWR; +} params; + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + float MDAPT_MODE; +} global; + +#pragma parameter HSM_DEDITHERING_TITLE "[ --- MDAPT DE-DITHERING --- ]:" 0 0 0.01 0.01 +#pragma parameter MDAPT_MODE " Mode - OFF | Strict | Relaxed | Stripes" 0 0 3 1 + +// #pragma parameter MODE "MDAPT Monochrome Analysis" 0.0 0.0 1.0 1.0 +// #pragma parameter PWR "MDAPT Color Metric Exp" 2.0 0.0 10.0 0.1 + +const float PWR = 2; + +#define dotfix(x,y) clamp(dot(x,y), 0.0, 1.0) // NVIDIA Fix +#define TEX(dx,dy) texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) + +// Reference: http://www.compuphase.com/cmetric.htm +float eq(vec3 A, vec3 B) +{ + vec3 diff = A-B; + float ravg = (A.x + B.x) * 0.5; + + diff *= diff * vec3(2.0 + ravg, 4.0, 3.0 - ravg); + + return pow( smoothstep(3.0, 0.0, sqrt(diff.x + diff.y + diff.z)), PWR ); +} + +float and_(float a, float b, float c, float d, float e, float f){ + return min(a, min(b, min(c, min(d, min(e,f))))); +} + +#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() +{ + /* + U + L C R + D + */ + + if (global.MDAPT_MODE < 1) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec3 C = TEX( 0., 0.).xyz; + vec3 L = TEX(-1., 0.).xyz; + vec3 R = TEX( 1., 0.).xyz; + vec3 U = TEX( 0.,-1.).xyz; + vec3 D = TEX( 0., 1.).xyz; + + + vec3 res = vec3(0.0); + + if(global.MDAPT_MODE == 1){ + res.x = float((L == R) && (C != L)); + res.y = float((U == D) && (C != U)); + res.z = float(bool(res.x) && bool(res.y) && (L == U)); + } + else{ + vec3 dCL = normalize(C-L), dCR = normalize(C-R), dCD = normalize(C-D), dCU = normalize(C-U); + + res.x = dotfix(dCL, dCR) * eq(L,R); + res.y = dotfix(dCU, dCD) * eq(U,D); + res.z = and_(res.x, res.y, dotfix(dCL, dCU) * eq(L,U), dotfix(dCL, dCD) * eq(L,D), dotfix(dCR, dCU) * eq(R,U), dotfix(dCR, dCD) * eq(R,D)); + } + + FragColor = vec4(res, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang new file mode 100644 index 0000000..048bc7b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass1.slang @@ -0,0 +1,95 @@ +#version 450 + +/* + Merge Dithering and Pseudo Transparency Shader v2.8 - Pass 1 + by Sp00kyFox, 2014 + + Preparing checkerboard patterns. + +*/ + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + +#define TEX(dx,dy) texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + float MDAPT_MODE; +} global; + +#pragma parameter MDAPT_MODE " Mode - OFF | Strict | Relaxed | Stripes" 0 0 3 1 + + +float and_(float a, float b){ + return min(a,b); +} + +float and_(float a, float b, float c){ + return min(a, min(b,c)); +} + +float or_(float a, float b){ + return max(a,b); +} + +float or_(float a, float b, float c, float d, float e){ + return max(a, max(b, max(c, max(d,e)))); +} + +#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() +{ + /* + UL U UR + L C R + DL D DR + */ + + if (global.MDAPT_MODE < 1) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec3 C = TEX( 0., 0.).xyz; + vec3 L = TEX(-1., 0.).xyz; + vec3 R = TEX( 1., 0.).xyz; + vec3 D = TEX( 0., 1.).xyz; + vec3 U = TEX( 0.,-1.).xyz; + + float UL = TEX(-1.,-1.).z; + float UR = TEX( 1.,-1.).z; + float DL = TEX(-1., 1.).z; + float DR = TEX( 1., 1.).z; + + // Checkerboard Pattern Completion + float prCB = or_(C.z, + and_(L.z, R.z, or_(U.x, D.x)), + and_(U.z, D.z, or_(L.y, R.y)), + and_(C.x, or_(and_(UL, UR), and_(DL, DR))), + and_(C.y, or_(and_(UL, DL), and_(UR, DR)))); + FragColor = vec4(C.x, prCB, 0.0, 0.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang new file mode 100644 index 0000000..ba0cf1b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass2.slang @@ -0,0 +1,120 @@ +#version 450 + +/* + Merge Dithering and Pseudo Transparency Shader v2.8 - Pass 2 + by Sp00kyFox, 2014 + + Eliminating isolated detections. + +*/ + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float VL_LO; + float VL_HI; + float CB_LO; + float CB_HI; +} params; + +// #pragma parameter VL_LO "MDAPT VL LO Thresh" 1.25 0.0 10.0 0.05 +// #pragma parameter VL_HI "MDAPT VL HI Thresh" 1.75 0.0 10.0 0.05 +// #pragma parameter CB_LO "MDAPT CB LO Thresh" 5.25 0.0 25.0 0.05 +// #pragma parameter CB_HI "MDAPT CB HI Thresh" 5.75 0.0 25.0 0.05 + +const float VL_LO = 1.25; +const float VL_HI = 1.75; +const float CB_LO = 5.25; +const float CB_HI = 5.75; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + float MDAPT_MODE; +} global; + +#pragma parameter MDAPT_MODE " Mode - OFF | Strict | Relaxed | Stripes" 0 0 3 1 + + +#define TEX(dx,dy) texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) +#define and(x,y) min(x,y) +#define or(x,y) max(x,y) + +vec2 sigmoid(vec2 signal){ + return smoothstep(vec2(VL_LO, CB_LO), vec2(VL_HI, CB_HI), signal); +} + +#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() +{ + /* + NW UUL U2 UUR NE + ULL UL U1 UR URR + L2 L1 C R1 R2 + DLL DL D1 DR DRR + SW DDL D2 DDR SE + */ + + if (global.MDAPT_MODE < 1) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec2 C = TEX( 0., 0.).xy; + vec2 hits = vec2(0.0); + + //phase 1 + vec2 L1 = TEX(-1., 0.).xy; + vec2 R1 = TEX( 1., 0.).xy; + vec2 U1 = TEX( 0.,-1.).xy; + vec2 D1 = TEX( 0., 1.).xy; + + //phase 2 + vec2 L2 = and(TEX(-2., 0.).xy, L1); + vec2 R2 = and(TEX( 2., 0.).xy, R1); + vec2 U2 = and(TEX( 0.,-2.).xy, U1); + vec2 D2 = and(TEX( 0., 2.).xy, D1); + vec2 UL = and(TEX(-1.,-1.).xy, or(L1, U1)); + vec2 UR = and(TEX( 1.,-1.).xy, or(R1, U1)); + vec2 DL = and(TEX(-1., 1.).xy, or(L1, D1)); + vec2 DR = and(TEX( 1., 1.).xy, or(R1, D1)); + + //phase 3 + vec2 ULL = and(TEX(-2.,-1.).xy, or(L2, UL)); + vec2 URR = and(TEX( 2.,-1.).xy, or(R2, UR)); + vec2 DRR = and(TEX( 2., 1.).xy, or(R2, DR)); + vec2 DLL = and(TEX(-2., 1.).xy, or(L2, DL)); + vec2 UUL = and(TEX(-1.,-2.).xy, or(U2, UL)); + vec2 UUR = and(TEX( 1.,-2.).xy, or(U2, UR)); + vec2 DDR = and(TEX( 1., 2.).xy, or(D2, DR)); + vec2 DDL = and(TEX(-1., 2.).xy, or(D2, DL)); + + //phase 4 + hits += and(TEX(-2.,-2.).xy, or(UUL, ULL)); + hits += and(TEX( 2.,-2.).xy, or(UUR, URR)); + hits += and(TEX(-2., 2.).xy, or(DDL, DLL)); + hits += and(TEX( 2., 2.).xy, or(DDR, DRR)); + + hits += (ULL + URR + DRR + DLL + L2 + R2) + vec2(0.0, 1.0) * (C + U1 + U2 + D1 + D2 + L1 + R1 + UL + UR + DL + DR + UUL + UUR + DDR + DDL); + + FragColor = vec4(C * sigmoid(hits), C); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang new file mode 100644 index 0000000..7c04ca4 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass3.slang @@ -0,0 +1,104 @@ +#version 450 + +/* + Merge Dithering and Pseudo Transparency Shader v2.8 - Pass 3 + by Sp00kyFox, 2014 + + Backpropagation and checkerboard smoothing. + +*/ + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + float MDAPT_MODE; +} global; + +#pragma parameter MDAPT_MODE " Mode - OFF | Strict | Relaxed | Stripes" 0 0 3 1 + + +#define TEX(dx,dy) texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) +#define TEXt0(dx,dy) texture(PreDeDitheringPass, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) + +bool eq(vec3 A, vec3 B){ + return (A == B); +} + +float and_(float a, float b){ + return min(a,b); +} + +float or_(float a, float b, float c, float d, float e, float f, float g, float h, float i){ + return max(a, max(b, max(c, max(d, max(e, max(f, max(g, max(h,i)))))))); +} + +vec2 and_(vec2 a, vec2 b){ + return min(a,b); +} + +vec2 or_(vec2 a, vec2 b){ + return max(a,b); +} + +vec2 or_(vec2 a, vec2 b, vec2 c, vec2 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; +} + +#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 PreDeDitheringPass; + +void main() +{ + /* + UL U UR + L C R + DL D DR + */ + + if (global.MDAPT_MODE < 1) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec4 C = TEX( 0., 0.); vec3 c = TEXt0( 0., 0.).xyz; + vec2 L = TEX(-1., 0.).xy; vec3 l = TEXt0(-1., 0.).xyz; + vec2 R = TEX( 1., 0.).xy; vec3 r = TEXt0( 1., 0.).xyz; + vec2 U = TEX( 0.,-1.).xy; vec3 u = TEXt0( 0.,-1.).xyz; + vec2 D = TEX( 0., 1.).xy; vec3 d = TEXt0( 0., 1.).xyz; + float UL = TEX(-1.,-1.).y; vec3 ul = TEXt0(-1.,-1.).xyz; + float UR = TEX( 1.,-1.).y; vec3 ur = TEXt0( 1.,-1.).xyz; + float DL = TEX(-1., 1.).y; vec3 dl = TEXt0(-1., 1.).xyz; + float DR = TEX( 1., 1.).y; vec3 dr = TEXt0( 1., 1.).xyz; + + // Backpropagation + C.xy = or_(C.xy, and_(C.zw, or_(L, R, U, D))); + + // Checkerboard Smoothing + C.y = or_(C.y, min(U.y, float(eq(c,u))), min(D.y, float(eq(c,d))), min(L.y, float(eq(c,l))), min(R.y, float(eq(c,r))), min(UL, float(eq(c,ul))), min(UR, float(eq(c,ur))), min(DL, float(eq(c,dl))), min(DR, float(eq(c,dr)))); + + FragColor = vec4(C); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang new file mode 100644 index 0000000..be8239c --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-mdapt/hsm-mdapt-pass4.slang @@ -0,0 +1,177 @@ +#version 450 + +/* + Merge Dithering and Pseudo Transparency Shader v2.8 - Pass 4 + by Sp00kyFox, 2014 + + Blends pixels based on detected dithering patterns. + +*/ + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float VL; + float CB; + float DEBUG; + float linear_gamma; +} params; + +// #pragma parameter VL "[DE-DITHERING] MDAPT Vertical Lines" 0.0 0.0 1.0 1.0 +// #pragma parameter CB "MDAPT Checkerboard" 1.0 0.0 1.0 1.0 +// #pragma parameter DEBUG "MDAPT Adjust View" 0.0 0.0 1.0 1.0 +// #pragma parameter linear_gamma "MDAPT Linear Gamma Blend" 0.0 0.0 1.0 1.0 + +// const float VL = 0; +const float CB = 1; +const float DEBUG = 0; +const float linear_gamma = 0; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + float MDAPT_MODE; +} global; + +#pragma parameter MDAPT_MODE " Mode - OFF | Strict | Relaxed | Stripes" 0 0 3 1 + + +#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 PreDeDitheringPass; + +//#define TEX(dx,dy) texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) +//#define TEXt0(dx,dy) texture(PreDeDitheringPass, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw) + +vec4 TEX(float dx, float dy){ + if(linear_gamma > 0.5) return pow(texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw), vec4(2.2)); + else return texture(Source, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw); +} + +vec4 TEXt0(float dx, float dy){ + if(linear_gamma > 0.5) return pow(texture(PreDeDitheringPass, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw), vec4(2.2)); + else return texture(PreDeDitheringPass, vTexCoord+vec2((dx),(dy))*params.SourceSize.zw); +} + +bool eq(vec3 A, vec3 B){ + return (A == B); +} + +float and_(float a, float b){ + return min(a,b); +} + +float or_(float a, float b){ + return max(a,b); +} + +float or_(float a, float b, float c, float d, float e, float f, float g, float h, float i){ + return max(a, max(b, max(c, max(d, max(e, max(f, max(g, max(h,i)))))))); +} + +vec2 and_(vec2 a, vec2 b){ + return min(a,b); +} + +vec2 or_(vec2 a, vec2 b){ + return max(a,b); +} + +vec2 or_(vec2 a, vec2 b, vec2 c, vec2 d){ + return max(a, max(b, max(c,d))); +} + +void main() +{ + /* + UL U UR + L C R + DL D DR + */ + + if (global.MDAPT_MODE < 1) + { + FragColor = texture(Source, vTexCoord); + return; + } + + vec4 C = TEX( 0., 0.); vec3 c = TEXt0( 0., 0.).xyz; + vec2 L = TEX(-1., 0.).xy; vec3 l = TEXt0(-1., 0.).xyz; + vec2 R = TEX( 1., 0.).xy; vec3 r = TEXt0( 1., 0.).xyz; + vec2 U = TEX( 0.,-1.).xy; + vec2 D = TEX( 0., 1.).xy; + + float prVL = 0.0, prCB = 0.0; + vec3 fVL = vec3(0.0), fCB = vec3(0.0); + + + // Backpropagation + C.xy = or_(C.xy, and_(C.zw, or_(L.xy, R.xy, U.xy, D.xy))); + + + if(global.MDAPT_MODE == 3){ + float prSum = L.x + R.x; + + prVL = max(L.x, R.x); + prVL = (prVL == 0.0) ? 1.0 : prSum/prVL; + + fVL = (prVL*c + L.x*l + R.x*r)/(prVL + prSum); + prVL = C.x; + } + + + if(CB > 0.5){ + vec3 u = TEXt0( 0.,-1.).xyz; + vec3 d = TEXt0( 0., 1.).xyz; + + float eqCL = float(eq(c,l)); + float eqCR = float(eq(c,r)); + float eqCU = float(eq(c,u)); + float eqCD = float(eq(c,d)); + + float prU = or_(U.y, eqCU); + float prD = or_(D.y, eqCD); + float prL = or_(L.y, eqCL); + float prR = or_(R.y, eqCR); + + + float prSum = prU + prD + prL + prR; + + prCB = max(prL, max(prR, max(prU,prD))); + prCB = (prCB == 0.0) ? 1.0 : prSum/prCB; + + //standard formula: C/2 + (L + R + D + U)/8 + fCB = (prCB*c + prU*u + prD*d + prL*l + prR*r)/(prCB + prSum); + + + float UL = TEX(-1.,-1.).y; vec3 ul = TEXt0(-1.,-1.).xyz; + float UR = TEX( 1.,-1.).y; vec3 ur = TEXt0( 1.,-1.).xyz; + float DL = TEX(-1., 1.).y; vec3 dl = TEXt0(-1., 1.).xyz; + float DR = TEX( 1., 1.).y; vec3 dr = TEXt0( 1., 1.).xyz; + + // Checkerboard Smoothing + prCB = or_(C.y, and_(L.y, eqCL), and_(R.y, eqCR), and_(U.y, eqCU), and_(D.y, eqCD), and_(UL, float(eq(c,ul))), and_(UR, float(eq(c,ur))), and_(DL, float(eq(c,dl))), and_(DR, float(eq(c,dr)))); + } + + if(DEBUG > 0.5) + FragColor = vec4(prVL, prCB, 0.0, 0.0); + + vec4 final = (prCB >= prVL) ? vec4(mix(c, fCB, prCB), 1.0) : vec4(mix(c, fVL, prVL), 1.0); + FragColor = (linear_gamma > 0.5) ? pow(final, vec4(1.0 / 2.2)) : final; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang new file mode 100644 index 0000000..f9c8de5 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-hdr-pass.slang @@ -0,0 +1,90 @@ +#version 450 + +/* +A shader that tries to emulate a sony PVM type aperture grille screen but with full brightness. + +The novel thing about this shader is that it relies on the HDR shaders to brighten up the image so that when +we apply this shader which emulates the apperture grille the resulting screen isn't left too dark. + +I think you need at least a DisplayHDR 600 monitor but to get close to CRT levels of brightness I think DisplayHDR 1000. + +Please Enable HDR in RetroArch 1.10+ + +NOTE: when this shader is envoked the Contrast, Peak Luminance and Paper White Luminance in the HDR menu do nothing instead set those values through the shader parameters + +For this shader set Paper White Luminance to above 700 and Peak Luminance to the peak luminance of your monitor. + +Also try to use a integer scaling - its just better - overscaling is fine. + +This shader doesn't do any geometry warping or bouncing of light around inside the screen etc - I think these effects just add unwanted noise, I know people disagree. Please feel free to make you own and add them + +Dont use this shader directly - use the hdr\crt-make-model-hdr.slangp where make and model are the make and model of the CRT you want. + +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 + +layout(push_constant) uniform Push +{ + // User Settings + float hcrt_hdr; + float hcrt_max_nits; + float hcrt_paper_white_nits; +} params; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} global; + +#include "include/parameters.h" + +#define HCRT_HDR params.hcrt_hdr +#define HCRT_MAX_NITS params.hcrt_max_nits +#define HCRT_PAPER_WHITE_NITS params.hcrt_paper_white_nits + +#define COMPAT_TEXTURE(c, d) texture(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 * vec2(1.00001); // To resolve rounding issues when sampling +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D Source; + +#include "include/inverse_tonemap.h" + +vec3 InverseTonemapConditional(const vec3 linear) +{ + if(HCRT_HDR < 1.0f) + { + return linear; + } + else + { + return InverseTonemap(linear, HCRT_MAX_NITS, HCRT_PAPER_WHITE_NITS); + } +} + +void main() +{ + vec3 source = COMPAT_TEXTURE(Source, vTexCoord).rgb; + + const vec3 hdr_colour = InverseTonemapConditional(source); + + FragColor = vec4(hdr_colour, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang new file mode 100644 index 0000000..0dc0549 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-no-reflect.slang @@ -0,0 +1,5 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "crt-sony-megatron.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-potato.slang new file mode 100644 index 0000000..14c344e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-potato.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-potato-params.inc" +#include "crt-sony-megatron.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang new file mode 100644 index 0000000..6036d8e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron-source-pass.slang @@ -0,0 +1,97 @@ +#version 450 + +/* +A shader that tries to emulate a sony PVM type aperture grille screen but with full brightness. + +The novel thing about this shader is that it relies on the HDR shaders to brighten up the image so that when +we apply this shader which emulates the apperture grille the resulting screen isn't left too dark. + +I think you need at least a DisplayHDR 600 monitor but to get close to CRT levels of brightness I think DisplayHDR 1000. + +Please Enable HDR in RetroArch 1.10+ + +NOTE: when this shader is envoked the Contrast, Peak Luminance and Paper White Luminance in the HDR menu do nothing instead set those values through the shader parameters + +For this shader set Paper White Luminance to above 700 and Peak Luminance to the peak luminance of your monitor. + +Also try to use a integer scaling - its just better - overscaling is fine. + +This shader doesn't do any geometry warping or bouncing of light around inside the screen etc - I think these effects just add unwanted noise, I know people disagree. Please feel free to make you own and add them + +Dont use this shader directly - use the hdr\crt-make-model-hdr.slangp where make and model are the make and model of the CRT you want. + +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) +*/ + +layout(push_constant) uniform Push +{ + float hcrt_hdr; + float hcrt_colour_space; + float hcrt_max_nits; + float hcrt_paper_white_nits; + float hcrt_lcd_resolution; + float hcrt_lcd_subpixel; + float hcrt_colour_system; + float hcrt_expand_gamut; + float hcrt_white_temperature; + float hcrt_brightness; + float hcrt_contrast; + float hcrt_saturation; + float hcrt_gamma_in; +} params; + +/* HSM Removed +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} global; +*/ + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" + +#include "include/parameters.h" + +#define HCRT_HDR params.hcrt_hdr +#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 +#define HCRT_BRIGHTNESS params.hcrt_brightness +#define HCRT_CONTRAST params.hcrt_contrast +#define HCRT_SATURATION params.hcrt_saturation +#define HCRT_GAMMA_IN params.hcrt_gamma_in + +#define COMPAT_TEXTURE(c, d) texture(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 * vec2(1.00001); // To resolve rounding issues when sampling +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D Source; + +#include "include/colour_grade.h" + +void main() +{ + vec3 source = COMPAT_TEXTURE(Source, vTexCoord).rgb; + + // Put the source back in the original gamma space + source = HSM_Delinearize(vec4(source, 1), GAMMA_INPUT).rgb; + + const vec3 colour = ColourGrade(source); + + FragColor = vec4(colour, 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.inc new file mode 100644 index 0000000..bebc734 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.inc @@ -0,0 +1,591 @@ +/* +A shader that tries to emulate a sony PVM type aperture grille screen but with full brightness. + +The novel thing about this shader is that it relies on the HDR shaders to brighten up the image so that when +we apply this shader which emulates the apperture grille the resulting screen isn't left too dark. + +I think you need at least a DisplayHDR 600 monitor but to get close to CRT levels of brightness I think DisplayHDR 1000. + +Please Enable HDR in RetroArch 1.10+ + +NOTE: when this shader is envoked the Contrast, Peak Luminance and Paper White Luminance in the HDR menu do nothing instead set those values through the shader parameters + +For this shader set Paper White Luminance to above 700 and Peak Luminance to the peak luminance of your monitor. + +Also try to use a integer scaling - its just better - overscaling is fine. + +This shader doesn't do any geometry warping or bouncing of light around inside the screen etc - I think these effects just add unwanted noise, I know people disagree. Please feel free to make you own and add them + +Dont use this shader directly - use the hdr\crt-make-model-hdr.slangp where make and model are the make and model of the CRT you want. + +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 + +layout(push_constant) uniform Push +{ + // User Settings + float hcrt_hdr; + float hcrt_colour_space; + float hcrt_max_nits; + float hcrt_paper_white_nits; + float hcrt_expand_gamut; + float hcrt_gamma_out; + + float hcrt_lcd_resolution; + float hcrt_lcd_subpixel; + + float hcrt_red_vertical_convergence; + float hcrt_green_vertical_convergence; + float hcrt_blue_vertical_convergence; + float hcrt_red_horizontal_convergence; + float hcrt_green_horizontal_convergence; + float hcrt_blue_horizontal_convergence; + + // Developer Settings + float hcrt_crt_screen_type; + float hcrt_crt_resolution; + + // Vertical Settings + float hcrt_red_scanline_min; + float hcrt_red_scanline_max; + float hcrt_red_scanline_attack; + float hcrt_green_scanline_min; + float hcrt_green_scanline_max; + float hcrt_green_scanline_attack; + float hcrt_blue_scanline_min; + float hcrt_blue_scanline_max; + float hcrt_blue_scanline_attack; + + // Horizontal Settings + float hcrt_red_beam_sharpness; + float hcrt_red_beam_attack; + float hcrt_green_beam_sharpness; + float hcrt_green_beam_attack; + float hcrt_blue_beam_sharpness; + float hcrt_blue_beam_attack; + +} params; + +/* HSM Removed +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + + float hcrt_h_size; + float hcrt_v_size; + float hcrt_h_cent; + float hcrt_v_cent; + float hcrt_pin_phase; + float hcrt_pin_amp; +} global; +*/ + +#include "include/parameters.h" + +#define HCRT_HDR params.hcrt_hdr +#define HCRT_OUTPUT_COLOUR_SPACE params.hcrt_colour_space +#define HCRT_MAX_NITS params.hcrt_max_nits +#define HCRT_PAPER_WHITE_NITS params.hcrt_paper_white_nits +#define HCRT_EXPAND_GAMUT params.hcrt_expand_gamut +#define HCRT_GAMMA_OUT params.hcrt_gamma_out + +#define HCRT_LCD_RESOLUTION params.hcrt_lcd_resolution +#define HCRT_LCD_SUBPIXEL params.hcrt_lcd_subpixel +#define HCRT_RED_VERTICAL_CONVERGENCE params.hcrt_red_vertical_convergence +#define HCRT_GREEN_VERTICAL_CONVERGENCE params.hcrt_green_vertical_convergence +#define HCRT_BLUE_VERTICAL_CONVERGENCE params.hcrt_blue_vertical_convergence +#define HCRT_RED_HORIZONTAL_CONVERGENCE params.hcrt_red_horizontal_convergence +#define HCRT_GREEN_HORIZONTAL_CONVERGENCE params.hcrt_green_horizontal_convergence +#define HCRT_BLUE_HORIZONTAL_CONVERGENCE params.hcrt_blue_horizontal_convergence + +#define HCRT_CRT_SCREEN_TYPE params.hcrt_crt_screen_type +#define HCRT_CRT_RESOLUTION params.hcrt_crt_resolution + +#define HCRT_RED_SCANLINE_MIN params.hcrt_red_scanline_min +#define HCRT_RED_SCANLINE_MAX params.hcrt_red_scanline_max +#define HCRT_RED_SCANLINE_ATTACK params.hcrt_red_scanline_attack +#define HCRT_GREEN_SCANLINE_MIN params.hcrt_green_scanline_min +#define HCRT_GREEN_SCANLINE_MAX params.hcrt_green_scanline_max +#define HCRT_GREEN_SCANLINE_ATTACK params.hcrt_green_scanline_attack +#define HCRT_BLUE_SCANLINE_MIN params.hcrt_blue_scanline_min +#define HCRT_BLUE_SCANLINE_MAX params.hcrt_blue_scanline_max +#define HCRT_BLUE_SCANLINE_ATTACK params.hcrt_blue_scanline_attack + +#define HCRT_RED_BEAM_SHARPNESS params.hcrt_red_beam_sharpness +#define HCRT_RED_BEAM_ATTACK params.hcrt_red_beam_attack +#define HCRT_GREEN_BEAM_SHARPNESS params.hcrt_green_beam_sharpness +#define HCRT_GREEN_BEAM_ATTACK params.hcrt_green_beam_attack +#define HCRT_BLUE_BEAM_SHARPNESS params.hcrt_blue_beam_sharpness +#define HCRT_BLUE_BEAM_ATTACK params.hcrt_blue_beam_attack + +#define HCRT_H_SIZE global.hcrt_h_size +#define HCRT_V_SIZE global.hcrt_v_size +#define HCRT_H_CENT global.hcrt_h_cent +#define HCRT_V_CENT global.hcrt_v_cent +#define HCRT_PIN_PHASE global.hcrt_pin_phase +#define HCRT_PIN_AMP global.hcrt_pin_amp + +/* HSM Removed +#define COMPAT_TEXTURE(c, d) texture(c, d) +*/ + +// HSM Added +#define COMPAT_TEXTURE(c,d) HSM_GetCroppedTexSample(c,d) +// End Addition + +#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 * vec2(1.00001); // To resolve rounding issues when sampling +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D SourceSDR; +layout(set = 0, binding = 3) uniform sampler2D SourceHDR; +layout(set = 0, binding = 4) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 5) uniform sampler2D InfoCachePassFeedback; + + +#define kChannelMask 3 +#define kFirstChannelShift 2 +#define kSecondChannelShift 4 +#define kThirdChannelShift 6 + +#define kRedId 0 +#define kGreenId 1 +#define kBlueId 2 + +#define kRed (1 | (kRedId << kFirstChannelShift)) +#define kGreen (1 | (kGreenId << kFirstChannelShift)) +#define kBlue (1 | (kBlueId << kFirstChannelShift)) +#define kMagenta (2 | (kRedId << kFirstChannelShift) | (kBlueId << kSecondChannelShift)) +#define kYellow (2 | (kRedId << kFirstChannelShift) | (kGreenId << kSecondChannelShift)) +#define kCyan (2 | (kGreenId << kFirstChannelShift) | (kBlueId << kSecondChannelShift)) +#define kWhite (3 | (kRedId << kFirstChannelShift) | (kGreenId << kSecondChannelShift) | (kBlueId << kThirdChannelShift)) +#define kBlack 0 + +#define kRedChannel vec3(1.0, 0.0, 0.0) +#define kGreenChannel vec3(0.0, 1.0, 0.0) +#define kBlueChannel vec3(0.0, 0.0, 1.0) + +const vec3 kColourMask[3] = { kRedChannel, kGreenChannel, kBlueChannel }; + +#define kApertureGrille 0 +#define kShadowMask 1 +#define kSlotMask 2 +#define kBlackWhiteMask 3 + +#define kBGRAxis 2 +#define kTVLAxis 4 +#define kResolutionAxis 2 + +// APERTURE GRILLE MASKS + +#define kMaxApertureGrilleSize 7 + +#define kMG { kMagenta, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kGM { kGreen, kMagenta, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kBGR { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack } +#define kRGB { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack } + +#define kRGBX { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack } +#define kBGRX { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack } + +#define kRYCBX { kRed, kYellow, kCyan, kBlue, kBlack, kBlack, kBlack } +#define kBCYRX { kBlue, kCyan, kYellow, kRed, kBlack, kBlack, kBlack } + +#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack } +#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack } + +const float kApertureGrilleMaskSize[kResolutionAxis][kTVLAxis] = { { 7.0f, 4.0f, 3.0f, 2.0f }, { 7.0f, 7.0f, 5.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL + +const uint kApertureGrilleMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxApertureGrilleSize] = { + { // 4K + { kRRGGBBX, kBBGGRRX }, // 300 TVL + { kRGBX, kBGRX }, // 600 TVL + { kBGR, kRGB }, // 800 TVL + { kMG, kGM } // 1000 TVL + }, + { // 8K + { kRRGGBBX, kBBGGRRX }, // 300 TVL + { kRRGGBBX, kBBGGRRX }, // 600 TVL + { kRYCBX, kRYCBX }, // 800 TVL + { kRGBX, kBGRX } // 1000 TVL + } +}; + +#undef kXXXX +#undef kMG +#undef kGM +#undef kBGR +#undef kRGB +#undef kRGBX +#undef kBGRX +#undef kRYCBX +#undef kBCYRX +#undef kRRGGBBX +#undef kBBGGRRX + +// SHADOW MASKS + +#define kMaxShadowMaskSizeX 12 +#define kMaxShadowMaskSizeY 8 + +#define kXXXX { kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kMG { kMagenta, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kGM { kGreen, kMagenta, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kGRRBBG { kGreen, kRed, kRed, kBlue, kBlue, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kBBGGRR { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kGBBRRG { kGreen, kBlue, kBlue, kRed, kRed, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kRRGGBB { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kGGRRRRBBBBGG { kGreen, kGreen, kRed, kRed, kRed, kRed, kBlue, kBlue, kBlue, kBlue, kGreen, kGreen } +#define kBBBBGGGGRRRR { kBlue, kBlue, kBlue, kBlue, kGreen, kGreen, kGreen, kGreen, kRed, kRed, kRed, kRed } + +#define kGGBBBBRRRRGG { kGreen, kGreen, kBlue, kBlue, kBlue, kBlue, kRed, kRed, kRed, kRed, kGreen, kGreen } +#define kRRRRGGGGBBBB { kRed, kRed, kRed, kRed, kGreen, kGreen, kGreen, kGreen, kBlue, kBlue, kBlue, kBlue } + +#define kMG_GM { kMG, kGM, kXXXX, kXXXX, kXXXX, kXXXX, kXXXX, kXXXX } +#define kGM_MG { kGM, kMG, kXXXX, kXXXX, kXXXX, kXXXX, kXXXX, kXXXX } + +#define kGRRBBG_GRRBBG_BBGGRR_BBGGRR { kGRRBBG, kGRRBBG, kBBGGRR, kBBGGRR, kXXXX, kXXXX, kXXXX, kXXXX } +#define kGBBRRG_GBBRRG_RRGGBB_RRGGBB { kGBBRRG, kGBBRRG, kRRGGBB, kRRGGBB, kXXXX, kXXXX, kXXXX, kXXXX } + +#define kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR { kGGRRRRBBBBGG, kGGRRRRBBBBGG, kGGRRRRBBBBGG, kGGRRRRBBBBGG, kBBBBGGGGRRRR, kBBBBGGGGRRRR, kBBBBGGGGRRRR, kBBBBGGGGRRRR } +#define kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB { kGGBBBBRRRRGG, kGGBBBBRRRRGG, kGGBBBBRRRRGG, kGGBBBBRRRRGG, kRRRRGGGGBBBB, kRRRRGGGGBBBB, kRRRRGGGGBBBB, kRRRRGGGGBBBB } + +const float kShadowMaskSizeX[kResolutionAxis][kTVLAxis] = { { 12.0f, 6.0f, 2.0f, 2.0f }, { 12.0f, 12.0f, 6.0f, 6.0f } }; +const float kShadowMaskSizeY[kResolutionAxis][kTVLAxis] = { { 8.0f, 4.0f, 2.0f, 2.0f }, { 8.0f, 8.0f, 4.0f, 4.0f } }; + +const uint kShadowMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxShadowMaskSizeY][kMaxShadowMaskSizeX] = { + { // 4K + { kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR, + kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 300 TVL + { kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB }, // 600 TVL + { kMG_GM, kGM_MG }, // 800 TVL + { kMG_GM, kGM_MG } // 1000 TVL + }, + { // 8K + { kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR, + kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 300 TVL + { kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR, + kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 600 TVL + { kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB }, // 800 TVL + { kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB } // 1000 TVL + } +}; + +#undef kXXXX +#undef kMG +#undef kGM +#undef kBGR +#undef kRGB +#undef kRGBX +#undef kBGRX +#undef kRYCBX +#undef kBCYRX +#undef kRRGGBBX +#undef kBBGGRRX + +// SLOT MASKS + +#define kMaxSlotMaskSize 8 +#define kMaxSlotSizeX 2 +#define kMaxSlotSizeY 6 + +#define kXXXX { kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kMG { kMagenta, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kGM { kGreen, kMagenta, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kBGR { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kRGB { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kRGBX { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kBGRX { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack, kBlack } + +#define kRYCBX { kRed, kYellow, kCyan, kBlue, kBlack, kBlack, kBlack, kBlack } +#define kBCYRX { kBlue, kCyan, kYellow, kRed, kBlack, kBlack, kBlack, kBlack } + +#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack, kBlack } +#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack, kBlack } + +#define kMGMG_MGXX_MGMG_XXMG { { kMG, kMG }, { kMG, kXXXX }, { kMG, kMG }, { kXXXX, kMG }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } +#define kGMGM_GMXX_GMGM_XXGM { { kGM, kGM }, { kGM, kXXXX }, { kGM, kGM }, { kXXXX, kGM }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } + +#define kBGRBGR_BGRXXX_BGRBGR_XXXBGR { { kBGR, kBGR }, { kBGR, kXXXX }, { kBGR, kBGR }, { kXXXX, kBGR }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } +#define kRGBRGB_RGBXXX_RGBRGB_XXXRGB { { kRGB, kRGB }, { kRGB, kXXXX }, { kRGB, kRGB }, { kXXXX, kRGB }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } + +#define kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX { { kRGBX, kRGBX }, { kRGBX, kXXXX }, { kRGBX, kRGBX }, { kXXXX, kRGBX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } +#define kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX { { kBGRX, kBGRX }, { kBGRX, kXXXX }, { kBGRX, kBGRX }, { kXXXX, kBGRX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } + +#define kRYCBXRYCBX_RYCBXXXXX_RYCBXRYCBX_XXXXRYCBX { { kRYCBX, kRYCBX }, { kRYCBX, kXXXX }, { kRYCBX, kRYCBX }, { kXXXX, kRYCBX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } +#define kBCYRXBCYRX_BCYRXXXXX_BCYRXBCYRX_XXXXBCYRX { { kBCYRX, kBCYRX }, { kBCYRX, kXXXX }, { kBCYRX, kBCYRX }, { kXXXX, kBCYRX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } } + +#define kRRGGBBXRRGGBBX_RRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_RRGGBBXRRGGBBX_XXXXRRGGBBX { { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kXXXX }, { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kRRGGBBX }, { kXXXX, kRRGGBBX } } +#define kBBGGRRXBBGGRRX_BBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_BBGGRRXBBGGRRX_XXXXBBGGRRX { { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kXXXX }, { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kBBGGRRX }, { kXXXX, kBBGGRRX } } + +const float kSlotMaskSizeX[kResolutionAxis][kTVLAxis] = { { 7.0f, 4.0f, 3.0f, 2.0f }, { 7.0f, 7.0f, 5.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL +const float kSlotMaskSizeY[kResolutionAxis][kTVLAxis] = { { 6.0f, 4.0f, 4.0f, 4.0f }, { 6.0f, 6.0f, 4.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL + +const uint kSlotMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxSlotSizeY][kMaxSlotSizeX][kMaxSlotMaskSize] = { + { // 4K + { kRRGGBBXRRGGBBX_RRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_RRGGBBXRRGGBBX_XXXXRRGGBBX, kBBGGRRXBBGGRRX_BBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_BBGGRRXBBGGRRX_XXXXBBGGRRX }, // 300 TVL + { kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX, kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX }, // 600 TVL + { kBGRBGR_BGRXXX_BGRBGR_XXXBGR, kRGBRGB_RGBXXX_RGBRGB_XXXRGB }, // 800 TVL + { kMGMG_MGXX_MGMG_XXMG, kGMGM_GMXX_GMGM_XXGM } // 1000 TVL + }, + { // 8K + { kRRGGBBXRRGGBBX_RRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_RRGGBBXRRGGBBX_XXXXRRGGBBX, kBBGGRRXBBGGRRX_BBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_BBGGRRXBBGGRRX_XXXXBBGGRRX }, // 300 TVL + { kRRGGBBXRRGGBBX_RRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_RRGGBBXRRGGBBX_XXXXRRGGBBX, kBBGGRRXBBGGRRX_BBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_BBGGRRXBBGGRRX_XXXXBBGGRRX }, // 600 TVL + { kRYCBXRYCBX_RYCBXXXXX_RYCBXRYCBX_XXXXRYCBX, kBCYRXBCYRX_BCYRXXXXX_BCYRXBCYRX_XXXXBCYRX }, // 800 TVL + { kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX, kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX } // 1000 TVL + } +}; + +#undef kXXXX +#undef kMG +#undef kGM +#undef kBGR +#undef kRGB +#undef kRGBX +#undef kBGRX +#undef kRYCBX +#undef kBCYRX +#undef kRRGGBBX +#undef kBBGGRRX + + +// BLACK WHITE MASKS + +#define kMaxBlackWhiteSize 14 + +#define kWX { kWhite, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kWWX { kWhite, kWhite, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kWWXX { kWhite, kWhite, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kWWWWX { kWhite, kWhite, kWhite, kWhite, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kWWWWWXX { kWhite, kWhite, kWhite, kWhite, kWhite, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack } +#define kWWWWWWWWWWWXXX { kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite, kWhite /*kBlack, kBlack, kBlack*/ } + +const float kBlackWhiteMaskSize[kResolutionAxis][kTVLAxis] = { { 7.0f, 4.0f, 3.0f, 2.0f }, { 14.0f, 7.0f, 5.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL + +const uint kBlackWhiteMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxBlackWhiteSize] = { + { // 4K + { kWWWWWXX, kWWWWWXX }, // 300 TVL + { kWWXX, kWWXX }, // 600 TVL + { kWWX, kWWX }, // 800 TVL + { kWX, kWX } // 1000 TVL + }, + { // 8K + { kWWWWWWWWWWWXXX, kWWWWWWWWWWWXXX }, // 300 TVL + { kWWWWWXX, kWWWWWXX }, // 600 TVL + { kWWWWX, kWWWWX }, // 800 TVL + { kWWXX, kWWXX } // 1000 TVL + } +}; + +#undef kXXXX +#undef kMG +#undef kGM +#undef kBGR +#undef kRGB +#undef kRGBX +#undef kBGRX +#undef kRYCBX +#undef kBCYRX +#undef kRRGGBBX +#undef kBBGGRRX + +#include "include/scanline_generation.h" +#include "include/hdr10.h" +#include "include/gamma_correct.h" + +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(SCREEN_COORD, + SCREEN_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; + } + + vec2 screen_curved_coord = HSM_GetCRTShaderCurvedCoord(SCREEN_COORD); + screen_curved_coord = HSM_GetMirrorWrappedCoord(screen_curved_coord); + +// End HSM Added + + const uint screen_type = uint(HCRT_CRT_SCREEN_TYPE); + const uint crt_resolution = uint(HCRT_CRT_RESOLUTION); + const uint lcd_resolution = uint(HCRT_LCD_RESOLUTION); + const uint lcd_subpixel_layout = uint(HCRT_LCD_SUBPIXEL); + const vec2 source_resolution = CROPPED_ROTATED_SIZE_WITH_RES_MULT; + + vec2 tex_coord = screen_curved_coord - vec2(0.5f); + tex_coord = tex_coord * vec2(1.0f + (HCRT_PIN_PHASE * tex_coord.y), 1.0f); + tex_coord = tex_coord * vec2(HCRT_H_SIZE, HCRT_V_SIZE); + tex_coord = tex_coord + vec2(0.5f); + tex_coord = tex_coord + vec2(HCRT_H_CENT, HCRT_V_CENT) / global.OutputSize.xy; + + const vec2 current_position = vTexCoord * global.OutputSize.xy; + + uint colour_mask; + + switch(screen_type) + { + case kApertureGrille: + { + uint mask = uint(floor(mod(current_position.x, kApertureGrilleMaskSize[lcd_resolution][crt_resolution]))); + + colour_mask = kApertureGrilleMasks[lcd_resolution][crt_resolution][lcd_subpixel_layout][mask]; + + break; + } + case kShadowMask: + { + uint shadow_y = uint(floor(mod(current_position.y, kShadowMaskSizeY[lcd_resolution][crt_resolution]))); + + uint mask = uint(floor(mod(current_position.x, kShadowMaskSizeX[lcd_resolution][crt_resolution]))); + + colour_mask = kShadowMasks[lcd_resolution][crt_resolution][lcd_subpixel_layout][shadow_y][mask]; + + break; + } + case kSlotMask: + { + uint slot_x = uint(floor(mod(current_position.x / kSlotMaskSizeX[lcd_resolution][crt_resolution], kMaxSlotSizeX))); + uint slot_y = uint(floor(mod(current_position.y, kSlotMaskSizeY[lcd_resolution][crt_resolution]))); + + uint mask = uint(floor(mod(current_position.x, kSlotMaskSizeX[lcd_resolution][crt_resolution]))); + + colour_mask = kSlotMasks[lcd_resolution][crt_resolution][lcd_subpixel_layout][slot_x][slot_y][mask]; + + break; + } + case kBlackWhiteMask: + { + uint mask = uint(floor(mod(current_position.x, kBlackWhiteMaskSize[lcd_resolution][crt_resolution]))); + + colour_mask = kBlackWhiteMasks[lcd_resolution][crt_resolution][lcd_subpixel_layout][mask]; + + break; + } + default: + { + break; + } + } + + const float scanline_size = global.OutputSize.y / global.SourceSize.y; + + const vec3 horizontal_convergence = vec3(HCRT_RED_HORIZONTAL_CONVERGENCE, HCRT_GREEN_HORIZONTAL_CONVERGENCE, HCRT_BLUE_HORIZONTAL_CONVERGENCE); + const vec3 vertical_convergence = vec3(HCRT_RED_VERTICAL_CONVERGENCE, HCRT_GREEN_VERTICAL_CONVERGENCE, HCRT_BLUE_VERTICAL_CONVERGENCE); + const vec3 beam_sharpness = vec3(HCRT_RED_BEAM_SHARPNESS, HCRT_GREEN_BEAM_SHARPNESS, HCRT_BLUE_BEAM_SHARPNESS); + const vec3 beam_attack = vec3(HCRT_RED_BEAM_ATTACK, HCRT_GREEN_BEAM_ATTACK, HCRT_BLUE_BEAM_ATTACK); + const vec3 scanline_min = vec3(HCRT_RED_SCANLINE_MIN, HCRT_GREEN_SCANLINE_MIN, HCRT_BLUE_SCANLINE_MIN); + const vec3 scanline_max = vec3(HCRT_RED_SCANLINE_MAX, HCRT_GREEN_SCANLINE_MAX, HCRT_BLUE_SCANLINE_MAX); + const vec3 scanline_attack = vec3(HCRT_RED_SCANLINE_ATTACK, HCRT_GREEN_SCANLINE_ATTACK, HCRT_BLUE_SCANLINE_ATTACK); + + const uint channel_count = colour_mask & 3; + + vec3 scanline_colour = vec3(0.0f); + + if(channel_count > 0) + { + const uint channel_0 = (colour_mask >> kFirstChannelShift) & 3; + + const float scanline_channel_0 = GenerateScanline( channel_0, + tex_coord, + source_resolution, + scanline_size, + horizontal_convergence[channel_0], + vertical_convergence[channel_0], + beam_sharpness[channel_0], + beam_attack[channel_0], + scanline_min[channel_0], + scanline_max[channel_0], + scanline_attack[channel_0]); + + scanline_colour = scanline_channel_0 * kColourMask[channel_0]; + } + + if(channel_count > 1) + { + const uint channel_1 = (colour_mask >> kSecondChannelShift) & 3; + + const float scanline_channel_1 = GenerateScanline(channel_1, + tex_coord, + source_resolution, + scanline_size, + horizontal_convergence[channel_1], + vertical_convergence[channel_1], + beam_sharpness[channel_1], + beam_attack[channel_1], + scanline_min[channel_1], + scanline_max[channel_1], + scanline_attack[channel_1]); + + scanline_colour += scanline_channel_1 * kColourMask[channel_1]; + } + + if(channel_count > 2) + { + const uint channel_2 = (colour_mask >> kThirdChannelShift) & 3; + + const float scanline_channel_2 = GenerateScanline(channel_2, + tex_coord, + source_resolution, + scanline_size, + horizontal_convergence[channel_2], + vertical_convergence[channel_2], + beam_sharpness[channel_2], + beam_attack[channel_2], + scanline_min[channel_2], + scanline_max[channel_2], + scanline_attack[channel_2]); + + scanline_colour += scanline_channel_2 * kColourMask[channel_2]; + } + + const vec3 hdr10 = GammaCorrect(scanline_colour); + + FragColor = vec4(hdr10, 1.0f); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang new file mode 100644 index 0000000..fba5737 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/crt-sony-megatron.slang @@ -0,0 +1,6 @@ +#version 450 + +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +#include "../hsm/common/hsm-params-2-bezel.inc" +#include "../hsm/common/hsm-common-functions-bezel.inc" +#include "crt-sony-megatron.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/hdr10.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/hdr10.slang new file mode 100644 index 0000000..1f7f913 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/hdr10.slang @@ -0,0 +1,54 @@ +#version 450 + +/* +Part of the crt-sony-megatron shader group. Does the exact same thing as RetroArch does internally to map into HDR10 space. + +This is used to do this mapping BEFORE screen effects are applied. + +Originally part of the crt\crt-sony-pvm-4k-hdr.slangp but can be used for any shader +*/ + +#pragma format A2B10G10R10_UNORM_PACK32 + +#include "include\hdr10.h" + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float PaperWhiteNits; + float ExpandGamut; +} params; + +#pragma parameter PaperWhiteNits "Paper White Luminance" 450.0 0.0 10000.0 10.0 +#pragma parameter ExpandGamut "ExpandGamut" 1.0 0.0 1.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; + +void main() +{ + vec4 hdr_linear = texture(Source, vTexCoord); + FragColor = vec4(Hdr10(hdr_linear.rgb, params.PaperWhiteNits, params.ExpandGamut), hdr_linear.a); +} + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/colour_grade.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/colour_grade.h new file mode 100644 index 0000000..420c8dd --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/colour_grade.h @@ -0,0 +1,178 @@ + +#define kColourSystems 4 + +#define kD50 5003.0f +#define kD55 5503.0f +#define kD65 6504.0f +#define kD75 7504.0f +#define kD93 9305.0f + +const mat3 k709_to_XYZ = mat3( + 0.412391f, 0.357584f, 0.180481f, + 0.212639f, 0.715169f, 0.072192f, + 0.019331f, 0.119195f, 0.950532f); + +const mat3 kPAL_to_XYZ = mat3( + 0.430554f, 0.341550f, 0.178352f, + 0.222004f, 0.706655f, 0.071341f, + 0.020182f, 0.129553f, 0.939322f); + +const mat3 kNTSC_to_XYZ = mat3( + 0.393521f, 0.365258f, 0.191677f, + 0.212376f, 0.701060f, 0.086564f, + 0.018739f, 0.111934f, 0.958385f); + +const mat3 kXYZ_to_709 = mat3( + 3.240970f, -1.537383f, -0.498611f, + -0.969244f, 1.875968f, 0.041555f, + 0.055630f, -0.203977f, 1.056972f); + +const mat3 kColourGamut[kColourSystems] = { k709_to_XYZ, kPAL_to_XYZ, kNTSC_to_XYZ, kNTSC_to_XYZ }; + +const float kTemperatures[kColourSystems] = { kD65, kD65, kD65, kD93 }; + + // Values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693 +const mat3 kWarmTemperature = mat3( + vec3(0.0, -2902.1955373783176, -8257.7997278925690), + vec3(0.0, 1669.5803561666639, 2575.2827530017594), + vec3(1.0, 1.3302673723350029, 1.8993753891711275)); + +const mat3 kCoolTemperature = mat3( + vec3( 1745.0425298314172, 1216.6168361476490, -8257.7997278925690), + vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594), + vec3( 0.55995389139931482, 0.70381203140554553, 1.8993753891711275)); + +const mat4 kCubicBezier = mat4( 1.0f, 0.0f, 0.0f, 0.0f, + -3.0f, 3.0f, 0.0f, 0.0f, + 3.0f, -6.0f, 3.0f, 0.0f, + -1.0f, 3.0f, -3.0f, 1.0f ); + +float Bezier(const float t0, const vec4 control_points) +{ + vec4 t = vec4(1.0, t0, t0*t0, t0*t0*t0); + return dot(t, control_points * kCubicBezier); +} + +vec3 WhiteBalance(float temperature, vec3 colour) +{ + const mat3 m = (temperature < kD65) ? kWarmTemperature : kCoolTemperature; + + const vec3 rgb_temperature = mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0f, 40000.0f)) + m[1]) + m[2]), vec3(0.0f), vec3(1.0f)), vec3(1.0f), smoothstep(1000.0f, 0.0f, temperature)); + + vec3 result = colour * rgb_temperature; + + result *= dot(colour, vec3(0.2126, 0.7152, 0.0722)) / max(dot(result, vec3(0.2126, 0.7152, 0.0722)), 1e-5); // Preserve luminance + + return result; +} + +float r601ToLinear_1(const float channel) +{ + return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), (1.0f / 0.45f)) : channel * (1.0f / 4.5f); +} + +vec3 r601ToLinear(const vec3 colour) +{ + return vec3(r601ToLinear_1(colour.r), r601ToLinear_1(colour.g), r601ToLinear_1(colour.b)); +} + + +float r709ToLinear_1(const float channel) +{ + return (channel >= 0.081f) ? pow((channel + 0.099f) * (1.0f / 1.099f), (1.0f / 0.45f)) : channel * (1.0f / 4.5f); +} + +vec3 r709ToLinear(const vec3 colour) +{ + return vec3(r709ToLinear_1(colour.r), r709ToLinear_1(colour.g), r709ToLinear_1(colour.b)); +} + +// XYZ Yxy transforms found in Dogway's Grade.slang shader + +vec3 XYZtoYxy(const vec3 XYZ) +{ + const float XYZrgb = XYZ.r + XYZ.g + XYZ.b; + const float Yxyg = (XYZrgb <= 0.0f) ? 0.3805f : XYZ.r / XYZrgb; + const float Yxyb = (XYZrgb <= 0.0f) ? 0.3769f : XYZ.g / XYZrgb; + return vec3(XYZ.g, Yxyg, Yxyb); +} + +vec3 YxytoXYZ(const vec3 Yxy) +{ + const float Xs = Yxy.r * (Yxy.g / Yxy.b); + const float Xsz = (Yxy.r <= 0.0f) ? 0.0f : 1.0f; + const vec3 XYZ = vec3(Xsz, Xsz, Xsz) * vec3(Xs, Yxy.r, (Xs / Yxy.g) - Xs - Yxy.r); + return XYZ; +} + +const vec4 kTopBrightnessControlPoints = vec4(0.0f, 1.0f, 1.0f, 1.0f); +const vec4 kMidBrightnessControlPoints = vec4(0.0f, 1.0f / 3.0f, (1.0f / 3.0f) * 2.0f, 1.0f); +const vec4 kBottomBrightnessControlPoints = vec4(0.0f, 0.0f, 0.0f, 1.0f); + +float Brightness(const float luminance) +{ + if(HCRT_BRIGHTNESS >= 0.0f) + { + return Bezier(luminance, mix(kMidBrightnessControlPoints, kTopBrightnessControlPoints, HCRT_BRIGHTNESS)); + } + else + { + return Bezier(luminance, mix(kMidBrightnessControlPoints, kBottomBrightnessControlPoints, abs(HCRT_BRIGHTNESS))); + } +} + +const vec4 kTopContrastControlPoints = vec4(0.0f, 0.0f, 1.0f, 1.0f); +const vec4 kMidContrastControlPoints = vec4(0.0f, 1.0f / 3.0f, (1.0f / 3.0f) * 2.0f, 1.0f); +const vec4 kBottomContrastControlPoints = vec4(0.0f, 1.0f, 0.0f, 1.0f); + +float Contrast(const float luminance) +{ + if(HCRT_CONTRAST >= 0.0f) + { + return Bezier(luminance, mix(kMidContrastControlPoints, kTopContrastControlPoints, HCRT_CONTRAST)); + } + else + { + return Bezier(luminance, mix(kMidContrastControlPoints, kBottomContrastControlPoints, abs(HCRT_CONTRAST))); + } +} + +vec3 Saturation(const vec3 colour) +{ + const float luma = dot(colour, vec3(0.2125, 0.7154, 0.0721)); + const float saturation = 0.5f + HCRT_SATURATION * 0.5f; + + return clamp(mix(vec3(luma), colour, vec3(saturation) * 2.0f), 0.0f, 1.0f); +} + +vec3 BrightnessContrastSaturation(const vec3 xyz) +{ + const vec3 Yxy = XYZtoYxy(xyz); + const float Y_gamma = clamp(pow(Yxy.x, 1.0f / 2.4f), 0.0f, 1.0f); + + const float Y_brightness = Brightness(Y_gamma); + + const float Y_contrast = Contrast(Y_brightness); + + const vec3 contrast_linear = vec3(pow(Y_contrast, 2.4f), Yxy.y, Yxy.z); + const vec3 contrast = clamp(YxytoXYZ(contrast_linear) * kXYZ_to_709, 0.0f, 1.0f); + + const vec3 saturation = Saturation(contrast); + + return saturation; +} + +vec3 ColourGrade(const vec3 colour) +{ + const uint colour_system = uint(HCRT_CRT_COLOUR_SYSTEM); + + const vec3 white_point = WhiteBalance(kTemperatures[colour_system] + HCRT_WHITE_TEMPERATURE, colour); + + const vec3 linear = pow(white_point, vec3((1.0f / 0.45f) + HCRT_GAMMA_IN)); + + const vec3 xyz = linear * kColourGamut[colour_system]; + + const vec3 graded = BrightnessContrastSaturation(xyz); + + return graded; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/gamma_correct.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/gamma_correct.h new file mode 100644 index 0000000..57e52ed --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/gamma_correct.h @@ -0,0 +1,60 @@ +// SDR Colour output spaces + +const mat3 k709_to_XYZ = mat3( + 0.412391f, 0.357584f, 0.180481f, + 0.212639f, 0.715169f, 0.072192f, + 0.019331f, 0.119195f, 0.950532f); + +const mat3 kXYZ_to_DCIP3 = mat3 ( + 2.4934969119f, -0.9313836179f, -0.4027107845f, + -0.8294889696f, 1.7626640603f, 0.0236246858f, + 0.0358458302f, -0.0761723893f, 0.9568845240f); + +float LinearTosRGB_1(const float channel) +{ + return (channel > 0.0031308f) ? (1.055f * pow(channel, (1.0f / 2.4f) + HCRT_GAMMA_OUT)) - 0.055f : channel * 12.92f; +} + +vec3 LinearTosRGB(const vec3 colour) +{ + return vec3(LinearTosRGB_1(colour.r), LinearTosRGB_1(colour.g), LinearTosRGB_1(colour.b)); +} + +float LinearTo709_1(const float channel) +{ + return (channel >= 0.018f) ? pow(channel * 1.099f, 0.45f + HCRT_GAMMA_OUT) - 0.099f : channel * 4.5f; +} + +vec3 LinearTo709(const vec3 colour) +{ + return vec3(LinearTo709_1(colour.r), LinearTo709_1(colour.g), LinearTo709_1(colour.b)); +} + +vec3 LinearToDCIP3(const vec3 colour) +{ + return clamp(pow(colour, vec3((1.0f / 2.6f) + HCRT_GAMMA_OUT)), 0.0f, 1.0f); +} + +vec3 GammaCorrect(const vec3 scanline_colour) +{ + if(HCRT_HDR < 1.0f) + { + if(HCRT_OUTPUT_COLOUR_SPACE == 0.0f) + { + return LinearTo709(scanline_colour); + } + else if(HCRT_OUTPUT_COLOUR_SPACE == 1.0f) + { + return LinearTosRGB(scanline_colour); + } + else + { + const vec3 dcip3_colour = (scanline_colour * k709_to_XYZ) * kXYZ_to_DCIP3; + return LinearToDCIP3(dcip3_colour); + } + } + else + { + return Hdr10(scanline_colour, HCRT_PAPER_WHITE_NITS, HCRT_EXPAND_GAMUT); + } +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/hdr10.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/hdr10.h new file mode 100644 index 0000000..c6a584e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/hdr10.h @@ -0,0 +1,33 @@ + +#define kMaxNitsFor2084 10000.0f + +const mat3 k709_to_2020 = mat3 ( + 0.6274040f, 0.3292820f, 0.0433136f, + 0.0690970f, 0.9195400f, 0.0113612f, + 0.0163916f, 0.0880132f, 0.8955950f); + +/* START Converted from (Copyright (c) Microsoft Corporation - Licensed under the MIT License.) https://github.com/microsoft/Xbox-ATG-Samples/tree/master/Kits/ATGTK/HDR */ +const mat3 kExpanded709_to_2020 = mat3 ( + 0.6274040f, 0.3292820f, 0.0433136f, + 0.0457456f, 0.941777f, 0.0124772f, + -0.00121055f, 0.0176041f, 0.983607f); + +const mat3 k2020Gamuts[2] = { k709_to_2020, kExpanded709_to_2020 }; + +vec3 LinearToST2084(vec3 normalizedLinearValue) +{ + 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)); + return ST2084; /* Don't clamp between [0..1], so we can still perform operations on scene values higher than 10,000 nits */ +} +/* 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 rec2020 = hdr_linear * k2020Gamuts[uint(expand_gamut)]; + vec3 linearColour = rec2020 * (paper_white_nits / kMaxNitsFor2084); + vec3 hdr10 = LinearToST2084(linearColour); + + return hdr10; +} + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/inverse_tonemap.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/inverse_tonemap.h new file mode 100644 index 0000000..1e64c70 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/inverse_tonemap.h @@ -0,0 +1,21 @@ + +#define kMaxNitsFor2084 10000.0f +#define kEpsilon 0.0001f + +vec3 InverseTonemap(const vec3 sdr_linear, const float max_nits, const float paper_white_nits) +{ + const float luma = dot(sdr_linear, vec3(0.2126, 0.7152, 0.0722)); /* Rec BT.709 luma coefficients - https://en.wikipedia.org/wiki/Luma_(video) */ + + /* Inverse reinhard tonemap */ + const float max_value = (max_nits / paper_white_nits) + kEpsilon; + const float elbow = max_value / (max_value - 1.0f); + const float offset = 1.0f - ((0.5f * elbow) / (elbow - 0.5f)); + + const float hdr_luma_inv_tonemap = offset + ((luma * elbow) / (elbow - luma)); + const float sdr_luma_inv_tonemap = luma / ((1.0f + kEpsilon) - luma); /* Convert the srd < 0.5 to 0.0 -> 1.0 range */ + + const float luma_inv_tonemap = (luma > 0.5f) ? hdr_luma_inv_tonemap : sdr_luma_inv_tonemap; + const vec3 hdr = sdr_linear / (luma + kEpsilon) * luma_inv_tonemap; + + return hdr; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/parameters.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/parameters.h new file mode 100644 index 0000000..1a6ea82 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/parameters.h @@ -0,0 +1,64 @@ + + + + +#pragma parameter hcrt_title "SONY MEGATRON COLOUR VIDEO MONITOR" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_space0 " " 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_support0 "SDR mode: Turn up your TV's brightness as high as possible" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_support1 "HDR mode: Set the peak luminance to that of your TV." 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_support2 "Then adjust paper white luminance until it looks right" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_support3 " " 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_support4 "Default white points for the different colour systems:" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_support5 "709: 6500K, PAL: 6500K, NTSC-U: 6500K, NTSC-J: 9300K" 0.0 0.0 0.0001 0.0001 +#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_space " SDR: 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 +#pragma parameter hcrt_expand_gamut " HDR: Original/Vivid" 0.0 0.0 1.0 1.0 +#pragma parameter hcrt_lcd_resolution " Display's Resolution: 4K | 8K" 0.0 0.0 1.0 1.0 +#pragma parameter hcrt_lcd_subpixel " Display's Subpixel Layout: RGB | BGR" 0.0 0.0 1.0 1.0 +#pragma parameter hcrt_space2 " " 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_developer_settings "CRT SETTINGS:" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_crt_screen_type " Screen Type: APERTURE GRILLE | SHADOW MASK | SLOT MASK" 0.0 0.0 3.0 1.0 +#pragma parameter hcrt_crt_resolution " Resolution: 300TVL | 600TVL | 800TVL | 1000TVL" 1.0 0.0 3.0 1.0 +#pragma parameter hcrt_colour_system " Colour System: r709 | PAL | NTSC-U | NTSC-J" 2.0 0.0 3.0 1.0 +#pragma parameter hcrt_white_temperature " White Temperature Offset (Kelvin)" 0.0 -5000.0 12000.0 100.0 +#pragma parameter hcrt_brightness " Brightness" 0.0 -1.0 1.0 0.01 +#pragma parameter hcrt_contrast " Contrast" 0.0 -1.0 1.0 0.01 +#pragma parameter hcrt_saturation " Saturation" 0.0 -1.0 1.0 0.01 +#pragma parameter hcrt_gamma_in " Gamma In" 0.0 -1.0 1.0 0.01 +#pragma parameter hcrt_gamma_out " Gamma Out" 0.0 -0.4 0.4 0.005 +#pragma parameter hcrt_pin_phase " Pin Phase" 0.00 -0.2 0.2 0.01 +#pragma parameter hcrt_pin_amp " Pin Amp" 0.00 -0.2 0.2 0.01 +#pragma parameter hcrt_space3 " " 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_developer_settings0 " VERTICAL SETTINGS:" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_v_size " Vertical Size" 1.00 0.8 1.2 0.01 +#pragma parameter hcrt_v_cent " Vertical Center" 0.00 -200.0 200.0 1.0 +#pragma parameter hcrt_red_vertical_convergence " Red Vertical Deconvergence" 0.00 -10.0 10.0 0.01 +#pragma parameter hcrt_green_vertical_convergence " Green Vertical Deconvergence" 0.00 -10.0 10.0 0.01 +#pragma parameter hcrt_blue_vertical_convergence " Blue Vertical Deconvergence" 0.00 -10.0 10.0 0.01 +#pragma parameter hcrt_red_scanline_min " Red Scanline Min" 0.50 0.0 2.0 0.01 +#pragma parameter hcrt_red_scanline_max " Red Scanline Max" 1.00 0.0 2.0 0.01 +#pragma parameter hcrt_red_scanline_attack " Red Scanline Attack" 0.20 0.0 1.0 0.01 +#pragma parameter hcrt_green_scanline_min " Green Scanline Min" 0.50 0.0 2.0 0.01 +#pragma parameter hcrt_green_scanline_max " Green Scanline Max" 1.00 0.0 2.0 0.01 +#pragma parameter hcrt_green_scanline_attack " Green Scanline Attack" 0.20 0.0 1.0 0.01 +#pragma parameter hcrt_blue_scanline_min " Blue Scanline Min" 0.50 0.0 2.0 0.01 +#pragma parameter hcrt_blue_scanline_max " Blue Scanline Max" 1.00 0.0 2.0 0.01 +#pragma parameter hcrt_blue_scanline_attack " Blue Scanline Attack" 0.20 0.0 1.0 0.01 +#pragma parameter hcrt_space4 " " 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_developer_settings1 " HORIZONTAL SETTINGS:" 0.0 0.0 0.0001 0.0001 +#pragma parameter hcrt_h_size " Horizontal Size" 1.00 0.8 1.2 0.01 +#pragma parameter hcrt_h_cent " Horizontal Center" 0.00 -200.0 200.0 1.0 +#pragma parameter hcrt_red_horizontal_convergence " Red Horizontal Deconvergence" 0.00 -10.0 10.0 0.01 +#pragma parameter hcrt_green_horizontal_convergence " Green Horizontal Deconvergence" 0.00 -10.0 10.0 0.01 +#pragma parameter hcrt_blue_horizontal_convergence " Blue Horizontal Deconvergence" 0.00 -10.0 10.0 0.01 +#pragma parameter hcrt_red_beam_sharpness " Red Beam Sharpness" 1.75 0.0 5.0 0.05 +#pragma parameter hcrt_red_beam_attack " Red Beam Attack" 0.50 0.0 2.0 0.01 +#pragma parameter hcrt_green_beam_sharpness " Green Beam Sharpness" 1.75 0.0 5.0 0.05 +#pragma parameter hcrt_green_beam_attack " Green Beam Attack" 0.50 0.0 2.0 0.01 +#pragma parameter hcrt_blue_beam_sharpness " Blue Beam Sharpness" 1.75 0.0 5.0 0.05 +#pragma parameter hcrt_blue_beam_attack " Blue Beam Attack" 0.50 0.0 2.0 0.01 + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/scanline_generation.h b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/scanline_generation.h new file mode 100644 index 0000000..e42f718 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/include/scanline_generation.h @@ -0,0 +1,137 @@ + +#define kPi 3.1415926536f +#define kEuler 2.718281828459f +#define kMax 1.0f + +#define kBeamWidth 0.5f + +const vec4 kFallOffControlPoints = vec4(0.0f, 0.0f, 0.0f, 1.0f); +const vec4 kAttackControlPoints = vec4(0.0f, 1.0f, 1.0f, 1.0f); +//const vec4 kScanlineControlPoints = vec4(1.0f, 1.0f, 0.0f, 0.0f); + +const mat4 kCubicBezier = mat4( 1.0f, 0.0f, 0.0f, 0.0f, + -3.0f, 3.0f, 0.0f, 0.0f, + 3.0f, -6.0f, 3.0f, 0.0f, + -1.0f, 3.0f, -3.0f, 1.0f ); + +float Bezier(const float t0, const vec4 control_points) +{ + vec4 t = vec4(1.0, t0, t0*t0, t0*t0*t0); + return dot(t, control_points * kCubicBezier); +} + +vec4 BeamControlPoints(const float beam_attack, const bool falloff) +{ + const float inner_attack = clamp(beam_attack, 0.0f, 1.0); + const float outer_attack = clamp(beam_attack - 1.0f, 0.0f, 1.0); + + return falloff ? kFallOffControlPoints + vec4(0.0f, outer_attack, inner_attack, 0.0f) : kAttackControlPoints - vec4(0.0f, inner_attack, outer_attack, 0.0f); +} + +float ScanlineColour(const uint channel, + const vec2 tex_coord, + const vec2 source_size, + const float scanline_size, + const float source_tex_coord_x, + const float narrowed_source_pixel_offset, + const float vertical_convergence, + const float beam_attack, + const float scanline_min, + const float scanline_max, + const float scanline_attack, + inout float next_prev) +{ + const float current_source_position_y = ((tex_coord.y * source_size.y) - vertical_convergence) + next_prev; + const float current_source_center_y = floor(current_source_position_y) + 0.5f; + + const float source_tex_coord_y = current_source_center_y / source_size.y; + + const float scanline_delta = fract(current_source_position_y) - 0.5f; + + // Slightly increase the beam width to get maximum brightness + float beam_distance = abs(scanline_delta - next_prev) - (kBeamWidth / scanline_size); + beam_distance = beam_distance < 0.0f ? 0.0f : beam_distance; + const float scanline_distance = beam_distance * 2.0f; + + next_prev = scanline_delta > 0.0f ? 1.0f : -1.0f; + + const vec2 tex_coord_0 = vec2(source_tex_coord_x, source_tex_coord_y); + const vec2 tex_coord_1 = vec2(source_tex_coord_x + (1.0f / source_size.x), source_tex_coord_y); + + const float sdr_channel_0 = COMPAT_TEXTURE(SourceSDR, tex_coord_0)[channel]; + const float sdr_channel_1 = COMPAT_TEXTURE(SourceSDR, tex_coord_1)[channel]; + + const float hdr_channel_0 = COMPAT_TEXTURE(SourceHDR, tex_coord_0)[channel]; + const float hdr_channel_1 = COMPAT_TEXTURE(SourceHDR, tex_coord_1)[channel]; + + /* Horizontal interpolation between pixels */ + const float horiz_interp = Bezier(narrowed_source_pixel_offset, BeamControlPoints(beam_attack, sdr_channel_0 > sdr_channel_1)); + + const float hdr_channel = mix(hdr_channel_0, hdr_channel_1, horiz_interp); + const float sdr_channel = mix(sdr_channel_0, sdr_channel_1, horiz_interp); + + const float channel_scanline_distance = clamp(scanline_distance / ((sdr_channel * (scanline_max - scanline_min)) + scanline_min), 0.0f, 1.0f); + + const vec4 channel_control_points = vec4(1.0f, 1.0f, sdr_channel * scanline_attack, 0.0f); + + const float luminance = Bezier(channel_scanline_distance, channel_control_points); + + return luminance * hdr_channel; +} + +float GenerateScanline( const uint channel, + const vec2 tex_coord, + const vec2 source_size, + const float scanline_size, + const float horizontal_convergence, + const float vertical_convergence, + const float beam_sharpness, + const float beam_attack, + const float scanline_min, + const float scanline_max, + const float scanline_attack) +{ + const float current_source_position_x = (tex_coord.x * source_size.x) - horizontal_convergence; + const float current_source_center_x = floor(current_source_position_x) + 0.5f; + + const float source_tex_coord_x = current_source_center_x / source_size.x; + + const float source_pixel_offset = fract(current_source_position_x); + + const float narrowed_source_pixel_offset = clamp(((source_pixel_offset - 0.5f) * beam_sharpness) + 0.5f, 0.0f, 1.0f); + + float next_prev = 0.0f; + + const float scanline_colour0 = ScanlineColour( channel, + tex_coord, + source_size, + scanline_size, + source_tex_coord_x, + narrowed_source_pixel_offset, + vertical_convergence, + beam_attack, + scanline_min, + scanline_max, + scanline_attack, + next_prev); + + // Optionally sample the neighbouring scanline + float scanline_colour1 = 0.0f; + if(scanline_max > 1.0f) + { + scanline_colour1 = ScanlineColour( channel, + tex_coord, + source_size, + scanline_size, + source_tex_coord_x, + narrowed_source_pixel_offset, + vertical_convergence, + beam_attack, + scanline_min, + scanline_max, + scanline_attack, + next_prev); + } + + return scanline_colour0 + scanline_colour1; +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/inverse_tonemap.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/inverse_tonemap.slang new file mode 100644 index 0000000..e08b393 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/inverse_tonemap.slang @@ -0,0 +1,63 @@ +#version 450 + +/* +Part of the crt-sony-megatron shader group. Does the exact same thing as RetroArch does internally to inverse tonemap from a SDR image to HDR. + +This is used to do this mapping BEFORE screen effects are applied. + +Originally part of the crt\crt-sony-pvm-4k-hdr.slangp but can be used for any shader +*/ + +#pragma format R16G16B16A16_SFLOAT + +#include "include\inverse_tonemap.h" + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float Contrast; + float PaperWhiteNits; + float MaxNits; + float Saturation; + float DisplayGamma; +} params; + +#pragma parameter Contrast "Contrast" 3.75 0.0 10.0 0.05 +#pragma parameter PaperWhiteNits "Paper White Luminance" 450.0 0.0 10000.0 10.0 +#pragma parameter MaxNits "Peak Luminance" 700.0 0.0 10000.0 10.0 +#pragma parameter Saturation "Saturation" 0.25 0.0 1.0 0.01 +#pragma parameter DisplayGamma "Display Gamma" 2.2 0.0 5.0 0.1 + +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; + +void main() +{ + vec4 source = texture(Source, vTexCoord); + + vec3 sdr = pow(abs(source.rgb), vec3(params.Contrast / params.DisplayGamma)); /* Display Gamma - needs to be determined by calibration screen */ + + FragColor = vec4(InverseTonemap(sdr, params.MaxNits, params.PaperWhiteNits, params.Saturation), source.a); +} + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/readme.md b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/readme.md new file mode 100644 index 0000000..ec0410f --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-megatron/readme.md @@ -0,0 +1,28 @@ +/* +Sony Megatron Colour Video Monitor +Author: Major Pain The Cactus + +A shader that specifically tries to emulate arcade monitor's with an shadow mask screen but with full brightness. + +The novel thing about this shader is that it transforms the image output by the 'console/arcade/computer' into HDR space first i.e brightens it first and then applies +an shadow mask afterwards which is kind of what a CRT would actually do - its kind of a kin to the electron beam (but nothing like it lol). + +My DisplayHDR 600 monitor does seem to get reasonably close to the brightness of my PVM - its not quite there but its close. I think DisplayHDR 1000 and above will be able to match. + +To use: +Please Enable HDR in RetroArch 1.10+ +[UPDATE] This shader supports SDR as well - just enable it in the shader parameters + +NOTE: when this shader is envoked the Contrast, Peak Luminance and Paper White Luminance in the HDR menu do nothing instead set those values through the shader parameters + +For this shader set Paper White Luminance to above 700 and Peak Luminance to the peak luminance of your monitor. + +Also try to use a integer scaling - its just better - overscaling is fine/great. + +This shader doesn't do any geometry warping or bouncing of light around inside the screen - I think these effects just add unwanted noise, I know people disagree. Please feel free to make you own and add them + +Works only with the D3D11/D3D12/Vulkan drivers currently + +DONT USE THIS PRESET DIRECTLY - Use any of the others in this directory +*/ + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-accumulate.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-accumulate.slang new file mode 100644 index 0000000..10c8bee --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-accumulate.slang @@ -0,0 +1,103 @@ +#version 450 + +// newpixie CRT +// by Mattias Gustavsson +// adapted for slang by hunterk + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses - you may choose the one you like. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2016 Mattias Gustavsson +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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 NPX_ACCUMULATE_MODULATION; +} params; + +#pragma parameter NPX_TITLE "[ --- NEWPIXIE --- ]:" 0 0 0.01 0.01 + +#pragma parameter NPX_ACCUMULATE_MODULATION " Accumulate Modulation" 0.65 0.0 1.0 0.01 +#define modulate params.NPX_ACCUMULATE_MODULATION + +//HSM Removed +// #define tex0 PassFeedback1 + +// HSM Added +#define tex0 PassFeedback16 + +#define tex1 Source + +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; + +//HSM Removed +// layout(set = 0, binding = 3) uniform sampler2D PassFeedback1; + +// HSM Added +layout(set = 0, binding = 3) uniform sampler2D PassFeedback16; + +void main() +{ + vec4 a = texture(tex0, vTexCoord.xy) * vec4(modulate); + vec4 b = texture(tex1, vTexCoord.xy); + FragColor = max( a, b * 0.96 ); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-blur-horiz.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-blur-horiz.slang new file mode 100644 index 0000000..fbe843d --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-blur-horiz.slang @@ -0,0 +1,96 @@ +#version 450 + +// newpixie CRT +// by Mattias Gustavsson +// adapted for slang by hunterk + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses - you may choose the one you like. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2016 Mattias Gustavsson +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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 NPX_BLUR_HORIZ; +} params; + +#pragma parameter NPX_BLUR_HORIZ " Horizontal Blur" 1.0 0.75 5.0 0.25 + +vec2 blur = vec2(params.NPX_BLUR_HORIZ, 0.0) * params.OutputSize.zw; + +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; + +void main() +{ + vec2 uv = vTexCoord.xy; + vec4 sum = texture( Source, uv ) * 0.2270270270; + sum += texture(Source, vec2( uv.x - 4.0 * blur.x, uv.y - 4.0 * blur.y ) ) * 0.0162162162; + sum += texture(Source, vec2( uv.x - 3.0 * blur.x, uv.y - 3.0 * blur.y ) ) * 0.0540540541; + sum += texture(Source, vec2( uv.x - 2.0 * blur.x, uv.y - 2.0 * blur.y ) ) * 0.1216216216; + sum += texture(Source, vec2( uv.x - 1.0 * blur.x, uv.y - 1.0 * blur.y ) ) * 0.1945945946; + sum += texture(Source, vec2( uv.x + 1.0 * blur.x, uv.y + 1.0 * blur.y ) ) * 0.1945945946; + sum += texture(Source, vec2( uv.x + 2.0 * blur.x, uv.y + 2.0 * blur.y ) ) * 0.1216216216; + sum += texture(Source, vec2( uv.x + 3.0 * blur.x, uv.y + 3.0 * blur.y ) ) * 0.0540540541; + sum += texture(Source, vec2( uv.x + 4.0 * blur.x, uv.y + 4.0 * blur.y ) ) * 0.0162162162; + FragColor = sum; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-blur-vert.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-blur-vert.slang new file mode 100644 index 0000000..c92ded0 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-blur-vert.slang @@ -0,0 +1,96 @@ +#version 450 + +// newpixie CRT +// by Mattias Gustavsson +// adapted for slang by hunterk + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses - you may choose the one you like. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2016 Mattias Gustavsson +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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 NPX_BLUR_VERT; +} params; + +#pragma parameter NPX_BLUR_VERT " Vertical Blur" 1.0 0.0 5.0 0.25 + +vec2 blur = vec2(0.0, params.NPX_BLUR_VERT) * params.OutputSize.zw; + +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; + +void main() +{ + vec2 uv = vTexCoord.xy; + vec4 sum = texture( Source, uv ) * 0.2270270270; + sum += texture(Source, vec2( uv.x - 4.0 * blur.x, uv.y - 4.0 * blur.y ) ) * 0.0162162162; + sum += texture(Source, vec2( uv.x - 3.0 * blur.x, uv.y - 3.0 * blur.y ) ) * 0.0540540541; + sum += texture(Source, vec2( uv.x - 2.0 * blur.x, uv.y - 2.0 * blur.y ) ) * 0.1216216216; + sum += texture(Source, vec2( uv.x - 1.0 * blur.x, uv.y - 1.0 * blur.y ) ) * 0.1945945946; + sum += texture(Source, vec2( uv.x + 1.0 * blur.x, uv.y + 1.0 * blur.y ) ) * 0.1945945946; + sum += texture(Source, vec2( uv.x + 2.0 * blur.x, uv.y + 2.0 * blur.y ) ) * 0.1216216216; + sum += texture(Source, vec2( uv.x + 3.0 * blur.x, uv.y + 3.0 * blur.y ) ) * 0.0540540541; + sum += texture(Source, vec2( uv.x + 4.0 * blur.x, uv.y + 4.0 * blur.y ) ) * 0.0162162162; + FragColor = sum; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-crt.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-crt.slang new file mode 100644 index 0000000..18fb73a --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-newpixie/hsm-newpixie-crt.slang @@ -0,0 +1,270 @@ +#version 450 + +// newpixie CRT +// by Mattias Gustavsson +// adapted for slang by hunterk +// Integration for Mega Bexel by HyperspaceMadness + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses - you may choose the one you like. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2016 Mattias Gustavsson +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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. +------------------------------------------------------------------------------ +*/ + +// HSM Added +#include "../hsm/common/hsm-globals-and-screen-scale-params.inc" +// End Addition + +// HSM Removed +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OutputSize; + uint FrameCount; + float use_frame; + float curvature; + float wiggle_toggle; +} params; + +// HSM Removed +// #pragma parameter use_frame "Use Frame Image" 0.0 0.0 1.0 1.0 +// #define use_frame params.use_frame +// #pragma parameter curvature "Curvature" 2.0 0.0001 4.0 0.25 +#pragma parameter wiggle_toggle "[NEWPIXIE] Interference" 0.0 0.0 1.0 1.0 + +#define gl_FragCoord (vTexCoord.xy * global.OutputSize.xy) +#define backbuffer accum1 +#define blurbuffer blur2 + +// HSM Removed +// #define frametexture frametexture + +#pragma stage vertex +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 0) out vec2 vTexCoord; + +void main() +{ + // vec4 modpos = vec4(Position.x, 1.-Position.y, Position.z, Position.w); + // gl_Position = global.MVP * modpos; + 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 InfoCachePass; +layout(set = 0, binding = 3) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 4) uniform sampler2D accum1; +layout(set = 0, binding = 5) uniform sampler2D blur2; + +vec3 tsample( sampler2D samp, vec2 tc, float offs, vec2 resolution ) + { + // tc = tc * vec2(1.025, 0.92) + vec2(-0.0125, 0.04); + // HSM Removed + // vec3 s = pow( abs( texture( samp, vec2( tc.x, 1.0-tc.y ) ).rgb), vec3( 2.2 ) ); + + // HSM Added + vec3 s = pow( abs( HSM_GetCroppedTexSample( samp, vec2(tc.x, tc.y) ).rgb), vec3( 2.2 ) ); + + return s*vec3(1.25); + } + +vec3 filmic( vec3 LinearColor ) + { + vec3 x = max( vec3(0.0), LinearColor-vec3(0.004)); + return (x*(6.2*x+0.5))/(x*(6.2*x+1.7)+0.06); + } + +// HSM Removed +// vec2 curve( vec2 uv ) +// { +// uv = (uv - 0.5);// * 2.0; +// // uv.x *= 0.75; +// uv *= vec2(0.925, 1.095); +// uv *= params.curvature; +// uv.x *= 1.0 + pow((abs(uv.y) / 4.0), 2.0); +// uv.y *= 1.0 + pow((abs(uv.x) / 3.0), 2.0); +// uv /= params.curvature; +// uv += 0.5; +// uv = uv *0.92 + 0.04; +// return uv; +// } + +float rand(vec2 co) + { + return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); + } + +// HSM Removed +// #define resolution global.OutputSize.xy + +// HSM Added +#define resolution global.OutputSize.xy + +void main() +{ + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + // stop time variable so the screen doesn't wiggle + float time = 1.0; + vec2 uv = SCREEN_COORD.xy; + /* Curve */ + // HSM Removed + // vec2 curved_uv = mix( curve( uv ), uv, 0.4 ); + + vec2 screen_curved_coord = HSM_GetCurvedCoord(uv, HSM_CRT_CURVATURE_SCALE, SCREEN_ASPECT); + vec2 curved_uv = HSM_GetMirrorWrappedCoord(screen_curved_coord); + // vec2 screen_curved_coord = curve(uv); + // vec2 curved_uv = mix( screen_curved_coord, uv, 0.4 ); + + // HSM Removed - we don't need to scale to fit inside the frame + // float scale = -0.101; + // vec2 scuv = curved_uv*(1.0-scale)+scale/2.0+vec2(0.003, -0.001); + + // HSM Added + vec2 scuv = curved_uv; + + // HSM Removed + // uv = scuv; + + /* Main color, Bleed */ + vec3 col; + float x = params.wiggle_toggle * sin(0.1*time+curved_uv.y*13.0)*sin(0.23*time+curved_uv.y*19.0)*sin(0.3+0.11*time+curved_uv.y*23.0)*0.0012; + float o = sin(gl_FragCoord.y*1.5)/resolution.x; + x+=o*0.25; + + // make time do something again + time = float(mod(global.FrameCount, 640) * 1); + col.r = tsample(backbuffer,vec2(x+scuv.x+0.0009,scuv.y+0.0009),resolution.y/800.0, resolution ).x+0.02; + col.g = tsample(backbuffer,vec2(x+scuv.x+0.0000,scuv.y-0.0011),resolution.y/800.0, resolution ).y+0.02; + col.b = tsample(backbuffer,vec2(x+scuv.x-0.0015,scuv.y+0.0000),resolution.y/800.0, resolution ).z+0.02; + float i = clamp(col.r*0.299 + col.g*0.587 + col.b*0.114, 0.0, 1.0 ); + i = pow( 1.0 - pow(i,2.0), 1.0 ); + i = (1.0-i) * 0.85 + 0.15; + + /* Ghosting */ + float ghs = 0.15; + vec3 r = tsample( blurbuffer, + vec2(x-0.014*1.0, -0.027)*0.85+0.007*vec2( 0.35*sin(1.0/7.0 + 15.0*curved_uv.y + 0.9*time), + 0.35*sin( 2.0/7.0 + 10.0*curved_uv.y + 1.37*time) )+vec2(scuv.x+0.001,scuv.y+0.001), + 5.5+1.3*sin( 3.0/9.0 + 31.0*curved_uv.x + 1.70*time),resolution).xyz*vec3(0.5,0.25,0.25); + vec3 g = tsample( blurbuffer, + vec2(x-0.019*1.0, -0.020)*0.85+0.007*vec2( 0.35*cos(1.0/9.0 + 15.0*curved_uv.y + 0.5*time), + 0.35*sin( 2.0/9.0 + 10.0*curved_uv.y + 1.50*time) )+vec2(scuv.x+0.000,scuv.y-0.002), + 5.4+1.3*sin( 3.0/3.0 + 71.0*curved_uv.x + 1.90*time),resolution).xyz*vec3(0.25,0.5,0.25); + vec3 b = tsample( blurbuffer, + vec2(x-0.017*1.0, -0.003)*0.85+0.007*vec2( 0.35*sin(2.0/3.0 + 15.0*curved_uv.y + 0.7*time), + 0.35*cos( 2.0/3.0 + 10.0*curved_uv.y + 1.63*time) )+vec2(scuv.x-0.002,scuv.y+0.000), + 5.3+1.3*sin( 3.0/7.0 + 91.0*curved_uv.x + 1.65*time),resolution).xyz*vec3(0.25,0.25,0.5); + + col += vec3(ghs*(1.0-0.299))*pow(clamp(vec3(3.0)*r,vec3(0.0),vec3(1.0)),vec3(2.0))*vec3(i); + col += vec3(ghs*(1.0-0.587))*pow(clamp(vec3(3.0)*g,vec3(0.0),vec3(1.0)),vec3(2.0))*vec3(i); + col += vec3(ghs*(1.0-0.114))*pow(clamp(vec3(3.0)*b,vec3(0.0),vec3(1.0)),vec3(2.0))*vec3(i); + + /* Level adjustment (curves) */ + col *= vec3(0.95,1.05,0.95); + col = clamp(col*1.3 + 0.75*col*col + 1.25*col*col*col*col*col,vec3(0.0),vec3(10.0)); + + // HSM Removed - Vignette is added in Grade + // /* Vignette */ + // float vig = (0.1 + 1.0*16.0*curved_uv.x*curved_uv.y*(1.0-curved_uv.x)*(1.0-curved_uv.y)); + // vig = 1.3*pow(vig,0.5); + // col *= vig; + + /* Scanlines */ + + // HSM Removed + // float scans = clamp( 0.35+0.18*sin(6.0*time-curved_uv.y*resolution.y*1.5), 0.0, 1.0); + + // HSM Added + vec2 mixed_uv_for_scanline = mix( curved_uv, uv, 0.4 ); + mixed_uv_for_scanline.y = 1 - mixed_uv_for_scanline.y; + float scans = clamp( 0.35 + 0.18 * sin(6.0 * time - mixed_uv_for_scanline.y * CROPPED_ROTATED_SIZE_WITH_RES_MULT.y * 8), 0.0, 1.0); + + float s = pow(scans,0.9); + + // Approximate adjustments to get a similar result to what newpixie generates at this point + // col = HSM_Linearize(HSM_GetCroppedTexSample(backbuffer, curved_uv), 2).rgb; + // col *= 1.25; + // col *= vec3(1.1, 1.20, 1.1); + // col = clamp(col*1.3 + 0.75*col*col + 1.25*col*col*col*col*col,vec3(0.0),vec3(10.0)); + + float outside_screen_mask = 1 - HSM_GetCornerMask(screen_curved_coord, SCREEN_ASPECT, 0, 1); + s = mix(s, 0.4, outside_screen_mask); + + col = col * vec3(s); + + /* Vertical lines (shadow mask) */ + col*=1.0-0.23*(clamp((mod(gl_FragCoord.xy.x, 3.0))/2.0,0.0,1.0)); + + /* Tone map */ + col = filmic( col ); + + /* Noise */ + /*vec2 seed = floor(curved_uv*resolution.xy*vec2(0.5))/resolution.xy;*/ + vec2 seed = curved_uv*resolution.xy; + /* seed = curved_uv; */ + col -= 0.015*pow(vec3(rand( seed +time ), rand( seed +time*2.0 ), rand( seed +time * 3.0 ) ), vec3(1.5) ); + + /* Flicker */ + col *= (1.0-0.004*(sin(50.0*time+curved_uv.y*2.0)*0.5+0.5)); + + // HSM Removed + // uv = curved_uv; + + /* Frame */ + // vec2 fscale = vec2( 0.026, -0.018);//vec2( -0.018, -0.013 ); + // uv = vec2(uv.x, 1.-uv.y); + + // vec4 f=texture(frametexture,uv*((1.0)+2.0*fscale)-fscale-vec2(-0.0, 0.005)); + // f.xyz = mix( f.xyz, vec3(0.5,0.5,0.5), 0.5 ); + + // float fvig = clamp( -0.00+512.0*uv.x*uv.y*(1.0-uv.x)*(1.0-uv.y), 0.2, 0.8 ); + // col = mix( col, mix( max( col, 0.0), pow( abs( f.xyz ), vec3( 1.4 ) ) * fvig, f.w * f.w), vec3( use_frame ) ); + + FragColor = vec4( col, 1.0 ); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang new file mode 100644 index 0000000..2841d79 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-ps1dither/hsm-PS1-Undither-BoxBlur.slang @@ -0,0 +1,78 @@ +#version 450 + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + float PS1_BOX_BLUR_MODE; + uint FrameCount; +} params; + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; +} global; + +#pragma parameter PS1_BOXBLUR_TITLE "[ --- PS1 BOX BLUR --- ]:" 0 0 0.01 0.01 +#pragma parameter PS1_BOX_BLUR_MODE " Box Blur ON" 0.0 0.0 1.0 1.0 +#define PS1_BOX_BLUR_MODE params.PS1_BOX_BLUR_MODE + +#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() +{ + vec4 orig_pass_full = texture(Source, vTexCoord); + if (PS1_BOX_BLUR_MODE < 0.5) + { + FragColor = orig_pass_full; + return; + } + + vec3 OriginPass = orig_pass_full.xyz;//No blending + + //Blend 4 pixels together by sampling between them with linear interpolation + vec2 SquareBlend = (vTexCoord * params.SourceSize.xy - 0.5) * params.SourceSize.zw; + //Blend 2 horizontal pixels together the same way as before + vec2 HorizoBlend = (vTexCoord * params.SourceSize.xy - vec2(0.5,0.0)) * params.SourceSize.zw; + vec3 SquarePass = texture(Source, SquareBlend).xyz; + vec3 HorizoPass = texture(Source, HorizoBlend).xyz; + + //Edge Detection for SquareBlend + vec3 SquareEdge = texture(Source, (SquareBlend * params.SourceSize.xy + vec2( 0.0, 1.0)) * params.SourceSize.zw).xyz + + texture(Source, (SquareBlend * params.SourceSize.xy + vec2( 1.0, 0.0)) * params.SourceSize.zw).xyz + + texture(Source, (SquareBlend * params.SourceSize.xy + vec2( 1.0, 1.0)) * params.SourceSize.zw).xyz; + SquareEdge = abs((SquareEdge / 3.0) - SquarePass); + //Try to adjust white / black range so that edges are black and non-edges are white + float SquareEdgeMask = 1.0-pow(1.0-pow(1.0-max(SquareEdge.x,max(SquareEdge.y,SquareEdge.z)),30.0),2.0); + + //Edge Detection for HorizoBlend + vec3 HorizoEdge = texture(Source, (HorizoBlend * params.SourceSize.xy + vec2( 0.0, 1.0)) * params.SourceSize.zw).xyz + + texture(Source, (HorizoBlend * params.SourceSize.xy + vec2( 1.0, 0.0)) * params.SourceSize.zw).xyz + + texture(Source, (HorizoBlend * params.SourceSize.xy + vec2( 1.0, 1.0)) * params.SourceSize.zw).xyz; + HorizoEdge = abs((HorizoEdge / 3.0) - HorizoPass); + //Try to adjust white / black range so that edges are black and non-edges are white + float HorizoEdgeMask = 1.0-pow(1.0-pow(1.0-max(HorizoEdge.x,max(HorizoEdge.y,HorizoEdge.z)),10.0),2.0); + + //If SquarePass has a detected edge, use HorizoPass + vec3 Result = mix(HorizoPass,SquarePass,SquareEdgeMask); + //If HorizoPass has a detected edge, use OriginPass + Result = mix(OriginPass,Result,HorizoEdgeMask); + + //It's complete + FragColor = vec4(Result,1.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang new file mode 100644 index 0000000..c76610b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass0.slang @@ -0,0 +1,116 @@ +#version 450 + +/* + ScaleFX - Pass 0 + by Sp00kyFox, 2017-03-01 + +Filter: Nearest +Scale: 1x + +ScaleFX is an edge interpolation algorithm specialized in pixel art. It was +originally intended as an improvement upon Scale3x but became a new filter in +its own right. +ScaleFX interpolates edges up to level 6 and makes smooth transitions between +different slopes. The filtered picture will only consist of colours present +in the original. + +Pass 0 prepares metric data for the next pass. + + + +Copyright (c) 2016 Sp00kyFox - ScaleFX@web.de + +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; + float HSM_SCALEFX_ON; + // float HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR; +} params; + +layout(set = 0, binding = 0, std140) uniform UBO +{ + mat4 MVP; +} global; + +#include "hsm-scalefx.inc" + +#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(binding = 1) uniform sampler2D Source; + + +// Reference: http://www.compuphase.com/cmetric.htm +float dist(vec3 A, vec3 B) +{ + float r = 0.5 * (A.r + B.r); + vec3 d = A - B; + vec3 c = vec3(2 + r, 4, 3 - r); + + return sqrt(dot(c*d, d)) / 3; +} + + +void main() +{ + if (HSM_SCALEFX_ON < 0.5) + { + FragColor = texture(Source, vTexCoord); + return; + } + + /* grid metric + + A B C x y z + E F o w + */ + +// HSM Removed +// #define TEX(x, y) textureOffset(Source, vTexCoord, ivec2(x, y)).rgb + +// HSM Added +#define TEX(x, y) HSM_TextureOffset(Source, vTexCoord, vec2(x, y), params.SourceSize.xy).rgb + + // read texels + vec3 A = TEX(-1,-1); + vec3 B = TEX( 0,-1); + vec3 C = TEX( 1,-1); + vec3 E = TEX( 0, 0); + vec3 F = TEX( 1, 0); + + // output + FragColor = vec4(dist(E,A), dist(E,B), dist(E,C), dist(E,F)); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang new file mode 100644 index 0000000..5728575 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass1.slang @@ -0,0 +1,128 @@ +#version 450 + +/* + ScaleFX - Pass 1 + by Sp00kyFox, 2017-03-01 + +Filter: Nearest +Scale: 1x + +ScaleFX is an edge interpolation algorithm specialized in pixel art. It was +originally intended as an improvement upon Scale3x but became a new filter in +its own right. +ScaleFX interpolates edges up to level 6 and makes smooth transitions between +different slopes. The filtered picture will only consist of colours present +in the original. + +Pass 1 calculates the strength of interpolation candidates. + + + +Copyright (c) 2016 Sp00kyFox - ScaleFX@web.de + +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; + float SFX_CLR; + float SFX_SAA; + float HSM_SCALEFX_ON; + // float HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR; +} params; + + +// #pragma parameter SFX_CLR "ScaleFX Threshold" 0.50 0.01 1.00 0.01 +#define SFX_CLR 0.5 + +// #pragma parameter SFX_SAA "ScaleFX Filter AA" 1.00 0.00 1.00 1.00 +#define SFX_SAA 1 + +layout(set = 0, binding = 0, std140) uniform UBO +{ + mat4 MVP; +} global; + +#include "hsm-scalefx.inc" + +#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(binding = 1) uniform sampler2D Source; + + +// corner strength +float str(float d, vec2 a, vec2 b){ + float diff = a.x - a.y; + float wght1 = max(SFX_CLR - d, 0) / SFX_CLR; + float wght2 = clamp((1-d) + (min(a.x, b.x) + a.x > min(a.y, b.y) + a.y ? diff : -diff), 0., 1.); + return (SFX_SAA == 1. || 2.*d < a.x + a.y) ? (wght1 * wght2) * (a.x * a.y) : 0.; +} + + +void main() +{ + if (HSM_SCALEFX_ON < 0.5) + { + FragColor = texture(Source, vTexCoord); + return; + } + + /* grid metric pattern + + A B x y z x y + D E F o w w z + G H I + */ + +// HSM Removed +// #define TEX(x, y) textureOffset(Source, vTexCoord, ivec2(x, y)) + +// HSM Added +#define TEX(x, y) HSM_TextureOffset(Source, vTexCoord, vec2(x, y), params.SourceSize.xy) + + // metric data + vec4 A = TEX(-1,-1), B = TEX( 0,-1); + vec4 D = TEX(-1, 0), E = TEX( 0, 0), F = TEX( 1, 0); + vec4 G = TEX(-1, 1), H = TEX( 0, 1), I = TEX( 1, 1); + + // corner strength + vec4 res; + res.x = str(D.z, vec2(D.w, E.y), vec2(A.w, D.y)); + res.y = str(F.x, vec2(E.w, E.y), vec2(B.w, F.y)); + res.z = str(H.z, vec2(E.w, H.y), vec2(H.w, I.y)); + res.w = str(H.x, vec2(D.w, H.y), vec2(G.w, G.y)); + + FragColor = res; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang new file mode 100644 index 0000000..593cf8b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass2.slang @@ -0,0 +1,171 @@ +#version 450 + +/* + ScaleFX - Pass 2 + by Sp00kyFox, 2017-03-01 + +Filter: Nearest +Scale: 1x + +ScaleFX is an edge interpolation algorithm specialized in pixel art. It was +originally intended as an improvement upon Scale3x but became a new filter in +its own right. +ScaleFX interpolates edges up to level 6 and makes smooth transitions between +different slopes. The filtered picture will only consist of colours present +in the original. + +Pass 2 resolves ambiguous configurations of corner candidates at pixel junctions. + + + +Copyright (c) 2016 Sp00kyFox - ScaleFX@web.de + +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 scalefx_pass0Size; + float HSM_SCALEFX_ON; + float HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR; +} params; + +layout(set = 0, binding = 0, std140) uniform UBO +{ + mat4 MVP; +} global; + +#include "hsm-scalefx.inc" + +#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(binding = 1) uniform sampler2D Source; +layout(binding = 2) uniform sampler2D scalefx_pass0; + + +#define LE(x, y) (1 - step(y, x)) +#define GE(x, y) (1 - step(x, y)) +#define LEQ(x, y) step(x, y) +#define GEQ(x, y) step(y, x) +#define NOT(x) (1 - (x)) + +// corner dominance at junctions +vec4 dom(vec3 x, vec3 y, vec3 z, vec3 w){ + return 2 * vec4(x.y, y.y, z.y, w.y) - (vec4(x.x, y.x, z.x, w.x) + vec4(x.z, y.z, z.z, w.z)); +} + +// necessary but not sufficient junction condition for orthogonal edges +float clear(vec2 crn, vec2 a, vec2 b){ + return (crn.x >= max(min(a.x, a.y), min(b.x, b.y))) && (crn.y >= max(min(a.x, b.y), min(b.x, a.y))) ? 1. : 0.; +} + + +void main() +{ + if (HSM_SCALEFX_ON < 0.5) + { + FragColor = texture(Source, vTexCoord); + return; + } + + /* grid metric pattern + + A B C x y z x y + D E F o w w z + G H I + */ + +// HSM Removed +// #define TEXm(x, y) textureOffset(scalefx_pass0, vTexCoord, ivec2(x, y)) +// #define TEXs(x, y) textureOffset(Source, vTexCoord, ivec2(x, y)) + +// HSM Added +#define TEXm(x, y) HSM_TextureOffset(scalefx_pass0, vTexCoord, vec2(x, y), params.scalefx_pass0Size.xy) +#define TEXs(x, y) HSM_TextureOffset(Source, vTexCoord, vec2(x, y), params.SourceSize.xy) + + // metric data + vec4 A = TEXm(-1,-1), B = TEXm( 0,-1); + vec4 D = TEXm(-1, 0), E = TEXm( 0, 0), F = TEXm( 1, 0); + vec4 G = TEXm(-1, 1), H = TEXm( 0, 1), I = TEXm( 1, 1); + + // strength data + vec4 As = TEXs(-1,-1), Bs = TEXs( 0,-1), Cs = TEXs( 1,-1); + vec4 Ds = TEXs(-1, 0), Es = TEXs( 0, 0), Fs = TEXs( 1, 0); + vec4 Gs = TEXs(-1, 1), Hs = TEXs( 0, 1), Is = TEXs( 1, 1); + + // strength & dominance junctions + vec4 jSx = vec4(As.z, Bs.w, Es.x, Ds.y), jDx = dom(As.yzw, Bs.zwx, Es.wxy, Ds.xyz); + vec4 jSy = vec4(Bs.z, Cs.w, Fs.x, Es.y), jDy = dom(Bs.yzw, Cs.zwx, Fs.wxy, Es.xyz); + vec4 jSz = vec4(Es.z, Fs.w, Is.x, Hs.y), jDz = dom(Es.yzw, Fs.zwx, Is.wxy, Hs.xyz); + vec4 jSw = vec4(Ds.z, Es.w, Hs.x, Gs.y), jDw = dom(Ds.yzw, Es.zwx, Hs.wxy, Gs.xyz); + + + // majority vote for ambiguous dominance junctions + vec4 zero4 = vec4(0); + vec4 jx = min(GE(jDx, zero4) * (LEQ(jDx.yzwx, zero4) * LEQ(jDx.wxyz, zero4) + GE(jDx + jDx.zwxy, jDx.yzwx + jDx.wxyz)), 1); + vec4 jy = min(GE(jDy, zero4) * (LEQ(jDy.yzwx, zero4) * LEQ(jDy.wxyz, zero4) + GE(jDy + jDy.zwxy, jDy.yzwx + jDy.wxyz)), 1); + vec4 jz = min(GE(jDz, zero4) * (LEQ(jDz.yzwx, zero4) * LEQ(jDz.wxyz, zero4) + GE(jDz + jDz.zwxy, jDz.yzwx + jDz.wxyz)), 1); + vec4 jw = min(GE(jDw, zero4) * (LEQ(jDw.yzwx, zero4) * LEQ(jDw.wxyz, zero4) + GE(jDw + jDw.zwxy, jDw.yzwx + jDw.wxyz)), 1); + + + // inject strength without creating new contradictions + vec4 res; + res.x = min(jx.z + NOT(jx.y) * NOT(jx.w) * GE(jSx.z, 0) * (jx.x + GE(jSx.x + jSx.z, jSx.y + jSx.w)), 1); + res.y = min(jy.w + NOT(jy.z) * NOT(jy.x) * GE(jSy.w, 0) * (jy.y + GE(jSy.y + jSy.w, jSy.x + jSy.z)), 1); + res.z = min(jz.x + NOT(jz.w) * NOT(jz.y) * GE(jSz.x, 0) * (jz.z + GE(jSz.x + jSz.z, jSz.y + jSz.w)), 1); + res.w = min(jw.y + NOT(jw.x) * NOT(jw.z) * GE(jSw.y, 0) * (jw.w + GE(jSw.y + jSw.w, jSw.x + jSw.z)), 1); + + + // single pixel & end of line detection + res = min(res * (vec4(jx.z, jy.w, jz.x, jw.y) + NOT(res.wxyz * res.yzwx)), 1); + + + // output + + vec4 clr; + clr.x = clear(vec2(D.z, E.x), vec2(D.w, E.y), vec2(A.w, D.y)); + clr.y = clear(vec2(F.x, E.z), vec2(E.w, E.y), vec2(B.w, F.y)); + clr.z = clear(vec2(H.z, I.x), vec2(E.w, H.y), vec2(H.w, I.y)); + clr.w = clear(vec2(H.x, G.z), vec2(D.w, H.y), vec2(G.w, G.y)); + + vec4 h = vec4(min(D.w, A.w), min(E.w, B.w), min(E.w, H.w), min(D.w, G.w)); + vec4 v = vec4(min(E.y, D.y), min(E.y, F.y), min(H.y, I.y), min(H.y, G.y)); + + vec4 orien = GE(h + vec4(D.w, E.w, E.w, D.w), v + vec4(E.y, E.y, H.y, H.y)); // orientation + vec4 hori = LE(h, v) * clr; // horizontal edges + vec4 vert = GE(h, v) * clr; // vertical edges + + FragColor = (res + 2 * hori + 4 * vert + 8 * orien) / 15; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang new file mode 100644 index 0000000..e518115 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass3.slang @@ -0,0 +1,196 @@ +#version 450 + +/* + ScaleFX - Pass 3 + by Sp00kyFox, 2017-03-01 + +Filter: Nearest +Scale: 1x + +ScaleFX is an edge interpolation algorithm specialized in pixel art. It was +originally intended as an improvement upon Scale3x but became a new filter in +its own right. +ScaleFX interpolates edges up to level 6 and makes smooth transitions between +different slopes. The filtered picture will only consist of colours present +in the original. + +Pass 3 determines which edge level is present and prepares tags for subpixel +output in the final pass. + + + +Copyright (c) 2016 Sp00kyFox - ScaleFX@web.de + +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; + float SFX_SCN; + float HSM_SCALEFX_ON; + // float HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR; +} params; + +#include "hsm-scalefx.inc" + +// #pragma parameter SFX_SCN "ScaleFX Filter Corners" 1.0 0.0 1.0 1.0 +#define SFX_SCN 1 + + +layout(set = 0, binding = 0, std140) 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(binding = 1) uniform sampler2D Source; + + +// extract first bool4 from float4 - corners +bvec4 loadCorn(vec4 x){ + return bvec4(floor(mod(x*15 + 0.5, 2))); +} + +// extract second bool4 from float4 - horizontal edges +bvec4 loadHori(vec4 x){ + return bvec4(floor(mod(x*7.5 + 0.25, 2))); +} + +// extract third bool4 from float4 - vertical edges +bvec4 loadVert(vec4 x){ + return bvec4(floor(mod(x*3.75 + 0.125, 2))); +} + +// extract fourth bool4 from float4 - orientation +bvec4 loadOr(vec4 x){ + return bvec4(floor(mod(x*1.875 + 0.0625, 2))); +} + + + +void main() +{ + if (HSM_SCALEFX_ON < 0.5) + { + FragColor = texture(Source, vTexCoord); + return; + } + + /* grid corners mids + + B x y x + D E F w y + H w z z + */ + +// HSM Removed +// #define TEX(x, y) textureOffset(Source, vTexCoord, ivec2(x, y)) + +// HSM Added +#define TEX(x, y) HSM_TextureOffset(Source, vTexCoord, vec2(x, y), params.SourceSize.xy) + + // read data + vec4 E = TEX( 0, 0); + vec4 D = TEX(-1, 0), D0 = TEX(-2, 0), D1 = TEX(-3, 0); + vec4 F = TEX( 1, 0), F0 = TEX( 2, 0), F1 = TEX( 3, 0); + vec4 B = TEX( 0,-1), B0 = TEX( 0,-2), B1 = TEX( 0,-3); + vec4 H = TEX( 0, 1), H0 = TEX( 0, 2), H1 = TEX( 0, 3); + + // extract data + bvec4 Ec = loadCorn(E), Eh = loadHori(E), Ev = loadVert(E), Eo = loadOr(E); + bvec4 Dc = loadCorn(D), Dh = loadHori(D), Do = loadOr(D), D0c = loadCorn(D0), D0h = loadHori(D0), D1h = loadHori(D1); + bvec4 Fc = loadCorn(F), Fh = loadHori(F), Fo = loadOr(F), F0c = loadCorn(F0), F0h = loadHori(F0), F1h = loadHori(F1); + bvec4 Bc = loadCorn(B), Bv = loadVert(B), Bo = loadOr(B), B0c = loadCorn(B0), B0v = loadVert(B0), B1v = loadVert(B1); + bvec4 Hc = loadCorn(H), Hv = loadVert(H), Ho = loadOr(H), H0c = loadCorn(H0), H0v = loadVert(H0), H1v = loadVert(H1); + + + // lvl1 corners (hori, vert) + bool lvl1x = Ec.x && (Dc.z || Bc.z || SFX_SCN == 1); + bool lvl1y = Ec.y && (Fc.w || Bc.w || SFX_SCN == 1); + bool lvl1z = Ec.z && (Fc.x || Hc.x || SFX_SCN == 1); + bool lvl1w = Ec.w && (Dc.y || Hc.y || SFX_SCN == 1); + + // lvl2 mid (left, right / up, down) + bvec2 lvl2x = bvec2((Ec.x && Eh.y) && Dc.z, (Ec.y && Eh.x) && Fc.w); + bvec2 lvl2y = bvec2((Ec.y && Ev.z) && Bc.w, (Ec.z && Ev.y) && Hc.x); + bvec2 lvl2z = bvec2((Ec.w && Eh.z) && Dc.y, (Ec.z && Eh.w) && Fc.x); + bvec2 lvl2w = bvec2((Ec.x && Ev.w) && Bc.z, (Ec.w && Ev.x) && Hc.y); + + // lvl3 corners (hori, vert) + bvec2 lvl3x = bvec2(lvl2x.y && (Dh.y && Dh.x) && Fh.z, lvl2w.y && (Bv.w && Bv.x) && Hv.z); + bvec2 lvl3y = bvec2(lvl2x.x && (Fh.x && Fh.y) && Dh.w, lvl2y.y && (Bv.z && Bv.y) && Hv.w); + bvec2 lvl3z = bvec2(lvl2z.x && (Fh.w && Fh.z) && Dh.x, lvl2y.x && (Hv.y && Hv.z) && Bv.x); + bvec2 lvl3w = bvec2(lvl2z.y && (Dh.z && Dh.w) && Fh.y, lvl2w.x && (Hv.x && Hv.w) && Bv.y); + + // lvl4 corners (hori, vert) + bvec2 lvl4x = bvec2((Dc.x && Dh.y && Eh.x && Eh.y && Fh.x && Fh.y) && (D0c.z && D0h.w), (Bc.x && Bv.w && Ev.x && Ev.w && Hv.x && Hv.w) && (B0c.z && B0v.y)); + bvec2 lvl4y = bvec2((Fc.y && Fh.x && Eh.y && Eh.x && Dh.y && Dh.x) && (F0c.w && F0h.z), (Bc.y && Bv.z && Ev.y && Ev.z && Hv.y && Hv.z) && (B0c.w && B0v.x)); + bvec2 lvl4z = bvec2((Fc.z && Fh.w && Eh.z && Eh.w && Dh.z && Dh.w) && (F0c.x && F0h.y), (Hc.z && Hv.y && Ev.z && Ev.y && Bv.z && Bv.y) && (H0c.x && H0v.w)); + bvec2 lvl4w = bvec2((Dc.w && Dh.z && Eh.w && Eh.z && Fh.w && Fh.z) && (D0c.y && D0h.x), (Hc.w && Hv.x && Ev.w && Ev.x && Bv.w && Bv.x) && (H0c.y && H0v.z)); + + // lvl5 mid (left, right / up, down) + bvec2 lvl5x = bvec2(lvl4x.x && (F0h.x && F0h.y) && (D1h.z && D1h.w), lvl4y.x && (D0h.y && D0h.x) && (F1h.w && F1h.z)); + bvec2 lvl5y = bvec2(lvl4y.y && (H0v.y && H0v.z) && (B1v.w && B1v.x), lvl4z.y && (B0v.z && B0v.y) && (H1v.x && H1v.w)); + bvec2 lvl5z = bvec2(lvl4w.x && (F0h.w && F0h.z) && (D1h.y && D1h.x), lvl4z.x && (D0h.z && D0h.w) && (F1h.x && F1h.y)); + bvec2 lvl5w = bvec2(lvl4x.y && (H0v.x && H0v.w) && (B1v.z && B1v.y), lvl4w.y && (B0v.w && B0v.x) && (H1v.y && H1v.z)); + + // lvl6 corners (hori, vert) + bvec2 lvl6x = bvec2(lvl5x.y && (D1h.y && D1h.x), lvl5w.y && (B1v.w && B1v.x)); + bvec2 lvl6y = bvec2(lvl5x.x && (F1h.x && F1h.y), lvl5y.y && (B1v.z && B1v.y)); + bvec2 lvl6z = bvec2(lvl5z.x && (F1h.w && F1h.z), lvl5y.x && (H1v.y && H1v.z)); + bvec2 lvl6w = bvec2(lvl5z.y && (D1h.z && D1h.w), lvl5w.x && (H1v.x && H1v.w)); + + + // subpixels - 0 = E, 1 = D, 2 = D0, 3 = F, 4 = F0, 5 = B, 6 = B0, 7 = H, 8 = H0 + + vec4 crn; + crn.x = (lvl1x && Eo.x || lvl3x.x && Eo.y || lvl4x.x && Do.x || lvl6x.x && Fo.y) ? 5 : (lvl1x || lvl3x.y && !Eo.w || lvl4x.y && !Bo.x || lvl6x.y && !Ho.w) ? 1 : lvl3x.x ? 3 : lvl3x.y ? 7 : lvl4x.x ? 2 : lvl4x.y ? 6 : lvl6x.x ? 4 : lvl6x.y ? 8 : 0; + crn.y = (lvl1y && Eo.y || lvl3y.x && Eo.x || lvl4y.x && Fo.y || lvl6y.x && Do.x) ? 5 : (lvl1y || lvl3y.y && !Eo.z || lvl4y.y && !Bo.y || lvl6y.y && !Ho.z) ? 3 : lvl3y.x ? 1 : lvl3y.y ? 7 : lvl4y.x ? 4 : lvl4y.y ? 6 : lvl6y.x ? 2 : lvl6y.y ? 8 : 0; + crn.z = (lvl1z && Eo.z || lvl3z.x && Eo.w || lvl4z.x && Fo.z || lvl6z.x && Do.w) ? 7 : (lvl1z || lvl3z.y && !Eo.y || lvl4z.y && !Ho.z || lvl6z.y && !Bo.y) ? 3 : lvl3z.x ? 1 : lvl3z.y ? 5 : lvl4z.x ? 4 : lvl4z.y ? 8 : lvl6z.x ? 2 : lvl6z.y ? 6 : 0; + crn.w = (lvl1w && Eo.w || lvl3w.x && Eo.z || lvl4w.x && Do.w || lvl6w.x && Fo.z) ? 7 : (lvl1w || lvl3w.y && !Eo.x || lvl4w.y && !Ho.w || lvl6w.y && !Bo.x) ? 1 : lvl3w.x ? 3 : lvl3w.y ? 5 : lvl4w.x ? 2 : lvl4w.y ? 8 : lvl6w.x ? 4 : lvl6w.y ? 6 : 0; + + vec4 mid; + mid.x = (lvl2x.x && Eo.x || lvl2x.y && Eo.y || lvl5x.x && Do.x || lvl5x.y && Fo.y) ? 5 : lvl2x.x ? 1 : lvl2x.y ? 3 : lvl5x.x ? 2 : lvl5x.y ? 4 : (Ec.x && Dc.z && Ec.y && Fc.w) ? ( Eo.x ? Eo.y ? 5 : 3 : 1) : 0; + mid.y = (lvl2y.x && !Eo.y || lvl2y.y && !Eo.z || lvl5y.x && !Bo.y || lvl5y.y && !Ho.z) ? 3 : lvl2y.x ? 5 : lvl2y.y ? 7 : lvl5y.x ? 6 : lvl5y.y ? 8 : (Ec.y && Bc.w && Ec.z && Hc.x) ? (!Eo.y ? !Eo.z ? 3 : 7 : 5) : 0; + mid.z = (lvl2z.x && Eo.w || lvl2z.y && Eo.z || lvl5z.x && Do.w || lvl5z.y && Fo.z) ? 7 : lvl2z.x ? 1 : lvl2z.y ? 3 : lvl5z.x ? 2 : lvl5z.y ? 4 : (Ec.z && Fc.x && Ec.w && Dc.y) ? ( Eo.z ? Eo.w ? 7 : 1 : 3) : 0; + mid.w = (lvl2w.x && !Eo.x || lvl2w.y && !Eo.w || lvl5w.x && !Bo.x || lvl5w.y && !Ho.w) ? 1 : lvl2w.x ? 5 : lvl2w.y ? 7 : lvl5w.x ? 6 : lvl5w.y ? 8 : (Ec.w && Hc.y && Ec.x && Bc.z) ? (!Eo.w ? !Eo.x ? 1 : 5 : 7) : 0; + + + // ouput + FragColor = (crn + 9 * mid) / 80; + +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4-hybrid.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4-hybrid.slang new file mode 100644 index 0000000..e4aaabb --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4-hybrid.slang @@ -0,0 +1,171 @@ +#version 450 + +/* + ScaleFX - Pass 4 + by Sp00kyFox, 2017-03-01 + +Filter: Nearest +Scale: 3x + +ScaleFX is an edge interpolation algorithm specialized in pixel art. It was +originally intended as an improvement upon Scale3x but became a new filter in +its own right. +ScaleFX interpolates edges up to level 6 and makes smooth transitions between +different slopes. The filtered picture will only consist of colours present +in the original. + +Pass 4 outputs subpixels based on previously calculated tags. + + + +Copyright (c) 2016 Sp00kyFox - ScaleFX@web.de + +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 refpassSize; + float SFX_RAA; + float HSM_SCALEFX_ON; + // float HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR; +} params; + +#include "hsm-scalefx.inc" + +// #pragma parameter SFX_RAA "ScaleFX rAA Sharpness" 2.0 0.0 10.0 0.05 +#define SFX_RAA 2 + +layout(set = 0, binding = 0, std140) 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(binding = 1) uniform sampler2D Source; +layout(binding = 2) uniform sampler2D refpass; + + +// extract corners +vec4 loadCrn(vec4 x){ + return floor(mod(x*80 + 0.5, 9)); +} + +// extract mids +vec4 loadMid(vec4 x){ + return floor(mod(x*8.888888 + 0.055555, 9)); +} + +vec3 res2x(vec3 pre2, vec3 pre1, vec3 px, vec3 pos1, vec3 pos2) +{ + vec3 t, m; + mat4x3 pre = mat4x3(pre2, pre1, px, pos1); + mat4x3 pos = mat4x3(pre1, px, pos1, pos2); + mat4x3 df = pos - pre; + + m = mix(px, 1-px, step(px, vec3(0.5))); + m = SFX_RAA * min(m, min(abs(df[1]), abs(df[2]))); + t = (7 * (df[1] + df[2]) - 3 * (df[0] + df[3])) / 16; + t = clamp(t, -m, m); + + return t; +} + + +void main() +{ + if (HSM_SCALEFX_ON < 0.5) + { + FragColor = texture(Source, vTexCoord); + return; + } + + /* grid corners mids + + B x y x + D E F w y + H w z z + */ + + + // read data + vec4 E = texture(Source, vTexCoord); + + // determine subpixel + vec2 fc = fract(vTexCoord * params.SourceSize.xy); + vec2 fp = floor(3.0 * fc); + + // check adjacent pixels to prevent artifacts + vec4 hn = texture(Source, vTexCoord + vec2(fp.x - 1, 0) / params.SourceSize.xy); + vec4 vn = texture(Source, vTexCoord + vec2(0, fp.y - 1) / params.SourceSize.xy); + + // extract data + vec4 crn = loadCrn(E), hc = loadCrn(hn), vc = loadCrn(vn); + vec4 mid = loadMid(E), hm = loadMid(hn), vm = loadMid(vn); + + vec3 res = fp.y == 0 ? (fp.x == 0 ? vec3(crn.x, hc.y, vc.w) : fp.x == 1 ? vec3(mid.x, 0, vm.z) : vec3(crn.y, hc.x, vc.z)) : (fp.y == 1 ? (fp.x == 0 ? vec3(mid.w, hm.y, 0) : fp.x == 1 ? vec3(0) : vec3(mid.y, hm.w, 0)) : (fp.x == 0 ? vec3(crn.w, hc.z, vc.x) : fp.x == 1 ? vec3(mid.z, 0, vm.x) : vec3(crn.z, hc.w, vc.y))); + +// HSM Removed +// #define TEX(x, y) textureOffset(refpass, vTexCoord, ivec2(x, y)).rgb + +// HSM Added +#define TEXs(x, y) HSM_TextureOffset(refpass, vTexCoord, vec2(x, y), params.refpassSize.xy).rgb + + // reverseAA + vec3 E0 = TEX( 0, 0); + vec3 B0 = TEX( 0,-1), B1 = TEX( 0,-2), H0 = TEX( 0, 1), H1 = TEX( 0, 2); + vec3 D0 = TEX(-1, 0), D1 = TEX(-2, 0), F0 = TEX( 1, 0), F1 = TEX( 2, 0); + + // output coordinate - 0 = E0, 1 = D0, 2 = D1, 3 = F0, 4 = F1, 5 = B0, 6 = B1, 7 = H0, 8 = H1 + vec3 sfx = res.x == 1. ? D0 : res.x == 2. ? D1 : res.x == 3. ? F0 : res.x == 4. ? F1 : res.x == 5. ? B0 : res.x == 6. ? B1 : res.x == 7. ? H0 : H1; + + // rAA weight + vec2 w = 2. * fc - 1.; + w.x = res.y == 0. ? w.x : 0.; + w.y = res.z == 0. ? w.y : 0.; + + // rAA filter + vec3 t1 = res2x(D1, D0, E0, F0, F1); + vec3 t2 = res2x(B1, B0, E0, H0, H1); + + vec3 a = min(min(min(min(B0,D0),E0),F0),H0); + vec3 b = max(max(max(max(B0,D0),E0),F0),H0); + vec3 raa = clamp(E0 + w.x*t1 + w.y*t2, a, b); + + // hybrid output + FragColor = vec4((res.x != 0.) ? sfx : raa, 0.); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang new file mode 100644 index 0000000..1617930 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx-pass4.slang @@ -0,0 +1,122 @@ +#version 450 + +/* + ScaleFX - Pass 4 + by Sp00kyFox, 2017-03-01 + +Filter: Nearest +Scale: 3x + +ScaleFX is an edge interpolation algorithm specialized in pixel art. It was +originally intended as an improvement upon Scale3x but became a new filter in +its own right. +ScaleFX interpolates edges up to level 6 and makes smooth transitions between +different slopes. The filtered picture will only consist of colours present +in the original. + +Pass 4 outputs subpixels based on previously calculated tags. + + + +Copyright (c) 2016 Sp00kyFox - ScaleFX@web.de + +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; + float HSM_SCALEFX_ON; + // float HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR; +} params; + + +layout(set = 0, binding = 0, std140) uniform UBO +{ + mat4 MVP; +} global; + +#include "hsm-scalefx.inc" + +#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(binding = 1) uniform sampler2D Source; +layout(binding = 2) uniform sampler2D refpass; + + +// extract corners +vec4 loadCrn(vec4 x){ + return floor(mod(x*80 + 0.5, 9)); +} + +// extract mids +vec4 loadMid(vec4 x){ + return floor(mod(x*8.888888 + 0.055555, 9)); +} + + +void main() +{ + if (HSM_SCALEFX_ON < 0.5) + { + FragColor = texture(Source, vTexCoord); + return; + } + + /* grid corners mids + + B x y x + D E F w y + H w z z + */ + + + // read data + vec4 E = texture(Source, vTexCoord); + + // extract data + vec4 crn = loadCrn(E); + vec4 mid = loadMid(E); + + // determine subpixel + vec2 fp = floor(3.0 * fract(vTexCoord * params.SourceSize.xy)); + float sp = fp.y == 0. ? (fp.x == 0. ? crn.x : fp.x == 1. ? mid.x : crn.y) : (fp.y == 1. ? (fp.x == 0. ? mid.w : fp.x == 1. ? 0. : mid.y) : (fp.x == 0. ? crn.w : fp.x == 1. ? mid.z : crn.z)); + + // output coordinate - 0 = E, 1 = D, 2 = D0, 3 = F, 4 = F0, 5 = B, 6 = B0, 7 = H, 8 = H0 + vec2 res = sp == 0. ? vec2(0,0) : sp == 1. ? vec2(-1,0) : sp == 2. ? vec2(-2,0) : sp == 3. ? vec2(1,0) : sp == 4. ? vec2(2,0) : sp == 5. ? vec2(0,-1) : sp == 6. ? vec2(0,-2) : sp == 7. ? vec2(0,1) : vec2(0,2); + + // ouput + FragColor = texture(refpass, vTexCoord + res / params.SourceSize.xy); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx.inc new file mode 100644 index 0000000..ca3507e --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-scalefx/hsm-scalefx.inc @@ -0,0 +1,13 @@ +vec4 HSM_TextureOffset(in sampler2D in_sampler, vec2 in_coord, vec2 pixel_offset, vec2 texture_size) +{ + vec2 uv_offset = pixel_offset / params.SourceSize.xy; + return texture(in_sampler, in_coord + uv_offset); +} + +#pragma parameter HSM_SCALEFX_TITLE "[ --- SMOOTHING - SCALEFX - SMOOTH-ADV Presets Only ---- ]:" 0 0 0.01 0.01 +#pragma parameter HSM_SCALEFX_ON " ScaleFx ON - Must Increase Core Res Sampling" 0 0 1 1 +#define HSM_SCALEFX_ON params.HSM_SCALEFX_ON + +// #pragma parameter HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR " Source Resolution Division Factor" 1 0 10 1 +// #define HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR params.HSM_SCALEFX_SOURCE_RES_DIVISION_FACTOR + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-sgenpt-mix/hsm-sgenpt-mix-pass2.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-sgenpt-mix/hsm-sgenpt-mix-pass2.slang new file mode 100644 index 0000000..751a27c --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-sgenpt-mix/hsm-sgenpt-mix-pass2.slang @@ -0,0 +1,154 @@ +#version 450 + +/* + SGENPT-MIX - Sega Genesis Pseudo Transparency Mixer Shader - v8 - Pass2 + + 2011-2020 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 SGPT_BLEND_OPTION_P2; + float SGPT_BLEND_LEVEL_P2; + float SGPT_ADJUST_VIEW_P2; + float SGPT_ON; +} params; + +#pragma parameter SGPT_ON " SGENPT-MIX ON" 0 0 1 1 +#pragma parameter SGPT_BLEND_OPTION_P2 " Pass 2 Blend - OFF | VL | CB | CB-S | Both | Both2 | Both-S" 2.0 0.0 6.0 1.0 +#pragma parameter SGPT_BLEND_LEVEL_P2 " Pass 2 - Both Blend Level " 1.0 0.0 1.0 0.1 +// #pragma parameter SGPT_ADJUST_VIEW_P2 " Pass 2 - Adjust View" 0.0 0.0 1.0 1.0 +#define SGPT_BLEND_OPTION_P2 (params.SGPT_BLEND_OPTION_P2 * params.SGPT_ON) +#define SGPT_BLEND_LEVEL_P2 params.SGPT_BLEND_LEVEL_P2 +#define SGPT_ADJUST_VIEW_P2 0 + +#define GAMMA_IN(color) color*color +#define GAMMA_OUT(color) sqrt(color) + +const vec3 Y = vec3(.2126, .7152, .0722); + +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; +} 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 = 1) uniform sampler2D Source; + +void main() +{ + 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 = GAMMA_IN(texture(Source, vTexCoord ).xyz); + vec3 L = GAMMA_IN(texture(Source, vTexCoord -dx).xyz); + vec3 R = GAMMA_IN(texture(Source, vTexCoord +dx).xyz); + vec3 U = GAMMA_IN(texture(Source, vTexCoord -dy).xyz); + vec3 D = GAMMA_IN(texture(Source, vTexCoord +dy).xyz); + vec3 UL = GAMMA_IN(texture(Source, vTexCoord -dx -dy).xyz); + vec3 UR = GAMMA_IN(texture(Source, vTexCoord +dx -dy).xyz); + vec3 DL = GAMMA_IN(texture(Source, vTexCoord -dx +dy).xyz); + vec3 DR = GAMMA_IN(texture(Source, vTexCoord +dx +dy).xyz); + + vec3 color = C; + + // Get min/max samples + vec3 min_sample = min_s(C, L, R); + vec3 max_sample = max_s(C, L, R); + + float diff = dot(max(max(C, L), max(C, R)) - min(min(C, L), min(C, R)), Y); + + if (SGPT_BLEND_OPTION_P2 == 1) + { + min_sample = max_s(min_sample, min_s(C, DL, DR), min_s(C, UL, UR)); + max_sample = min_s(max_sample, max_s(C, DL, DR), max_s(C, UL, UR)); + + diff *= (1.0 - SGPT_BLEND_LEVEL_P2); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + else if (SGPT_BLEND_OPTION_P2 == 2) + { + min_sample = max(min_sample, min_s(C, U, D)); + max_sample = min(max_sample, max_s(C, U, D)); + + diff *= (1.0 - SGPT_BLEND_LEVEL_P2); + + color = 0.5*( 1.0 + diff )*C + 0.125*( 1.0 - diff )*(L + R + U + D); + } + else if (SGPT_BLEND_OPTION_P2 == 3) + { + min_sample = min_s(min_sample, U, D); + max_sample = max_s(max_sample, U, D); + + diff *= (1.0 - SGPT_BLEND_LEVEL_P2); + + color = 0.5*( 1.0 + diff )*C + 0.125*( 1.0 - diff )*(L + R + U + D); + } + else if (SGPT_BLEND_OPTION_P2 == 4) + { + min_sample = min_s(min_sample, U, D); + max_sample = max_s(max_sample, U, D); + + diff *= (1.0 - SGPT_BLEND_LEVEL_P2); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + else if (SGPT_BLEND_OPTION_P2 == 5) + { + min_sample = min(min_sample, min(min_s(D, DL, DR), min_s(U, UL, UR))); + max_sample = max(max_sample, max(max_s(D, DL, DR), max_s(U, UL, UR))); + + diff *= (1.0 - SGPT_BLEND_LEVEL_P2); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + + color = clamp(color, min_sample, max_sample); + + color = mix(color, vec3(dot(abs(C-color), vec3(1.0, 1.0, 1.0))), SGPT_ADJUST_VIEW_P2); + + FragColor = vec4(GAMMA_OUT(color), 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-sgenpt-mix/hsm-sgenpt-mix.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-sgenpt-mix/hsm-sgenpt-mix.slang new file mode 100644 index 0000000..5b797d8 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm-sgenpt-mix/hsm-sgenpt-mix.slang @@ -0,0 +1,166 @@ +#version 450 + +/* + SGENPT-MIX - Sega Genesis Pseudo Transparency Mixer Shader - v8b + + 2011-2020 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 SGPT_BLEND_OPTION; + float SGPT_BLEND_LEVEL; + float SGPT_ADJUST_VIEW; + float SGPT_LINEAR_GAMMA; + float SGPT_ON; +} params; + +#pragma parameter SGPT_TITLE "[ --- SGENPT-MIX DE-DITHERING V8b --- ]:" 0 0 0.01 0.01 + +#pragma parameter SGPT_ON " SGENPT-MIX ON" 0 0 1 1 +#pragma parameter SGPT_BLEND_OPTION " Pass 1 Blend - OFF | VL | CB | CB-S | Both | Both2 | Both-S" 4.0 0.0 6.0 1.0 +#pragma parameter SGPT_BLEND_LEVEL " Pass 1 Both Blend Level" 1.0 0.0 1.0 0.1 +// #pragma parameter SGPT_ADJUST_VIEW " Adjust View (Debug)" 0.0 0.0 1.0 1.0 +#pragma parameter SGPT_LINEAR_GAMMA " Pass 1 Use Linear Gamma" 0.0 0.0 1.0 1.0 +#define SGPT_BLEND_OPTION (params.SGPT_BLEND_OPTION * params.SGPT_ON) +#define SGPT_BLEND_LEVEL params.SGPT_BLEND_LEVEL +#define SGPT_ADJUST_VIEW 0 +#define SGPT_LINEAR_GAMMA params.SGPT_LINEAR_GAMMA + +#define GAMMA_EXP (SGPT_LINEAR_GAMMA+1.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)) + +const vec3 Y = vec3(.2126, .7152, .0722); + +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; +} 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; + +void main() +{ + 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 = GAMMA_IN(texture(Source, vTexCoord ).xyz); + vec3 L = GAMMA_IN(texture(Source, vTexCoord -dx).xyz); + vec3 R = GAMMA_IN(texture(Source, vTexCoord +dx).xyz); + vec3 U = GAMMA_IN(texture(Source, vTexCoord -dy).xyz); + vec3 D = GAMMA_IN(texture(Source, vTexCoord +dy).xyz); + vec3 UL = GAMMA_IN(texture(Source, vTexCoord -dx -dy).xyz); + vec3 UR = GAMMA_IN(texture(Source, vTexCoord +dx -dy).xyz); + vec3 DL = GAMMA_IN(texture(Source, vTexCoord -dx +dy).xyz); + vec3 DR = GAMMA_IN(texture(Source, vTexCoord +dx +dy).xyz); + + vec3 color = C; + + // Get min/max samples + vec3 min_sample = min_s(C, L, R); + vec3 max_sample = max_s(C, L, R); + + float diff = dot(max(max(C, L), max(C, R)) - min(min(C, L), min(C, R)), Y); + + if (SGPT_BLEND_OPTION == 1) // Only Vertical Lines + { + min_sample = max_s(min_sample, min_s(C, DL, DR), min_s(C, UL, UR)); + max_sample = min_s(max_sample, max_s(C, DL, DR), max_s(C, UL, UR)); + + diff *= (1.0 - SGPT_BLEND_LEVEL); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + else if (SGPT_BLEND_OPTION == 2) // Only Checkerboard + { + min_sample = max(min_sample, min_s(C, U, D)); + max_sample = min(max_sample, max_s(C, U, D)); + + diff *= (1.0 - SGPT_BLEND_LEVEL); + + color = 0.5*( 1.0 + diff )*C + 0.125*( 1.0 - diff )*(L + R + U + D); + } + else if (SGPT_BLEND_OPTION == 3) // Only Checkerboard - Soft + { + min_sample = min_s(min_sample, U, D); + max_sample = max_s(max_sample, U, D); + + diff *= (1.0 - SGPT_BLEND_LEVEL); + + color = 0.5*( 1.0 + diff )*C + 0.125*( 1.0 - diff )*(L + R + U + D); + } + else if (SGPT_BLEND_OPTION == 4) // VL-CB + { + diff *= (1.0 - SGPT_BLEND_LEVEL); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + else if (SGPT_BLEND_OPTION == 5) // VL-CB-2 + { + min_sample = min_s(min_sample, U, D); + max_sample = max_s(max_sample, U, D); + + diff *= (1.0 - SGPT_BLEND_LEVEL); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + else if (SGPT_BLEND_OPTION == 6) // VL-CB-Soft + { + min_sample = min(min_sample, min(min_s(D, DL, DR), min_s(U, UL, UR))); + max_sample = max(max_sample, max(max_s(D, DL, DR), max_s(U, UL, UR))); + + diff *= (1.0 - SGPT_BLEND_LEVEL); + + color = 0.5*( 1.0 + diff )*C + 0.25*( 1.0 - diff )*(L + R); + } + + color = clamp(color, min_sample, max_sample); + + color = mix(color, vec3(dot(abs(C-color), vec3(1.0, 1.0, 1.0))), SGPT_ADJUST_VIEW); + + FragColor = vec4(GAMMA_OUT(color), 1.0); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-common-functions-bezel.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-common-functions-bezel.inc new file mode 100644 index 0000000..5ac1cc3 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-common-functions-bezel.inc @@ -0,0 +1,172 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +vec2 HSM_GetOuterBezelScale(vec2 screen_scale, float screen_aspect) +{ + vec2 bezel_outer_scale_offset = vec2(HSM_BZL_WIDTH / screen_aspect + 1, HSM_BZL_HEIGHT + 1); + return bezel_outer_scale_offset; +} + +vec2 GetDefaultScreenScale() +{ + float output_aspect = global.FinalViewportSize.x / global.FinalViewportSize.y; + vec2 out_placement_scale = DEFAULT_UNCORRECTED_SCREEN_SCALE; + out_placement_scale.x /= output_aspect; + return out_placement_scale; +} + +vec2 GetDefaultBezelScale() +{ + float output_aspect = global.FinalViewportSize.x / global.FinalViewportSize.y; + vec2 out_placement_scale = DEFAULT_UNCORRECTED_BEZEL_SCALE; + out_placement_scale.x /= output_aspect; + return out_placement_scale; +} + +float HSM_GetBezelCoords(vec2 screen_coord, + vec2 screen_scale, + vec2 tube_scale, + float screen_aspect, + bool curve_coords_on, + inout vec2 bezel_outside_scale, + inout vec2 bezel_outside_coord, + inout vec2 bezel_outside_curved_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(screen_scale, screen_aspect); + + bezel_outside_coord = screen_coord + bezel_outer_pos_offset; + bezel_outside_curved_coord = bezel_outside_coord; + + // Only run curved coordinates if requested or we are using tilt + if (curve_coords_on) + if ((HSM_CURVATURE_MODE > 0) && ((HSM_CURVATURE_3D_TILT_ANGLE_X != 0) || (HSM_CURVATURE_3D_TILT_ANGLE_Y != 0))) + bezel_outside_curved_coord = HSM_GetCurvedCoord(bezel_outside_curved_coord, 0, bezel_outer_scale_offset.x * output_aspect / bezel_outer_scale_offset.y); + + vec2 black_edge_scale_offset = tube_scale / screen_scale; + + bezel_outside_scale.xy = screen_scale * black_edge_scale_offset * bezel_outer_scale_offset; + // bezel_outside_transform.zw = -vec2(HSM_SCREEN_POSITION_X, HSM_SCREEN_POSITION_Y) + bezel_outer_pos_offset * screen_scale; + + bezel_outside_coord = HSM_GetInverseScaledCoord(bezel_outside_curved_coord, black_edge_scale_offset * bezel_outer_scale_offset) + vec2(0, HSM_BZL_OUTER_POSITION_Y); + bezel_outside_curved_coord = HSM_GetInverseScaledCoord(bezel_outside_curved_coord, black_edge_scale_offset * bezel_outer_scale_offset) + vec2(0, HSM_BZL_OUTER_POSITION_Y); + + frame_outside_coord = (bezel_outside_curved_coord + + vec2(0, HSM_FRM_OUTER_POS_Y) - 0.5) / + vec2((HSM_FRM_THICKNESS * HSM_FRM_THICKNESS_SCALE_X) / + (screen_scale.x / screen_scale.y * output_aspect) + 1, + HSM_FRM_THICKNESS + 1) + 0.5; + + if (HSM_BZL_OUTER_CURVATURE_SCALE > 0) + { + if (curve_coords_on) + bezel_outside_curved_coord = HSM_GetTubeCurvedCoord(bezel_outside_curved_coord, HSM_BZL_OUTER_CURVATURE_SCALE, screen_scale, tube_scale, bezel_outer_scale_offset.x * global.OutputSize.x / global.OutputSize.y / bezel_outer_scale_offset.y, 0); + + if (curve_coords_on) + if ( HSM_FRM_OUTER_CURVATURE_SCALE > 0) + frame_outside_coord = HSM_GetTubeCurvedCoord(frame_outside_coord, HSM_BZL_OUTER_CURVATURE_SCALE * HSM_FRM_OUTER_CURVATURE_SCALE, screen_scale, tube_scale, bezel_outer_scale_offset.x * global.OutputSize.x / global.OutputSize.y / bezel_outer_scale_offset.y, 0); + } + + DEFAULT_SCREEN_SCALE = GetDefaultScreenScale(); + DEFAULT_BEZEL_SCALE = GetDefaultBezelScale(); + + return 0; +} + +// Change Transforms for Scale + +// Applies the position before scaling from the center +// Should allow having an image where the center of the tube in the graphic is off center +// the position offset moves it so the screen is centered, then the graphic is scaled from the center +vec2 HSM_AddPosScaleToCoord(vec2 in_base_coord, vec2 in_base_scale, vec2 in_pos, vec2 in_scale) +{ + // out_coord += in_base_scale * in_transform.zw; + vec2 positioned_coord = in_base_coord + in_pos; + vec2 out_coord = HSM_GetInverseScaledCoord(positioned_coord, in_scale); + return out_coord; +} + +float MAX_LAYER_ORDER = 12; + +bool HSM_GetUseTubeStaticReflection() +{ + return HSM_TUBE_STATIC_REFLECTION_IMAGE_ON > 0.5 && HSM_GetUseOnCurrentScreenIndex(HSM_TUBE_STATIC_REFLECTION_IMAGE_DUALSCREEN_VIS_MODE); +} + +bool HSM_GetUseTubeDiffuseImage() +{ + return HSM_TUBE_DIFFUSE_MODE == 1 && HSM_GetUseOnCurrentScreenIndex(HSM_TUBE_DIFFUSE_IMAGE_DUALSCREEN_VIS_MODE); +} + +bool HSM_GetUseTubeColoredGelImage() +{ + return HSM_TUBE_COLORED_GEL_IMAGE_ON > 0.5 && HSM_GetUseOnCurrentScreenIndex(HSM_TUBE_COLORED_GEL_IMAGE_DUALSCREEN_VIS_MODE); +} + +vec4 HSM_GetTubeHighlight(vec2 tube_curved_coord, bool apply_to_mirror, in sampler2D TubeStaticReflectionImage, vec4 ambient_lighting_image) +{ + tube_curved_coord = HSM_GetViewportCoordWithFlip(tube_curved_coord); + vec4 out_color = vec4(0); + + vec2 mirrored_tube_coord = tube_curved_coord; + if (apply_to_mirror) + mirrored_tube_coord = HSM_GetMirrorWrappedCoord(tube_curved_coord); + + float bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + if(HSM_BZL_USE_INDEPENDENT_CURVATURE > 0) + bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * DEFAULT_SCREEN_CORNER_RADIUS; + + vec2 tube_highlight_coord = (mirrored_tube_coord - 0.5) / HSM_TUBE_STATIC_REFLECTION_IMAGE_SCALE + 0.5; + + tube_highlight_coord.x = (tube_highlight_coord.x - 0.5) * HSM_FLIP_VIEWPORT_HORIZONTAL + 0.5; + tube_highlight_coord.y = (tube_highlight_coord.y - 0.5) * HSM_FLIP_VIEWPORT_VERTICAL + 0.5; +/* + // Dithering for the glass reflection if needed to reduce banding + float blur_max_size = 1; + float blur_amount = 0.2; + vec4 tube_highlight_image = HSM_GetStoichaicBlurredSample(TubeStaticReflectionImage, tube_highlight_coord, HSM_TUBE_STATIC_REFLECTION_IMAGE_DITHERING_SAMPLES, blur_max_size, blur_amount); +*/ + // Mask the very outer edge of the tube for a very small shadowing effect + float tube_highlight_mask = HSM_GetCornerMask((tube_curved_coord - 0.5) + 0.5 , SCREEN_ASPECT, HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS, 0.9); + + vec4 tube_highlight_image = HSM_GetMipmappedTexSample(TubeStaticReflectionImage, tube_highlight_coord, TUBE_SCALE, 0); + + tube_highlight_image = HSM_Linearize(tube_highlight_image, DEFAULT_SRGB_GAMMA) * tube_highlight_mask; + + if (HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING > 0) + { + ambient_lighting_image.rgb = (1 - HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING) * vec3(1) + HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING * ambient_lighting_image.rgb; + tube_highlight_image.rgb *= ambient_lighting_image.rgb; + } + + out_color = HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY * tube_highlight_image * tube_highlight_image.a; + out_color.rgb *= HSM_GLOBAL_GRAPHICS_BRIGHTNESS; + + return out_color; +} + + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-common-functions.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-common-functions.inc new file mode 100644 index 0000000..88b63c3 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-common-functions.inc @@ -0,0 +1,1185 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "hsm-helper-functions.inc" + +#ifndef IS_POTATO_PRESET +#include "hsm-royale-geometry-functions.inc" +#endif + +float CURVATURE_MODE_OFF = 0; +float CURVATURE_MODE_2D = 1; +float CURVATURE_MODE_2D_CYLINDER = 2; +float CURVATURE_MODE_3D_1 = 3; +float CURVATURE_MODE_3D_2 = 4; +float CURVATURE_MODE_3D_CYLINDER = 5; + +vec2 HSM_GetViewportCoordWithFlip(vec2 viewport_coord) +{ + vec2 out_coord = viewport_coord; + + // out_coord.y = HSM_FLIP_VIEWPORT_VERTICAL * (out_coord.y - 0.5) + 0.5; + // out_coord.x = HSM_FLIP_VIEWPORT_HORIZONTAL * (out_coord.x - 0.5) + 0.5; + + if (HSM_FLIP_VIEWPORT_VERTICAL == -1) + out_coord.y = 1 - out_coord.y; + + if (HSM_FLIP_VIEWPORT_HORIZONTAL == -1) + out_coord.x = 1 - out_coord.x; + + return out_coord; +} + +vec2 HSM_GetViewportCoordWithZoomAndPan(vec2 viewport_coord) +{ + vec2 out_coord = HSM_GetViewportCoordWithFlip(viewport_coord); + + out_coord = (out_coord - 0.5) / HSM_VIEWPORT_ZOOM + 0.5; + out_coord.x += HSM_VIEWPORT_POSITION_X; + out_coord.y -= HSM_VIEWPORT_POSITION_Y; + + return out_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) + out_explicit_aspect = global.OutputSize.x / global.OutputSize.y; + if (in_aspect_ratio_mode == TEXTURE_ASPECT_MODE_4_3) + out_explicit_aspect = 1.33333; + if (in_aspect_ratio_mode == TEXTURE_ASPECT_MODE_3_4) + out_explicit_aspect = 0.75; + if (in_aspect_ratio_mode == TEXTURE_ASPECT_MODE_16_9) + out_explicit_aspect = 1.7777; + if (in_aspect_ratio_mode == TEXTURE_ASPECT_MODE_9_16) + out_explicit_aspect = 0.5625; + + return out_explicit_aspect; +} + +vec2 HSM_GetRotatedCoreOriginalSize() +{ + return HSM_ROTATE_CORE_IMAGE * global.OriginalSize.yx + (1 - HSM_ROTATE_CORE_IMAGE) * global.OriginalSize.xy; +} + +vec2 HSM_GetDerezedSize() +{ + return global.DerezedPassSize.xy; +} + +vec2 HSM_GetRotatedDerezedSize() +{ + return HSM_ROTATE_CORE_IMAGE * global.DerezedPassSize.yx + (1 - HSM_ROTATE_CORE_IMAGE) * global.DerezedPassSize.xy; +} + +// Core Prepped Size is the size after DeRez and adding in the negative crop +vec2 HSM_GetNegativeCropAddedSize() +{ + return global.NegativeCropAddedPassSize.xy; +} + +vec2 HSM_GetRotatedNegativeCropAddedSize() +{ + return HSM_ROTATE_CORE_IMAGE * global.NegativeCropAddedPassSize.yx + (1 - HSM_ROTATE_CORE_IMAGE) * global.NegativeCropAddedPassSize.xy; +} + +float HSM_GetNegativeCropExpandMultiplier() +{ + return HSM_GetNegativeCropAddedSize().y / HSM_GetDerezedSize().y; +} + +// Returns 1 for vertical split, 2 for horizontal split +float HSM_GetCoreImageSplitDirection() +{ + float core_image_split_direction = 1; + + if (HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE == 0) + { + if (HSM_DUALSCREEN_MODE == 1) + core_image_split_direction = 1; + if (HSM_DUALSCREEN_MODE == 2) + core_image_split_direction = 2; + } + else + { + core_image_split_direction = HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE; + } + return core_image_split_direction; +} + +float HSM_GetSwappedScreenIndex(float screen_index) +{ + float out_index = screen_index; + + if (HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS == 1) + { + if (screen_index == 1) + { + out_index = 2; + } + else + { + out_index = 1; + } + } + + return out_index; +} + +// Get the original size with split area added +vec2 HSM_GetScreenCorePreppedSize(float screen_index) +{ + vec2 core_prepped_size = global.NegativeCropAddedPassSize.xy; + + if (HSM_DUALSCREEN_MODE > 0) + if (HSM_GetCoreImageSplitDirection() == 1) + core_prepped_size.y *= 0.5; + else + core_prepped_size.x *= 0.5; + + return core_prepped_size; +} + +vec2 HSM_GetRotatedScreenCorePreppedSize(float screen_index) +{ + vec2 original_size = HSM_GetScreenCorePreppedSize(screen_index); + return HSM_ROTATE_CORE_IMAGE * original_size.yx + (1 - HSM_ROTATE_CORE_IMAGE) * original_size.xy; +} + +// Get the original size with split area added +vec2 HSM_GetScreenDerezedSize() +{ + vec2 pass_size = global.DerezedPassSize.xy; + + if (HSM_DUALSCREEN_MODE > 0) + if (HSM_GetCoreImageSplitDirection() == 1) + pass_size.y *= 0.5; + else + pass_size.x *= 0.5; + + return pass_size; +} + +vec2 HSM_GetRotatedScreenDerezedSize() +{ + vec2 pass_size = HSM_GetScreenDerezedSize(); + 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 ctr_coord = in_coord - 0.5; + ctr_coord = (1 - rotation_on) * ctr_coord + rotation_on * vec2(-ctr_coord.y, ctr_coord.x); + return ctr_coord + 0.5; +} + +float HSM_GetUseVerticalScanlines(float screen_aspect) +{ + float auto_use_vert_scanlines = screen_aspect < 1 ? 1 : 0; + + float scanline_direction = HSM_SCANLINE_DIRECTION < 2 ? 0 : 1; + + if (HSM_SCANLINE_DIRECTION < 1) + if (HSM_DUALSCREEN_MODE < 1) + scanline_direction = auto_use_vert_scanlines; + + return scanline_direction; +} + +// Rows and Columns are 1 based +vec4 HSM_GetCacheSampleRange(float column_index, float row_index) +{ + float num_rows = 8; + float num_columns = 8; + + float range_width = 1 / num_columns; + float range_height = 1 / num_rows; + + float zero_based_row_index = row_index - 1; + float zero_based_column_index = column_index - 1; + + vec4 out_sample_range = vec4(0); + + out_sample_range.x = zero_based_column_index * range_width; + out_sample_range.y = zero_based_row_index * range_height; + out_sample_range.z = out_sample_range.x + range_width; + out_sample_range.w = out_sample_range.y + range_height; + + return out_sample_range; +} + +vec2 HSM_GetCacheSampleCoord(float column_index, float row_index) +{ + float num_rows = 8; + float num_columns = 8; + + float range_width = 1 / num_columns; + float range_height = 1 / num_rows; + + vec4 sample_range = HSM_GetCacheSampleRange(column_index, row_index); + return vec2(sample_range.x + range_width/2, sample_range.y + range_height/2); +} + +vec2 HSM_GetResMult() +{ + // TODO when using target resolution + // float epsilon = 0.25; + // float original_res = 1464; + // float target_res + // float multiple = 1464 / 224; + // float int_multiple = floor(multiple + epsilon); + // float int_div_res_near_target_res = original_res / int_multiple; + + vec2 original_size = HSM_GetRotatedNegativeCropAddedSize(); + float use_vert_scanlines = HSM_GetUseVerticalScanlines(original_size.x/original_size.y); + + vec2 sampling_mult = vec2(HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR, HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR); + + if (use_vert_scanlines == 1 && HSM_ROTATE_CORE_IMAGE == 0 || use_vert_scanlines == 0 && HSM_ROTATE_CORE_IMAGE == 1) + sampling_mult = sampling_mult.yx; + + return sampling_mult; +} + +// Texture Sampler function which takes a coordinate in the cropped coordinate space +vec4 HSM_GetTexSampleFromSampleStartAndSize(sampler2D in_sampler, vec2 in_screen_coord, vec2 sample_start_pixel_coord, vec2 window_size) +{ + vec2 core_prepped_size = HSM_GetRotatedNegativeCropAddedSize(); + + if ( HSM_DUALSCREEN_MODE > 0 ) + if (HSM_FLIP_CORE_VERTICAL == -1) + in_screen_coord.y = 1 - in_screen_coord.y; + + // in_screen_coord.y = abs(HSM_FLIP_CORE_VERTICAL) * (1 - in_screen_coord.y) + (1 - abs(HSM_FLIP_CORE_VERTICAL)) * in_screen_coord.y; + // in_screen_coord.y = HSM_FLIP_CORE_VERTICAL * (in_screen_coord.y - 0.5) + 0.5; + + vec2 px_coord = SAMPLE_AREA_START_PIXEL_COORD + in_screen_coord * window_size; + + vec2 sample_coord = px_coord / core_prepped_size; + sample_coord = HSM_RotateCoordinate(sample_coord, HSM_ROTATE_CORE_IMAGE); + + vec4 out_color = texture(in_sampler, sample_coord); + + return out_color; +} + +vec2 HSM_GetInverseScaledCoord(vec2 in_coord, vec2 in_scale) +{ + vec2 middle = vec2(0.49999, 0.49999); + vec2 diff = in_coord.xy - middle; + vec2 screen_inverse_scale = 1.0 / in_scale; + vec2 scaled_coord = middle + diff * screen_inverse_scale; + + return scaled_coord; +} + +vec2 HSM_GetRotatedCorePreppedSizeWithResMult(float screen_index) +{ + vec2 prepped_size = HSM_GetScreenCorePreppedSize(screen_index); + vec2 sampling_mult = HSM_GetResMult(); + + vec2 sampling_size = vec2(floor(sampling_mult.x * prepped_size.x), floor(sampling_mult.y * prepped_size.y)); + + return HSM_ROTATE_CORE_IMAGE * sampling_size.yx + (1 - HSM_ROTATE_CORE_IMAGE) * sampling_size.xy; +} + +vec2 HSM_GetScreenPositionOffset(vec2 placement_image_pos, vec2 screen_scale, float screen_index ) +{ + + float output_aspect = global.FinalViewportSize.x / global.FinalViewportSize.y; + + + // If we are not using the image placement then get its offset from the center + placement_image_pos = HSM_USE_IMAGE_FOR_PLACEMENT == 1 && screen_index == 1 ? placement_image_pos : vec2(0.5); + + vec2 pos_offset = screen_index == 1 ? vec2(HSM_SCREEN_POSITION_X / output_aspect, HSM_SCREEN_POSITION_Y) + (placement_image_pos - 0.5) + : vec2(HSM_2ND_SCREEN_POS_X / output_aspect, HSM_2ND_SCREEN_POS_Y); + + float split_offset_multiplier = screen_index == 1 ? -1 : 1; + + if (HSM_DUALSCREEN_MODE == 1) + { + if (HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE == 1) + pos_offset.y += HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION + split_offset_multiplier * screen_scale.y * 1.17 / 2; + else + pos_offset.y += split_offset_multiplier * 0.25; + + pos_offset.y += split_offset_multiplier * HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS; + } + + if (HSM_DUALSCREEN_MODE == 2) + { + if (HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE == 1) + pos_offset.x += HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION / output_aspect + split_offset_multiplier * screen_scale.x * 1.17 / 2; + else + pos_offset.x += split_offset_multiplier * 0.25 / output_aspect; + + pos_offset.x += split_offset_multiplier * HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS / output_aspect; + } + + return pos_offset; +} + +float HSM_GetAverageLuma(sampler2D Source, vec2 SourceSize) +{ + //////// Calculate Average Luminance ////////// + float m = max(log2(global.SourceSize.x), log2(global.SourceSize.y)); + m = max(m - 1.0, 1.0); + + float luma_total = 0.0; + + float num_samples = 5; + float sample_dist = 1 / (num_samples - 1); + vec4 tex_sample = vec4(0); + for (float i = 0; i <= num_samples; i++) + { + for (float j = 0; j <= num_samples; j++) + { + tex_sample = textureLod(Source, vec2(sample_dist * i, sample_dist * j), m); + luma_total += max(0.0, (tex_sample.r + tex_sample.g + tex_sample.g) / 3); + // luma_total += max(0.0, length(tex_sample.rgb)); + } + } + luma_total = pow(0.577350269 * luma_total / (num_samples * num_samples), 0.6); + return luma_total; +} + +vec3 HSM_GetScreenPlacementAndHeight(sampler2D in_sampler_2D, float num_samples) +{ + if (HSM_USE_IMAGE_FOR_PLACEMENT == 1) + { + float screen_top_y_pos = 1; + float screen_bottom_y_pos = 0; + + for (int i=0; i < num_samples; i++) + { + float y_pos = i * 1 / num_samples; + vec4 sample_color = texture(in_sampler_2D, vec2(0.5, y_pos)); + float test_value = 0; + if (HSM_PLACEMENT_IMAGE_MODE > 0) + test_value = (sample_color.r + sample_color.b + sample_color.g) / 3; + else + test_value = 1 - sample_color.a; + + if (test_value > 0.5) + { + screen_top_y_pos = min(screen_top_y_pos, y_pos); + screen_bottom_y_pos = max(screen_bottom_y_pos, y_pos); + } + } + + float screen_left_x_pos = 0.75; + float screen_right_x_pos = 0.25; + + if (HSM_PLACEMENT_IMAGE_USE_HORIZONTAL == 1) + for (int i=0; i < num_samples; i++) + { + float x_pos = 0.25 + i * 0.5 / num_samples; + vec4 sample_color = texture(in_sampler_2D, vec2(x_pos, 0.5)); + float test_value = 0; + if (HSM_PLACEMENT_IMAGE_MODE == 1) + test_value = (sample_color.r + sample_color.b + sample_color.g) / 3; + else + test_value = 1 - sample_color.a; + + if (test_value > 0.5) + { + screen_left_x_pos = min(screen_left_x_pos, x_pos); + screen_right_x_pos = max(screen_right_x_pos, x_pos); + } + } + + return vec3((screen_left_x_pos + screen_right_x_pos) / 2, (screen_top_y_pos + screen_bottom_y_pos) / 2, screen_bottom_y_pos - screen_top_y_pos); + } + else + return vec3(0.5, 0.5, 1); +} + +vec2 HSM_GetCoordWithPositionOffset(vec2 in_coord, vec2 position_offset) +{ + return in_coord - position_offset; +} + +vec2 HSM_GetVTexCoordWithArgs(vec2 in_coord, vec2 in_scale, vec2 position_offset) +{ + return HSM_GetInverseScaledCoord(HSM_GetCoordWithPositionOffset(in_coord, position_offset), in_scale); +} + +vec2 HSM_GetScreenVTexCoord(vec2 in_coord, vec2 in_screen_scale, vec2 position_offset) +{ + return HSM_GetVTexCoordWithArgs(in_coord, in_screen_scale, position_offset); +} + +vec2 HSM_GetCurvatureScales(float screen_aspect) +{ + vec2 curvature_scales = screen_aspect < 1 ? vec2(HSM_CURVATURE_2D_SCALE_SHORT_AXIS, HSM_CURVATURE_2D_SCALE_LONG_AXIS) + : vec2(HSM_CURVATURE_2D_SCALE_LONG_AXIS, HSM_CURVATURE_2D_SCALE_SHORT_AXIS); + curvature_scales = (clamp(curvature_scales, 1, 5) - 1) + 1; + return curvature_scales; +} + +vec2 HSM_GetCurvatureValues(float screen_aspect) +{ + vec2 curvature_values = screen_aspect < 1 ? vec2(2 * HSM_CURVATURE_2D_SCALE_SHORT_AXIS * 2 / 100, HSM_CURVATURE_2D_SCALE_LONG_AXIS * 3 / 100) + : vec2(HSM_CURVATURE_2D_SCALE_LONG_AXIS * 3 / 100, 2 * HSM_CURVATURE_2D_SCALE_SHORT_AXIS * 2 / 100); + return curvature_values; +} + + +// CRT Geom Curvature +#define FIX(c) max(abs(c), 1e-5) + +float intersect(vec2 in_coord , vec2 sinangle, vec2 cosangle, float in_radius, float in_distance) +{ + float A = dot(in_coord, in_coord) + in_distance.x * in_distance.x; + float B = 2.0 * (in_radius * (dot(in_coord, sinangle) - in_distance.x * cosangle.x * cosangle.y) - in_distance.x * in_distance.x); + float C = in_distance.x * in_distance.x + 2.0 * in_radius * in_distance.x * cosangle.x * cosangle.y; + return (-B-sqrt(B * B - 4.0 * A * C)) / (2.0 * A); +} + +vec2 bkwtrans(vec2 in_coord, vec2 sinangle, vec2 cosangle, float in_radius, float in_distance) +{ + float c = intersect(in_coord, sinangle, cosangle, in_radius, in_distance); + vec2 pt = vec2(c) * in_coord; + pt -= vec2(-in_radius) * sinangle; + pt /= vec2(in_radius); + vec2 tang = sinangle / cosangle; + vec2 poc = pt / cosangle; + float A = dot(tang, tang) + 1.0; + float B = -2.0 * dot(poc, tang); + float C = dot(poc,poc)-1.0; + float a = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A); + vec2 uv = (pt - a * sinangle) / cosangle; + float r = FIX(in_radius * acos(a)); + return uv * r / sin(r / in_radius); +} + +vec2 fwtrans(vec2 uv, vec2 sinangle, vec2 cosangle, float in_radius, float in_distance) +{ + float r = FIX(sqrt(dot(uv,uv))); + uv *= sin(r/in_radius)/r; + float x = 1.0-cos(r/in_radius); + float D = in_distance/in_radius + x*cosangle.x*cosangle.y+dot(uv,sinangle); + return in_distance*(uv*cosangle-x*sinangle)/D; +} + +vec3 maxscale(vec2 sinangle, vec2 cosangle, float in_radius, float in_distance, float in_aspect) +{ + vec2 aspect_vec2 = vec2(1, 1/in_aspect); + vec2 c = bkwtrans(-in_radius * sinangle / (1.0 + in_radius/in_distance*cosangle.x*cosangle.y), sinangle, cosangle, in_radius, in_distance); + vec2 a = vec2(0.5,0.5)*aspect_vec2.xy; + + vec2 lo = vec2( fwtrans(vec2(-a.x,c.y), sinangle, cosangle, in_radius, in_distance).x, + fwtrans(vec2(c.x,-a.y), sinangle, cosangle, in_radius, in_distance).y)/aspect_vec2.xy; + + vec2 hi = vec2( fwtrans(vec2(+a.x,c.y), sinangle, cosangle, in_radius, in_distance).x, + fwtrans(vec2(c.x,+a.y), sinangle, cosangle, in_radius, in_distance).y)/aspect_vec2.xy; + + return vec3((hi+lo)*aspect_vec2.xy*0.5,max(hi.x-lo.x,hi.y-lo.y)); +} + +vec2 transform(vec2 coord, vec3 stretch, vec2 sinangle, vec2 cosangle, float in_radius, float in_distance, vec2 aspect) +{ + coord = (coord-vec2(0.5))*aspect.xy*stretch.z+stretch.xy; + return (bkwtrans(coord, sinangle, cosangle, in_radius, in_distance)/aspect.xy+vec2(0.5)); +} + +// TODO need to rescale so the screen does not shrink +vec2 HSM_GetGeomCurvedCoord(vec2 in_coord, float tilt_x, float tilt_y, float in_radius, float in_distance, float in_aspect) +{ + //default radius = 3.5 + //default distance = 2 + in_distance *= 1.4; + vec2 ang = vec2(tilt_x, tilt_y); + vec2 v_sinangle = sin(ang); + vec2 v_cosangle = cos(ang); + vec3 v_stretch = maxscale(v_sinangle, v_cosangle, in_radius, in_distance, in_aspect); + vec2 aspect_vec2 = vec2(1, 1/in_aspect); + vec2 curved_coord = transform(in_coord, v_stretch, v_sinangle, v_cosangle, in_radius, in_distance, aspect_vec2); + + return curved_coord; +} + +vec2 HSM_GetGeomCurvedCoordRetainWidth(vec2 in_coord, float tilt_x, float tilt_y, float in_radius, float in_distance, float in_aspect) +{ + vec2 ctr_curved_coord = HSM_GetGeomCurvedCoord(in_coord, tilt_x, tilt_y, in_radius, in_distance, in_aspect) - 0.5; + vec2 right_edge_curved_ctr_coord = HSM_GetGeomCurvedCoord(vec2(1, 0.5), tilt_x, tilt_y, in_radius, in_distance, in_aspect) - 0.5; + ctr_curved_coord.x = ctr_curved_coord.x * 0.5 / right_edge_curved_ctr_coord.x; + return ctr_curved_coord + 0.5; +} + +/* +vec2 HSM_GetGuestCurvedCoord(vec2 in_coord, vec2 in_curvature, float in_curvature_shape) +{ + vec2 pos = in_coord; + float warpX = in_curvature.x; + float warpY = in_curvature.y; + float c_shape = in_curvature_shape; + + pos = pos*2.0-1.0; + pos = mix(pos, vec2(pos.x*inversesqrt(1.0-c_shape*pos.y*pos.y), pos.y*inversesqrt(1.0-c_shape*pos.x*pos.x)), vec2(warpX, warpY)/c_shape); + return pos*0.5 + 0.5; +} +*/ + +/* +vec2 HSM_GetTorridGristleCurvedCoord(vec2 in_coord, vec2 in_curvature){ + // default curvature is vec2(0.031, 0.041 + vec2 Distortion = in_curvature * 15;// * vec2(0.031, 0.041); + + vec2 curvedCoords = in_coord * 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+Distortion*0.2)))); + + curvedCoords = curvedCoords / (1.0-pow(vec2(0.29289321881345247559915563789515),(1.0/(vec2(1.0)+Distortion*0.2)))); + + curvedCoords = curvedCoords * 0.5 + 0.5; + return curvedCoords; +} +*/ + +vec2 HSM_GetCrtPiCurvedCoord(vec2 in_coord, vec2 in_curvature) +{ + // Barrel distortion shrinks the display area a bit, this will allow us to counteract that. + in_curvature *= 5; + vec2 barrelScale = 1.0 - (0.23 * in_curvature); + in_coord -= vec2(0.5); + float rsq = in_coord.x * in_coord.x + (HSM_CURVATURE_MODE == 2 ? 0 : in_coord.y * in_coord.y); + in_coord += in_coord * (in_curvature * rsq); + in_coord *= barrelScale; + in_coord += vec2(0.5); + return in_coord; +} + +vec2 HSM_Get2DCurvedCoord(vec2 in_coord, vec2 curvature_values) +{ + vec2 ctr_curved_coord = vec2(0) ; + + ctr_curved_coord = HSM_GetCrtPiCurvedCoord(in_coord, curvature_values) - 0.5; + + vec2 right_edge_curved_ctr_coord = HSM_GetCrtPiCurvedCoord(vec2(1, 0.5), curvature_values) - 0.5; + ctr_curved_coord.x = ctr_curved_coord.x * 0.5 / right_edge_curved_ctr_coord.x; + + vec2 bottom_edge_curved_ctr_coord = HSM_GetCrtPiCurvedCoord(vec2(0.5, 1), curvature_values) - 0.5; + ctr_curved_coord.y = ctr_curved_coord.y * 0.5 / bottom_edge_curved_ctr_coord.y; + + return ctr_curved_coord + 0.5; +} + +vec2 HSM_GetCurvedCoord(vec2 in_coord, float curvature_multiplier, float screen_aspect) +{ + if (HSM_CURVATURE_MODE == CURVATURE_MODE_OFF) + return in_coord; + + float epsilon = 0.002; + vec2 original_size = HSM_GetRotatedNegativeCropAddedSize(); + + vec2 adjusted_coord = in_coord; + float tilt_angle_y = HSM_CURVATURE_3D_TILT_ANGLE_Y; + float tilt_angle_x = HSM_CURVATURE_3D_TILT_ANGLE_X; + float pin_inner_edge = 0; + + vec2 curved_coord = vec2(0); + +#ifndef IS_POTATO_PRESET + if (HSM_CURVATURE_MODE > CURVATURE_MODE_2D_CYLINDER) + { + if (HSM_USE_GEOM > 0.5) + curved_coord = HSM_GetGeomCurvedCoordRetainWidth(in_coord, HSM_CURVATURE_3D_TILT_ANGLE_X, HSM_CURVATURE_3D_TILT_ANGLE_Y, HSM_CURVATURE_3D_RADIUS, HSM_CURVATURE_3D_VIEW_DIST, screen_aspect); + else + { + float geom_radius_with_mult = HSM_CURVATURE_3D_RADIUS; + // Adjust curvature so 3D mode 1 looks similar to 3D mode 2 + if (HSM_CURVATURE_MODE == CURVATURE_MODE_3D_1) geom_radius_with_mult -= 0.40; + if (HSM_CURVATURE_MODE == CURVATURE_MODE_3D_CYLINDER) geom_radius_with_mult -= 1; + geom_radius_with_mult *= (1 / (curvature_multiplier + epsilon)); + vec2 extra_curvature_mult = HSM_GetCurvatureScales(screen_aspect); + mat2x2 pixel_to_video_uv; + + float geom_mode = HSM_CURVATURE_MODE - 2; + + curved_coord = HRG_GetGeomCurvedCoord( adjusted_coord, + geom_mode, + geom_radius_with_mult, + HSM_CURVATURE_3D_VIEW_DIST, + tilt_angle_x, + tilt_angle_y, + screen_aspect, + pin_inner_edge, + global.SourceSize.xy, + global.OutputSize.xy, + pixel_to_video_uv); + } + } + else + { + vec2 curvature_values = curvature_multiplier * HSM_GetCurvatureValues(screen_aspect); + curved_coord = HSM_Get2DCurvedCoord(adjusted_coord, curvature_values); + } +#endif + +#ifdef IS_POTATO_PRESET + vec2 curvature_values = curvature_multiplier * HSM_GetCurvatureValues(screen_aspect); + curved_coord = HSM_Get2DCurvedCoord(adjusted_coord, curvature_values); +#endif + + return curved_coord; +} + +vec2 HSM_GetCRTShaderCurvedCoord(vec2 in_coord) +{ + vec2 out_coord = HSM_GetCurvedCoord(in_coord, 1, SCREEN_ASPECT); + + if (HSM_CRT_CURVATURE_SCALE < 100 && !HHLP_IsOutsideCoordSpace(out_coord)) + { + out_coord = HSM_GetCurvedCoord(in_coord, HSM_CRT_CURVATURE_SCALE, SCREEN_ASPECT); + } + + return out_coord; +} + +vec2 HSM_GetMirrorWrappedCoord(vec2 in_coord) +{ + vec2 ctr_coord = in_coord - 0.5; + if (abs(ctr_coord.x) > 0.5 || abs(ctr_coord.y) > 0.5 ) + in_coord = ctr_coord / HSM_SCREEN_REFLECTION_SCALE + 0.5 + vec2(HSM_SCREEN_REFLECTION_POS_X, HSM_SCREEN_REFLECTION_POS_Y); + + in_coord = mod(in_coord, 2); + vec2 ctr_mirror_coord = in_coord - 0.5; + + float mirror_x = clamp(clamp(abs(ctr_mirror_coord.x) - 0.5, 0, 1) * 100000, 0, 1); + float mirror_y = clamp(clamp(abs(ctr_mirror_coord.y) - 0.5, 0, 1) * 100000, 0, 1); + + ctr_mirror_coord.x = ctr_mirror_coord.x - mirror_x * 2 * sign(ctr_mirror_coord.x) * (abs(ctr_mirror_coord.x) - 0.5); + ctr_mirror_coord.y = ctr_mirror_coord.y - mirror_y * 2 * sign(ctr_mirror_coord.y) * (abs(ctr_mirror_coord.y) - 0.5); + + return ctr_mirror_coord + 0.5; +} + +// Borrowed from cgwg's crt-geom, under GPL +float HSM_GetCornerMask(vec2 in_coord, float screen_aspect, float corner_radius, float edge_sharpness) +// returns 0.0 - 1.0 value used for masking the corner so it looks round +{ + //(0.5 - abs(in_coord - 0.5)) * 2 + vec2 new_coord = min(in_coord, vec2(1.0) - in_coord) * vec2(screen_aspect, 1); + vec2 corner_distance = vec2(max(corner_radius / 1000.0, (1.0 - edge_sharpness) * 0.01)); + new_coord = (corner_distance - min(new_coord, corner_distance)); + float distance = sqrt(dot(new_coord, new_coord)); + + return clamp((corner_distance.x - distance) * (edge_sharpness * 500 + 100), 0.0, 1.0); +} + +// Guest improved corner mask, to integrate +// sborder is border intensity +// float corner(vec2 pos) { +// vec2 b = vec2(bsize1, bsize1) * vec2(1.0, OutputSize.x/OutputSize.y) * 0.05; +// pos = clamp(pos, 0.0, 1.0); +// pos = abs(2.0*(pos - 0.5)); +// float csize1 = mix(400.0, 7.0, pow(4.0*csize, 0.10)); +// float crn = dot(pow(pos, csize1.xx), vec2(1.0, OutputSize.y/OutputSize.x)); +// crn = (csize == 0.0) ? max(pos.x, pos.y) : pow(crn, 1.0/csize1); +// pos = max(pos, crn); +// vec2 res = (bsize1 == 0.0) ? 1.0.xx : mix(0.0.xx, 1.0.xx, smoothstep(1.0.xx, 1.0.xx-b, sqrt(pos))); +// res = pow(res, sborder.xx); +// return sqrt(res.x*res.y); +// } + +vec2 HSM_GetTubeCurvedCoord(vec2 screen_coord, float curvature_scale, vec2 screen_scale, vec2 tube_scale, float screen_aspect, float apply_black_edge_offset) +{ + vec2 black_edge_scale_offset = tube_scale / screen_scale; + + // Get the tube coord with the black edge added + // vec2 tube_coord = HSM_GetInverseScaledCoord(screen_coord, black_edge_scale_offset); + + // Get the curved coordinate + vec2 tube_curved_coord = vec2(0.5, 0.5); + + if (HSM_BZL_USE_INDEPENDENT_CURVATURE == 1) + { + vec2 curvature_values = screen_aspect < 1 ? vec2(2 * HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS * 2 / 100, HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS * 3 / 100) + : vec2(HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS * 3 / 100, 2 * HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS * 2 / 100); + curvature_values *= curvature_scale * HSM_BZL_INNER_CURVATURE_SCALE; + tube_curved_coord = HSM_Get2DCurvedCoord(screen_coord, curvature_values); + } + else + { + tube_curved_coord = HSM_GetCurvedCoord(screen_coord, curvature_scale * HSM_BZL_INNER_CURVATURE_SCALE, screen_aspect); + } + if (apply_black_edge_offset == 1) + tube_curved_coord = HSM_GetInverseScaledCoord(tube_curved_coord, black_edge_scale_offset); + + return tube_curved_coord; +} + +/* +Light Illumination +vec3 evaluateLight(in vec3 pos) +{ + vec3 lightPos = LPOS; + vec3 lightCol = LCOL; + vec3 L = lightPos-pos; + return lightCol * 1.0/dot(L,L); +} + +vec3 evaluateLight(in vec3 pos, in vec3 normal) +{ + vec3 lightPos = LPOS; + vec3 L = lightPos-pos; + float distanceToL = length(L); + vec3 Lnorm = L/distanceToL; + return max(0.0,dot(normal,Lnorm)) * evaluateLight(pos); +} +*/ + +vec2 HSM_GetMirrorWrapCoord(vec2 in_coord) +{ + vec2 ctr_coord = in_coord - 0.5; + vec2 ctr_mirror_coord = vec2(0,0); + + float x_is_outside = clamp((clamp(abs(ctr_coord.x), 0.5, 1) - 0.5) * 100000, 0, 1); + ctr_mirror_coord.x = (1 - x_is_outside) * ctr_coord.x + + x_is_outside * (ctr_coord.x - 2 * sign(ctr_coord.x) * (abs(ctr_coord.x) - 0.5)); + + float y_is_outside = clamp((clamp(abs(ctr_coord.y), 0.5, 1) - 0.5) * 100000, 0, 1); + ctr_mirror_coord.y = (1 - y_is_outside) * ctr_coord.y + + y_is_outside * (ctr_coord.y - 2 * sign(ctr_coord.y) * (abs(ctr_coord.y) - 0.5)); + + return ctr_mirror_coord + 0.5; +} + +float HSM_rand(inout float r) +{ + r = fract(3712.65 * r + 0.61432); + return (r - 0.5) * 2.0; +} + +vec4 HSM_GetStoichaicBlurredSample(sampler2D in_sampler, vec2 in_coord, float num_samples, float max_blur_size, float blur_ratio) +{ + if (num_samples < 1) + return texture(in_sampler, in_coord); + + // Common value for max_blur_size is about 40 + float p = blur_ratio * max_blur_size / global.SourceSize.y; + vec4 blurred_color = vec4(0.0); + // srand + float radius = sin(dot(in_coord, vec2(1233.224, 1743.335))); + vec2 radius_vector; + + for(int i=0; i < num_samples; i++) + { + radius_vector.x = HSM_rand(radius); + radius_vector.y = HSM_rand(radius); + vec2 sample_coord = in_coord + radius_vector * p; + + blurred_color += texture(in_sampler, sample_coord) / num_samples; + } + return blurred_color; +} + +float HSM_GetScreenIndex(vec2 viewport_coord) +{ + float out_index = 1; + float output_aspect = global.FinalViewportSize.x / global.FinalViewportSize.y; + + if (HSM_DUALSCREEN_MODE == 0) + out_index = 1; + if (HSM_DUALSCREEN_MODE == 1) + out_index = (viewport_coord.y < 0.5 + HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION / output_aspect) ? 1 : 2; + if (HSM_DUALSCREEN_MODE == 2) + out_index = (viewport_coord.x < 0.5 + HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION / output_aspect) ? 1 : 2; + + return out_index; +} + +vec4 HSM_UpdateGlobalScreenValuesFromCache(sampler2D in_cache_pass, sampler2D in_cache_feedback_pass, vec2 vTexCoord) +{ + vec2 flipped_viewport_coord = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + SCREEN_INDEX = HSM_GetScreenIndex(flipped_viewport_coord); + CORE_SIZE = global.CorePassSize.xy; + CORE_FEEDBACK_SIZE = global.CorePassFeedbackSize.xy; + ROTATED_CORE_PREPPED_SIZE = HSM_GetRotatedNegativeCropAddedSize(); + ROTATED_CORE_ORIGINAL_SIZE = HSM_GetRotatedCoreOriginalSize(); + vec2 sample_coord = vec2(0); + vec4 texture_sample = vec4(0); + + // Sample 1, 1 + sample_coord = HSM_GetCacheSampleCoord(1, 1); + texture_sample = texture(in_cache_pass, sample_coord); + AVERAGE_LUMA = texture_sample.a; + + if (SCREEN_INDEX == 1) + { + // Sample 2, 1 + // r SCREEN_ASPECT + // ba SCREEN_SCALE + sample_coord = HSM_GetCacheSampleCoord(2, 1); + texture_sample = texture(in_cache_pass, sample_coord); + SCREEN_ASPECT = texture_sample.r; + SCREEN_SCALE = texture_sample.ba; + + // Sample 2, 1 Feedback + // ba SCREEN_SCALE_FEEDBACK + texture_sample = texture(in_cache_feedback_pass, sample_coord); + SCREEN_SCALE_FEEDBACK = texture_sample.ba; + + // Sample 3, 1 + // rg TUBE_SCALE + // ba SCREEN_POS_OFFSET + sample_coord = HSM_GetCacheSampleCoord(3, 1); + texture_sample = texture(in_cache_pass, sample_coord); + TUBE_SCALE = texture_sample.rg; + SCREEN_POS_OFFSET = texture_sample.ba; + + // Sample 3, 1 Feedback + // rg TUBE_SCALE_FEEDBACK + // ba SCREEN_POS_OFFSET_FEEDBACK + texture_sample = texture(in_cache_feedback_pass, sample_coord); + TUBE_SCALE_FEEDBACK = texture_sample.rg; + SCREEN_POS_OFFSET_FEEDBACK = texture_sample.ba; + + // Sample 3, 4 + // rg BLACK_EDGE_SCALE + sample_coord = HSM_GetCacheSampleCoord(3, 4); + texture_sample = texture(in_cache_pass, sample_coord); + BLACK_EDGE_SCALE = texture_sample.rg; + + // Sample 4, 1 + // rg CROPPED_ROTATED_SIZE_WITH_RES_MULT + sample_coord = HSM_GetCacheSampleCoord(4, 1); + texture_sample = texture(in_cache_pass, sample_coord); + CROPPED_ROTATED_SIZE_WITH_RES_MULT = texture_sample.rg; + + // Sample 1, 2 + // rg CROPPED_ROTATED_SIZE + // ba SAMPLE_AREA_START_PIXEL_COORD + sample_coord = HSM_GetCacheSampleCoord(1, 2); + texture_sample = texture(in_cache_pass, sample_coord); + CROPPED_ROTATED_SIZE = texture_sample.rg; + SAMPLE_AREA_START_PIXEL_COORD = texture_sample.ba; + } + // If we are in the section of the viewport which is the second screen + if (SCREEN_INDEX == 2) + { + // Sample 2, 1 Sample - 2nd Screen + // r SCREEN_ASPECT + // ba SCREEN_SCALE + sample_coord = HSM_GetCacheSampleCoord(2, 2); + texture_sample = texture(in_cache_pass, sample_coord); + SCREEN_ASPECT = texture_sample.r; + SCREEN_SCALE = texture_sample.gb; + + // Sample 2, 1 Sample Feedback + // ba SCREEN_SCALE_FEEDBACK + texture_sample = texture(in_cache_feedback_pass, sample_coord); + SCREEN_SCALE_FEEDBACK = texture_sample.ba; + + // Sample 3, 2 - 2nd Screen + // rg TUBE_SCALE + // ba SCREEN_POS_OFFSET + sample_coord = HSM_GetCacheSampleCoord(3, 2); + texture_sample = texture(in_cache_pass, sample_coord); + TUBE_SCALE = texture_sample.rg; + SCREEN_POS_OFFSET = texture_sample.ba; + + // Sample 3, 2 Feedback + // rg TUBE_SCALE_FEEDBACK + // ba SCREEN_POS_OFFSET_FEEDBACK + texture_sample = texture(in_cache_feedback_pass, sample_coord); + TUBE_SCALE_FEEDBACK = texture_sample.rg; + SCREEN_POS_OFFSET_FEEDBACK = texture_sample.ba; + + // Sample 3, 4 + // rg BLACK_EDGE_SCALE + sample_coord = HSM_GetCacheSampleCoord(3, 4); + texture_sample = texture(in_cache_pass, sample_coord); + BLACK_EDGE_SCALE = texture_sample.ba; + + // Sample 4, 2 + // rg CROPPED_ROTATED_SIZE_WITH_RES_MULT + // sample_coord = vec2(0.875, 0.375); + sample_coord = HSM_GetCacheSampleCoord(4, 2); + texture_sample = texture(in_cache_pass, sample_coord); + CROPPED_ROTATED_SIZE_WITH_RES_MULT = texture_sample.rg; + + // Sample 1, 3 + // rg CROPPED_ROTATED_SIZE + // ba SAMPLE_AREA_START_PIXEL_COORD + // sample_coord = vec2(0.125, 0.675); + sample_coord = HSM_GetCacheSampleCoord(1, 3); + texture_sample = texture(in_cache_pass, sample_coord); + CROPPED_ROTATED_SIZE = texture_sample.rg; + SAMPLE_AREA_START_PIXEL_COORD = texture_sample.ba; + } + + // Sample 2, 3 Sample + // rg CORE_SIZE + sample_coord = HSM_GetCacheSampleCoord(2, 3); + texture_sample = texture(in_cache_pass, sample_coord); + CORE_SIZE = texture_sample.rg; + + // Sample 2, 3 Sample Feedback + // rg CORE_FEEDBACK_SIZE + texture_sample = texture(in_cache_feedback_pass, sample_coord); + CORE_FEEDBACK_SIZE = texture_sample.rg; + + // Sample 3, 3 + // rg VIEWPORT_SCALE + // ba VIEWPORT_POS + sample_coord = HSM_GetCacheSampleCoord(3, 3); + texture_sample = texture(in_cache_pass, sample_coord); + VIEWPORT_SCALE = texture_sample.rg; + VIEWPORT_POS = texture_sample.ba; + + // Sample 3, 3 Feedback + // rg VIEWPORT_SCALE + // ba VIEWPORT_POS + texture_sample = texture(in_cache_feedback_pass, sample_coord); + VIEWPORT_SCALE_FEEDBACK = texture_sample.rg; + VIEWPORT_POS_FEEDBACK = texture_sample.ba; + + // Sample 4, 3 + // rg SCREEN_SCALE_2ND_SCREEN + // ba SCREEN_POS_OFFSET_2ND_SCREEN + sample_coord = HSM_GetCacheSampleCoord(4, 3); + texture_sample = texture(in_cache_pass, sample_coord); + SCREEN_SCALE_2ND_SCREEN = texture_sample.rg; + SCREEN_POS_OFFSET_2ND_SCREEN = texture_sample.ba; + + // Sample 4, 3 Feedback + // rg SCREEN_SCALE_2ND_SCREEN_FEEDBACK + // ba SCREEN_POS_2ND_SCREEN_OFFSET_FEEDBACK + texture_sample = texture(in_cache_feedback_pass, sample_coord); + SCREEN_SCALE_2ND_SCREEN_FEEDBACK = texture_sample.rg; + SCREEN_POS_OFFSET_2ND_SCREEN_FEEDBACK = texture_sample.ba; + + + + // Sample 1, 4 + // r parameter_sum + 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; + + // Sample 1, 4 Feedback + // r parameter_sum_feedback + texture_sample = texture(in_cache_feedback_pass, sample_coord); + float parameter_sum_feedback = texture_sample.r; + + // Sample 2, 4 + // r NEGATIVE_CROP_EXPAND_MULTIPLIER + // g MAX_NEGATIVE_CROP + sample_coord = HSM_GetCacheSampleCoord(2, 4); + texture_sample = texture(in_cache_pass, sample_coord); + NEGATIVE_CROP_EXPAND_MULTIPLIER = texture_sample.r; + MAX_NEGATIVE_CROP = texture_sample.g; + + USE_VERTICAL_SCANLINES = HSM_GetUseVerticalScanlines(SCREEN_ASPECT); + SCREEN_COORD = HSM_GetVTexCoordWithArgs(flipped_viewport_coord, SCREEN_SCALE, SCREEN_POS_OFFSET); + BLACK_EDGE_COORD = HSM_GetVTexCoordWithArgs(flipped_viewport_coord, BLACK_EDGE_SCALE, SCREEN_POS_OFFSET); + + float param_sum_epsilon = 0.0000001; + CACHE_INFO_PARAM_SUM_CHANGED = (abs(parameter_sum - parameter_sum_feedback) > param_sum_epsilon); + + return vec4(0); +} + +bool HSM_GetIsInABCompareArea(vec2 viewport_coord) +{ + float test_value = HSM_AB_COMPARE_AREA > 1.5 ? viewport_coord.y : viewport_coord.x; + float position = mod(HSM_AB_COMPARE_AREA, 2) == 1 ? (1 - HSM_AB_COMPARE_SPLIT_POSITION) : HSM_AB_COMPARE_SPLIT_POSITION; + return mod(HSM_AB_COMPARE_AREA, 2) == 0 && test_value < position || + mod(HSM_AB_COMPARE_AREA, 2) == 1 && test_value > position; +} + +bool HSM_CheckCacheInfoChanged() +{ + float epsilon = 0.0001; + return (CORE_SIZE.x != CORE_FEEDBACK_SIZE.x + || CORE_SIZE.y != CORE_FEEDBACK_SIZE.y + || HSM_DUALSCREEN_MODE < 0.5 && + ( + abs(SCREEN_SCALE.x - SCREEN_SCALE_FEEDBACK.x) > epsilon + || abs(SCREEN_SCALE.y - SCREEN_SCALE_FEEDBACK.y) > epsilon + ) + || abs(SCREEN_POS_OFFSET.x - SCREEN_POS_OFFSET_FEEDBACK.x) > epsilon + || abs(SCREEN_POS_OFFSET.y - SCREEN_POS_OFFSET_FEEDBACK.y) > epsilon + || HSM_DUALSCREEN_MODE > 0.5 && + ( + abs(SCREEN_SCALE_2ND_SCREEN.x - SCREEN_SCALE_2ND_SCREEN_FEEDBACK.x) > epsilon + || abs(SCREEN_SCALE_2ND_SCREEN.y - SCREEN_SCALE_2ND_SCREEN_FEEDBACK.y) > epsilon + || abs(SCREEN_POS_OFFSET_2ND_SCREEN.x - SCREEN_POS_OFFSET_2ND_SCREEN_FEEDBACK.x) > epsilon + || abs(SCREEN_POS_OFFSET_2ND_SCREEN.y - SCREEN_POS_OFFSET_2ND_SCREEN_FEEDBACK.y) > epsilon + ) + || abs(TUBE_SCALE.x - TUBE_SCALE_FEEDBACK.x) > epsilon + || abs(TUBE_SCALE.y - TUBE_SCALE_FEEDBACK.y) > epsilon + || abs(VIEWPORT_SCALE.y - VIEWPORT_SCALE_FEEDBACK.x) > epsilon + || abs(VIEWPORT_POS.x - VIEWPORT_POS_FEEDBACK.x) > epsilon + || abs(VIEWPORT_POS.y - VIEWPORT_POS_FEEDBACK.y) > epsilon + || 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); + vec2 scaled_tex_size = in_scale * global.FinalViewportSize.xy; + float mipmap_lod = log2(tex_size.y / scaled_tex_size.y); + return textureLod(in_sampler, in_coord, mipmap_lod + in_blend_bias); +} + +// Texture Sampler function which takes a coordinate in the cropped coordinate space +vec4 HSM_GetCroppedTexSample(sampler2D in_sampler, vec2 in_screen_coord) +{ + vec2 core_prepped_size = HSM_GetRotatedNegativeCropAddedSize(); + + vec4 out_color = HSM_GetTexSampleFromSampleStartAndSize(in_sampler, in_screen_coord, SAMPLE_AREA_START_PIXEL_COORD, CROPPED_ROTATED_SIZE); + + return out_color; +} + +float HSM_GetVignetteFactor(vec2 coord, float amount, float size) +{ + float orig_mamehlsl_amount = amount; + vec2 ctr_coord = coord - 0.5; + + float vignette_length = length(ctr_coord * vec2(0.5 / size * global.OutputSize.x/global.OutputSize.y + 0.5, 1)); + float vignette_blur = (orig_mamehlsl_amount * 0.75) + 0.25; + + // 0.5 full screen fitting circle + float vignette_radius = 1.0 - (orig_mamehlsl_amount * 0.25); + float vignette = smoothstep(vignette_radius, vignette_radius - vignette_blur, vignette_length); + + float vignette_multiplier = smoothstep(0, 0.05, amount); + return 1 - vignette_multiplier + vignette * vignette_multiplier; +} + +float HSM_GetScreenVignetteFactor(vec2 in_coord) +{ + vec2 vpos = HSM_GetMirrorWrappedCoord(in_coord); + vpos = (vpos - 0.5) / 1.01 + 0.5; + vpos *= 1.0 - vpos.xy; + float vig = vpos.x * vpos.y * HSM_SCREEN_VIGNETTE_STRENGTH; + vig = min(pow(vig, HSM_SCREEN_VIGNETTE_POWER), 1.0); + + return vig; +} + +bool HSM_GetUseOnCurrentScreenIndex(float dual_screen_vis_mode) +{ + return dual_screen_vis_mode == SHOW_ON_DUALSCREEN_MODE_BOTH || dual_screen_vis_mode == SCREEN_INDEX; +} + +bool HSM_GetUseScreenVignette() +{ + return HSM_SCREEN_VIGNETTE_ON > 0.5 && HSM_GetUseOnCurrentScreenIndex(HSM_SCREEN_VIGNETTE_DUALSCREEN_VIS_MODE); +} + +vec4 HSM_GetNightLightingMultiplyColor( vec2 viewport_coord, in sampler2D NightLightingImage ) +{ + vec2 night_lighting_coord = HSM_GetMirrorWrapCoord(viewport_coord); + + night_lighting_coord = (night_lighting_coord - 0.5) / HSM_AMBIENT_LIGHTING_SCALE + 0.5; + night_lighting_coord = HSM_RotateCoordinate(night_lighting_coord, HSM_AMBIENT_LIGHTING_ROTATE); + + if (HSM_AMBIENT_LIGHTING_MIRROR_HORZ == 1) + night_lighting_coord.x = (night_lighting_coord.x - 0.5) * -1 + 0.5; + + vec4 night_lighting_image = vec4(0); + // if (HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES > 0.5) + // { + // // Dithering if needed to reduce banding + // float blur_max_size = 1; + // float blur_amount = 0.2; + // night_lighting_image = HSM_GetStoichaicBlurredSample(NightLightingImage, night_lighting_coord.xy, HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES, blur_max_size, blur_amount); + // } + // else + night_lighting_image = HSM_GetMipmappedTexSample(NightLightingImage, night_lighting_coord.xy, vec2(1), 0); + + night_lighting_image = HSM_Linearize(night_lighting_image, DEFAULT_SRGB_GAMMA); + + // Do HSV alterations on the night lighting image + if (HSM_AMBIENT_LIGHTING_HUE != 0 || HSM_AMBIENT_LIGHTING_SATURATION != 1 || HSM_AMBIENT_LIGHTING_VALUE != 1) + { + vec3 night_lighting_image_hsv = HSM_RGBtoHSV(night_lighting_image.rgb); + night_lighting_image_hsv.x += HSM_AMBIENT_LIGHTING_HUE; + night_lighting_image_hsv.y *= HSM_AMBIENT_LIGHTING_SATURATION; + night_lighting_image_hsv.z *= HSM_AMBIENT_LIGHTING_VALUE; + night_lighting_image = vec4(HSM_HSVtoRGB(night_lighting_image_hsv), night_lighting_image.a); + } + + night_lighting_image.rgb = mix( vec3(1), night_lighting_image.rgb, HSM_AMBIENT_LIGHTING_OPACITY ); + + return night_lighting_image; +} + +vec4 HSM_ApplyMonochrome(vec4 in_color) +{ + vec4 out_color = in_color; + out_color.rgb = pow(out_color.rgb, HSM_MONOCHROME_GAMMA.xxx); + float luma = dot(out_color.rgb, vec3(0.299, 0.587, 0.114)); + luma *= HSM_MONOCHROME_BRIGHTNESS; + vec3 mcolor = vec3(1.0); + + if (HSM_MONOCHROME_MODE > 1.5) mcolor = (HSM_MONOCHROME_MODE > 2.5) ? vec3(0.2549, 1.0, 0.0) : vec3(1.0, 0.749, 0.0); + + if (HSM_MONOCHROME_HUE_OFFSET != 0 || HSM_MONOCHROME_SATURATION != 0) + { + vec3 mcolor_hsv = HSM_RGBtoHSV(mcolor); + mcolor_hsv.x += HSM_MONOCHROME_HUE_OFFSET; + mcolor_hsv.y *= HSM_MONOCHROME_SATURATION; + mcolor = HSM_HSVtoRGB(mcolor_hsv); + } + + out_color.rgb = pow(luma, 1.0/HSM_MONOCHROME_GAMMA) * mcolor; + return out_color; +} + +float HSM_GetTubeDiffuseOpacity() +{ + float tube_diffuse_opacity = HSM_TUBE_DIFFUSE_MODE < 1.5 ? HSM_TUBE_DIFFUSE_OPACITY : 0; + + // If CRT Blend Mode is Multiply (2) then the tube must be fully opaque + if (HSM_CRT_BLEND_MODE == 2) + tube_diffuse_opacity = 1; + + return tube_diffuse_opacity; +} + +float HSM_Get_Screen_Black_Edge_Mask(vec2 screen_coord, bool apply_to_mirror) +{ + if (apply_to_mirror) + screen_coord = HSM_GetMirrorWrappedCoord(screen_coord); + + SCREEN_BLACK_EDGE_CURVED_COORD = HSM_GetCurvedCoord(screen_coord, HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE, SCREEN_ASPECT); + SCREEN_MASK = HSM_GetCornerMask(((SCREEN_BLACK_EDGE_CURVED_COORD - 0.5) * 1.001) + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE, HSM_TUBE_BLACK_EDGE_SHARPNESS); + + return SCREEN_MASK; +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-all-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-all-params.inc new file mode 100644 index 0000000..4c4fabe --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-all-params.inc @@ -0,0 +1,8 @@ + +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-2-bezel.inc" +#include "hsm-params-2-reflection.inc" +#include "hsm-params-4-image-layers.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-bezel-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-bezel-params.inc new file mode 100644 index 0000000..a367a12 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-bezel-params.inc @@ -0,0 +1,7 @@ + +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-2-bezel.inc" +#include "hsm-params-4-image-layers.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-glass-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-glass-params.inc new file mode 100644 index 0000000..4f19c42 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-glass-params.inc @@ -0,0 +1,9 @@ +#define IS_GLASS_PRESET + +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-2-bezel.inc" +#include "hsm-params-2-reflection.inc" +#include "hsm-params-3-glass-only.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-image-layers-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-image-layers-params.inc new file mode 100644 index 0000000..f7faa2a --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-image-layers-params.inc @@ -0,0 +1,6 @@ +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-2-bezel.inc" +#include "hsm-params-4-image-layers.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-potato-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-potato-params.inc new file mode 100644 index 0000000..9ab2018 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-potato-params.inc @@ -0,0 +1,7 @@ +#define IS_POTATO_PRESET + +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-1-potato-only.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-reflection-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-reflection-params.inc new file mode 100644 index 0000000..f617934 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-reflection-params.inc @@ -0,0 +1,6 @@ +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-2-bezel.inc" +#include "hsm-params-2-reflection.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-screen-scale-params.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-screen-scale-params.inc new file mode 100644 index 0000000..13cff67 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals-and-screen-scale-params.inc @@ -0,0 +1,4 @@ +#include "hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "hsm-params-5-intro.inc" +#include "hsm-common-functions.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals.inc new file mode 100644 index 0000000..69e4a62 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-globals.inc @@ -0,0 +1,863 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 SourceSize; + vec4 OriginalSize; + vec4 CorePassSize; + vec4 CorePassFeedbackSize; + vec4 OutputSize; + vec4 FinalViewportSize; + vec4 NegativeCropAddedPassSize; + vec4 DerezedPassSize; + int FrameDirection; + uint FrameCount; + + float HSM_RESOLUTION_DEBUG_ON; + float HSM_CACHE_GRAPHICS_ON; + float HSM_CACHE_UPDATE_INDICATOR_MODE; + + // Graphics Brightness + float HSM_GLOBAL_GRAPHICS_BRIGHTNESS; + float HSM_STATIC_LAYERS_GAMMA; + + // Night Lighting + float HSM_AMBIENT_LIGHTING_OPACITY; + float HSM_AMBIENT_LIGHTING_HUE; + float HSM_AMBIENT_LIGHTING_SATURATION; + float HSM_AMBIENT_LIGHTING_VALUE; + float HSM_AMBIENT_LIGHTING_SCALE; + float HSM_AMBIENT_LIGHTING_ROTATE; + float HSM_AMBIENT_LIGHTING_MIRROR_HORZ; + float HSM_AMBIENT_LIGHTING_SCALE_MODE; + float HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES; + + // Zoom & Pan + float HSM_VIEWPORT_ZOOM; + float HSM_VIEWPORT_POSITION_X; + float HSM_VIEWPORT_POSITION_Y; + float HSM_VIEWPORT_ZOOM_MASK; + + // FLIP & ROTATE + float HSM_FLIP_VIEWPORT_VERTICAL; + float HSM_FLIP_VIEWPORT_HORIZONTAL; + float HSM_FLIP_CORE_VERTICAL; + float HSM_FLIP_CORE_HORIZONTAL; + float HSM_ROTATE_CORE_IMAGE; + + // ASPECT RATIO + float HSM_ASPECT_RATIO_ORIENTATION; + float HSM_ASPECT_RATIO_MODE; + float HSM_ASPECT_RATIO_EXPLICIT; + + // SCALING + float HSM_INT_SCALE_MODE; + float HSM_INT_SCALE_MULTIPLE_OFFSET; + float HSM_INT_SCALE_MULTIPLE_OFFSET_LONG; + float HSM_INT_SCALE_MAX_HEIGHT; + float HSM_VERTICAL_PRESET; + float HSM_NON_INTEGER_SCALE; + + float HSM_USE_PHYSICAL_SIZE_FOR_NON_INTEGER; + float HSM_PHYSICAL_MONITOR_ASPECT_RATIO; + float HSM_PHYSICAL_MONITOR_DIAGONAL_SIZE; + float HSM_PHYSICAL_SIM_TUBE_DIAGONAL_SIZE; + + + // Extended Scale + float HSM_USE_IMAGE_FOR_PLACEMENT; + float HSM_PLACEMENT_IMAGE_USE_HORIZONTAL; + float HSM_PLACEMENT_IMAGE_MODE; + float HSM_NON_INTEGER_SCALE_OFFSET; + float HSM_USE_SNAP_TO_CLOSEST_INT_SCALE; + float HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE; + + // Position + float HSM_SCREEN_POSITION_X; + float HSM_SCREEN_POSITION_Y; + + // CROPPING + float HSM_CROP_MODE; + float HSM_CROP_PERCENT_ZOOM; + float HSM_CROP_PERCENT_TOP; + float HSM_CROP_PERCENT_BOTTOM; + float HSM_CROP_PERCENT_LEFT; + float HSM_CROP_PERCENT_RIGHT; + float HSM_CROP_BLACK_THRESHOLD; + + // SCANLINES + float HSM_SCANLINE_DIRECTION; + + // CORE RES SAMPLING + float HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR; + float HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR; + float HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR; + float HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR; + + // INTERLACING + float HSM_INTERLACE_TRIGGER_RES; + float HSM_INTERLACE_MODE; + float HSM_INTERLACE_EFFECT_SMOOTHNESS_INTERS; + float HSM_INTERLACE_SCANLINE_EFFECT; + float iscans; + + // FAKE SCANLINES + float HSM_FAKE_SCANLINE_MODE; + float HSM_FAKE_SCANLINE_OPACITY; + float HSM_FAKE_SCANLINE_RES_MODE; + float HSM_FAKE_SCANLINE_RES; + float HSM_FAKE_SCANLINE_INT_SCALE; + float HSM_FAKE_SCANLINE_ROLL; + float HSM_FAKE_SCANLINE_CURVATURE; + float HSM_FAKE_SCANLINE_BRIGHTNESS_CUTOFF; + + // DUAL SCREEN + float HSM_DUALSCREEN_MODE; + float HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE; + float HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS; + float HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET; + float HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION; + float HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE; + float HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS; + float HSM_2ND_SCREEN_ASPECT_RATIO_MODE; + float HSM_2ND_SCREEN_INDEPENDENT_SCALE; + float HSM_2ND_SCREEN_SCALE_OFFSET; + float HSM_2ND_SCREEN_POS_X; + float HSM_2ND_SCREEN_POS_Y; + float HSM_2ND_SCREEN_CROP_PERCENT_ZOOM; + float HSM_2ND_SCREEN_CROP_PERCENT_TOP; + float HSM_2ND_SCREEN_CROP_PERCENT_BOTTOM; + float HSM_2ND_SCREEN_CROP_PERCENT_LEFT; + float HSM_2ND_SCREEN_CROP_PERCENT_RIGHT; + + + // CURVATURE + float HSM_CURVATURE_MODE; + float HSM_CURVATURE_2D_SCALE_LONG_AXIS; + float HSM_CURVATURE_2D_SCALE_SHORT_AXIS; + // float HSM_CURVATURE_2D_SHAPE; + float HSM_CURVATURE_3D_RADIUS; + float HSM_CURVATURE_3D_VIEW_DIST; + float HSM_CURVATURE_3D_TILT_ANGLE_X; + float HSM_CURVATURE_3D_TILT_ANGLE_Y; + float HSM_CRT_CURVATURE_SCALE; + + // ANTI-FLICKER + float HSM_ANTI_FLICKER_ON; + float HSM_ANTI_FLICKER_THRESHOLD; + + // CRT vs ORIGINAL A/B TESTING + float HSM_AB_COMPARE_SHOW_MODE; + float HSM_AB_COMPARE_AREA; + float HSM_AB_COMPARE_FREEZE_CRT_TUBE; + float HSM_AB_COMPARE_FREEZE_GRAPHICS; + float HSM_AB_COMPARE_SPLIT_AREA; + float HSM_AB_COMPARE_SPLIT_POSITION; + + // CRT Screen + // These names are inconsistent with the general naming on purpose + // They match the namse in Guest's shader + float HSM_CRT_BLEND_MODE; + float HSM_CRT_BLEND_AMOUNT; + + float HSM_CRT_SCREEN_BLEND_MODE; + + // Screen Vignette + float HSM_SCREEN_VIGNETTE_ON; + float HSM_SCREEN_VIGNETTE_DUALSCREEN_VIS_MODE; + float HSM_SCREEN_VIGNETTE_STRENGTH; + float HSM_SCREEN_VIGNETTE_POWER; + float HSM_SCREEN_VIGNETTE_IN_REFLECTION; + + // Monochrome + float HSM_MONOCHROME_MODE; + float HSM_MONOCHROME_BRIGHTNESS; + float HSM_MONOCHROME_GAMMA; + float HSM_MONOCHROME_HUE_OFFSET; + float HSM_MONOCHROME_SATURATION; + float HSM_MONOCHROME_DUALSCREEN_VIS_MODE; + + // Reflection Transform + float HSM_SCREEN_REFLECTION_RENDER_ON; + float HSM_SCREEN_REFLECTION_SCALE; + float HSM_SCREEN_REFLECTION_POS_X; + float HSM_SCREEN_REFLECTION_POS_Y; + + // float HSM_PHOSPHOR_PERSISTENCE_BLEND; + // float HSM_PHOSPHOR_PERSISTENCE_RED; + // float HSM_PHOSPHOR_PERSISTENCE_GREEN; + // float HSM_PHOSPHOR_PERSISTENCE_BLUE; + + // TUBE IMAGES + float HSM_TUBE_DIFFUSE_MODE; + float HSM_TUBE_DIFFUSE_IMAGE_DUALSCREEN_VIS_MODE; + float HSM_TUBE_DIFFUSE_OPACITY; + float HSM_TUBE_DIFFUSE_IMAGE_HUE; + float HSM_TUBE_DIFFUSE_IMAGE_COLORIZE_ON; + float HSM_TUBE_DIFFUSE_IMAGE_SATURATION; + float HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS; + float HSM_TUBE_DIFFUSE_IMAGE_GAMMA; + float HSM_TUBE_DIFFUSE_IMAGE_AMBIENT_LIGHTING; + float HSM_TUBE_DIFFUSE_IMAGE_SCALE; + float HSM_TUBE_DIFFUSE_IMAGE_SCALE_X; + float HSM_TUBE_EMPTY_THICKNESS; + float HSM_TUBE_EMPTY_THICKNESS_X_SCALE; + + float HSM_TUBE_COLORED_GEL_IMAGE_ON; + float HSM_TUBE_COLORED_GEL_IMAGE_DUALSCREEN_VIS_MODE; + float HSM_TUBE_COLORED_GEL_IMAGE_MULTIPLY_AMOUNT; + float HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT; + float HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_BRIGHTNESS; + float HSM_TUBE_COLORED_GEL_IMAGE_TRANSPARENCY_THRESHOLD; + float HSM_TUBE_COLORED_GEL_IMAGE_ADDITIVE_AMOUNT; + float HSM_SHOW_CRT_ON_TOP_OF_COLORED_GEL; + + float HSM_TUBE_SHADOW_IMAGE_ON; + float HSM_TUBE_SHADOW_IMAGE_OPACITY; + float HSM_TUBE_SHADOW_IMAGE_SCALE_X; + float HSM_TUBE_SHADOW_IMAGE_SCALE_Y; + float HSM_TUBE_SHADOW_IMAGE_POS_X; + float HSM_TUBE_SHADOW_IMAGE_POS_Y; + float HSM_TUBE_SHADOW_CURVATURE_SCALE; + + float HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING; + float HSM_TUBE_COLORED_GEL_IMAGE_SCALE; + float HSM_TUBE_COLORED_GEL_IMAGE_FLIP_HORIZONTAL; + float HSM_TUBE_COLORED_GEL_IMAGE_FLIP_VERTICAL; + + // TUBE STATIC REFLECTION + float HSM_TUBE_STATIC_REFLECTION_IMAGE_ON; + float HSM_TUBE_STATIC_REFLECTION_IMAGE_DUALSCREEN_VIS_MODE; + float HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY; + float HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING; + float HSM_TUBE_STATIC_REFLECTION_IMAGE_SCALE; + float HSM_TUBE_STATIC_REFLECTION_IMAGE_DITHERING_SAMPLES; + + // SCREEN BLACK EDGE + float HSM_GLOBAL_CORNER_RADIUS; + float HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE; + float HSM_TUBE_BLACK_EDGE_SHARPNESS; + float HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE; + float HSM_TUBE_BLACK_EDGE_THICKNESS; + float HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE; + float HSM_TUBE_BLACK_EDGE_LAYERING_MODE; + + // Bezel Independent Scale + float HSM_BZL_USE_INDEPENDENT_SCALE; + float HSM_BZL_INDEPENDENT_SCALE; + float HSM_BZL_USE_INDEPENDENT_CURVATURE; + float HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS; + float HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS; + + // Bezel General + float HSM_BZL_OPACITY; + float HSM_BZL_BLEND_MODE; + float HSM_BZL_WIDTH; + float HSM_BZL_HEIGHT; + float HSM_BZL_SCALE_OFFSET; + float HSM_BZL_INNER_CURVATURE_SCALE; + float HSM_BZL_INNER_CORNER_RADIUS_SCALE; + + // Bezel Params not in Screen Scale + float HSM_BZL_OUTER_CURVATURE_SCALE; + float HSM_BZL_INNER_EDGE_THICKNESS; + float HSM_BZL_INNER_EDGE_SHARPNESS; + float HSM_BZL_OUTER_CORNER_RADIUS_SCALE; + float HSM_BZL_INNER_EDGE_SHADOW; + + // Generated Bezel + float HSM_BZL_COLOR_HUE; + float HSM_BZL_COLOR_SATURATION; + float HSM_BZL_COLOR_VALUE; + float HSM_BZL_NOISE; + float HSM_BZL_BRIGHTNESS; + float HSM_BZL_HIGHLIGHT; + float HSM_BZL_AMBIENT_LIGHTING_MULTIPLIER; + + // Generated Frame + float HSM_FRM_USE_INDEPENDENT_COLOR; + float HSM_FRM_COLOR_HUE; + float HSM_FRM_COLOR_SATURATION; + float HSM_FRM_COLOR_VALUE; + float HSM_FRM_NOISE; + float HSM_FRM_OUTER_CURVATURE_SCALE; + float HSM_FRM_THICKNESS; + float HSM_FRM_THICKNESS_SCALE_X; + float HSM_FRM_OUTER_POS_Y; + float HSM_FRM_INNER_EDGE_THICKNESS; + float HSM_FRM_OUTER_EDGE_THICKNESS; + float HSM_FRM_OUTER_EDGE_SHADING; + float HSM_FRM_OUTER_CORNER_RADIUS; + float HSM_BZL_OUTER_POSITION_Y; + float HSM_FRM_SHADOW_OPACITY; + float HSM_FRM_SHADOW_WIDTH; + + // Corner + float HSM_REFLECT_CORNER_FADE; + float HSM_REFLECT_CORNER_INNER_SPREAD; + float HSM_REFLECT_CORNER_OUTER_SPREAD; + float HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP; + float HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM; + float HSM_REFLECT_CORNER_SPREAD_FALLOFF; + float HSM_REFLECT_CORNER_FADE_DISTANCE; + + // Reflection + float HSM_REFLECT_GLOBAL_AMOUNT; + float HSM_REFLECT_GLOBAL_GAMMA_ADJUST; + + float HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT; + float HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW; + float HSM_REFLECT_FRAME_INNER_EDGE_AMOUNT; + float HSM_REFLECT_FRAME_INNER_EDGE_SHARPNESS; + float HSM_REFLECT_DIRECT_AMOUNT; + float HSM_REFLECT_DIFFUSED_AMOUNT; + float HSM_REFLECT_FULLSCREEN_GLOW; + float HSM_REFLECT_FULLSCREEN_GLOW_GAMMA; + + float HSM_REFLECT_FADE_AMOUNT; + float HSM_REFLECT_RADIAL_FADE_WIDTH; + float HSM_REFLECT_RADIAL_FADE_HEIGHT; + + float HSM_REFLECT_LATERAL_OUTER_FADE_POSITION; + float HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE; + float HSM_REFLECT_VIGNETTE_AMOUNT; + float HSM_REFLECT_VIGNETTE_SIZE; + + float HSM_REFLECT_NOISE_AMOUNT; + float HSM_REFLECT_NOISE_SAMPLES; + float HSM_REFLECT_NOISE_SAMPLE_DISTANCE; + + // Blur Stuff + float HSM_REFLECT_BLUR_NUM_SAMPLES; + float HSM_REFLECT_BLUR_FALLOFF_DISTANCE; + float HSM_REFLECT_BLUR_MIN; + float HSM_REFLECT_BLUR_MAX; + + float HSM_REFLECT_MASK_IMG_AMOUNT; + float HSM_REFLECT_IS_LAST_PASS; + + float HSM_GLASS_BORDER_ON; + + float HSM_POTATO_SHOW_BG_OVER_SCREEN; + float HSM_STANDARD_DECAL_SCALE_WITH_FRAME; + float HSM_STANDARD_TOP_SCALE_WITH_FRAME; + + // Layer Order + float HSM_BG_LAYER_ORDER; + float HSM_VIEWPORT_VIGNETTE_LAYER_ORDER; + float HSM_CRT_LAYER_ORDER; + float HSM_DEVICE_LAYER_ORDER; + float HSM_CAB_GLASS_LAYER_ORDER; + float HSM_DECAL_LAYER_ORDER; + float HSM_LED_LAYER_ORDER; + float HSM_TOP_LAYER_ORDER; + + // 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_KEEP_ASPECT; + float HSM_CUTOUT_SCALE; + float HSM_CUTOUT_SCALE_X; + float HSM_CUTOUT_CORNER_RADIUS; + float HSM_CUTOUT_POS_X; + float HSM_CUTOUT_POS_Y; + + // Background + float HSM_BG_OPACITY; + float HSM_BG_HUE; + float HSM_BG_COLORIZE_ON; + float HSM_BG_SATURATION; + float HSM_BG_BRIGHTNESS; + float HSM_BG_GAMMA; + float HSM_BG_AMBIENT_LIGHTING_MULTIPLIER; + float HSM_BG_APPLY_AMBIENT_IN_ADD_MODE; + float HSM_BG_BLEND_MODE; + float HSM_BG_SOURCE_MATTE_TYPE; + 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_FILL_MODE; + float HSM_BG_SCALE_KEEP_ASPECT; + float HSM_BG_SCALE; + float HSM_BG_SCALE_X; + float HSM_BG_POS_X; + float HSM_BG_POS_Y; + float HSM_BG_MIRROR_WRAP; + float HSM_BG_MIPMAPPING_BLEND_BIAS; + + // Background Vignette + 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_SCALE; + float HSM_VIEWPORT_VIGNETTE_SCALE_X; + float HSM_VIEWPORT_VIGNETTE_POS_X; + float HSM_VIEWPORT_VIGNETTE_POS_Y; + + // LED + float HSM_LED_OPACITY; + float HSM_LED_HUE; + float HSM_LED_COLORIZE_ON; + float HSM_LED_SATURATION; + float HSM_LED_BRIGHTNESS; + float HSM_LED_GAMMA; + float HSM_LED_AMBIENT_LIGHTING_MULTIPLIER; + float HSM_LED_APPLY_AMBIENT_IN_ADD_MODE; + float HSM_LED_BLEND_MODE; + float HSM_LED_SOURCE_MATTE_TYPE; + 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_SCALE_KEEP_ASPECT; + float HSM_LED_FILL_MODE; + float HSM_LED_SCALE; + float HSM_LED_SCALE_X; + float HSM_LED_POS_X; + float HSM_LED_POS_Y; + float HSM_LED_MIPMAPPING_BLEND_BIAS; + + // Device + float HSM_DEVICE_OPACITY; + float HSM_DEVICE_HUE; + float HSM_DEVICE_COLORIZE_ON; + float HSM_DEVICE_SATURATION; + float HSM_DEVICE_BRIGHTNESS; + float HSM_DEVICE_GAMMA; + float HSM_DEVICE_AMBIENT_LIGHTING_MULTIPLIER; + float HSM_DEVICE_APPLY_AMBIENT_IN_ADD_MODE; + float HSM_DEVICE_BLEND_MODE; + float HSM_DEVICE_SOURCE_MATTE_TYPE; + 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_SCALE_KEEP_ASPECT; + float HSM_DEVICE_FILL_MODE; + float HSM_DEVICE_SCALE; + 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; + + // Generated Bezel & Frame + float HSM_FRM_OPACITY; + float HSM_FRM_BLEND_MODE; + float HSM_FRM_TEXTURE_OPACITY; + float HSM_FRM_TEXTURE_BLEND_MODE; + + // Decal + float HSM_DECAL_OPACITY; + float HSM_DECAL_HUE; + float HSM_DECAL_COLORIZE_ON; + float HSM_DECAL_SATURATION; + float HSM_DECAL_BRIGHTNESS; + float HSM_DECAL_GAMMA; + float HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER; + float HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE; + float HSM_DECAL_BLEND_MODE; + float HSM_DECAL_SOURCE_MATTE_TYPE; + 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_SCALE_KEEP_ASPECT; + float HSM_DECAL_FILL_MODE; + float HSM_DECAL_SCALE; + float HSM_DECAL_SCALE_X; + float HSM_DECAL_POS_X; + float HSM_DECAL_POS_Y; + float HSM_DECAL_MIPMAPPING_BLEND_BIAS; + + // Cab Glass + float HSM_CAB_GLASS_OPACITY; + float HSM_CAB_GLASS_HUE; + float HSM_CAB_GLASS_COLORIZE_ON; + float HSM_CAB_GLASS_SATURATION; + float HSM_CAB_GLASS_BRIGHTNESS; + float HSM_CAB_GLASS_GAMMA; + float HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER; + float HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE; + float HSM_CAB_GLASS_BLEND_MODE; + float HSM_CAB_GLASS_SOURCE_MATTE_TYPE; + 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_SCALE_KEEP_ASPECT; + float HSM_CAB_GLASS_FILL_MODE; + float HSM_CAB_GLASS_SCALE; + float HSM_CAB_GLASS_SCALE_X; + float HSM_CAB_GLASS_POS_X; + float HSM_CAB_GLASS_POS_Y; + float HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS; + + // Top Image + float HSM_TOP_OPACITY; + float HSM_TOP_HUE; + float HSM_TOP_COLORIZE_ON; + float HSM_TOP_SATURATION; + float HSM_TOP_BRIGHTNESS; + float HSM_TOP_GAMMA; + float HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER; + float HSM_TOP_APPLY_AMBIENT_IN_ADD_MODE; + float HSM_TOP_BLEND_MODE; + float HSM_TOP_SOURCE_MATTE_TYPE; + 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_SCALE_KEEP_ASPECT; + float HSM_TOP_FILL_MODE; + float HSM_TOP_SCALE; + float HSM_TOP_SCALE_X; + float HSM_TOP_POS_X; + float HSM_TOP_POS_Y; + float HSM_TOP_MIRROR_WRAP; + float HSM_TOP_MIPMAPPING_BLEND_BIAS; + + float HSM_RENDER_SIMPLE_MODE; + float HSM_RENDER_SIMPLE_MASK_TYPE; + float HSM_LAYERING_DEBUG_MASK_MODE; + + float HSM_INTRO_LOGO_BLEND_MODE; + float HSM_INTRO_LOGO_FLIP_VERTICAL; + float HSM_INTRO_NOISE_BLEND_MODE; + float HSM_INTRO_NOISE_HOLD; + float HSM_INTRO_NOISE_FADE_OUT; + float HSM_INTRO_SOLID_BLACK_HOLD; + float HSM_INTRO_SOLID_BLACK_FADE_OUT; + float HSM_INTRO_SOLID_COLOR_BLEND_MODE; + float HSM_INTRO_LOGO_OVER_SOLID_COLOR; + float HSM_INTRO_LOGO_PLACEMENT; + float HSM_INTRO_LOGO_HEIGHT; + float HSM_INTRO_LOGO_POS_X; + float HSM_INTRO_LOGO_POS_Y; + float HSM_INTRO_WHEN_TO_SHOW; + float HSM_INTRO_SPEED; + float HSM_INTRO_LOGO_WAIT; + float HSM_INTRO_LOGO_FADE_IN; + float HSM_INTRO_LOGO_HOLD; + float HSM_INTRO_LOGO_FADE_OUT; + float HSM_INTRO_SOLID_COLOR_HUE; + float HSM_INTRO_SOLID_COLOR_SAT; + float HSM_INTRO_SOLID_COLOR_VALUE; + float HSM_INTRO_SOLID_COLOR_HOLD; + float HSM_INTRO_SOLID_COLOR_FADE_OUT; + + // Guest-Dr-Venom Params + float GAMMA_INPUT; + float gamma_out; + float post_br; + float post_br_affect_black_level; + + float glow; + float bloom; + float bloom_dist; + float halation; + + + float TATE; + float IOS; + float OS; + float BLOOM; + float overscanX; + float overscanY; + float intres; + float prescalex; + float c_shape; + float sborder; + float csize; + float bsize1; + float warpX; + float warpY; + + float gamma_c; + float brightboost; + float brightboost1; + + float blendMode; + + float gsl; + float scanline1; + float scanline2; + float beam_min; + float beam_max; + float beam_size; + float vertmask; + float scans; + float scan_falloff; + float spike; + float ring; + float scangamma; + + float rolling_scan; + + float h_sharp; + float s_sharp; + float smart_ei; + float ei_limit; + float sth; + + float barspeed; + float barintensity; + float bardir; + + float shadowMask; + float maskstr; + float mcut; + float masksize; + float maskDark; + float maskLight; + float mask_gamma; + float slotmask; + float slotmask1; + float slotwidth; + float double_slot; + float slotms; + float mclip; + float mshift; + float mask_layout; + + float GDV_DECONVERGENCE_ON; + float decons; + float GDV_NOISE_ON; + float addnoised; + float noisetype; + float noiseresd; + float deconrr; + float deconrg; + float deconrb; + float deconrry; + float deconrgy; + float deconrby; + float deconsmooth; + float dctypex; + float dctypey; + + // Grade Params + float g_grade_on; + float wp_temperature; + float g_satr; + float g_satg; + float g_satb; + + // Grade Afterglow Params + float AS; + float asat; + + // Megatron Parameters + float hcrt_h_size; + float hcrt_v_size; + float hcrt_h_cent; + float hcrt_v_cent; + float hcrt_pin_phase; + float hcrt_pin_amp; + +} global; + +/////////////// DEFINES /////////////// + +// Maximum Negative cropping fron each edge +// This means that the pass with the negative crop area +// added needs to have twice this much added in each direction +#define DEFAULT_CRT_GAMMA 2.4 +#define DEFAULT_SRGB_GAMMA 2.2 + +#define DEFAULT_SCREEN_HEIGHT 0.8297 +#define DEFAULT_SCREEN_HEIGHT_PORTRAIT_MULTIPLIER (DEFAULT_SCREEN_HEIGHT - 0.4792) / DEFAULT_SCREEN_HEIGHT + +#define SHOW_ON_DUALSCREEN_MODE_BOTH 0 +#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_SCREEN 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 TEXTURE_ASPECT_MODE_VIEWPORT 0 +#define TEXTURE_ASPECT_MODE_EXPLICIT 1 +#define TEXTURE_ASPECT_MODE_4_3 2 +#define TEXTURE_ASPECT_MODE_3_4 3 +#define TEXTURE_ASPECT_MODE_16_9 4 +#define TEXTURE_ASPECT_MODE_9_16 5 + +float NEGATIVE_CROP_EXPAND_MULTIPLIER = 0.5; +float MAX_NEGATIVE_CROP = 0.5; + +// In square coordinate space +#define DEFAULT_UNCORRECTED_SCREEN_SCALE vec2(1.10585, 0.8296) +#define DEFAULT_UNCORRECTED_BEZEL_SCALE vec2(1.2050, 0.9110) + +float DEFAULT_SCREEN_ASPECT = DEFAULT_UNCORRECTED_SCREEN_SCALE.x / DEFAULT_UNCORRECTED_SCREEN_SCALE.y; +float DEFAULT_BEZEL_ASPECT = DEFAULT_UNCORRECTED_BEZEL_SCALE.x / DEFAULT_UNCORRECTED_BEZEL_SCALE.y; + +vec2 DEFAULT_SCREEN_SCALE = vec2(0); +vec2 DEFAULT_BEZEL_SCALE = vec2(0); + +#define DEFAULT_SCREEN_CORNER_RADIUS 10 + +int INFOCACHE_MAX_INDEX = 4; + +float BLEND_MODE_OFF = 0; +float BLEND_MODE_NORMAL = 1; +float BLEND_MODE_ADD = 2; +float BLEND_MODE_MULTIPLY = 3; + +float SOURCE_MATTE_PREMULTIPLIED = 0; +float SOURCE_MATTE_WHITE = 1; +float SOURCE_MATTE_NONE = 2; + +float IMAGE_ASPECT_MODE_INHERIT_ASPECT_SCALE = 0; +float IMAGE_ASPECT_MODE_KEEP_ASPECT = 1; + +float FILL_MODE_STRETCH = 0; +float FILL_MODE_SPLIT_FILL_HORIZONTAL = 1; +float FILL_MODE_SPLIT_FILL_VERTICAL = 2; + +#define RENDER_SIMPLE_MODE_NONE 0 +#define RENDER_SIMPLE_MODE_BLACK_SCREEN 1 +#define RENDER_SIMPLE_MODE_BLACK_SCREEN_AND_BG 2 +#define RENDER_SIMPLE_MODE_PINK_MASK 3 +#define RENDER_SIMPLE_MODE_BLACK_WHITE_MASK 4 + +#define RENDER_SIMPLE_MASK_TYPE_SCREEN 0 +#define RENDER_SIMPLE_MASK_TYPE_TUBE 1 +#define RENDER_SIMPLE_MASK_TYPE_BEZEL_AND_FRAME 2 +#define RENDER_SIMPLE_MASK_TYPE_BEZEL 3 +#define RENDER_SIMPLE_MASK_TYPE_FRAME 4 + +bool CACHE_INFO_PARAM_SUM_CHANGED = false; +float CURRENT_FRAME_FROM_CACHE_INFO = 0; + +float PARAMETER_SUM_SCREEN_SCALE = 0; +float PARAMETER_SUM_SCREEN_SCALE_FEEDBACK = 0; +float PARAMETER_SUM_BEZEL = 0; +float PARAMETER_SUM_BEZEL_FEEDBACK = 0; +float PARAMETER_SUM_IMAGE_LAYERS_1 = 0; +float PARAMETER_SUM_IMAGE_LAYERS_1_FEEDBACK = 0; +float PARAMETER_SUM_IMAGE_LAYERS_2 = 0; +float PARAMETER_SUM_IMAGE_LAYERS_2_FEEDBACK = 0; +float PARAMETER_SUM_IMAGE_LAYERS_3 = 0; +float PARAMETER_SUM_IMAGE_LAYERS_3_FEEDBACK = 0; +float PARAMETER_SUM_IMAGE_LAYERS_4 = 0; +float PARAMETER_SUM_IMAGE_LAYERS_4_FEEDBACK = 0; + +float SCREEN_MASK = 0; +float TUBE_MASK = 0; +float BEZEL_MASK = 0; +float INSIDE_BEZEL_MASK = 0; +float OUTSIDE_TUBE_MASK_FOR_IMAGE = 0; +float FRAME_MASK = 0; +float FRAME_MASK_FOR_IMAGE = 0; +float OUTSIDE_BEZEL_MASK = 0; +float OUTSIDE_FRAME_MASK_FOR_IMAGE = 0; +float OUTSIDE_FRAME_MASK = 0; +float CUTOUT_MASK = 0; + +float SCREEN_INDEX = 1; + +float SCREEN_ASPECT = 1; +vec2 SCREEN_SCALE = vec2(1); +vec2 SCREEN_SCALE_FEEDBACK = vec2(1); +vec2 SCREEN_POS_OFFSET = vec2(0.15); +vec2 SCREEN_POS_OFFSET_FEEDBACK = vec2(0.15); +vec2 SCREEN_SCALE_2ND_SCREEN = vec2(1); +vec2 SCREEN_SCALE_2ND_SCREEN_FEEDBACK = vec2(1); +vec2 SCREEN_POS_OFFSET_2ND_SCREEN = vec2(0.15); +vec2 SCREEN_POS_OFFSET_2ND_SCREEN_FEEDBACK = vec2(0.15); +vec2 VIEWPORT_SCALE = vec2(1); +vec2 VIEWPORT_SCALE_FEEDBACK = vec2(1); +vec2 VIEWPORT_POS = vec2(1); +vec2 VIEWPORT_POS_FEEDBACK = vec2(1); +vec2 TUBE_SCALE = vec2(1); +vec2 TUBE_SCALE_FEEDBACK = vec2(1); +vec2 BLACK_EDGE_SCALE = vec2(1); +vec2 FRAME_SCALE = vec2(1); +vec2 FRAME_SCALE_FEEDBACK = vec2(1); + +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 DECAL_SCALE = vec2(0.5); +vec2 CAB_GLASS_SCALE = vec2(0.5); +vec2 TOP_IMAGE_SCALE = vec2(0.5); + +float AVERAGE_LUMA = 0; +float USE_VERTICAL_SCANLINES = 0; + +vec2 CORE_SIZE = vec2(1); +vec2 CORE_FEEDBACK_SIZE = vec2(2); + +vec2 ROTATED_CORE_ORIGINAL_SIZE = vec2(1); +vec2 ROTATED_CORE_PREPPED_SIZE = vec2(1); +vec2 ROTATED_DEREZED_SIZE = vec2(1); + +vec2 CROPPED_ROTATED_SIZE_WITH_RES_MULT = vec2(1); +vec2 CROPPED_ROTATED_SIZE = vec2(1); +vec2 SAMPLE_AREA_START_PIXEL_COORD = vec2(1); + +vec2 VIEWPORT_UNSCALED_COORD = vec2(0.5); +vec2 SCREEN_COORD = vec2(0.5); +vec2 TUBE_COORD = vec2(0.5); +vec2 BLACK_EDGE_COORD = vec2(0.5); +vec2 BEZEL_OUTSIDE_COORD = vec2(0.5); +vec2 BACKGROUND_COORD = vec2(0.5); +vec2 DEVICE_COORD = vec2(0.5); +vec2 LED_COORD = vec2(0.5); +vec2 DECAL_COORD = vec2(0.5); +vec2 CAB_GLASS_COORD = vec2(0.5); +vec2 TOP_IMAGE_COORD = vec2(0.5); + +vec2 SCREEN_CURVED_COORD = vec2(0.5); +vec2 TUBE_CURVED_COORD = vec2(0.5); +vec2 SCREEN_BLACK_EDGE_CURVED_COORD = vec2(0.5); +vec2 BEZEL_OUTSIDE_CURVED_COORD = vec2(0.5); +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 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/HyperspaceMadness/hsm/common/hsm-helper-functions.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-helper-functions.inc new file mode 100644 index 0000000..5a28682 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-helper-functions.inc @@ -0,0 +1,280 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 HyperspaceMadness - HyperspaceMadness@outlook.com + + Texture interpolation based on "Improved texture interpolation" by Inigo Quilez + Original description: http://www.iquilezles.org/www/articles/texture/texture.htm + Expects the texture to be using linear filtering + + 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 . +*/ + +vec4 HSM_ApplyGamma(vec4 in_color, float in_gamma) +{ + vec3 out_color = pow(in_color.rgb, vec3(1 / in_gamma)); + return vec4(out_color, in_color.a); +} + +// 'Removes' encoded gamma from color to put the color in linear space +vec4 HSM_Linearize(vec4 in_color, float encoded_gamma) +{ + return HSM_ApplyGamma(in_color, 1 / encoded_gamma); +} + +// Adds gamma onto color in linear space to get a color with encoded gamma +vec4 HSM_Delinearize(vec4 in_color, float in_gamma) +{ + return HSM_ApplyGamma(in_color, in_gamma); +} + +vec3 HSM_RGBtoHSV(vec3 c) +{ + vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy); + vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx); + + float d = q.x - min(q.w, q.y); + float e = 1.0e-10; + return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); +} + +vec3 HSM_HSVtoRGB(vec3 c) +{ + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +vec3 HSM_ApplyHSVAdjustment(vec3 in_color_rgb, float in_hue, float in_saturation, float in_brightness, float in_colorize_on, float in_gamma_adjust) +{ + if (!(in_colorize_on == 1 || in_hue != 0 || in_saturation != 1 || in_brightness != 1 || in_gamma_adjust != 1)) + return in_color_rgb; + + vec3 color_hsv = HSM_RGBtoHSV(in_color_rgb); + + if (in_colorize_on > 0.5) + { + color_hsv.x = in_hue; + color_hsv.y = mix(mix(0, color_hsv.y, clamp(in_saturation, 0, 1)), 1, clamp(in_saturation - 1, 0, 1) ); + } + else + { + color_hsv.x += in_hue; + color_hsv.y *= in_saturation; + } + + color_hsv.z *= in_brightness; + + vec3 color_rgb = HSM_HSVtoRGB(color_hsv); + + if (in_gamma_adjust != 1) + color_rgb = HSM_ApplyGamma(vec4(color_rgb.r, color_rgb.g, color_rgb.b, 1), in_gamma_adjust).rgb; + + return color_rgb; +} + +vec4 HSM_GetPreMultipliedColorLinear(vec4 in_color, float matte_type, float encoded_gamma) +{ + vec4 out_color = in_color; + + if (matte_type == SOURCE_MATTE_WHITE) + out_color.rgb = clamp(out_color.rgb - (1 - out_color.a), 0, 1); + + out_color = HSM_Linearize(out_color, encoded_gamma); + + // If the color was not already premultiplied (matted with black) premultiply it now + if (matte_type == SOURCE_MATTE_NONE) + out_color.rgb *= out_color.a; + + return out_color; +} + +/* Composite one image over top another using the alpha to blend + * It is expected that the input colors have been already premultiplied + * which means their rgb has already been multiplied by their alpha */ +vec4 HSM_PreMultAlphaBlend(vec4 color_under, vec4 color_over) +{ + vec4 out_color = vec4(color_over.rgb + (color_under.rgb * (1 - color_over.a)), clamp(color_under.a + color_over.a, 0, 1)); + return out_color; +} + +vec4 HSM_BlendMultiply(vec4 color_under, vec4 color_over, float opacity) +{ + float final_opacity = color_over.a * opacity; + return vec4(color_under.rgb * (final_opacity * color_over.rgb + (1 - final_opacity) * vec3(1)), color_under.a); +} + +// Assumes Opacity is already encoded in alpha +vec4 HSM_BlendModeLayerMix(vec4 color_under, vec4 color_over, float blend_mode, float layer_opacity) +{ + if (blend_mode == 0) + return color_under; + + if (blend_mode == BLEND_MODE_OFF) + return color_under; + + color_over.a *= layer_opacity; + + vec4 out_color = vec4(0); + + if (blend_mode == BLEND_MODE_NORMAL) + { + color_over.rgb *= color_over.a; + out_color = HSM_PreMultAlphaBlend(color_under, color_over); + } + else + { + vec4 blend_color = color_under; + if (blend_mode == BLEND_MODE_ADD) blend_color.rgb = color_under.rgb + color_over.rgb ; + if (blend_mode == BLEND_MODE_MULTIPLY) blend_color.rgb = color_under.rgb * color_over.rgb ; + + out_color = vec4(clamp(mix(color_under.rgb, blend_color.rgb, color_over.a), 0, 1), color_under.a); + } + return out_color; +} + +vec4 HSM_TextureQuilez(sampler2D in_sampler_2D, vec2 in_texture_size, vec2 p) +{ + vec2 tex_size = textureSize(in_sampler_2D, 0); + p = p * in_texture_size + vec2(0.5, 0.5); + + vec2 i = floor(p); + vec2 f = p - i; + f = f * f * f * (f * (f * 6.0 - vec2(15.0, 15.0)) + vec2(10.0, 10.0)); + p = i + f; + + p = (p - vec2(0.5, 0.5)) * (1/in_texture_size); + + // final sum and weight normalization + return texture(in_sampler_2D, p); +} + +float HHLP_GetMaskCenteredOnValue(float in_value, float value_to_match, float threshold) +{ + float edge_0 = value_to_match - threshold; + float edge_1 = value_to_match - 0.5 * threshold; + float edge_2 = value_to_match + 0.5 * threshold; + float edge_3 = value_to_match + threshold; + float out_mask = 1.0; + out_mask *= smoothstep(edge_0, edge_1, in_value); + out_mask *= smoothstep(edge_3, edge_2, in_value); + return out_mask; +} + +// Quadratic Bezier allows us to have a controlled falloff between 0 and 1 +// One use is to avoid the perception of discontinuity at the outer edge experienced with a linear gradients +float HHLP_QuadraticBezier (float x, vec2 a) +{ + // Originally adapted by @kyndinfo from BEZMATH.PS (1993) by Don Lancaster + // http://www.tinaja.com/text/bezmath.html + + float epsilon = 0.00001; + a.x = clamp(a.x,0.0,1.0); + a.y = clamp(a.y,0.0,1.0); + if (a.x == 0.5){ + a += epsilon; + } + + // solve t from x (an inverse operation) + float om2a = 1.0 - 2.0 * a.x; + float t = (sqrt(a.x*a.x + om2a*x) - a.x)/om2a; + float y = (1.0-2.0*a.y)*(t*t) + (2.0*a.y)*t; + return y; +} + +float HHLP_EasePowerIn(float x, float in_exponent) +{ + x = max(0, min(x, 1)); + return pow(x, in_exponent); +} + +float HHLP_EasePowerOut(float x, float in_exponent) +{ + x = 1.0 - max(0, min(x, 1)); + return 1.0 - pow(x, in_exponent); +} + +float HHLP_EasePowerInOut(float x, float in_exponent) +{ + x = max(0, min(x, 1)); + if (x < 0.5) + { + return pow(x * 2, in_exponent) * 0.5; + } + else + { + return 1.0 - pow((1 - x) * 2, in_exponent) * 0.5; + } +} + +float HHLP_GetDistanceToLine(float x1, float y1, float a, float b, float c) +{ + float d = abs((a * x1 + b * y1 + c)) / + (sqrt(a * a + b * b)); + return d; +} + +// Returns 1 if in_value < compare_value +// Useful when ifs are bad for performance +float HHLP_IsUnderValue(float in_value, float compare_value) +{ + return clamp((compare_value - in_value) * 100000, 0, 1); +} + +// Returns 1 if in_value > compare_value +// Useful when ifs are bad for performance +float HHLP_IsOverValue(float in_value, float compare_value) +{ + return clamp(-1 * (compare_value - in_value) * 100000, 0, 1); +} + +// Returns 1 if in_value == compare_value within the epsilon value provided +// Useful when ifs are bad for performance +float HHLP_EqualsValue(float in_value, float compare_value, float epsilon) +{ + return HHLP_IsUnderValue(in_value, compare_value + epsilon) * HHLP_IsOverValue(in_value, compare_value - epsilon); +} + +float HHLP_EqualsResolution(vec2 in_res, vec2 test_res) +{ + float hardcoded_epsilon = 0.001; + return HHLP_EqualsValue(in_res.x, test_res.x, hardcoded_epsilon) * + HHLP_EqualsValue(in_res.y, test_res.y, hardcoded_epsilon); +} + +vec4 HHLP_GetBilinearTextureSample(sampler2D in_sampler, vec2 in_coord, vec4 in_size) +{ + vec2 uv = in_coord * in_size.xy - 0.5; // Shift by 0.5 since the texel sampling points are in the texel center. + vec2 a = fract(uv); + vec2 tex = (floor(uv) + 0.5) * in_size.zw; // Build a sampling point which is in the center of the texel. + + // Sample the bilinear footprint. + vec4 t0 = textureLodOffset(in_sampler, tex, 0.0, ivec2(0, 0)); + vec4 t1 = textureLodOffset(in_sampler, tex, 0.0, ivec2(1, 0)); + vec4 t2 = textureLodOffset(in_sampler, tex, 0.0, ivec2(0, 1)); + vec4 t3 = textureLodOffset(in_sampler, tex, 0.0, ivec2(1, 1)); + + // Bilinear filter. + vec4 result = mix(mix(t0, t1, a.x), mix(t2, t3, a.x), a.y); + + return result; +} + +bool HHLP_IsOutsideCoordSpace(vec2 in_coord) +{ + return (in_coord.x < -0.01 || in_coord.x > 1.01 || in_coord.y < -0.01 || in_coord.y > 1.01); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-0-screen-scale.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-0-screen-scale.inc new file mode 100644 index 0000000..47865c2 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-0-screen-scale.inc @@ -0,0 +1,802 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +// Screen Scale Required Parameters +#pragma parameter HSM_MEGA_BEZEL_TITLE "[ --- HSM MEGA BEZEL V 1.0.001 2022-06-24 Rev 1 --- ]" 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; + + +//--------------------------------------------------------------------------------------------------- +// CRT Layer +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_CRT_TITLE "[ CRT BRIGHTNESS & GAMMA ]:" 0 0 0.01 0.01 + +#pragma parameter GAMMA_INPUT " Gamma In (Game Embedded Gamma) Def 2.4" 2.4 0.1 5 0.05 +#define GAMMA_INPUT global.GAMMA_INPUT + +#pragma parameter gamma_out " Gamma Out (Electron Gun Gamma) Def 2.4" 2.4 0.1 5 0.05 +#define HSM_GAMMA_OUT_CRT global.gamma_out + +#pragma parameter post_br " Post CRT Brightness" 1 0.01 5 0.01 +#define HSM_POST_CRT_BRIGHTNESS global.post_br + +#pragma parameter post_br_affect_black_level " Post CRT Brightness Affects Grade Black Level" 100 0 100 10 +#define HSM_POST_CRT_BRIGHTNESS_AFFECT_BLACK_LEVEL global.post_br_affect_black_level / 100 + +//--------------------------------------------------------------------------------------------------- +// Global Graphics Caching +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_GLOBAL_GRAPHICS_CACHE_TITLE "[ GRAPHICS CACHE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_CACHE_GRAPHICS_ON " Cache Graphics: OFF | ON" 1 0 1 1 +float HSM_CACHE_GRAPHICS_ON = global.HSM_CACHE_GRAPHICS_ON; + +#pragma parameter HSM_CACHE_UPDATE_INDICATOR_MODE " Cache Update Indicator: OFF | ON | ONLY WHEN CACHE OFF" 2 0 2 1 +float HSM_CACHE_UPDATE_INDICATOR_MODE = global.HSM_CACHE_UPDATE_INDICATOR_MODE; + + +//--------------------------------------------------------------------------------------------------- +// Global Graphics Brightness +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_GLOBAL_GRAPHICS_BRIGHTNESS_TITLE "[ GRAPHICS GLOBAL BRIGHTNESS ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_GLOBAL_GRAPHICS_BRIGHTNESS " Graphics Brightness" 100 0 500 1 +float HSM_GLOBAL_GRAPHICS_BRIGHTNESS = global.HSM_GLOBAL_GRAPHICS_BRIGHTNESS / 100; + +#pragma parameter HSM_STATIC_LAYERS_GAMMA " Graphics Gamma Adjust" 1 0.01 5 0.01 +float HSM_STATIC_LAYERS_GAMMA = global.HSM_STATIC_LAYERS_GAMMA; + + +//--------------------------------------------------------------------------------------------------- +// NIGHT LIGHTING +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_AMBIENT_LIGHTING_TITLE "[ AMBIENT LIGHTING ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_AMBIENT_LIGHTING_OPACITY " Opacity" 0 0 100 1 +float HSM_AMBIENT_LIGHTING_OPACITY = global.HSM_AMBIENT_LIGHTING_OPACITY / 100; + +#pragma parameter HSM_AMBIENT_LIGHTING_HUE " Hue" 0 -180 180 1 +float HSM_AMBIENT_LIGHTING_HUE = global.HSM_AMBIENT_LIGHTING_HUE / 360; + +#pragma parameter HSM_AMBIENT_LIGHTING_SATURATION " Saturation" 100 0 300 1 +float HSM_AMBIENT_LIGHTING_SATURATION = global.HSM_AMBIENT_LIGHTING_SATURATION / 100; + +#pragma parameter HSM_AMBIENT_LIGHTING_VALUE " Value" 100 0 400 1 +float HSM_AMBIENT_LIGHTING_VALUE = global.HSM_AMBIENT_LIGHTING_VALUE / 100; + +#pragma parameter HSM_AMBIENT_LIGHTING_SCALE_MODE " Scale Mode - VIEW WITH ZOOM | FULL" 1 0 1 1 +float HSM_AMBIENT_LIGHTING_SCALE_MODE = global.HSM_AMBIENT_LIGHTING_SCALE_MODE; + +#pragma parameter HSM_AMBIENT_LIGHTING_SCALE " Scale Offset" 100 10 1000 1 +float HSM_AMBIENT_LIGHTING_SCALE = global.HSM_AMBIENT_LIGHTING_SCALE / 100; + +#pragma parameter HSM_AMBIENT_LIGHTING_ROTATE " Rotate" 0 0 1 1 +float HSM_AMBIENT_LIGHTING_ROTATE = global.HSM_AMBIENT_LIGHTING_ROTATE; + +#pragma parameter HSM_AMBIENT_LIGHTING_MIRROR_HORZ " Mirror Horizontal" 0 0 1 1 +float HSM_AMBIENT_LIGHTING_MIRROR_HORZ = global.HSM_AMBIENT_LIGHTING_MIRROR_HORZ; + +// Commented out because I don't think anyone is using this +// #pragma parameter HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES " Dithering Noise Samples (Reduces Banding)" 0 0 10 1 +// float HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES = global.HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES; +float HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES = 0; + + +//--------------------------------------------------------------------------------------------------- +// Zoom & Pan +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_VIEWPORT_ZOOM_TITLE "[ VIEWPORT ZOOM ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_VIEWPORT_ZOOM " Viewport Zoom" 100 10 500 0.2 +float HSM_VIEWPORT_ZOOM = global.HSM_VIEWPORT_ZOOM / 100; + +#pragma parameter HSM_VIEWPORT_ZOOM_MASK " Zoom CRT Mask" 0 0 1 1 +float HSM_VIEWPORT_ZOOM_MASK = global.HSM_VIEWPORT_ZOOM_MASK; + +#pragma parameter HSM_VIEWPORT_POSITION_X " Viewport Position X" 0 -500 500 1 +float HSM_VIEWPORT_POSITION_X = -1 * global.HSM_VIEWPORT_POSITION_X / 1000; + +#pragma parameter HSM_VIEWPORT_POSITION_Y " Viewport Position Y" 0 -500 500 1 +float HSM_VIEWPORT_POSITION_Y = -1 * global.HSM_VIEWPORT_POSITION_Y / 1000; + + +//--------------------------------------------------------------------------------------------------- +// FLIP & ROTATE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_FLIP_ROTATE_TITLE "[ FLIP & ROTATE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_FLIP_VIEWPORT_VERTICAL " Flip Viewport Vertical" 0 0 1 1 +float HSM_FLIP_VIEWPORT_VERTICAL = -(global.HSM_FLIP_VIEWPORT_VERTICAL * 2 - 1); + +#pragma parameter HSM_FLIP_VIEWPORT_HORIZONTAL " Flip Viewport Horizontal" 0 0 1 1 +float HSM_FLIP_VIEWPORT_HORIZONTAL = -(global.HSM_FLIP_VIEWPORT_HORIZONTAL * 2 - 1); + +#pragma parameter HSM_FLIP_CORE_VERTICAL " Flip Core Image Vertical" 0 0 1 1 +// float HSM_FLIP_CORE_VERTICAL = global.HSM_FLIP_CORE_VERTICAL; +float HSM_FLIP_CORE_VERTICAL = -(global.HSM_FLIP_CORE_VERTICAL * 2 - 1); + +#pragma parameter HSM_FLIP_CORE_HORIZONTAL " Flip Core Image Horizontal" 0 0 1 1 +// float HSM_FLIP_CORE_HORIZONTAL = global.HSM_FLIP_CORE_HORIZONTAL; +float HSM_FLIP_CORE_HORIZONTAL = -(global.HSM_FLIP_CORE_HORIZONTAL * 2 - 1); + +#pragma parameter HSM_ROTATE_CORE_IMAGE " Rotate CRT Tube" 0 0 1 1 +float HSM_ROTATE_CORE_IMAGE = global.HSM_ROTATE_CORE_IMAGE; + + +//--------------------------------------------------------------------------------------------------- +// ASPECT RATIO +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_ASPECT_RATIO_TITLE "[ ASPECT RATIO ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_ASPECT_RATIO_ORIENTATION " Orientation - Auto | Horizontal | Vertical" 0 0 2 1 +float HSM_ASPECT_RATIO_ORIENTATION = global.HSM_ASPECT_RATIO_ORIENTATION; + +#pragma parameter HSM_ASPECT_RATIO_MODE " Type - Auto | Explicit | 4:3 | 3:2 | 16:9 | PAR | Full" 0 0 6 1 +float HSM_ASPECT_RATIO_MODE = global.HSM_ASPECT_RATIO_MODE; + +#pragma parameter HSM_ASPECT_RATIO_EXPLICIT " Explicit Aspect Ratio (Also Auto Ratio Fallback)" 1.3333 0 8 0.002 +float HSM_ASPECT_RATIO_EXPLICIT = global.HSM_ASPECT_RATIO_EXPLICIT; + + +//--------------------------------------------------------------------------------------------------- +// SCALING +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SCALING_TITLE "[ CRT SCREEN SCALING GENERAL ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INT_SCALE_MODE " Integer Scale Mode - OFF | ShortAxis | BothAxes" 0 0 2 1 +#define HSM_INT_SCALE_MODE global.HSM_INT_SCALE_MODE + +#pragma parameter HSM_VERTICAL_PRESET " Preset is for Monitor Portrait Mode (Smaller CRT Screen)" 0 0 1 1 +float HSM_VERTICAL_PRESET = global.HSM_VERTICAL_PRESET; + + +//--------------------------------------------------------------------------------------------------- +// Integer Scale +//--------------------------------------------------------------------------------------------------- + +#pragma parameter HSM_INTEGER_SCALE_TITLE "[ INTEGER SCALE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INT_SCALE_MAX_HEIGHT " Base Integer Scale Max Height %" 89 60 140 0.5 +float HSM_INT_SCALE_MAX_HEIGHT = global.HSM_INT_SCALE_MAX_HEIGHT / 100; + +#pragma parameter HSM_INT_SCALE_MULTIPLE_OFFSET " Integer Scale Multiple Offset" 0 -20 20 1 +#define HSM_INT_SCALE_MULTIPLE_OFFSET global.HSM_INT_SCALE_MULTIPLE_OFFSET + +#pragma parameter HSM_INT_SCALE_MULTIPLE_OFFSET_LONG " Integer Scale Multiple Offset on Long Axis" 0 -20 20 1 +#define HSM_INT_SCALE_MULTIPLE_OFFSET_LONG global.HSM_INT_SCALE_MULTIPLE_OFFSET_LONG + + +//--------------------------------------------------------------------------------------------------- +// Non-Integer Scale +//--------------------------------------------------------------------------------------------------- + +#pragma parameter HSM_NON_INTEGER_SCALE_PERCENT_TITLE "[ NON-INTEGER SCALE PERCENT ]:" 0 0 0.01 0.01 + +// Non integer scale is set to 82.97 so that cores which output 224px will have integer scale by default +// This is 8x integer scale at 3840x2160 and 6x integer scale at 1920x1080 +#pragma parameter HSM_NON_INTEGER_SCALE " Non-Integer Scale %" 82.97 1 200 0.2 +float HSM_NON_INTEGER_SCALE = global.HSM_NON_INTEGER_SCALE / 100; + + +//--------------------------------------------------------------------------------------------------- +// Physical Size +//--------------------------------------------------------------------------------------------------- + +#pragma parameter HSM_PHYSICAL_SIZE_TITLE "[ NON-INTEGER - PHYSICAL SIZES ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_USE_PHYSICAL_SIZE_FOR_NON_INTEGER " Use Physical Monitor and Tube Sizes for Non-Integer" 0 0 1 1 +float HSM_USE_PHYSICAL_SIZE_FOR_NON_INTEGER = global.HSM_USE_PHYSICAL_SIZE_FOR_NON_INTEGER; + +#pragma parameter HSM_PHYSICAL_MONITOR_ASPECT_RATIO " Your Monitor's Aspect Ratio" 1.77 0.25 5 0.01 +float HSM_PHYSICAL_MONITOR_ASPECT_RATIO = global.HSM_PHYSICAL_MONITOR_ASPECT_RATIO; + +#pragma parameter HSM_PHYSICAL_MONITOR_DIAGONAL_SIZE " Your Monitor's Size (Diagonal)" 27 1 100 0.1 +float HSM_PHYSICAL_MONITOR_DIAGONAL_SIZE = global.HSM_PHYSICAL_MONITOR_DIAGONAL_SIZE; + +#pragma parameter HSM_PHYSICAL_SIM_TUBE_DIAGONAL_SIZE " Simulated Tube Size (Diagonal)" 18.1 1 100 0.1 +float HSM_PHYSICAL_SIM_TUBE_DIAGONAL_SIZE = global.HSM_PHYSICAL_SIM_TUBE_DIAGONAL_SIZE; + + +//--------------------------------------------------------------------------------------------------- +// Automatic Scale & Position +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_AUTOMATIC_SCREEN_SCALE_TITLE "[ NON-INTEGER - AUTOMATIC SCREEN SCALE & PLACEMENT ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_USE_IMAGE_FOR_PLACEMENT " Use Image For Automatic Placement (Scale and Y Pos)" 0 0 1 1 +float HSM_USE_IMAGE_FOR_PLACEMENT = global.HSM_USE_IMAGE_FOR_PLACEMENT; + +#pragma parameter HSM_PLACEMENT_IMAGE_USE_HORIZONTAL " Auto Place Horizontal (X Pos)" 0 0 1 1 +float HSM_PLACEMENT_IMAGE_USE_HORIZONTAL = global.HSM_PLACEMENT_IMAGE_USE_HORIZONTAL; + +#pragma parameter HSM_PLACEMENT_IMAGE_MODE " Placement Image Mode: TRANSPARENCY : WHITE ON BLACK" 0 0 1 1 +float HSM_PLACEMENT_IMAGE_MODE = global.HSM_PLACEMENT_IMAGE_MODE; + + +//--------------------------------------------------------------------------------------------------- +// Non Integer Scale Offset +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_NONINTEGER_SCALE_OFFSET_TITLE "[ NON-INTEGER SCALE OFFSET ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_NON_INTEGER_SCALE_OFFSET " Non-Integer Scale Offset" 100 5 400 0.1 +float HSM_NON_INTEGER_SCALE_OFFSET = global.HSM_NON_INTEGER_SCALE_OFFSET / 100; + + +//--------------------------------------------------------------------------------------------------- +// Snap to Integer Scale +//--------------------------------------------------------------------------------------------------- + +#pragma parameter HSM_SNAP_NONINTEGER_TITLE "[ SNAP NON-INTEGER TO CLOSEST INTEGER SCALE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_USE_SNAP_TO_CLOSEST_INT_SCALE " Snap to Closest Integer Scale: OFF | ON" 0 0 1 1 +float HSM_USE_SNAP_TO_CLOSEST_INT_SCALE = global.HSM_USE_SNAP_TO_CLOSEST_INT_SCALE; + +#pragma parameter HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE " Snap To Closest Integer Scale Tolerance" 20 0 300 1 +float HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE = HSM_USE_SNAP_TO_CLOSEST_INT_SCALE > 0.5 ? global.HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE / 100 : 0; + + + +//--------------------------------------------------------------------------------------------------- +// Position +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SCREEN_POSITION_TITLE "[ POSITION OFFSET ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_SCREEN_POSITION_X " Position X" 0 -1000 1000 1 +float HSM_SCREEN_POSITION_X = global.HSM_SCREEN_POSITION_X / 1000; + +#pragma parameter HSM_SCREEN_POSITION_Y " Position Y" 0 -1000 1000 1 +float HSM_SCREEN_POSITION_Y = -1 * global.HSM_SCREEN_POSITION_Y / 1000; + + +//--------------------------------------------------------------------------------------------------- +// CROPPING +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_CROPPING_TITLE "[ CROPPING CORE IMAGE ]:" 0 0 0.01 0.01 +#pragma parameter HSM_CROP_FYI "!!! FYI !!! Negative Crop is currently Disabled :(" 2 0 2 1 + +#pragma parameter HSM_CROP_MODE " Crop Mode - OFF | CROP BLACK ONLY | CROP ANY" 2 0 2 1 +float HSM_CROP_MODE = global.HSM_CROP_MODE; + +#pragma parameter HSM_CROP_PERCENT_ZOOM " Crop Zoom %" 0 -50 100 0.1 +float HSM_CROP_PERCENT_ZOOM = global.HSM_CROP_PERCENT_ZOOM / 100; + +#pragma parameter HSM_CROP_PERCENT_TOP " Crop Top %" 0 -50 100 0.1 +float HSM_CROP_PERCENT_TOP = global.HSM_CROP_PERCENT_TOP / 100; + +#pragma parameter HSM_CROP_PERCENT_BOTTOM " Crop Bottom %" 0 -50 100 0.1 +float HSM_CROP_PERCENT_BOTTOM = global.HSM_CROP_PERCENT_BOTTOM / 100; + +#pragma parameter HSM_CROP_PERCENT_LEFT " Crop Left %" 0 -50 100 0.1 +float HSM_CROP_PERCENT_LEFT = global.HSM_CROP_PERCENT_LEFT / 100; + +#pragma parameter HSM_CROP_PERCENT_RIGHT " Crop Right %" 0 -50 100 0.1 +float HSM_CROP_PERCENT_RIGHT = global.HSM_CROP_PERCENT_RIGHT / 100; + +#pragma parameter HSM_CROP_BLACK_THRESHOLD " Black Threshold for 'CROP BLACK ONLY'" 0 0 100 1 +float HSM_CROP_BLACK_THRESHOLD = global.HSM_CROP_BLACK_THRESHOLD / 100; + + +//--------------------------------------------------------------------------------------------------- +// SHADERFX +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SCALEFX_TITLE "[ --- SMOOTHING - SCALEFX - SMOOTH-ADV Presets Only ---- ]:" 0 0 0.01 0.01 +#pragma parameter HSM_SCALEFX_ON " ScaleFx ON - Must Increase Core Res Sampling" 0 0 1 1 + + +//--------------------------------------------------------------------------------------------------- +// SCANLINES +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SCANLINE_TITLE "[ SCANLINE DIRECTION ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_SCANLINE_DIRECTION " Scanline Direction - Auto | Horiz | Vert" 0 0 2 1 +float HSM_SCANLINE_DIRECTION = global.HSM_SCANLINE_DIRECTION; + + +//--------------------------------------------------------------------------------------------------- +// CORE RES SAMPLING +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SAMPLING_TITLE "[ CORE RES SAMPLING]:" 0 0 0.01 0.01 + +#pragma parameter HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR " Scanline Dir Multiplier (X-Prescale for H Scanline)" 100 25 1600 25 +float HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = global.HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR / 100; + +#pragma parameter HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR " Scanline Dir Downsample Blur" 0 0 200 1 +float HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = global.HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR / 100; + +#pragma parameter HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR " Opposite Dir Multiplier (Y Downsample for H Scanline)" 100 25 1600 25 +float HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = global.HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR / 100; + +#pragma parameter HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR " Opposite Dir Downsample Blur" 0 0 200 1 +float HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = global.HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR / 100; + + +//--------------------------------------------------------------------------------------------------- +// INTERLACING +//--------------------------------------------------------------------------------------------------- +#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 +#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 +#define HSM_INTERLACE_MODE global.HSM_INTERLACE_MODE + +#pragma parameter HSM_INTERLACE_EFFECT_SMOOTHNESS_INTERS " Interlacing Effect Smoothness" 0 0 100 10 +#define HSM_INTERLACE_EFFECT_SMOOTHNESS_INTERS global.HSM_INTERLACE_EFFECT_SMOOTHNESS_INTERS / 200 + +#pragma parameter HSM_INTERLACE_SCANLINE_EFFECT " Interlacing Scanline Effect" 20 0 100 5 +#define HSM_INTERLACE_SCANLINE_EFFECT global.HSM_INTERLACE_SCANLINE_EFFECT / 100 + +#pragma parameter iscans " Interlacing (Scanline) Saturation" 0.25 0 1 0.05 +#define iscans global.iscans + + +//--------------------------------------------------------------------------------------------------- +// FAKE SCANLINES +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_FAKE_SCANLINE_TITLE "[ FAKE SCANLINES ]" 0 0 0.01 0.01 + +#pragma parameter HSM_FAKE_SCANLINE_MODE " Show Fake Scanlines - OFF | ON | USE TRIGGER RES" 2 0 2 1 +#define HSM_FAKE_SCANLINE_MODE global.HSM_FAKE_SCANLINE_MODE + +#pragma parameter HSM_FAKE_SCANLINE_OPACITY " Opacity - Def 70" 0 0 100 5 +#define HSM_FAKE_SCANLINE_OPACITY global.HSM_FAKE_SCANLINE_OPACITY / 100 + +#pragma parameter HSM_FAKE_SCANLINE_RES_MODE " Scan Resolution Mode: AUTO (CORE RES) : EXPLICIT" 1 0 1 1 +#define HSM_FAKE_SCANLINE_RES_MODE global.HSM_FAKE_SCANLINE_RES_MODE + +#pragma parameter HSM_FAKE_SCANLINE_RES " Explicit Scan Resolution" 240 0 480 8 +#define HSM_FAKE_SCANLINE_RES global.HSM_FAKE_SCANLINE_RES + +#pragma parameter HSM_FAKE_SCANLINE_INT_SCALE " Int Scale Scanlines" 1 0 1 1 +#define HSM_FAKE_SCANLINE_INT_SCALE global.HSM_FAKE_SCANLINE_INT_SCALE + +#pragma parameter HSM_FAKE_SCANLINE_ROLL " Rolling Scanline" 0 -100 100 1 +#define HSM_FAKE_SCANLINE_ROLL global.HSM_FAKE_SCANLINE_ROLL / 100 + +#pragma parameter HSM_FAKE_SCANLINE_CURVATURE " Scanline Curvature" 0 0 100 1 +#define HSM_FAKE_SCANLINE_CURVATURE global.HSM_FAKE_SCANLINE_CURVATURE / 100 + +// #pragma parameter HSM_FAKE_SCANLINE_BRIGHTNESS_CUTOFF "[ SCREEN FX ] Fake 240p Scanline Brightness Cutoff - Def 3" 3 0 10 0.05 +#ifndef HSM_FAKE_SCANLINE_BRIGHTNESS_CUTOFF + #define HSM_FAKE_SCANLINE_BRIGHTNESS_CUTOFF 3 +#endif + + +//--------------------------------------------------------------------------------------------------- +// CURVATURE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_CURVATURE_TITLE "[ CURVATURE ]:" 0 0 0.01 0.01 + +// #pragma parameter HSM_USE_GEOM " Use Geom Curvature" 0 -1 3 1 +// float HSM_USE_GEOM = global.HSM_USE_GEOM; +float HSM_USE_GEOM = 0; + +#pragma parameter HSM_CURVATURE_MODE " Curvature Mode OFF | 2D | 2D-CYL | 3D-1 | 3D-2 | 3D CYL" 1 0 5 1 +float HSM_CURVATURE_MODE = global.HSM_CURVATURE_MODE; + +#pragma parameter HSM_CURVATURE_2D_SCALE_LONG_AXIS " 2D Curvature on Long Axis" 100 5 400 5 +#define HSM_CURVATURE_2D_SCALE_LONG_AXIS global.HSM_CURVATURE_2D_SCALE_LONG_AXIS / 100 + +#pragma parameter HSM_CURVATURE_2D_SCALE_SHORT_AXIS " 2D Curvature on Short Axis" 100 5 400 5 +#define HSM_CURVATURE_2D_SCALE_SHORT_AXIS global.HSM_CURVATURE_2D_SCALE_SHORT_AXIS / 100 + +// #pragma parameter HSM_CURVATURE_2D_SHAPE " 2D Curvature Shape" 0.25 0.05 0.60 0.05 +// #define HSM_CURVATURE_2D_SHAPE global.HSM_CURVATURE_2D_SHAPE + +#pragma parameter HSM_CURVATURE_3D_RADIUS " 3D Radius" 200 16 102400 1 +float HSM_CURVATURE_3D_RADIUS = global.HSM_CURVATURE_3D_RADIUS / 100; + +#pragma parameter HSM_CURVATURE_3D_VIEW_DIST " 3D View Distance - Def 150" 150 50 102400 5 +float HSM_CURVATURE_3D_VIEW_DIST = global.HSM_CURVATURE_3D_VIEW_DIST / 100; + +#pragma parameter HSM_CURVATURE_3D_TILT_ANGLE_X " 3D Tilt Angle X" 0 -120 120 1 +float HSM_CURVATURE_3D_TILT_ANGLE_X = global.HSM_CURVATURE_3D_TILT_ANGLE_X / 100; + +#pragma parameter HSM_CURVATURE_3D_TILT_ANGLE_Y " 3D Tilt Angle Y" 0 -120 120 1 +float HSM_CURVATURE_3D_TILT_ANGLE_Y = global.HSM_CURVATURE_3D_TILT_ANGLE_Y / 100; + +#pragma parameter HSM_CRT_CURVATURE_SCALE " CRT Curvature Scale Multiplier: 0 = Less Moire Artifacts" 100 0 100 1 +float HSM_CRT_CURVATURE_SCALE = global.HSM_CRT_CURVATURE_SCALE / 100; + + + +//--------------------------------------------------------------------------------------------------- +// ANTI-FLICKER +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_ANTI_FLICKER_TITLE "[ ANTI-FLICKER ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_ANTI_FLICKER_ON " Anti-Flicker ON" 0 0 1 1 +#define HSM_ANTI_FLICKER_ON global.HSM_ANTI_FLICKER_ON + +#pragma parameter HSM_ANTI_FLICKER_THRESHOLD " Luma Difference Threshold" 25 0 100 5 +#define HSM_ANTI_FLICKER_THRESHOLD global.HSM_ANTI_FLICKER_THRESHOLD / 100 + + +//--------------------------------------------------------------------------------------------------- +// CRT vs ORIGINAL A/B TESTING +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_CRT_AB_COMPARE_TITLE "[ A/B SPLITSCREEN COMPARE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_AB_COMPARE_SHOW_MODE " Show: CRT SHADER | ORIGINAL" 0 0 1 1 +float HSM_AB_COMPARE_SHOW_MODE = global.HSM_AB_COMPARE_SHOW_MODE; + +#pragma parameter HSM_AB_COMPARE_AREA " Compare Area: LEFT | RIGHT | TOP | BOTTOM" 0 0 3 1 +float HSM_AB_COMPARE_AREA = global.HSM_AB_COMPARE_AREA; + +#pragma parameter HSM_AB_COMPARE_SPLIT_POSITION " Splitscreen Position" 50 0 100 0.2 +float HSM_AB_COMPARE_SPLIT_POSITION = global.HSM_AB_COMPARE_SPLIT_POSITION / 100; + +#pragma parameter HSM_AB_COMPARE_FREEZE_CRT_TUBE " Freeze CRT Tube (Freeze Left, New changes on Right)" 0 0 1 1 +float HSM_AB_COMPARE_FREEZE_CRT_TUBE = global.HSM_AB_COMPARE_FREEZE_CRT_TUBE; + +#pragma parameter HSM_AB_COMPARE_FREEZE_GRAPHICS " Freeze Graphics (Freeze Left, New changes on Right)" 0 0 1 1 +float HSM_AB_COMPARE_FREEZE_GRAPHICS = global.HSM_AB_COMPARE_FREEZE_GRAPHICS; + + +//--------------------------------------------------------------------------------------------------- +// Screen Vignette +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SCREEN_VIGNETTE_TITLE "[ SCREEN VIGNETTE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_SCREEN_VIGNETTE_ON " Use Vignette" 1 0 1 1 +#define HSM_SCREEN_VIGNETTE_ON global.HSM_SCREEN_VIGNETTE_ON + +#pragma parameter HSM_SCREEN_VIGNETTE_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1 +float HSM_SCREEN_VIGNETTE_DUALSCREEN_VIS_MODE = global.HSM_SCREEN_VIGNETTE_DUALSCREEN_VIS_MODE; + +#pragma parameter HSM_SCREEN_VIGNETTE_STRENGTH " Amount (Strength)" 40 0 98 2 +#define HSM_SCREEN_VIGNETTE_STRENGTH (1 - global.HSM_SCREEN_VIGNETTE_STRENGTH / 100) * 50 + +#pragma parameter HSM_SCREEN_VIGNETTE_POWER " Corner Amount (Power)" 26 0 200 2 +#define HSM_SCREEN_VIGNETTE_POWER global.HSM_SCREEN_VIGNETTE_POWER / 100 + +#pragma parameter HSM_SCREEN_VIGNETTE_IN_REFLECTION " Amount of Vignette in Reflection" 100 0 100 1 +#define HSM_SCREEN_VIGNETTE_IN_REFLECTION global.HSM_SCREEN_VIGNETTE_IN_REFLECTION / 100 + + +//--------------------------------------------------------------------------------------------------- +// Monochrome +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_MONOCHROME_TITLE "[ MONOCHROME ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_MONOCHROME_MODE " Monochrome Color: OFF | BW | AMBER | GREEN" 0.0 0.0 3.0 1.0 +#define HSM_MONOCHROME_MODE global.HSM_MONOCHROME_MODE + +#pragma parameter HSM_MONOCHROME_BRIGHTNESS " Monochrome Brightness" 100 1 500 1 +#define HSM_MONOCHROME_BRIGHTNESS global.HSM_MONOCHROME_BRIGHTNESS / 100 + +#pragma parameter HSM_MONOCHROME_GAMMA " Monochrome Gamma" 1.0 0.1 5 0.1 +#define HSM_MONOCHROME_GAMMA global.HSM_MONOCHROME_GAMMA + +#pragma parameter HSM_MONOCHROME_HUE_OFFSET " Monochrome Hue Offset" 0 -180 180 1 +#define HSM_MONOCHROME_HUE_OFFSET (global.HSM_MONOCHROME_HUE_OFFSET / 360) + +#pragma parameter HSM_MONOCHROME_SATURATION " Monochrome Saturation" 100 -100 200 1 +#define HSM_MONOCHROME_SATURATION (global.HSM_MONOCHROME_SATURATION / 100) + +#pragma parameter HSM_MONOCHROME_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1 +float HSM_MONOCHROME_DUALSCREEN_VIS_MODE = global.HSM_MONOCHROME_DUALSCREEN_VIS_MODE; + + +//--------------------------------------------------------------------------------------------------- +// CRT Blend Over Diffuse +//--------------------------------------------------------------------------------------------------- + +#pragma parameter HSM_CRT_BLEND_TITLE "[ CRT ON TUBE DIFFUSE BLENDING ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_CRT_BLEND_MODE " CRT On Tube Diffuse Blend Mode: OFF | ADD | MULTIPLY" 1 0 2 1 +#define HSM_CRT_BLEND_MODE global.HSM_CRT_BLEND_MODE + +#pragma parameter HSM_CRT_BLEND_AMOUNT " CRT On Tube Diffuse Blend Amount" 100 0 100 1 +#define HSM_CRT_BLEND_AMOUNT global.HSM_CRT_BLEND_AMOUNT / 100 + + +//--------------------------------------------------------------------------------------------------- +// TUBE DIFFUSE COLOR +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_TITLE "[ TUBE DIFFUSE IMAGE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_TUBE_DIFFUSE_MODE " Tube Diffuse Color - BLACK | IMAGE | TRANSPARENT" 0 0 2 1 +float HSM_TUBE_DIFFUSE_MODE = global.HSM_TUBE_DIFFUSE_MODE; + +#pragma parameter HSM_TUBE_DIFFUSE_OPACITY " Opacity" 100 0 100 0.1 +float HSM_TUBE_DIFFUSE_OPACITY = global.HSM_TUBE_DIFFUSE_OPACITY / 100; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1 +float HSM_TUBE_DIFFUSE_IMAGE_DUALSCREEN_VIS_MODE = global.HSM_TUBE_DIFFUSE_IMAGE_DUALSCREEN_VIS_MODE; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_COLORIZE_ON " Colorize On" 0 0 1 1 +float HSM_TUBE_DIFFUSE_IMAGE_COLORIZE_ON = global.HSM_TUBE_DIFFUSE_IMAGE_COLORIZE_ON; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_HUE " Hue Offset" 0 0 360 1 +float HSM_TUBE_DIFFUSE_IMAGE_HUE = global.HSM_TUBE_DIFFUSE_IMAGE_HUE / 360; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_SATURATION " Saturation" 100 0 200 1 +float HSM_TUBE_DIFFUSE_IMAGE_SATURATION = global.HSM_TUBE_DIFFUSE_IMAGE_SATURATION / 100; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS " Brightness" 20 0 500 1 +float HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS = global.HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS / 100; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_GAMMA " Gamma Adjust" 1 0 5 0.01 +float HSM_TUBE_DIFFUSE_IMAGE_GAMMA = global.HSM_TUBE_DIFFUSE_IMAGE_GAMMA; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_AMBIENT_LIGHTING " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_TUBE_DIFFUSE_IMAGE_AMBIENT_LIGHTING = global.HSM_TUBE_DIFFUSE_IMAGE_AMBIENT_LIGHTING / 100; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_SCALE " Scale" 100 0 1000 1 +float HSM_TUBE_DIFFUSE_IMAGE_SCALE = global.HSM_TUBE_DIFFUSE_IMAGE_SCALE / 100; + +#pragma parameter HSM_TUBE_DIFFUSE_IMAGE_SCALE_X " 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_EMPTY_THICKNESS " Empty Tube Thickness" 0 0 6000 5 +#define HSM_TUBE_EMPTY_THICKNESS (0.7 * global.HSM_TUBE_EMPTY_THICKNESS / 100) + +#pragma parameter HSM_TUBE_EMPTY_THICKNESS_X_SCALE " Empty Tube Thicknes X Scale" 100 0 3000 1 +#define HSM_TUBE_EMPTY_THICKNESS_X_SCALE (global.HSM_TUBE_EMPTY_THICKNESS_X_SCALE / 100) + + +//--------------------------------------------------------------------------------------------------- +// TUBE SHADOW IMAGE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_TUBE_SHADOW_IMAGE_TITLE "[ TUBE SHADOW IMAGE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_TUBE_SHADOW_IMAGE_ON " Tube Shadow Image - OFF | ON" 1 0 1 1 +float HSM_TUBE_SHADOW_IMAGE_ON = global.HSM_TUBE_SHADOW_IMAGE_ON; + +#pragma parameter HSM_TUBE_SHADOW_IMAGE_OPACITY " Opacity" 60 0 100 2 +float HSM_TUBE_SHADOW_IMAGE_OPACITY = global.HSM_TUBE_SHADOW_IMAGE_OPACITY / 100; + +#pragma parameter HSM_TUBE_SHADOW_IMAGE_POS_X " Position X" 0 -500 500 0.1 +float HSM_TUBE_SHADOW_IMAGE_POS_X = global.HSM_TUBE_SHADOW_IMAGE_POS_X / 100; + +#pragma parameter HSM_TUBE_SHADOW_IMAGE_POS_Y " Position Y" 9 -500 500 0.1 +float HSM_TUBE_SHADOW_IMAGE_POS_Y = global.HSM_TUBE_SHADOW_IMAGE_POS_Y / 100; + +#pragma parameter HSM_TUBE_SHADOW_IMAGE_SCALE_X " Scale X" 122 0 1000 0.1 +float HSM_TUBE_SHADOW_IMAGE_SCALE_X = global.HSM_TUBE_SHADOW_IMAGE_SCALE_X / 100; + +#pragma parameter HSM_TUBE_SHADOW_IMAGE_SCALE_Y " Scale Y" 130 0 1000 0.1 +float HSM_TUBE_SHADOW_IMAGE_SCALE_Y = global.HSM_TUBE_SHADOW_IMAGE_SCALE_Y / 100; + +#pragma parameter HSM_TUBE_SHADOW_CURVATURE_SCALE " Curvature Scale" 300 0 2000 1 +float HSM_TUBE_SHADOW_CURVATURE_SCALE = global.HSM_TUBE_SHADOW_CURVATURE_SCALE / 100; + + +//--------------------------------------------------------------------------------------------------- +// TUBE STATIC REFLECTION +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_TITLE "[ TUBE STATIC REFLECTION IMAGE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_ON " Use Tube Static Reflection Image - OFF | ON" 0 0 1 1 +float HSM_TUBE_STATIC_REFLECTION_IMAGE_ON = global.HSM_TUBE_STATIC_REFLECTION_IMAGE_ON; + +#pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1 +float HSM_TUBE_STATIC_REFLECTION_IMAGE_DUALSCREEN_VIS_MODE = global.HSM_TUBE_STATIC_REFLECTION_IMAGE_DUALSCREEN_VIS_MODE; + +#pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY " Opacity" 10 0 100 0.1 +float HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY = global.HSM_TUBE_STATIC_REFLECTION_IMAGE_OPACITY / 100; + +#pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING = global.HSM_TUBE_STATIC_REFLECTION_IMAGE_AMBIENT_LIGHTING / 100; + +#pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_SCALE " Scale" 110 0 1000 1 +float HSM_TUBE_STATIC_REFLECTION_IMAGE_SCALE = global.HSM_TUBE_STATIC_REFLECTION_IMAGE_SCALE / 100; + +// #pragma parameter HSM_TUBE_STATIC_REFLECTION_IMAGE_DITHERING_SAMPLES "[ TUBE IMAGES ] Tube Static Reflection Noise Samples (Reduces Banding)" 0 0 10 1 +// float HSM_TUBE_STATIC_REFLECTION_IMAGE_DITHERING_SAMPLES = global.HSM_TUBE_STATIC_REFLECTION_IMAGE_DITHERING_SAMPLES; + + +//--------------------------------------------------------------------------------------------------- +// TUBE COLORED GEL +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_TUBE_IMAGES_TITLE "[ TUBE COLORED GEL IMAGE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_ON " Use Tube Colored Gel - OFF | ON" 0 0 1 1 +float HSM_TUBE_COLORED_GEL_IMAGE_ON = global.HSM_TUBE_COLORED_GEL_IMAGE_ON; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_DUALSCREEN_VIS_MODE " Dual Screen Visibility - BOTH | SCREEN 1 | SCREEN 2" 0 0 2 1 +float HSM_TUBE_COLORED_GEL_IMAGE_DUALSCREEN_VIS_MODE = global.HSM_TUBE_COLORED_GEL_IMAGE_DUALSCREEN_VIS_MODE; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_MULTIPLY_AMOUNT " Multiply Blend Amount" 90 0 100 1 +float HSM_TUBE_COLORED_GEL_IMAGE_MULTIPLY_AMOUNT = global.HSM_TUBE_COLORED_GEL_IMAGE_MULTIPLY_AMOUNT / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_ADDITIVE_AMOUNT " Additive Blend Amount" 0 0 100 0.05 +float HSM_TUBE_COLORED_GEL_IMAGE_ADDITIVE_AMOUNT = global.HSM_TUBE_COLORED_GEL_IMAGE_ADDITIVE_AMOUNT / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT " Normal Blend Amount" 15 0 100 1 +float HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT = global.HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_BRIGHTNESS " Normal Blend Brightness" 100 0 200 1 +float HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_BRIGHTNESS = global.HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_BRIGHTNESS / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_TRANSPARENCY_THRESHOLD " Normal Blend Transparency Threshold" 23 0 100 1 +float HSM_TUBE_COLORED_GEL_IMAGE_TRANSPARENCY_THRESHOLD = global.HSM_TUBE_COLORED_GEL_IMAGE_TRANSPARENCY_THRESHOLD / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING = global.HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_SCALE " Scale" 100 0 1000 1 +float HSM_TUBE_COLORED_GEL_IMAGE_SCALE = global.HSM_TUBE_COLORED_GEL_IMAGE_SCALE / 100; + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_FLIP_HORIZONTAL " Flip Horizontal" 0 0 1 1 +float HSM_TUBE_COLORED_GEL_IMAGE_FLIP_HORIZONTAL = -(global.HSM_TUBE_COLORED_GEL_IMAGE_FLIP_HORIZONTAL * 2 - 1); + +#pragma parameter HSM_TUBE_COLORED_GEL_IMAGE_FLIP_VERTICAL " Flip Vertical" 0 0 1 1 +float HSM_TUBE_COLORED_GEL_IMAGE_FLIP_VERTICAL = -(global.HSM_TUBE_COLORED_GEL_IMAGE_FLIP_VERTICAL * 2 - 1); + +#pragma parameter HSM_SHOW_CRT_ON_TOP_OF_COLORED_GEL " Show CRT on Top of Colored Gel Normal" 0 0 1 1 +float HSM_SHOW_CRT_ON_TOP_OF_COLORED_GEL = global.HSM_SHOW_CRT_ON_TOP_OF_COLORED_GEL; + + +//--------------------------------------------------------------------------------------------------- +// SCREEN BLACK EDGE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_SCREEN_EDGE_TITLE "[ SCREEN BLACK EDGE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_TUBE_BLACK_EDGE_LAYERING_MODE " Show Black Edge: OFF | OVER DIFFUSE & GEL" 1 0 1 1 +float HSM_TUBE_BLACK_EDGE_LAYERING_MODE = global.HSM_TUBE_BLACK_EDGE_LAYERING_MODE; + +#pragma parameter HSM_GLOBAL_CORNER_RADIUS " Global Corner Radius - Def 10" 10 4 500 2 +#define HSM_GLOBAL_CORNER_RADIUS global.HSM_GLOBAL_CORNER_RADIUS + +#pragma parameter HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE " Black Edge Corner Radius Scale" 100 100 8000 10 +#define HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE global.HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE / 100 + +#pragma parameter HSM_TUBE_BLACK_EDGE_SHARPNESS " Black Edge Sharpness - Def 70" 70 0 90 1 +#define HSM_TUBE_BLACK_EDGE_SHARPNESS global.HSM_TUBE_BLACK_EDGE_SHARPNESS / 100 + +#pragma parameter HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE " Black Edge Curvature Scale Multiplier" 100 100 8000 10 +#define HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE global.HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE / 100 + +#pragma parameter HSM_TUBE_BLACK_EDGE_THICKNESS " Black Edge Thickness" 100 -800 6000 5 +#define HSM_TUBE_BLACK_EDGE_THICKNESS (0.7 * global.HSM_TUBE_BLACK_EDGE_THICKNESS / 100) + +#pragma parameter HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE " Black Edge Thickness X Scale" 100 0 3000 10 +#define HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE (global.HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE / 100) + + +//--------------------------------------------------------------------------------------------------- +// DUAL SCREEN +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_DUALSCREEN_TITLE "[ DUAL SCREEN ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_DUALSCREEN_MODE " Dual Screen Mode - OFF | VERTICAL | HORIZONTAL" 0 0 2 1 +float HSM_DUALSCREEN_MODE = global.HSM_DUALSCREEN_MODE; + +#pragma parameter HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE " Core Image Split Mode - AUTO | VERTICAL | HORIZONTAL" 1 0 2 1 +float HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE = global.HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE; + +#pragma parameter HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS " Core Image Swap Screen Content" 0 0 1 1 +float HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS = global.HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS; + +#pragma parameter HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET " Core Image Split Offset" 0 -100 100 1 +float HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET = global.HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET / 1000; + +// #pragma parameter HSM_2ND_SCREEN_SIDES_CROP " Crop % from Edges of 2nd Screen" 0 0 100 0.1 +// float HSM_2ND_SCREEN_SIDES_CROP = global.HSM_2ND_SCREEN_SIDES_CROP / 100; + +#pragma parameter HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION " Viewport Split Offset" 0 -500 500 1 +float HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION = global.HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION / 1000; + +#pragma parameter HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE " Scale Screens from Center of Split" 1 0 1 1 +float HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE = global.HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE; + +#pragma parameter HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS " Position Offset Between Screens" 0 -250 250 0.2 +float HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS = global.HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS / 1000; + +#pragma parameter HSM_2ND_SCREEN_ASPECT_RATIO_MODE " 2nd Screen Aspect Ratio Mode - Same as 1st Screen | PAR" 0 0 1 1 +float HSM_2ND_SCREEN_ASPECT_RATIO_MODE = global.HSM_2ND_SCREEN_ASPECT_RATIO_MODE; + +#pragma parameter HSM_2ND_SCREEN_INDEPENDENT_SCALE " 2nd Screen Use Independent Scale" 0 0 1 1 +float HSM_2ND_SCREEN_INDEPENDENT_SCALE = global.HSM_2ND_SCREEN_INDEPENDENT_SCALE; + +#pragma parameter HSM_2ND_SCREEN_SCALE_OFFSET " 2nd Screen Scale Offset" 100 1 500 0.5 +float HSM_2ND_SCREEN_SCALE_OFFSET = global.HSM_2ND_SCREEN_SCALE_OFFSET / 100; + +#pragma parameter HSM_2ND_SCREEN_POS_X " 2nd Screen Pos X" 0 -500 500 1 +float HSM_2ND_SCREEN_POS_X = global.HSM_2ND_SCREEN_POS_X / 1000; + +#pragma parameter HSM_2ND_SCREEN_POS_Y " 2nd Screen Pos Y" 0 -500 500 1 +float HSM_2ND_SCREEN_POS_Y = global.HSM_2ND_SCREEN_POS_Y / 1000; + +#pragma parameter HSM_2ND_SCREEN_CROP_PERCENT_ZOOM " 2nd Screen Crop Zoom %" 0 -10 100 0.1 +float HSM_2ND_SCREEN_CROP_PERCENT_ZOOM = global.HSM_2ND_SCREEN_CROP_PERCENT_ZOOM / 100; + +#pragma parameter HSM_2ND_SCREEN_CROP_PERCENT_TOP " 2nd Screen Crop Top %" 0 -10 100 0.1 +float HSM_2ND_SCREEN_CROP_PERCENT_TOP = global.HSM_2ND_SCREEN_CROP_PERCENT_TOP / 100; + +#pragma parameter HSM_2ND_SCREEN_CROP_PERCENT_BOTTOM " 2nd Screen Crop Bottom %" 0 -10 100 0.1 +float HSM_2ND_SCREEN_CROP_PERCENT_BOTTOM = global.HSM_2ND_SCREEN_CROP_PERCENT_BOTTOM / 100; + +#pragma parameter HSM_2ND_SCREEN_CROP_PERCENT_LEFT " 2nd Screen Crop Left %" 0 -10 100 0.1 +float HSM_2ND_SCREEN_CROP_PERCENT_LEFT = global.HSM_2ND_SCREEN_CROP_PERCENT_LEFT / 100; + +#pragma parameter HSM_2ND_SCREEN_CROP_PERCENT_RIGHT " 2nd Screen Crop Right %" 0 -10 100 0.1 +float HSM_2ND_SCREEN_CROP_PERCENT_RIGHT = global.HSM_2ND_SCREEN_CROP_PERCENT_RIGHT / 100; + + +//--------------------------------------------------------------------------------------------------- +// Reflection Transform +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_REFLECTIONAPPEARANCE_TITLE "[ REFLECTION POSITION & SCALE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_SCREEN_REFLECTION_SCALE " Screen Reflection Scale" 100 1 300 1 +float HSM_SCREEN_REFLECTION_SCALE = global.HSM_SCREEN_REFLECTION_SCALE / 100; + +#pragma parameter HSM_SCREEN_REFLECTION_POS_X " Screen Reflection Pos X" 0 -100 100 1 +float HSM_SCREEN_REFLECTION_POS_X = global.HSM_SCREEN_REFLECTION_POS_X / 600; + +#pragma parameter HSM_SCREEN_REFLECTION_POS_Y " Screen Reflection Pos Y" 0 -100 100 1 +float HSM_SCREEN_REFLECTION_POS_Y = global.HSM_SCREEN_REFLECTION_POS_Y / 600; + + +//--------------------------------------------------------------------------------------------------- +// BEZEL INDEPENDENT SCALE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_BEZEL_INDEPENDENT_TITLE "[ BEZEL INDEPENDENT SCALE & CURVATURE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_BZL_USE_INDEPENDENT_SCALE " Use Independent Scale" 0 0 1 1 +#define HSM_BZL_USE_INDEPENDENT_SCALE global.HSM_BZL_USE_INDEPENDENT_SCALE + +#pragma parameter HSM_BZL_INDEPENDENT_SCALE " Independent Scale (When scale from image is not used)" 82.97 1 200 0.1 +#define HSM_BZL_INDEPENDENT_SCALE global.HSM_BZL_INDEPENDENT_SCALE / 100 + +#pragma parameter HSM_BZL_USE_INDEPENDENT_CURVATURE " Use Independent Curvature" 0 0 1 1 +#define HSM_BZL_USE_INDEPENDENT_CURVATURE global.HSM_BZL_USE_INDEPENDENT_CURVATURE + +#pragma parameter HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS " Independent Curvature X" 100 0 400 5 +#define HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS global.HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS / 100 + +#pragma parameter HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS " Independent Curvature Y" 100 0 400 5 +#define HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS global.HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS / 100 + + +//--------------------------------------------------------------------------------------------------- +// BEZEL GENERAL +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_BEZEL_GENERAL_TITLE "[ BEZEL GENERAL ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_BZL_OPACITY " Opacity" 100 0 100 5 +float HSM_BZL_OPACITY = global.HSM_BZL_OPACITY / 100; + +#pragma parameter HSM_BZL_BLEND_MODE " Blend Mode - Off | Normal | Add | Mult" 1 0 3 1 +float HSM_BZL_BLEND_MODE = global.HSM_BZL_BLEND_MODE; + +#pragma parameter HSM_BZL_WIDTH " Width - Def 125" 125 -250 5000 1 +float HSM_BZL_WIDTH = global.HSM_BZL_WIDTH * 0.0008624; + +#pragma parameter HSM_BZL_HEIGHT " Height" 100 -250 5000 1 +float HSM_BZL_HEIGHT = global.HSM_BZL_HEIGHT * 0.0008732; + +#pragma parameter HSM_BZL_SCALE_OFFSET " Scale Offset" 100 1 200 0.1 +#define HSM_BZL_SCALE_OFFSET global.HSM_BZL_SCALE_OFFSET / 100 + +#pragma parameter HSM_BZL_INNER_CURVATURE_SCALE " Inner Curvature Scale Multiplier" 100 0 8000 10 +#define HSM_BZL_INNER_CURVATURE_SCALE global.HSM_BZL_INNER_CURVATURE_SCALE / 100 + +#pragma parameter HSM_BZL_INNER_CORNER_RADIUS_SCALE " Inner Corner Radius Scale - Def 80" 80 0 8000 1 +float HSM_BZL_INNER_CORNER_RADIUS_SCALE = global.HSM_BZL_INNER_CORNER_RADIUS_SCALE / 100; diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-1-potato-only.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-1-potato-only.inc new file mode 100644 index 0000000..3f23581 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-1-potato-only.inc @@ -0,0 +1,43 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +#pragma parameter HSM_CRT_SCREEN_BLEND_MODE " CRT POTATO Blend Mode - OFF | NORMAL | ADD (Backdrop)" 1 0 2 1 +float HSM_CRT_SCREEN_BLEND_MODE = global.HSM_CRT_SCREEN_BLEND_MODE; + +//--------------------------------------------------------------------------------------------------- +// BASIC BACKGROUND IMAGE LAYER +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_BASIC_BG_IMG_TITLE "[ POTATO BACKGROUND IMAGE LAYER ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_BG_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 -1 3 1 +float HSM_BG_BLEND_MODE = global.HSM_BG_BLEND_MODE; + +#pragma parameter HSM_BG_OPACITY " Opacity" 100 0 100 0.1 +float HSM_BG_OPACITY = global.HSM_BG_OPACITY / 100; + +#pragma parameter HSM_BG_BRIGHTNESS " Brightness" 100 0 200 1 +float HSM_BG_BRIGHTNESS = global.HSM_BG_BRIGHTNESS / 100; + +#pragma parameter HSM_POTATO_SHOW_BG_OVER_SCREEN " Show BG: 0:UNDER SCREEN | 1:OVER SCREEN" 1 0 1 1 +float HSM_POTATO_SHOW_BG_OVER_SCREEN = global.HSM_POTATO_SHOW_BG_OVER_SCREEN; \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-2-bezel.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-2-bezel.inc new file mode 100644 index 0000000..0ee89a8 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-2-bezel.inc @@ -0,0 +1,173 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +//--------------------------------------------------------------------------------------------------- +// BEZEL +//--------------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------------- +// GENERATED BEZEL & FRAME +//--------------------------------------------------------------------------------------------------- +// #pragma parameter HSM_BZL_TITLE "-----[ GENERATED BEZEL & FRAME ]-------------------------------" 0 0 0 1 + +#define HAS_BEZEL_PARAMS + +#pragma parameter HSM_BZL_INNER_EDGE_THICKNESS " Inner Edge Thickness" 110 0 700 10 +float HSM_BZL_INNER_EDGE_THICKNESS = global.HSM_BZL_INNER_EDGE_THICKNESS * 0.00007; + +#pragma parameter HSM_BZL_INNER_EDGE_SHARPNESS " Inner Edge Sharpness - Def 95" 95 0 90 5 +float HSM_BZL_INNER_EDGE_SHARPNESS = global.HSM_BZL_INNER_EDGE_SHARPNESS / 100; + +#pragma parameter HSM_BZL_OUTER_POSITION_Y " Outer Edge Position Y" 0 -500 500 1 +float HSM_BZL_OUTER_POSITION_Y = global.HSM_BZL_OUTER_POSITION_Y / 2000; + +#pragma parameter HSM_BZL_OUTER_CURVATURE_SCALE " Outer Curvature Scale" 0 0 500 5 +float HSM_BZL_OUTER_CURVATURE_SCALE = global.HSM_BZL_OUTER_CURVATURE_SCALE / 100; + +#pragma parameter HSM_BZL_OUTER_CORNER_RADIUS_SCALE " Outer Corner Radius Scale - Def 60" 60 0 4000 1 +float HSM_BZL_OUTER_CORNER_RADIUS_SCALE = 0.9 * global.HSM_BZL_OUTER_CORNER_RADIUS_SCALE / 100; + +#pragma parameter HSM_BZL_BRIGHTNESS " Brightness - Def 30" 30 0 300 2 +float HSM_BZL_BRIGHTNESS = global.HSM_BZL_BRIGHTNESS / 100; + +#pragma parameter HSM_BZL_HIGHLIGHT " Highlight" 1 0 100 0.2 +float HSM_BZL_HIGHLIGHT = global.HSM_BZL_HIGHLIGHT / 100; + +#pragma parameter HSM_BZL_INNER_EDGE_SHADOW " Opacity of Shadow from Bezel on Tube" 70 0 200 5 +float HSM_BZL_INNER_EDGE_SHADOW = global.HSM_BZL_INNER_EDGE_SHADOW / 100; + + +//--------------------------------------------------------------------------------------------------- +// Bezel Color +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_BEZEL_COLOR_TITLE "[ BEZEL COLOR ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_BZL_COLOR_HUE " Hue" 0 0 360 1 +float HSM_BZL_COLOR_HUE = global.HSM_BZL_COLOR_HUE / 360; + +#pragma parameter HSM_BZL_COLOR_SATURATION " Saturation" 0 0 100 1 +float HSM_BZL_COLOR_SATURATION = global.HSM_BZL_COLOR_SATURATION / 100; + +#pragma parameter HSM_BZL_COLOR_VALUE " Value/Brightness - Def 10" 10 0 100 0.2 +float HSM_BZL_COLOR_VALUE = global.HSM_BZL_COLOR_VALUE / 100; + +#pragma parameter HSM_BZL_NOISE " Noise - Def 30" 30 0 100 1 +float HSM_BZL_NOISE = global.HSM_BZL_NOISE / 100; + +#pragma parameter HSM_BZL_AMBIENT_LIGHTING_MULTIPLIER " Bezel Ambient Lighting Multiplier" 100 0 100 1 +float HSM_BZL_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_BZL_AMBIENT_LIGHTING_MULTIPLIER / 100; + +//--------------------------------------------------------------------------------------------------- +// Frame Color +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_FRM_COLOR_TITLE "[ FRAME COLOR ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_FRM_USE_INDEPENDENT_COLOR " Use Inependent Frame Color" 0 0 1 1 +float HSM_FRM_USE_INDEPENDENT_COLOR = global.HSM_FRM_USE_INDEPENDENT_COLOR; + +#pragma parameter HSM_FRM_COLOR_HUE " Hue" 0 0 360 1 +float HSM_FRM_COLOR_HUE = global.HSM_FRM_COLOR_HUE / 360; + +#pragma parameter HSM_FRM_COLOR_SATURATION " Saturation" 0 0 100 1 +float HSM_FRM_COLOR_SATURATION = global.HSM_FRM_COLOR_SATURATION / 100; + +#pragma parameter HSM_FRM_COLOR_VALUE " Value/Brightness - Def 10" 10 0 100 0.2 +float HSM_FRM_COLOR_VALUE = global.HSM_FRM_COLOR_VALUE / 100; + +#pragma parameter HSM_FRM_NOISE " Noise - Def 30" 30 0 100 1 +float HSM_FRM_NOISE = global.HSM_FRM_NOISE / 100; + +//--------------------------------------------------------------------------------------------------- +// FRAME +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_FRAME_TITLE "[ FRAME GENERAL ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_FRM_OPACITY " Opacity" 100 0 100 5 +float HSM_FRM_OPACITY = global.HSM_FRM_OPACITY / 100; + +// #pragma parameter HSM_FRM_BLEND_MODE " Blend Mode - Off | Normal | Add | Mult" 1 0 3 1 +// float HSM_FRM_BLEND_MODE = global.HSM_FRM_BLEND_MODE; + +float HSM_FRM_BLEND_MODE = 1; + +#pragma parameter HSM_FRM_TEXTURE_OPACITY " Texture Overlay Opacity (Highlight)" 1.5 0 100 0.1 +float HSM_FRM_TEXTURE_OPACITY = global.HSM_FRM_TEXTURE_OPACITY / 100; + +#pragma parameter HSM_FRM_TEXTURE_BLEND_MODE " Texture Overlay Blend Mode - Off | Normal | Add | Mult" 2 0 3 1 +float HSM_FRM_TEXTURE_BLEND_MODE = global.HSM_FRM_TEXTURE_BLEND_MODE; + +#pragma parameter HSM_FRM_INNER_EDGE_THICKNESS " Inner Edge Thickness" 100 0 5000 5 +float HSM_FRM_INNER_EDGE_THICKNESS = global.HSM_FRM_INNER_EDGE_THICKNESS * 0.00003; + +#pragma parameter HSM_FRM_THICKNESS " Frame Thickness" 100 0 2000 5 +float HSM_FRM_THICKNESS = global.HSM_FRM_THICKNESS * 0.0007; + +#pragma parameter HSM_FRM_THICKNESS_SCALE_X " Frame Thickness Scale X" 100 0 1000 2 +float HSM_FRM_THICKNESS_SCALE_X = global.HSM_FRM_THICKNESS_SCALE_X / 100; + +#pragma parameter HSM_FRM_OUTER_POS_Y " Frame Outer Pos Y" 0 -100 100 0.05 +float HSM_FRM_OUTER_POS_Y = global.HSM_FRM_OUTER_POS_Y / 100; + +#pragma parameter HSM_FRM_OUTER_CURVATURE_SCALE " Frame Outer Curvature Scale" 0 0 500 5 +float HSM_FRM_OUTER_CURVATURE_SCALE = global.HSM_FRM_OUTER_CURVATURE_SCALE / 100; + +// TODO how this is being used is strange +#pragma parameter HSM_FRM_OUTER_CORNER_RADIUS " Outer Corner Radius" 5 0 70 0.05 +float HSM_FRM_OUTER_CORNER_RADIUS = global.HSM_FRM_OUTER_CORNER_RADIUS; + +#pragma parameter HSM_FRM_OUTER_EDGE_THICKNESS " Outer Edge Thickness" 100 0 1000 10 +float HSM_FRM_OUTER_EDGE_THICKNESS = global.HSM_FRM_OUTER_EDGE_THICKNESS * 0.00006; + +#pragma parameter HSM_FRM_OUTER_EDGE_SHADING " Outer Edge Shading" 50 0 100 5 +float HSM_FRM_OUTER_EDGE_SHADING = global.HSM_FRM_OUTER_EDGE_SHADING / 100; + +#pragma parameter HSM_FRM_SHADOW_OPACITY " Shadow Opacity" 100 0 300 1 +float HSM_FRM_SHADOW_OPACITY = global.HSM_FRM_SHADOW_OPACITY / 100; + +#pragma parameter HSM_FRM_SHADOW_WIDTH " Shadow Width" 100 0 500 1 +float HSM_FRM_SHADOW_WIDTH = global.HSM_FRM_SHADOW_WIDTH / 1000; + + +#pragma parameter HSM_REFLECT_CORNER_TITLE "[ CORNER CREASE - ALSO CONTROLS REFLECTION]:" 0 0 0.01 0.01 + +// TODO how this is being used is strange +#pragma parameter HSM_REFLECT_CORNER_FADE " Corner Fade" 10 1 100 0.5 +float HSM_REFLECT_CORNER_FADE = global.HSM_REFLECT_CORNER_FADE / 100; + +#pragma parameter HSM_REFLECT_CORNER_FADE_DISTANCE " Corner Fade Distance" 100 1 100 1 +float HSM_REFLECT_CORNER_FADE_DISTANCE = global.HSM_REFLECT_CORNER_FADE_DISTANCE / 100; + +#pragma parameter HSM_REFLECT_CORNER_INNER_SPREAD " Corner Inner Spread" 500 0 1000 10 +float HSM_REFLECT_CORNER_INNER_SPREAD = global.HSM_REFLECT_CORNER_INNER_SPREAD / 100; + +#pragma parameter HSM_REFLECT_CORNER_OUTER_SPREAD " Corner Outer Spread" 160 0 1000 10 +float HSM_REFLECT_CORNER_OUTER_SPREAD = global.HSM_REFLECT_CORNER_OUTER_SPREAD / 100; + +#pragma parameter HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP " Corner Rotation Offset Top" 0 -90 90 0.5 +float HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP = global.HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP; + +#pragma parameter HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM " Corner Rotation Offset Bottom" 0 -90 90 0.5 +float HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM = global.HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM; + +#pragma parameter HSM_REFLECT_CORNER_SPREAD_FALLOFF " Corner Spread Falloff" 100 1 200 1 +float HSM_REFLECT_CORNER_SPREAD_FALLOFF = global.HSM_REFLECT_CORNER_SPREAD_FALLOFF; diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-2-reflection.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-2-reflection.inc new file mode 100644 index 0000000..64f57be --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-2-reflection.inc @@ -0,0 +1,137 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +//--------------------------------------------------------------------------------------------------- +// REFLECTION +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_REFLECTION_TITLE "[ REFLECTION ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_REFLECT_GLOBAL_AMOUNT " Global Amount" 40 0 1000 1 +float HSM_REFLECT_GLOBAL_AMOUNT = global.HSM_REFLECT_GLOBAL_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_GLOBAL_GAMMA_ADJUST " Global Gamma Adjust" 1.2 0.25 3 0.05 +float HSM_REFLECT_GLOBAL_GAMMA_ADJUST = global.HSM_REFLECT_GLOBAL_GAMMA_ADJUST; + +#pragma parameter HSM_REFLECT_DIRECT_AMOUNT " Direct Reflection" 150 0 300 2 +float HSM_REFLECT_DIRECT_AMOUNT = global.HSM_REFLECT_DIRECT_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_DIFFUSED_AMOUNT " Diffused Reflection" 50 0 300 2 +float HSM_REFLECT_DIFFUSED_AMOUNT = global.HSM_REFLECT_DIFFUSED_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_FULLSCREEN_GLOW " FullScreen Glow" 75 0 600 0.5 +float HSM_REFLECT_FULLSCREEN_GLOW = global.HSM_REFLECT_FULLSCREEN_GLOW / 100; + +#pragma parameter HSM_REFLECT_FULLSCREEN_GLOW_GAMMA " FullScreen Glow Gamma" 3 0 5 0.02 +float HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = global.HSM_REFLECT_FULLSCREEN_GLOW_GAMMA; + +#pragma parameter HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT " Bezel Inner Edge Amount" 130 0 300 2 +float HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = global.HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW " Bezel Inner Edge Fullscreen Glow" 40 0 1000 1 +float HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = global.HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW / 100; + +#pragma parameter HSM_REFLECT_FRAME_INNER_EDGE_AMOUNT " Frame Inner Edge Amount" 50 0 300 2 +float HSM_REFLECT_FRAME_INNER_EDGE_AMOUNT = global.HSM_REFLECT_FRAME_INNER_EDGE_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_FRAME_INNER_EDGE_SHARPNESS " Frame Inner Edge Sharpness" 90 0 90 2 +float HSM_REFLECT_FRAME_INNER_EDGE_SHARPNESS = global.HSM_REFLECT_FRAME_INNER_EDGE_SHARPNESS / 100; + + +//--------------------------------------------------------------------------------------------------- +// Reflection Fading +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_REFLECTION_FADE_TITLE "[ REFLECTION FADE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_REFLECT_FADE_AMOUNT " Fade Amount" 100 0 100 5 +float HSM_REFLECT_FADE_AMOUNT = global.HSM_REFLECT_FADE_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_RADIAL_FADE_WIDTH " Radial Fade Width" 100 0 1000 1 +float HSM_REFLECT_RADIAL_FADE_WIDTH = global.HSM_REFLECT_RADIAL_FADE_WIDTH / 350; + +#pragma parameter HSM_REFLECT_RADIAL_FADE_HEIGHT " Radial Fade Height" 100 0 1000 1 +float HSM_REFLECT_RADIAL_FADE_HEIGHT = global.HSM_REFLECT_RADIAL_FADE_HEIGHT / 350; + +#pragma parameter HSM_REFLECT_LATERAL_OUTER_FADE_POSITION " Lateral Outer Fade Position" -18 -500 500 0.5 +float HSM_REFLECT_LATERAL_OUTER_FADE_POSITION = global.HSM_REFLECT_LATERAL_OUTER_FADE_POSITION / -1000; + +#pragma parameter HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE " Lateral Outer Fade Distance" 20 1 400 0.5 +float HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE = global.HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE / 100; + + +//--------------------------------------------------------------------------------------------------- +// Reflection Blur +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_REFLECT_BLUR_TITLE "[ REFLECTION BLUR ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_REFLECT_BLUR_NUM_SAMPLES " Blur Samples - 0 for OFF" 12 0 40 1 +float HSM_REFLECT_BLUR_NUM_SAMPLES = global.HSM_REFLECT_BLUR_NUM_SAMPLES; + +#pragma parameter HSM_REFLECT_BLUR_MIN " Min Blur" 0 0 100 1 +float HSM_REFLECT_BLUR_MIN = global.HSM_REFLECT_BLUR_MIN / 100; + +#pragma parameter HSM_REFLECT_BLUR_MAX " Max Blur" 95 0 100 1 +float HSM_REFLECT_BLUR_MAX = global.HSM_REFLECT_BLUR_MAX / 100; + +#pragma parameter HSM_REFLECT_BLUR_FALLOFF_DISTANCE " Falloff Distance" 100 0 1000 1 +float HSM_REFLECT_BLUR_FALLOFF_DISTANCE = global.HSM_REFLECT_BLUR_FALLOFF_DISTANCE / 100; + +// float HSM_REFLECT_BLUR_FALLOFF_DISTANCE = 1; + +// Reflection Noise +#pragma parameter HSM_REFLECT_NOISE_TITLE "[ REFLECTION NOISE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_REFLECT_NOISE_AMOUNT " Noise Amount" 50 0 100 1 +float HSM_REFLECT_NOISE_AMOUNT = global.HSM_REFLECT_NOISE_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_NOISE_SAMPLES " Noise Samples (0 for OFF)" 1 0 20 1 +float HSM_REFLECT_NOISE_SAMPLES = global.HSM_REFLECT_NOISE_SAMPLES; + +#pragma parameter HSM_REFLECT_NOISE_SAMPLE_DISTANCE " Sample Distance" 100 0 500 5 +float HSM_REFLECT_NOISE_SAMPLE_DISTANCE = global.HSM_REFLECT_NOISE_SAMPLE_DISTANCE / 500; + +//TODO Reflection Mask is disabled at the moment because it really needs the layer scaling sof it can follow the device or other layers +// Reflection Mask +// #pragma parameter HSM_REFLECT_MASK_TITLE "[ REFLECTION MASK IMAGE ]:" 0 0 0.01 0.01 + +// #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_GLASS_BORDER_ON " Glass Border ON (For Glass Preset)" 0 0 1 1 +float HSM_GLASS_BORDER_ON = global.HSM_GLASS_BORDER_ON; + +#pragma parameter HSM_REFLECT_VIGNETTE_AMOUNT " Glass Reflection Vignette" 0 0 100 0.5 +float HSM_REFLECT_VIGNETTE_AMOUNT = global.HSM_REFLECT_VIGNETTE_AMOUNT / 100; + +#pragma parameter HSM_REFLECT_VIGNETTE_SIZE " Glass Reflection Vignette Size" 100 50 200 2 +float HSM_REFLECT_VIGNETTE_SIZE = global.HSM_REFLECT_VIGNETTE_SIZE / 100; + + +/////////////// CONSTANT TUNING SETTINGS /////////////// + +// #ifndef HSM_REFLECT_CORNER_SPREAD_FALLOFF +// #define HSM_REFLECT_CORNER_SPREAD_FALLOFF 100 +// #endif \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-3-glass-only.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-3-glass-only.inc new file mode 100644 index 0000000..ffd3036 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-3-glass-only.inc @@ -0,0 +1,34 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +//--------------------------------------------------------------------------------------------------- +// STANDARD BACKGROUND IMAGE LAYER +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_BG_IMG_TITLE "[ GLASS BACKGROUND IMAGE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_BG_OPACITY " Opacity" 100 0 100 0.1 +float HSM_BG_OPACITY = global.HSM_BG_OPACITY / 100; + +#pragma parameter HSM_BG_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 -1 3 1 +float HSM_BG_BLEND_MODE = global.HSM_BG_BLEND_MODE; diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-4-image-layers.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-4-image-layers.inc new file mode 100644 index 0000000..66713a9 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-4-image-layers.inc @@ -0,0 +1,580 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +#define HAS_IMAGE_LAYER_PARAMS + +//--------------------------------------------------------------------------------------------------- +// IMAGE LAYERING START +//--------------------------------------------------------------------------------------------------- +#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 +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 +float HSM_LED_LAYER_ORDER = global.HSM_LED_LAYER_ORDER; + +#pragma parameter HSM_DEVICE_LAYER_ORDER " Device Image" 3 0 12 1 +float HSM_DEVICE_LAYER_ORDER = global.HSM_DEVICE_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 +float HSM_DECAL_LAYER_ORDER = global.HSM_DECAL_LAYER_ORDER; + +#pragma parameter HSM_CAB_GLASS_LAYER_ORDER " Cabinet Glass Image" 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 +float HSM_TOP_LAYER_ORDER = global.HSM_TOP_LAYER_ORDER; + + +//--------------------------------------------------------------------------------------------------- +// CutOut in Image Layers +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_CUTOUT_TITLE "[ CUTOUT ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_CUTOUT_ASPECT_MODE " Cutout Aspect- FULL | EXPL. | 4:3 | 3:4 | 16:9 | 9:16" 4 0 5 1 +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_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_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | KEEP ASPECT" 1 0 1 1 +float HSM_CUTOUT_KEEP_ASPECT = global.HSM_CUTOUT_KEEP_ASPECT; + +#pragma parameter HSM_CUTOUT_SCALE " Scale" 100 -100 200 0.1 +float HSM_CUTOUT_SCALE = global.HSM_CUTOUT_SCALE / 100; + +#pragma parameter HSM_CUTOUT_SCALE_X " Scale X" 100 -100 200 0.1 +float HSM_CUTOUT_SCALE_X = global.HSM_CUTOUT_SCALE_X / 100; + +#pragma parameter HSM_CUTOUT_POS_X " Position XY" 0 -100 200 0.05 +float HSM_CUTOUT_POS_X = global.HSM_CUTOUT_POS_X / -100; + +#pragma parameter HSM_CUTOUT_POS_Y " Position Y" 0 -100 200 0.05 +float HSM_CUTOUT_POS_Y = global.HSM_CUTOUT_POS_Y / 100; + +#pragma parameter HSM_CUTOUT_CORNER_RADIUS " Corner Radius - Def 0" 0 0 70 1 +float HSM_CUTOUT_CORNER_RADIUS = global.HSM_CUTOUT_CORNER_RADIUS; + + +//--------------------------------------------------------------------------------------------------- +// MASK DEBUG +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_MASK_DEBUG_TITLE "[ MASK DEBUG ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_LAYERING_DEBUG_MASK_MODE " Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" -1 -2 8 1 +float HSM_LAYERING_DEBUG_MASK_MODE = global.HSM_LAYERING_DEBUG_MASK_MODE; + +//--------------------------------------------------------------------------------------------------- +// BG IMAGE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_BACKGROUND_TITLE "[ BACKGROUND LAYER ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_BG_OPACITY " Opacity" 100 0 100 0.1 +float HSM_BG_OPACITY = global.HSM_BG_OPACITY / 100; + +#pragma parameter HSM_BG_COLORIZE_ON " Colorize On" 0 0 1 1 +float HSM_BG_COLORIZE_ON = global.HSM_BG_COLORIZE_ON; + +#pragma parameter HSM_BG_HUE " Hue Offset" 0 0 360 1 +float HSM_BG_HUE = global.HSM_BG_HUE / 360; + +#pragma parameter HSM_BG_SATURATION " Saturation" 100 0 200 1 +float HSM_BG_SATURATION = global.HSM_BG_SATURATION / 100; + +#pragma parameter HSM_BG_BRIGHTNESS " Brightness" 100 0 200 1 +float HSM_BG_BRIGHTNESS = global.HSM_BG_BRIGHTNESS / 100; + +#pragma parameter HSM_BG_GAMMA " Gamma Adjust" 1 0 5 0.01 +float HSM_BG_GAMMA = global.HSM_BG_GAMMA; + +#pragma parameter HSM_BG_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_BG_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_BG_AMBIENT_LIGHTING_MULTIPLIER / 100; + +#pragma parameter HSM_BG_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1 +float HSM_BG_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_BG_APPLY_AMBIENT_IN_ADD_MODE; + +#pragma parameter HSM_BG_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 -1 3 1 +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_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; + +#pragma parameter HSM_BG_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1 +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_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_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | 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 +float HSM_BG_FILL_MODE = global.HSM_BG_FILL_MODE; + +#pragma parameter HSM_BG_SCALE " Scale" 100 0 1000 0.1 +float HSM_BG_SCALE = global.HSM_BG_SCALE / 100; + +#pragma parameter HSM_BG_SCALE_X " Scale X" 100 0 1000 0.1 +float HSM_BG_SCALE_X = global.HSM_BG_SCALE_X / 100; + +#pragma parameter HSM_BG_POS_X " Position X" 0 -1000 1000 0.05 +float HSM_BG_POS_X = global.HSM_BG_POS_X / -100; + +#pragma parameter HSM_BG_POS_Y " Position Y" 0 -1000 1000 0.05 +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 +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_VIEWPORT_VIGNETTE_TITLE "[ VIEWPORT VIGNETTE LAYER ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_VIEWPORT_VIGNETTE_OPACITY " Opacity" 0 0 100 2 +float HSM_VIEWPORT_VIGNETTE_OPACITY = global.HSM_VIEWPORT_VIGNETTE_OPACITY / 100; + +#pragma parameter HSM_VIEWPORT_VIGNETTE_MASK_MODE "Mask - ALL | SCRN | TUBE | BZ- | BZ | BZ+ | FRM | FRM+ | BG" 5 0 8 1 +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_SCALE " Scale" 100 0 1000 0.1 +float HSM_VIEWPORT_VIGNETTE_SCALE = global.HSM_VIEWPORT_VIGNETTE_SCALE / 100; + +#pragma parameter HSM_VIEWPORT_VIGNETTE_SCALE_X " Scale X" 100 0 1000 0.1 +float HSM_VIEWPORT_VIGNETTE_SCALE_X = global.HSM_VIEWPORT_VIGNETTE_SCALE_X / 100; + +#pragma parameter HSM_VIEWPORT_VIGNETTE_POS_X " Position X" 0 -1000 1000 0.05 +float HSM_VIEWPORT_VIGNETTE_POS_X = global.HSM_VIEWPORT_VIGNETTE_POS_X / -100; + +#pragma parameter HSM_VIEWPORT_VIGNETTE_POS_Y " Position Y" 0 -1000 1000 0.05 +float HSM_VIEWPORT_VIGNETTE_POS_Y = global.HSM_VIEWPORT_VIGNETTE_POS_Y / 100; + + +//--------------------------------------------------------------------------------------------------- +// LED IMAGE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_LED_TITLE "[ LED LAYER ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_LED_OPACITY " Opacity" 100 0 100 1 +float HSM_LED_OPACITY = global.HSM_LED_OPACITY / 100; + +#pragma parameter HSM_LED_COLORIZE_ON " Colorize" 0 0 1 1 +float HSM_LED_COLORIZE_ON = global.HSM_LED_COLORIZE_ON; + +#pragma parameter HSM_LED_HUE " Hue Offset" 0 0 360 1 +float HSM_LED_HUE = global.HSM_LED_HUE / 360; + +#pragma parameter HSM_LED_SATURATION " Saturation" 100 0 200 1 +float HSM_LED_SATURATION = global.HSM_LED_SATURATION / 100; + +#pragma parameter HSM_LED_BRIGHTNESS " Brightness" 100 0 200 1 +float HSM_LED_BRIGHTNESS = global.HSM_LED_BRIGHTNESS / 100; + +#pragma parameter HSM_LED_GAMMA " Gamma Adjust" 1 0 5 0.01 +float HSM_LED_GAMMA = global.HSM_LED_GAMMA; + +#pragma parameter HSM_LED_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_LED_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_LED_AMBIENT_LIGHTING_MULTIPLIER / 100; + +#pragma parameter HSM_LED_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1 +float HSM_LED_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_LED_APPLY_AMBIENT_IN_ADD_MODE; + +#pragma parameter HSM_LED_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 2 0 3 1 +float HSM_LED_BLEND_MODE = global.HSM_LED_BLEND_MODE; + +#pragma parameter HSM_LED_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1 +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_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_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_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | 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 +float HSM_LED_FILL_MODE = global.HSM_LED_FILL_MODE; + +#pragma parameter HSM_LED_SCALE " Scale" 100 0 1000 0.1 +float HSM_LED_SCALE = global.HSM_LED_SCALE / 100; + +#pragma parameter HSM_LED_SCALE_X " Scale X" 100 0 1000 0.1 +float HSM_LED_SCALE_X = global.HSM_LED_SCALE_X / 100; + +#pragma parameter HSM_LED_POS_X " Position X" 0 -1000 1000 0.05 +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 +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_DEVICE_TITLE "[ DEVICE IMAGE LAYER ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_DEVICE_OPACITY " Opacity" 100 0 100 1 +float HSM_DEVICE_OPACITY = global.HSM_DEVICE_OPACITY / 100; + +#pragma parameter HSM_DEVICE_COLORIZE_ON " Colorize" 0 0 1 1 +float HSM_DEVICE_COLORIZE_ON = global.HSM_DEVICE_COLORIZE_ON; + +#pragma parameter HSM_DEVICE_HUE " Hue Offset" 0 0 360 1 +float HSM_DEVICE_HUE = global.HSM_DEVICE_HUE / 360; + +#pragma parameter HSM_DEVICE_SATURATION " Saturation" 100 0 200 1 +float HSM_DEVICE_SATURATION = global.HSM_DEVICE_SATURATION / 100; + +#pragma parameter HSM_DEVICE_BRIGHTNESS " Brightness" 100 0 200 1 +float HSM_DEVICE_BRIGHTNESS = global.HSM_DEVICE_BRIGHTNESS / 100; + +#pragma parameter HSM_DEVICE_GAMMA " Gamma Adjust" 1 0 5 0.01 +float HSM_DEVICE_GAMMA = global.HSM_DEVICE_GAMMA; + +#pragma parameter HSM_DEVICE_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_DEVICE_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_DEVICE_AMBIENT_LIGHTING_MULTIPLIER / 100; + +#pragma parameter HSM_DEVICE_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1 +float HSM_DEVICE_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_DEVICE_APPLY_AMBIENT_IN_ADD_MODE; + +#pragma parameter HSM_DEVICE_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 0 3 1 +float HSM_DEVICE_BLEND_MODE = global.HSM_DEVICE_BLEND_MODE; + +#pragma parameter HSM_DEVICE_SOURCE_MATTE_TYPE " Source Matte Color - BLACK | WHITE | NONE" 0 0 2 1 +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_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_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_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_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | 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_SCALE " Scale" 100 0 1000 0.1 +float HSM_DEVICE_SCALE = global.HSM_DEVICE_SCALE / 100; + +#pragma parameter HSM_DEVICE_SCALE_X " Scale X" 100 0 1000 0.1 +float HSM_DEVICE_SCALE_X = global.HSM_DEVICE_SCALE_X / 100; + +#pragma parameter HSM_DEVICE_POS_X " Position X" 0 -1000 1000 0.05 +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; + + + +//--------------------------------------------------------------------------------------------------- +// DECAL IMAGE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_DECAL_TITLE "[ DECAL LAYER ]:" 0 0 0.01 0.01 + +#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 +float HSM_DECAL_COLORIZE_ON = global.HSM_DECAL_COLORIZE_ON; + +#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 +float HSM_DECAL_SATURATION = global.HSM_DECAL_SATURATION / 100; + +#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 +float HSM_DECAL_GAMMA = global.HSM_DECAL_GAMMA; + +#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_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 +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_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; + +#pragma parameter HSM_DECAL_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1 +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_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_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | 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 +float HSM_DECAL_FILL_MODE = global.HSM_DECAL_FILL_MODE; + +#pragma parameter HSM_DECAL_SCALE " Scale" 100 1 500 0.1 +float HSM_DECAL_SCALE = global.HSM_DECAL_SCALE / 100; + +#pragma parameter HSM_DECAL_SCALE_X " Scale X" 100 50 500 0.1 +float HSM_DECAL_SCALE_X = global.HSM_DECAL_SCALE_X / 100; + +#pragma parameter HSM_DECAL_POS_X " Position X" 0 -1000 1000 0.05 +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_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 +float HSM_CAB_GLASS_COLORIZE_ON = global.HSM_CAB_GLASS_COLORIZE_ON; + +#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 +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 +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 +float HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER / 100; + +#pragma parameter HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1 +float HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE; + +#pragma parameter HSM_CAB_GLASS_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 0 3 1 +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_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; + +#pragma parameter HSM_CAB_GLASS_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1 +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_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_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | 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 +float HSM_CAB_GLASS_FILL_MODE = global.HSM_CAB_GLASS_FILL_MODE; + +#pragma parameter HSM_CAB_GLASS_SCALE " Scale" 100 10 500 0.1 +float HSM_CAB_GLASS_SCALE = global.HSM_CAB_GLASS_SCALE / 100; + +#pragma parameter HSM_CAB_GLASS_SCALE_X " Scale X" 100 0 500 0.1 +float HSM_CAB_GLASS_SCALE_X = global.HSM_CAB_GLASS_SCALE_X / 100; + +#pragma parameter HSM_CAB_GLASS_POS_X " Position X" 0 -1000 1000 0.05 +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 +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_TOP_TITLE "[ TOP EXTRA LAYER ]:" 0 0 0.01 0.01 + +#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 +float HSM_TOP_COLORIZE_ON = global.HSM_TOP_COLORIZE_ON; + +#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 +float HSM_TOP_SATURATION = global.HSM_TOP_SATURATION / 100; + +#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 +float HSM_TOP_GAMMA = global.HSM_TOP_GAMMA; + +#pragma parameter HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER " Ambient Lighting Multiplier" 100 0 100 1 +float HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER = global.HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER / 100; + +#pragma parameter HSM_TOP_APPLY_AMBIENT_IN_ADD_MODE " Apply Ambient Lighting in ADD Blend Mode" 0 0 1 1 +float HSM_TOP_APPLY_AMBIENT_IN_ADD_MODE = global.HSM_TOP_APPLY_AMBIENT_IN_ADD_MODE; + +#pragma parameter HSM_TOP_BLEND_MODE " Blend Mode - OFF | NORMAL | ADD | MULTIPLY" 1 0 3 1 +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_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; + +#pragma parameter HSM_TOP_CUTOUT_MODE " Cutout Mask - OFF | ON | INVERT" 0 0 2 1 +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_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_SCALE_KEEP_ASPECT " Scale Aspect - INHERIT FROM SCALE MODE | 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 +float HSM_TOP_FILL_MODE = global.HSM_TOP_FILL_MODE; + +#pragma parameter HSM_TOP_SCALE " Scale" 100 0 1000 0.1 +float HSM_TOP_SCALE = global.HSM_TOP_SCALE / 100; + +#pragma parameter HSM_TOP_SCALE_X " Scale X" 100 0 1000 0.1 +float HSM_TOP_SCALE_X = global.HSM_TOP_SCALE_X / 100; + +#pragma parameter HSM_TOP_POS_X " Position X" 0 -1000 1000 0.05 +float HSM_TOP_POS_X = global.HSM_TOP_POS_X / -100; + +#pragma parameter HSM_TOP_POS_Y " Position Y" 0 -1000 1000 0.05 +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; + + +#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 +float HSM_RENDER_SIMPLE_MODE = global.HSM_RENDER_SIMPLE_MODE; + +#pragma parameter HSM_RENDER_SIMPLE_MASK_TYPE " Mask Type: SCREEN | TUBE | BEZEL & FRAME | BEZEL | FRAME" 0 0 4 1 +float HSM_RENDER_SIMPLE_MASK_TYPE = global.HSM_RENDER_SIMPLE_MASK_TYPE; diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-5-intro.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-5-intro.inc new file mode 100644 index 0000000..cd94352 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-params-5-intro.inc @@ -0,0 +1,120 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +//--------------------------------------------------------------------------------------------------- +// INTRO IMAGE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_INTRO_IMAGE_TITLE "[ INTRO SEQUENCE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INTRO_WHEN_TO_SHOW " When to Show Intro - OFF|Game Load|Shader Load|Repeat" 1 0 3 1 +#define HSM_INTRO_WHEN_TO_SHOW global.HSM_INTRO_WHEN_TO_SHOW + +#pragma parameter HSM_INTRO_SPEED " Speed" 100 1 500 5 +#define HSM_INTRO_SPEED (global.HSM_INTRO_SPEED / 100) + + +#pragma parameter HSM_INTRO_LOGO_TITLE "[ INTRO LOGO ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INTRO_LOGO_BLEND_MODE " Logo Blend Mode - OFF | NORM | ADD | MULT" 1 0 3 1 +#define HSM_INTRO_LOGO_BLEND_MODE global.HSM_INTRO_LOGO_BLEND_MODE + +// #pragma parameter HSM_INTRO_LOGO_FLIP_VERTICAL " Logo Flip Vertical" 0 0 1 1 +// #define HSM_INTRO_LOGO_FLIP_VERTICAL global.HSM_INTRO_LOGO_FLIP_VERTICAL + +#pragma parameter HSM_INTRO_LOGO_OVER_SOLID_COLOR " Logo Over Solid Color - Off | ON" 1 0 1 1 +#define HSM_INTRO_LOGO_OVER_SOLID_COLOR global.HSM_INTRO_LOGO_OVER_SOLID_COLOR + +#pragma parameter HSM_INTRO_LOGO_HEIGHT " Logo Height (0 for exact resolution)" 42.86 0 100 1 +#define HSM_INTRO_LOGO_HEIGHT (global.HSM_INTRO_LOGO_HEIGHT / 100) + +#pragma parameter HSM_INTRO_LOGO_PLACEMENT " Logo Placement - Middle | TL | TR | BL | BR" 0 0 4 1 +#define HSM_INTRO_LOGO_PLACEMENT global.HSM_INTRO_LOGO_PLACEMENT + +#pragma parameter HSM_INTRO_LOGO_POS_X " Logo Pos X" 0 -100 100 0.5 +#define HSM_INTRO_LOGO_POS_X global.HSM_INTRO_LOGO_POS_X / 100 + +#pragma parameter HSM_INTRO_LOGO_POS_Y " Logo Pos Y" 2 -100 100 0.5 +#define HSM_INTRO_LOGO_POS_Y global.HSM_INTRO_LOGO_POS_Y / 100 + +// #pragma parameter HSM_INTRO_LOGO_WAIT " Logo Wait Before Start Frames" 20 0 1200 5 +// #define HSM_INTRO_LOGO_WAIT global.HSM_INTRO_LOGO_WAIT +#define HSM_INTRO_LOGO_WAIT 20 + +// #pragma parameter HSM_INTRO_LOGO_FADE_IN " Logo Fade In Frames" 20 0 600 5 +// #define HSM_INTRO_LOGO_FADE_IN global.HSM_INTRO_LOGO_FADE_IN +#define HSM_INTRO_LOGO_FADE_IN 20 + +// #pragma parameter HSM_INTRO_LOGO_HOLD " Logo Hold Frames" 130 0 600 5 +// #define HSM_INTRO_LOGO_HOLD global.HSM_INTRO_LOGO_HOLD +#define HSM_INTRO_LOGO_HOLD 130 + +// #pragma parameter HSM_INTRO_LOGO_FADE_OUT " Logo Fade Out Frames" 80 0 600 5 +// #define HSM_INTRO_LOGO_FADE_OUT global.HSM_INTRO_LOGO_FADE_OUT +#define HSM_INTRO_LOGO_FADE_OUT 80 + + +#pragma parameter HSM_INTRO_LOGO_SOLID_TITLE "[ INTRO SOLID COLOR ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INTRO_SOLID_COLOR_BLEND_MODE " Solid Color Blend Mode - OFF | NORM | ADD | MULT" 1 0 3 1 +#define HSM_INTRO_SOLID_COLOR_BLEND_MODE global.HSM_INTRO_SOLID_COLOR_BLEND_MODE + +#pragma parameter HSM_INTRO_SOLID_COLOR_HUE " Solid Color Hue" 0 0 360 1 +#define HSM_INTRO_SOLID_COLOR_HUE (global.HSM_INTRO_SOLID_COLOR_HUE / 360) + +#pragma parameter HSM_INTRO_SOLID_COLOR_SAT " Solid Color Saturation" 0 0 100 5 +#define HSM_INTRO_SOLID_COLOR_SAT (global.HSM_INTRO_SOLID_COLOR_SAT / 100) + +#pragma parameter HSM_INTRO_SOLID_COLOR_VALUE " Solid Color Value" 100 0 100 5 +#define HSM_INTRO_SOLID_COLOR_VALUE (global.HSM_INTRO_SOLID_COLOR_VALUE / 100) + +// #pragma parameter HSM_INTRO_SOLID_COLOR_HOLD " Solid Color Hold Frames" 40 0 600 5 +// #define HSM_INTRO_SOLID_COLOR_HOLD global.HSM_INTRO_SOLID_COLOR_HOLD +#define HSM_INTRO_SOLID_COLOR_HOLD 40 + +// #pragma parameter HSM_INTRO_SOLID_COLOR_FADE_OUT " Solid Color Fade Out Frames" 40 0 600 5 +// #define HSM_INTRO_SOLID_COLOR_FADE_OUT global.HSM_INTRO_SOLID_COLOR_FADE_OUT +#define HSM_INTRO_SOLID_COLOR_FADE_OUT 40 + + +#pragma parameter HSM_INTRO_NOISE_TITLE "[ INTRO STATIC NOISE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INTRO_NOISE_BLEND_MODE " Static Noise Blend Mode - OFF | NORM | ADD | MULT" 1 0 3 1 +#define HSM_INTRO_NOISE_BLEND_MODE global.HSM_INTRO_NOISE_BLEND_MODE + +// #pragma parameter HSM_INTRO_NOISE_HOLD " Static Noise Hold Frames" 80 0 600 5 +// #define HSM_INTRO_NOISE_HOLD global.HSM_INTRO_NOISE_HOLD +#define HSM_INTRO_NOISE_HOLD 80 + +// #pragma parameter HSM_INTRO_NOISE_FADE_OUT " Static Noise Fade Out Frames" 120 0 600 5 +// #define HSM_INTRO_NOISE_FADE_OUT global.HSM_INTRO_NOISE_FADE_OUT +#define HSM_INTRO_NOISE_FADE_OUT 120 + +#pragma parameter HSM_INTRO_SOLID_BLACK_TITLE "[ INTRO SOLID BLACK ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_INTRO_SOLID_BLACK_HOLD " Solid Black Hold Frames" 0 0 600 5 +#define HSM_INTRO_SOLID_BLACK_HOLD global.HSM_INTRO_SOLID_BLACK_HOLD + +// #pragma parameter HSM_INTRO_SOLID_BLACK_FADE_OUT " Solid Black Fade Out Frames" 0 0 600 5 +// #define HSM_INTRO_SOLID_BLACK_FADE_OUT global.HSM_INTRO_SOLID_BLACK_FADE_OUT +#define HSM_INTRO_SOLID_BLACK_FADE_OUT 0 \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-royale-geometry-functions.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-royale-geometry-functions.inc new file mode 100644 index 0000000..6e4af4f --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/common/hsm-royale-geometry-functions.inc @@ -0,0 +1,812 @@ +///////////////////////////// GPL LICENSE NOTICE ///////////////////////////// + +// hsm-royale-geometry-functions, extracted from crt-royale +// crt-royale: A full-featured CRT shader, with cheese. +// GPL & Copyright (C) 2014 TroggleMonkey + + +//////////////////////////// MACROS AND CONSTANTS //////////////////////////// + +// Curvature-related constants: +#define HRG_MAX_POINT_CLOUD_SIZE 9 + +///////////////////////////// CURVATURE FUNCTIONS ///////////////////////////// + +vec2 hrg_quadratic_solve(float a, float b_over_2, float c) +{ + // Requires: 1.) a, b, and c are quadratic formula coefficients + // 2.) b_over_2 = b/2.0 (simplifies terms to factor 2 out) + // 3.) b_over_2 must be guaranteed < 0 (avoids a branch) + // Returns: Returns vec2(first_solution, discriminant), so the caller + // can choose how to handle the "no intersection" case. The + // Kahan or Citardauq formula is used for numerical robustness. + float discriminant = b_over_2 * b_over_2 - a * c; + float solution0 = c / (-b_over_2 + sqrt(discriminant)); + return vec2(solution0, discriminant); +} + +vec2 hrg_intersect_sphere(vec3 view_vec, vec3 eye_pos_vec, float in_geom_radius) +{ + // Requires: 1.) view_vec and eye_pos_vec are 3D vectors in the sphere's + // local coordinate frame (eye_pos_vec is a position, i.e. + // a vector from the origin to the eye/camera) + // 2.) in_geom_radius is a global containing the sphere's radius + // Returns: Cast a ray of direction view_vec from eye_pos_vec at a + // sphere of radius in_geom_radius, and return the distance to + // the first intersection in units of length(view_vec). + // http://wiki.cgsociety.org/index.php/Ray_Sphere_Intersection + // Quadratic formula coefficients (b_over_2 is guaranteed negative): + float a = dot(view_vec, view_vec); + float b_over_2 = dot(view_vec, eye_pos_vec); // * 2.0 factored out + float c = dot(eye_pos_vec, eye_pos_vec) - in_geom_radius * in_geom_radius; + return hrg_quadratic_solve(a, b_over_2, c); +} + +vec2 hrg_intersect_cylinder(vec3 view_vec, vec3 eye_pos_vec, float in_geom_radius) +{ + // Requires: 1.) view_vec and eye_pos_vec are 3D vectors in the sphere's + // local coordinate frame (eye_pos_vec is a position, i.e. + // a vector from the origin to the eye/camera) + // 2.) in_geom_radius is a global containing the cylinder's radius + // Returns: Cast a ray of direction view_vec from eye_pos_vec at a + // cylinder of radius in_geom_radius, and return the distance to + // the first intersection in units of length(view_vec). The + // derivation of the coefficients is in Christer Ericson's + // Real-Time Collision Detection, p. 195-196, and this version + // uses LaGrange's identity to reduce operations. + // Arbitrary "cylinder top" reference point for an infinite cylinder: + vec3 cylinder_top_vec = vec3(0, in_geom_radius, 0); + vec3 cylinder_axis_vec = vec3(0, 1, 0);//vec3(0, 2.0*in_geom_radius, 0); + vec3 top_to_eye_vec = eye_pos_vec - cylinder_top_vec; + vec3 axis_x_view = cross(cylinder_axis_vec, view_vec); + vec3 axis_x_top_to_eye = cross(cylinder_axis_vec, top_to_eye_vec); + // Quadratic formula coefficients (b_over_2 is guaranteed negative): + float a = dot(axis_x_view, axis_x_view); + float b_over_2 = dot(axis_x_top_to_eye, axis_x_view); + float c = dot(axis_x_top_to_eye, axis_x_top_to_eye) - in_geom_radius * in_geom_radius; //*dot(cylinder_axis_vec, cylinder_axis_vec); + return hrg_quadratic_solve(a, b_over_2, c); +} + +vec2 hrg_cylinder_xyz_to_uv( vec3 intersection_pos_local, vec2 output_aspect, float in_geom_radius) +{ + // Requires: An xyz intersection position on a cylinder. + // Returns: video_uv coords mapped to range [-0.5, 0.5] + // Mapping: Define square_uv.x to be the signed arc length in xz-space, + // and define square_uv.y = -intersection_pos_local.y (+v = -y). + // Start with a numerically robust arc length calculation. + float angle_from_image_center = atan(intersection_pos_local.x, intersection_pos_local.z); + float signed_arc_len = angle_from_image_center * in_geom_radius; + // Get a uv-mapping where [-0.5, 0.5] maps to a "square" area, then divide + // by the aspect ratio to stretch the mapping appropriately: + vec2 square_uv = vec2(signed_arc_len, -intersection_pos_local.y); + vec2 video_uv = square_uv / output_aspect; + return video_uv; +} + +vec3 hrg_cylinder_uv_to_xyz(vec2 video_uv, vec2 output_aspect, float in_geom_radius) +{ + // Requires: video_uv coords mapped to range [-0.5, 0.5] + // Returns: An xyz intersection position on a cylinder. This is the + // inverse of hrg_cylinder_xyz_to_uv(). + // Expand video_uv by the aspect ratio to get proportionate x/y lengths, + // then calculate an xyz position for the cylindrical mapping above. + vec2 square_uv = video_uv * output_aspect; + float arc_len = square_uv.x; + float angle_from_image_center = arc_len / in_geom_radius; + float x_pos = sin(angle_from_image_center) * in_geom_radius; + float z_pos = cos(angle_from_image_center) * in_geom_radius; + // Or: z = sqrt(in_geom_radius**2 - x**2) + // Or: z = in_geom_radius/sqrt(1 + tan(angle)**2), x = z * tan(angle) + vec3 intersection_pos_local = vec3(x_pos, -square_uv.y, z_pos); + return intersection_pos_local; +} + +vec2 hrg_sphere_xyz_to_uv(vec3 intersection_pos_local, vec2 output_aspect, float in_geom_radius) +{ + // Requires: An xyz intersection position on a sphere. + // Returns: video_uv coords mapped to range [-0.5, 0.5] + // Mapping: First define square_uv.x/square_uv.y == + // intersection_pos_local.x/intersection_pos_local.y. Then, + // length(square_uv) is the arc length from the image center + // at (0, 0, in_geom_radius) along the tangent great circle. + // Credit for this mapping goes to cgwg: I never managed to + // understand his code, but he told me his mapping was based on + // great circle distances when I asked him about it, which + // informed this very similar (almost identical) mapping. + // Start with a numerically robust arc length calculation between the ray- + // sphere intersection point and the image center using a method posted by + // Roger Stafford on comp.soft-sys.matlab: + // https://groups.google.com/d/msg/comp.soft-sys.matlab/zNbUui3bjcA/c0HV_bHSx9cJ + vec3 image_center_pos_local = vec3(0, 0, in_geom_radius); + float cp_len = + length(cross(intersection_pos_local, image_center_pos_local)); + float dp = dot(intersection_pos_local, image_center_pos_local); + float angle_from_image_center = atan(cp_len, dp); + float arc_len = angle_from_image_center * in_geom_radius; + // Get a uv-mapping where [-0.5, 0.5] maps to a "square" area, then divide + // by the aspect ratio to stretch the mapping appropriately: + vec2 square_uv_unit = normalize(vec2(intersection_pos_local.x, -intersection_pos_local.y)); + vec2 square_uv = arc_len * square_uv_unit; + vec2 video_uv = square_uv / output_aspect; + return video_uv; +} + +vec3 hrg_sphere_uv_to_xyz(vec2 video_uv, vec2 output_aspect, float in_geom_radius) +{ + // Requires: video_uv coords mapped to range [-0.5, 0.5] + // Returns: An xyz intersection position on a sphere. This is the + // inverse of hrg_sphere_xyz_to_uv(). + // Expand video_uv by the aspect ratio to get proportionate x/y lengths, + // then calculate an xyz position for the spherical mapping above. + vec2 square_uv = video_uv * output_aspect; + // Using length or sqrt here butchers the framerate on my 8800GTS if + // this function is called too many times, and so does taking the max + // component of square_uv/square_uv_unit (program length threshold?). + //float arc_len = length(square_uv); + vec2 square_uv_unit = normalize(square_uv); + float arc_len = square_uv.y/square_uv_unit.y; + float angle_from_image_center = arc_len / in_geom_radius; + float xy_dist_from_sphere_center = sin(angle_from_image_center) * in_geom_radius; + //vec2 xy_pos = xy_dist_from_sphere_center * (square_uv/FIX_ZERO(arc_len)); + vec2 xy_pos = xy_dist_from_sphere_center * square_uv_unit; + float z_pos = cos(angle_from_image_center) * in_geom_radius; + vec3 intersection_pos_local = vec3(xy_pos.x, -xy_pos.y, z_pos); + return intersection_pos_local; +} + +vec2 hrg_sphere_alt_xyz_to_uv(vec3 intersection_pos_local, vec2 output_aspect, float in_geom_radius) +{ + // Requires: An xyz intersection position on a cylinder. + // Returns: video_uv coords mapped to range [-0.5, 0.5] + // Mapping: Define square_uv.x to be the signed arc length in xz-space, + // and define square_uv.y == signed arc length in yz-space. + // See hrg_cylinder_xyz_to_uv() for implementation details (very similar). + vec2 angle_from_image_center = atan( vec2(intersection_pos_local.x, -intersection_pos_local.y), + intersection_pos_local.zz); + vec2 signed_arc_len = angle_from_image_center * in_geom_radius; + vec2 video_uv = signed_arc_len / output_aspect; + return video_uv; +} + +vec3 hrg_sphere_alt_uv_to_xyz(vec2 video_uv, vec2 output_aspect, float in_geom_radius) +{ + // Requires: video_uv coords mapped to range [-0.5, 0.5] + // Returns: An xyz intersection position on a sphere. This is the + // inverse of hrg_sphere_alt_xyz_to_uv(). + // See hrg_cylinder_uv_to_xyz() for implementation details (very similar). + vec2 square_uv = video_uv * output_aspect; + vec2 arc_len = square_uv; + vec2 angle_from_image_center = arc_len / in_geom_radius; + vec2 xy_pos = sin(angle_from_image_center) * in_geom_radius; + float z_pos = sqrt(in_geom_radius * in_geom_radius - dot(xy_pos, xy_pos)); + return vec3(xy_pos.x, -xy_pos.y, z_pos); +} + +vec2 hrg_intersect(vec3 view_vec_local, vec3 eye_pos_local, float in_geom_mode, float in_geom_radius) +{ + return in_geom_mode < 2.5 ? hrg_intersect_sphere(view_vec_local, eye_pos_local, in_geom_radius) : + hrg_intersect_cylinder(view_vec_local, eye_pos_local, in_geom_radius); +} + +vec2 hrg_xyz_to_uv( vec3 intersection_pos_local, vec2 output_aspect, float in_geom_mode, float in_geom_radius) +{ + return in_geom_mode < 1.5 ? hrg_sphere_xyz_to_uv(intersection_pos_local, output_aspect, in_geom_radius) : + in_geom_mode < 2.5 ? hrg_sphere_alt_xyz_to_uv(intersection_pos_local, output_aspect, in_geom_radius) : + hrg_cylinder_xyz_to_uv(intersection_pos_local, output_aspect, in_geom_radius); +} + +vec3 hrg_uv_to_xyz(vec2 uv, vec2 output_aspect, float in_geom_mode, float in_geom_radius) +{ + return in_geom_mode < 1.5 ? hrg_sphere_uv_to_xyz(uv, output_aspect, in_geom_radius) : + in_geom_mode < 2.5 ? hrg_sphere_alt_uv_to_xyz(uv, output_aspect, in_geom_radius) : + hrg_cylinder_uv_to_xyz(uv, output_aspect, in_geom_radius); +} + +vec2 hrg_view_vec_to_uv(vec3 view_vec_local, + vec3 eye_pos_local, + vec2 output_aspect, + float in_geom_mode, + float in_geom_radius, + out vec3 intersection_pos) +{ + // Get the intersection point on the primitive, given an eye position + // and view vector already in its local coordinate frame: + vec2 intersect_dist_and_discriminant = hrg_intersect(view_vec_local, eye_pos_local, in_geom_mode, in_geom_radius); + vec3 intersection_pos_local = eye_pos_local + view_vec_local * intersect_dist_and_discriminant.x; + // Save the intersection position to an output parameter: + intersection_pos = intersection_pos_local; + // Transform into uv coords, but give out-of-range coords if the + // view ray doesn't hrg_intersect the primitive in the first place: + return intersect_dist_and_discriminant.y > 0.005 ? hrg_xyz_to_uv(intersection_pos_local, output_aspect, in_geom_mode, in_geom_radius) : + vec2(1); +} + +vec3 hrg_get_ideal_global_eye_pos_for_points( vec3 eye_pos, + vec2 output_aspect, + vec3 global_coords[HRG_MAX_POINT_CLOUD_SIZE], + int num_points, + float in_geom_radius, + float in_geom_view_dist) +{ + // Requires: Parameters: + // 1.) Starting eye_pos is a global 3D position at which the + // camera contains all points in global_coords[] in its FOV + // 2.) output_aspect = hrg_get_aspect_vector( + // IN.OutputSize.xy.x / IN.OutputSize.xy.y); + // 3.) global_coords is a point cloud containing global xyz + // coords of extreme points on the simulated CRT screen. + // Globals: + // 1.) in_geom_view_dist must be > 0. It controls the "near + // plane" used to interpret flat_video_uv as a view + // vector, which controls the field of view (FOV). + // Eyespace coordinate frame: +x = right, +y = up, +z = back + // Returns: Return an eye position at which the point cloud spans as + // much of the screen as possible (given the FOV controlled by + // in_geom_view_dist) without being cropped or sheared. + // Algorithm: + // 1.) Move the eye laterally to a point which attempts to maximize the + // the amount we can move forward without clipping the CRT screen. + // 2.) Move forward by as much as possible without clipping the CRT. + // Get the allowed movement range by solving for the eye_pos offsets + // that result in each point being projected to a screen edge/corner in + // pseudo-normalized device coords (where xy ranges from [-0.5, 0.5] + // and z = eyespace z): + // pndc_coord = vec3(vec2(eyespace_xyz.x, -eyespace_xyz.y)* + // in_geom_view_dist / (output_aspect * -eyespace_xyz.z), eyespace_xyz.z); + // Notes: + // The field of view is controlled by in_geom_view_dist's magnitude relative to + // the view vector's x and y components: + // view_vec.xy ranges from [-0.5, 0.5] * output_aspect + // view_vec.z = -in_geom_view_dist + // But for the purposes of perspective divide, it should be considered: + // view_vec.xy ranges from [-0.5, 0.5] * output_aspect / in_geom_view_dist + // view_vec.z = -1 + int max_centering_iters = 1; // Keep for easy testing. + for(int iter = 0; iter < max_centering_iters; iter++) + { + // 0.) Get the eyespace coordinates of our point cloud: + vec3 eyespace_coords[HRG_MAX_POINT_CLOUD_SIZE]; + for(int i = 0; i < num_points; i++) + { + eyespace_coords[i] = global_coords[i] - eye_pos; + } + // 1a.)For each point, find out how far we can move eye_pos in each + // lateral direction without the point clipping the frustum. + // Eyespace +y = up, screenspace +y = down, so flip y after + // applying the eyespace offset (on the way to "clip space"). + // Solve for two offsets per point based on: + // (eyespace_xyz.xy - offset_dr) * vec2(1, -1) * + // in_geom_view_dist / (output_aspect * -eyespace_xyz.z) = vec2(-0.5) + // (eyespace_xyz.xy - offset_dr) * vec2(1, -1) * + // in_geom_view_dist / (output_aspect * -eyespace_xyz.z) = vec2(0.5) + // offset_ul and offset_dr represent the farthest we can move the + // eye_pos up-left and down-right. Save the min of all offset_dr's + // and the max of all offset_ul's (since it's negative). + float abs_radius = abs(in_geom_radius); // In case anyone gets ideas. ;) + vec2 offset_dr_min = vec2(10.0 * abs_radius, 10.0 * abs_radius); + vec2 offset_ul_max = vec2(-10.0 * abs_radius, -10.0 * abs_radius); + for(int i = 0; i < num_points; i++) + { + vec2 flipy = vec2(1, -1); + vec3 eyespace_xyz = eyespace_coords[i]; + vec2 offset_dr = eyespace_xyz.xy - vec2(-0.5) * + (output_aspect * -eyespace_xyz.z) / + (in_geom_view_dist * flipy); + vec2 offset_ul = eyespace_xyz.xy - vec2(0.5) * + (output_aspect * -eyespace_xyz.z) / + (in_geom_view_dist * flipy); + offset_dr_min = min(offset_dr_min, offset_dr); + offset_ul_max = max(offset_ul_max, offset_ul); + } + // 1b.)Update eye_pos: Adding the average of offset_ul_max and + // offset_dr_min gives it equal leeway on the top vs. bottom + // and left vs. right. Recalculate eyespace_coords accordingly. + vec2 center_offset = 0.5 * (offset_ul_max + offset_dr_min); + eye_pos.xy += center_offset; + for(int i = 0; i < num_points; i++) + { + eyespace_coords[i] = global_coords[i] - eye_pos; + } + // 2a.)For each point, find out how far we can move eye_pos forward + // without the point clipping the frustum. Flip the y + // direction in advance (matters for a later step, not here). + // Solve for four offsets per point based on: + // eyespace_xyz_flipy.x * in_geom_view_dist / + // (output_aspect.x * (offset_z - eyespace_xyz_flipy.z)) =-0.5 + // eyespace_xyz_flipy.y * in_geom_view_dist / + // (output_aspect.y * (offset_z - eyespace_xyz_flipy.z)) =-0.5 + // eyespace_xyz_flipy.x * in_geom_view_dist / + // (output_aspect.x * (offset_z - eyespace_xyz_flipy.z)) = 0.5 + // eyespace_xyz_flipy.y * in_geom_view_dist / + // (output_aspect.y * (offset_z - eyespace_xyz_flipy.z)) = 0.5 + // We'll vectorize the actual computation. Take the maximum of + // these four for a single offset, and continue taking the max + // for every point (use max because offset.z is negative). + float offset_z_max = -10.0 * in_geom_radius * in_geom_view_dist; + for(int i = 0; i < num_points; i++) + { + vec3 eyespace_xyz_flipy = eyespace_coords[i] * vec3(1, -1, 1); + vec4 offset_zzzz = eyespace_xyz_flipy.zzzz + + (eyespace_xyz_flipy.xyxy * in_geom_view_dist) / + (vec4(-0.5, -0.5, 0.5, 0.5) * vec4(output_aspect, output_aspect)); + // Ignore offsets that push positive x/y values to opposite + // boundaries, and vice versa, and don't let the camera move + // past a point in the dead center of the screen: + offset_z_max = (eyespace_xyz_flipy.x < 0) ? max(offset_z_max, offset_zzzz.x) : offset_z_max; + offset_z_max = (eyespace_xyz_flipy.y < 0) ? max(offset_z_max, offset_zzzz.y) : offset_z_max; + offset_z_max = (eyespace_xyz_flipy.x > 0) ? max(offset_z_max, offset_zzzz.z) : offset_z_max; + offset_z_max = (eyespace_xyz_flipy.y > 0) ? max(offset_z_max, offset_zzzz.w) : offset_z_max; + offset_z_max = max(offset_z_max, eyespace_xyz_flipy.z); + } + // 2b.)Update eye_pos: Add the maximum (smallest negative) z offset. + eye_pos.z += offset_z_max; + } + return eye_pos; +} + +vec3 hrg_get_ideal_global_eye_pos( mat3x3 local_to_global, + vec2 output_aspect, + float in_geom_mode, + float in_geom_radius, + float in_geom_view_dist) +{ + // Start with an initial eye_pos that includes the entire primitive + // (sphere or cylinder) in its field-of-view: + vec3 high_view = vec3(0, output_aspect.y, -in_geom_view_dist); + vec3 low_view = high_view * vec3(1, -1, 1); + float len_sq = dot(high_view, high_view); + float fov = abs(acos(dot(high_view, low_view)/len_sq)); + // Trigonometry/similar triangles say distance = in_geom_radius/sin(fov/2): + float eye_z_spherical = in_geom_radius / sin(fov*0.5); + vec3 eye_pos = in_geom_mode < 2.5 ? vec3(0, 0, eye_z_spherical) : + vec3(0, 0, max(in_geom_view_dist, eye_z_spherical)); + + // Get global xyz coords of extreme sample points on the simulated CRT + // screen. Start with the center, edge centers, and corners of the + // video image. We can't ignore backfacing points: They're occluded + // by closer points on the primitive, but they may NOT be occluded by + // the convex hull of the remaining samples (i.e. the remaining convex + // hull might not envelope points that do occlude a back-facing point.) + int num_points = HRG_MAX_POINT_CLOUD_SIZE; + vec3 global_coords[HRG_MAX_POINT_CLOUD_SIZE]; + global_coords[0] = hrg_uv_to_xyz(vec2(0, 0), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[1] = hrg_uv_to_xyz(vec2(0, -0.5), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[2] = hrg_uv_to_xyz(vec2(0, 0.5), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[3] = hrg_uv_to_xyz(vec2(-0.5, 0), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[4] = hrg_uv_to_xyz(vec2(0.5, 0), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[5] = hrg_uv_to_xyz(vec2(-0.5, -0.5), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[6] = hrg_uv_to_xyz(vec2(0.5, -0.5), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[7] = hrg_uv_to_xyz(vec2(-0.5, 0.5), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + global_coords[8] = hrg_uv_to_xyz(vec2(0.5, 0.5), output_aspect, in_geom_mode, in_geom_radius) * local_to_global; + // Adding more inner image points could help in extreme cases, but too many + // points will kille the framerate. For safety, default to the initial + // eye_pos if any z coords are negative: + float num_negative_z_coords = 0; + for(int i = 0; i < num_points; i++) + { + num_negative_z_coords += float(global_coords[0].z < 0); + } + // Outsource the optimized eye_pos calculation: + return num_negative_z_coords > 0.5 ? eye_pos : + hrg_get_ideal_global_eye_pos_for_points(eye_pos, + output_aspect, + global_coords, + num_points, + in_geom_radius, + in_geom_view_dist); +} + +mat3x3 hrg_get_pixel_to_object_matrix( mat3x3 global_to_local, + vec3 eye_pos_local, + vec3 view_vec_global, + vec3 intersection_pos_local, + vec3 normal, + vec2 output_pixel_size) +{ + // Requires: See hrg_get_curved_video_uv_coords_and_tangent_matrix for + // descriptions of each parameter. + // Returns: Return a transformation matrix from 2D pixel-space vectors + // (where (+1, +1) is a vector to one pixel down-right, + // i.e. same directionality as uv texels) to 3D object-space + // vectors in the CRT's local coordinate frame (right-handed) + // ***which are tangent to the CRT surface at the intersection + // position.*** (Basically, we want to convert pixel-space + // vectors to 3D vectors along the CRT's surface, for later + // conversion to uv vectors.) + // Shorthand inputs: + vec3 pos = intersection_pos_local; + vec3 eye_pos = eye_pos_local; + // Get a piecewise-linear matrix transforming from "pixelspace" offset + // vectors (1 = one pixel) to object space vectors in the tangent + // plane (faster than finding 3 view-object intersections). + // 1.) Get the local view vecs for the pixels to the right and down: + vec3 view_vec_right_global = view_vec_global + vec3(output_pixel_size.x, 0, 0); + vec3 view_vec_down_global = view_vec_global + vec3(0, -output_pixel_size.y, 0); + vec3 view_vec_right_local = view_vec_right_global * global_to_local; + vec3 view_vec_down_local = view_vec_down_global * global_to_local; + // 2.) Using the true intersection point, hrg_intersect the neighboring + // view vectors with the tangent plane: + vec3 intersection_vec_dot_normal = vec3(dot(pos - eye_pos, normal)); + vec3 right_pos = eye_pos + + (intersection_vec_dot_normal / dot(view_vec_right_local, normal)) * + view_vec_right_local; + vec3 down_pos = eye_pos + + (intersection_vec_dot_normal / dot(view_vec_down_local, normal)) * + view_vec_down_local; + // 3.) Subtract the original intersection pos from its neighbors; the + // resulting vectors are object-space vectors tangent to the plane. + // These vectors are the object-space transformations of (1, 0) + // and (0, 1) pixel offsets, so they form the first two basis + // vectors of a pixelspace to object space transformation. This + // transformation is 2D to 3D, so use (0, 0, 0) for the third vector. + vec3 object_right_vec = right_pos - pos; + vec3 object_down_vec = down_pos - pos; + mat3x3 pixel_to_object = mat3x3( + object_right_vec.x, object_down_vec.x, 0, + object_right_vec.y, object_down_vec.y, 0, + object_right_vec.z, object_down_vec.z, 0 + ); + return pixel_to_object; +} + +mat3x3 hrg_get_object_to_tangent_matrix(vec3 intersection_pos_local, + vec3 normal, + vec2 output_aspect, + float in_geom_mode) +{ + // Requires: See hrg_get_curved_video_uv_coords_and_tangent_matrix for + // descriptions of each parameter. + // Returns: Return a transformation matrix from 3D object-space vectors + // in the CRT's local coordinate frame (right-handed, +y = up) + // to 2D video_uv vectors (+v = down). + // Description: + // The TBN matrix formed by the [tangent, bitangent, normal] basis + // vectors transforms ordinary vectors from tangent->object space. + // The cotangent matrix formed by the [cotangent, cobitangent, normal] + // basis vectors transforms normal vectors (covectors) from + // tangent->object space. It's the inverse-transpose of the TBN matrix. + // We want the inverse of the TBN matrix (transpose of the cotangent + // matrix), which transforms ordinary vectors from object->tangent space. + // Start by calculating the relevant basis vectors in accordance with + // Christian Schüler's blog post "Followup: Normal Mapping Without + // Precomputed Tangents": http://www.thetenthplanet.de/archives/1180 + // With our particular uv mapping, the scale of the u and v directions + // is determined entirely by the aspect ratio for cylindrical and ordinary + // spherical mappings, and so tangent and bitangent lengths are also + // determined by it (the alternate mapping is more complex). Therefore, we + // must ensure appropriate cotangent and cobitangent lengths as well. + // Base these off the uv<=>xyz mappings for each primitive. + vec3 pos = intersection_pos_local; + vec3 x_vec = vec3(1, 0, 0); + vec3 y_vec = vec3(0, 1, 0); + // The tangent and bitangent vectors correspond with increasing u and v, + // respectively. Mathematically we'd base the cotangent/cobitangent on + // those, but we'll compute the cotangent/cobitangent directly when we can. + vec3 cotangent_unscaled; + vec3 cobitangent_unscaled; + // in_geom_mode should be constant-folded without RUNTIME_GEOMETRY_MODE. + if(in_geom_mode < 1.5) + { + // Sphere: + // tangent = normalize(cross(normal, cross(x_vec, pos))) * output_aspect.x + // bitangent = normalize(cross(cross(y_vec, pos), normal)) * output_aspect.y + // inv_determinant = 1/length(cross(bitangent, tangent)) + // cotangent = cross(normal, bitangent) * inv_determinant + // == normalize(cross(y_vec, pos)) * output_aspect.y * inv_determinant + // cobitangent = cross(tangent, normal) * inv_determinant + // == normalize(cross(x_vec, pos)) * output_aspect.x * inv_determinant + // Simplified (scale by inv_determinant below): + cotangent_unscaled = normalize(cross(y_vec, pos)) * output_aspect.y; + cobitangent_unscaled = normalize(cross(x_vec, pos)) * output_aspect.x; + } + else if(in_geom_mode < 2.5) + { + // Sphere, alternate mapping: + // This mapping works a bit like the cylindrical mapping in two + // directions, which makes the lengths and directions more complex. + // Unfortunately, I can't find much of a shortcut: + vec3 tangent = normalize(cross(y_vec, vec3(pos.x, 0, pos.z))) * output_aspect.x; + vec3 bitangent = normalize(cross(x_vec, vec3(0, pos.yz))) * output_aspect.y; + cotangent_unscaled = cross(normal, bitangent); + cobitangent_unscaled = cross(tangent, normal); + } + else + { + // Cylinder: + // tangent = normalize(cross(y_vec, normal)) * output_aspect.x; + // bitangent = vec3(0, -output_aspect.y, 0); + // inv_determinant = 1/length(cross(bitangent, tangent)) + // cotangent = cross(normal, bitangent) * inv_determinant + // == normalize(cross(y_vec, pos)) * output_aspect.y * inv_determinant + // cobitangent = cross(tangent, normal) * inv_determinant + // == vec3(0, -output_aspect.x, 0) * inv_determinant + cotangent_unscaled = cross(y_vec, normal) * output_aspect.y; + cobitangent_unscaled = vec3(0, -output_aspect.x, 0); + } + vec3 computed_normal = cross(cobitangent_unscaled, cotangent_unscaled); + float inv_determinant = inversesqrt(dot(computed_normal, computed_normal)); + vec3 cotangent = cotangent_unscaled * inv_determinant; + vec3 cobitangent = cobitangent_unscaled * inv_determinant; + // The [cotangent, cobitangent, normal] column vecs form the cotangent + // frame, i.e. the inverse-transpose TBN matrix. Get its transpose: + mat3x3 object_to_tangent = mat3x3( cotangent, + cobitangent, + normal); + return object_to_tangent; +} + +vec2 hrg_get_curved_video_uv_coords_and_tangent_matrix( vec2 flat_video_uv, + vec3 eye_pos_local, + vec2 output_pixel_size, + vec2 output_aspect, + float in_geom_mode, + float in_geom_radius, + float in_geom_view_dist, + mat3x3 global_to_local, + out mat2x2 pixel_to_tangent_video_uv) +{ + // Requires: Parameters: + // 1.) flat_video_uv coords are in range [0, 1], where + // (0, 0) is the top-left corner of the screen and + // (1, 1) is the bottom-right corner. + // 2.) eye_pos_local is the 3D camera position in the simulated + // CRT's local coordinate frame. For best results, it must + // be computed based on the same in_geom_view_dist used here. + // 3.) output_pixel_size = vec2(1)/IN.OutputSize.xy + // 4.) output_aspect = hrg_get_aspect_vector( + // IN.OutputSize.xy.x / IN.OutputSize.xy.y); + // 5.) in_geom_mode is a static or runtime mode setting: + // 0 = off, 1 = sphere, 2 = sphere alt., 3 = cylinder + // 6.) global_to_local is a 3x3 matrix transforming (ordinary) + // worldspace vectors to the CRT's local coordinate frame + // Globals: + // 1.) in_geom_view_dist must be > 0. It controls the "near + // plane" used to interpret flat_video_uv as a view + // vector, which controls the field of view (FOV). + // Returns: Return final uv coords in [0, 1], and return a pixel- + // space to video_uv tangent-space matrix in the out parameter. + // (This matrix assumes pixel-space +y = down, like +v = down.) + // We'll transform flat_video_uv into a view vector, project + // the view vector from the camera/eye, hrg_intersect with a sphere + // or cylinder representing the simulated CRT, and convert the + // intersection position into final uv coords and a local + // transformation matrix. + // First get the 3D view vector (output_aspect and in_geom_view_dist are globals): + // 1.) Center uv around (0, 0) and make (-0.5, -0.5) and (0.5, 0.5) + // correspond to the top-left/bottom-right output screen corners. + // 2.) Multiply by output_aspect to preemptively "undo" Retroarch's screen- + // space 2D aspect correction. We'll reapply it in uv-space. + // 3.) (x, y) = (u, -v), because +v is down in 2D screenspace, but +y + // is up in 3D worldspace (enforce a right-handed system). + // 4.) The view vector z controls the "near plane" distance and FOV. + // For the effect of "looking through a window" at a CRT, it should be + // set equal to the user's distance from their physical screen, in + // units of the viewport's physical diagonal size. + vec2 view_uv = (flat_video_uv - vec2(0.5)) * output_aspect; + vec3 view_vec_global = vec3(view_uv.x, -view_uv.y, -in_geom_view_dist); + // Transform the view vector into the CRT's local coordinate frame, convert + // to video_uv coords, and get the local 3D intersection position: + vec3 view_vec_local = view_vec_global * global_to_local; + vec3 pos; + vec2 centered_uv = hrg_view_vec_to_uv( view_vec_local, + eye_pos_local, + output_aspect, + in_geom_mode, + in_geom_radius, + pos); + vec2 video_uv = centered_uv + vec2(0.5); + // Get a pixel-to-tangent-video-uv matrix. The caller could deal with + // all but one of these cases, but that would be more complicated. + //#ifdef DRIVERS_ALLOW_DERIVATIVES + // Derivatives obtain a matrix very fast, but the direction of pixel- + // space +y seems to depend on the pass. Enforce the correct direction + // on a best-effort basis (but it shouldn't matter for antialiasing). + // vec2 duv_dx = dFdx(video_uv); + // vec2 duv_dy = dFdy(video_uv); + // // #ifdef LAST_PASS + // pixel_to_tangent_video_uv = mat2x2( duv_dx.x, duv_dy.x, + // -duv_dx.y, -duv_dy.y); + // #else + // pixel_to_tangent_video_uv = mat2x2( duv_dx.x, duv_dy.x, + // duv_dx.y, duv_dy.y); + // #endif + // #else + // Manually define a transformation matrix. We'll assume pixel-space + // +y = down, just like +v = down. + bool geom_force_correct_tangent_matrix = true; + if(geom_force_correct_tangent_matrix) + { + // Get the surface normal based on the local intersection position: + vec3 normal_base = in_geom_mode < 2.5 ? pos : + vec3(pos.x, 0, pos.z); + vec3 normal = normalize(normal_base); + // Get pixel-to-object and object-to-tangent matrices and combine + // them into a 2x2 pixel-to-tangent matrix for video_uv offsets: + mat3x3 pixel_to_object = hrg_get_pixel_to_object_matrix(global_to_local, + eye_pos_local, + view_vec_global, + pos, + normal, + output_pixel_size); + mat3x3 object_to_tangent = hrg_get_object_to_tangent_matrix(pos, normal, output_aspect, in_geom_mode); + mat3x3 pixel_to_tangent3x3 = pixel_to_object * object_to_tangent; + pixel_to_tangent_video_uv = mat2x2( pixel_to_tangent3x3[0][0], pixel_to_tangent3x3[0][1], + pixel_to_tangent3x3[1][0], pixel_to_tangent3x3[1][1]);//._m00_m01_m10_m11); + } + else + { + // Ignore curvature, and just consider flat scaling. The + // difference is only apparent with strong curvature: + pixel_to_tangent_video_uv = mat2x2( output_pixel_size.x, 0, + 0, output_pixel_size.y); + } + //#endif + return video_uv; +} + +float HRG_GetBorderDimFactor(vec2 video_uv, vec2 output_aspect, float in_border_size, float in_border_darkness, float in_border_compress) +{ + // COPYRIGHT NOTE FOR THIS FUNCTION: + // Copyright (C) 2010-2012 cgwg, 2014 TroggleMonkey + // This function uses an algorithm first coded in several of cgwg's GPL- + // licensed lines in crt-geom-curved.cg and its ancestors. + + // Calculate border_dim_factor from the proximity to uv-space image + // borders; output_aspect/in_border_size/border/darkness/in_border_compress are globals: + vec2 edge_dists = min(video_uv, vec2(1) - video_uv) * output_aspect; + vec2 border_penetration = max(vec2(in_border_size) - edge_dists, vec2(0)); + float penetration_ratio = length(border_penetration)/in_border_size; + float border_escape_ratio = max(1 - penetration_ratio, 0); + float border_dim_factor = pow(border_escape_ratio, in_border_darkness) * max(1, in_border_compress); + return min(border_dim_factor, 1); +} + +// Provide accessors for vector constants that pack scalar uniforms: +vec2 hrg_get_aspect_vector(float geom_aspect_ratio) +{ + // Get an aspect ratio vector. Enforce geom_max_aspect_ratio, and prevent + // the absolute scale from affecting the uv-mapping for curvature: + float geom_max_aspect_ratio = 4/3; + float geom_clamped_aspect_ratio = min(geom_aspect_ratio, geom_max_aspect_ratio); + vec2 output_aspect = normalize(vec2(geom_clamped_aspect_ratio, 1)); + return output_aspect; +} + +vec2 HRG_GetGeomCurvedCoord( vec2 in_coord, + float in_geom_mode, + float in_geom_radius, + float in_geom_view_dist, + float in_geom_tilt_angle_x, + float in_geom_tilt_angle_y, + float in_screen_aspect, + float pin_inner_edge, + vec2 in_source_size, + vec2 in_output_size, + out mat2x2 pixel_to_video_uv) +{ + vec2 output_pixel_size = vec2(1.0, 1.0) / in_output_size; + + float geom_radius_scaled = in_geom_radius; + + vec2 output_aspect = hrg_get_aspect_vector(in_screen_aspect); + + // Create a local-to-global rotation matrix for the CRT's coordinate + // frame and its global-to-local inverse. Rotate around the x axis + // first (pitch) and then the y axis (yaw) with yucky Euler angles. + // Positive angles go clockwise around the right-vec and up-vec. + vec2 geom_tilt_angle = vec2(in_geom_tilt_angle_x, in_geom_tilt_angle_y); + vec2 sin_tilt = sin(geom_tilt_angle); + vec2 cos_tilt = cos(geom_tilt_angle); + + // Conceptual breakdown: + mat3x3 rot_x_matrix = mat3x3( 1, 0, 0, + 0, cos_tilt.y, -sin_tilt.y, + 0, sin_tilt.y, cos_tilt.y); + + mat3x3 rot_y_matrix = mat3x3( cos_tilt.x, 0, sin_tilt.x, + 0, 1, 0, + -sin_tilt.x, 0, cos_tilt.x); + + mat3x3 local_to_global = rot_x_matrix * rot_y_matrix; + // This is a pure rotation, so transpose = inverse: + mat3x3 global_to_local = transpose(local_to_global); + + // Get an optimal eye position based on in_geom_view_dist, viewport_aspect, + // and CRT radius/rotation: + vec3 eye_pos_global = hrg_get_ideal_global_eye_pos( local_to_global, + output_aspect, + in_geom_mode, + geom_radius_scaled, + in_geom_view_dist); + vec3 eye_pos_local = eye_pos_global * global_to_local; + + + vec2 curved_coord; + + if(in_geom_mode > 0.5) + { + // Put in a test for the projection with a flat plane to compare + // with the distorted coordinate to scale out to the edges of the flat plane + // Also helps with cyndrilical projection where the sides shift in towards the center + vec2 ctr_curved_coord = hrg_get_curved_video_uv_coords_and_tangent_matrix( in_coord, + eye_pos_local, + output_pixel_size, + output_aspect, + in_geom_mode, + geom_radius_scaled, + in_geom_view_dist, + global_to_local, + pixel_to_video_uv) - 0.5; + + // Curvature can cause the screen to shrink so we want to scale it back out so it is the same width & height + // Especially helps with cylindrical projection which shrinks a lot + // Right Edge should end up at 1, we scale it back out so it hits 1 + // Only do this when not using tilt so we don't mess up what the perspective is doing + if (in_geom_tilt_angle_x == 0 && in_geom_tilt_angle_y == 0) + { + vec2 right_edge_curved_ctr_coord = hrg_get_curved_video_uv_coords_and_tangent_matrix(vec2(1, 0.5), + eye_pos_local, + output_pixel_size, + output_aspect, + in_geom_mode, + geom_radius_scaled, + in_geom_view_dist, + global_to_local, + pixel_to_video_uv) - 0.5; + + vec2 bottom_edge_curved_ctr_coord = hrg_get_curved_video_uv_coords_and_tangent_matrix(vec2(0.5, 1), + eye_pos_local, + output_pixel_size, + output_aspect, + in_geom_mode, + geom_radius_scaled, + in_geom_view_dist, + global_to_local, + pixel_to_video_uv) - 0.5; + + ctr_curved_coord.x = ctr_curved_coord.x * 0.5 / right_edge_curved_ctr_coord.x; + ctr_curved_coord.y = ctr_curved_coord.y * 0.5 / bottom_edge_curved_ctr_coord.y; + } + if (pin_inner_edge == 1) + { + if (in_geom_tilt_angle_y != 0) + { + vec2 top_edge_curved_ctr_coord = hrg_get_curved_video_uv_coords_and_tangent_matrix(vec2(0.5, 0), + eye_pos_local, + output_pixel_size, + output_aspect, + in_geom_mode, + geom_radius_scaled, + in_geom_view_dist, + global_to_local, + pixel_to_video_uv); + ctr_curved_coord.y = ctr_curved_coord.y - top_edge_curved_ctr_coord.y; + } + if (in_geom_tilt_angle_x != 0) + { + vec2 left_edge_curved_ctr_coord = hrg_get_curved_video_uv_coords_and_tangent_matrix(vec2(0, 0.5), + eye_pos_local, + output_pixel_size, + output_aspect, + in_geom_mode, + geom_radius_scaled, + in_geom_view_dist, + global_to_local, + pixel_to_video_uv); + ctr_curved_coord.x = ctr_curved_coord.x - left_edge_curved_ctr_coord.x; + } + } + + curved_coord = ctr_curved_coord + 0.5; + } + else + { + curved_coord = in_coord; + pixel_to_video_uv = mat2x2( output_pixel_size.x, 0, + 0, output_pixel_size.y); + } + + return curved_coord; +} + + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-negative-crop-area.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-negative-crop-area.slang new file mode 100644 index 0000000..52cb7c7 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-negative-crop-area.slang @@ -0,0 +1,56 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +layout(std140, set = 0, binding = 0) uniform UBO +{ + mat4 MVP; + vec4 OutputSize; + 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; + +void main() +{ + float NEGATIVE_CROP_EXPAND_MULTIPLIER = global.OutputSize.y / global.SourceSize.y; + float MAX_NEGATIVE_CROP = ((1 - (1 / NEGATIVE_CROP_EXPAND_MULTIPLIER)) / 2); + + FragColor = vec4(texture(Source, (vTexCoord - 0.5) / (1 - 2 * MAX_NEGATIVE_CROP) + 0.5).rgb, 1.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang new file mode 100644 index 0000000..2c2a161 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-all.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-all-params.inc" +#include "hsm-stock.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang new file mode 100644 index 0000000..2c12000 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-glass.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-glass-params.inc" +#include "hsm-stock.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang new file mode 100644 index 0000000..91d9a6f --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-no-reflect.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET + +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-stock.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang new file mode 100644 index 0000000..b66cb9c --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-add-params-potato.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-potato-params.inc" +#include "hsm-stock.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang new file mode 100644 index 0000000..09e8937 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images-over-crt.slang @@ -0,0 +1,7 @@ +#version 450 + +#define LAYERS_OVER_CRT + +/////////////// IMPORTS /////////////// +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-bezel-images.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang new file mode 100644 index 0000000..a132e13 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images-under-crt.slang @@ -0,0 +1,7 @@ +#version 450 + +#define LAYERS_UNDER_CRT + +/////////////// IMPORTS /////////////// +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-bezel-images.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images.inc new file mode 100644 index 0000000..9618249 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-bezel-images.inc @@ -0,0 +1,1087 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +/////////////// IMPORTS /////////////// +#include "common/hsm-common-functions-bezel.inc" + +// Removed because BackgroundImageSize returns vec4(0,0,0,0), this happens with all user defined textures +// layout(push_constant) uniform Push +// { +// vec4 BackgroundImageSize; +// } params; + +/////////////// DEFINES /////////////// + +#define MASK_MODE_ALL 0 +#define MASK_MODE_SCREEN 1 +#define MASK_MODE_TUBE 2 +#define MASK_MODE_INSIDE_BEZEL 3 +#define MASK_MODE_BEZEL 4 +#define MASK_MODE_OUTSIDE_TUBE 5 +#define MASK_MODE_FRAME 6 +#define MASK_MODE_OUTSIDE_BEZEL 7 +#define MASK_MODE_OUTSIDE_FRAME 8 + +#define CUTOUT_MODE_OFF 0 +#define CUTOUT_MODE_INSIDE 1 +#define CUTOUT_MODE_OUTSIDE 2 + +float USE_INHERITED_COORD_OFF = 0; +float USE_INHERITED_COORD_ON = 1; + +vec2 VIEWPORT_COORD = vec2(0.5); + +/////////////// Helper Functions /////////////// + +// Return the mask for the specific mode +float GetMask(float mask_mode) +{ + float mask = (mask_mode == MASK_MODE_ALL) ? 1 : + (mask_mode == MASK_MODE_SCREEN) ? SCREEN_MASK : + (mask_mode == MASK_MODE_TUBE) ? TUBE_MASK : + (mask_mode == MASK_MODE_INSIDE_BEZEL) ? INSIDE_BEZEL_MASK : + (mask_mode == MASK_MODE_BEZEL) ? BEZEL_MASK : + (mask_mode == MASK_MODE_OUTSIDE_TUBE) ? OUTSIDE_TUBE_MASK_FOR_IMAGE : + (mask_mode == MASK_MODE_FRAME) ? FRAME_MASK : + (mask_mode == MASK_MODE_OUTSIDE_BEZEL) ? OUTSIDE_BEZEL_MASK : + (mask_mode == MASK_MODE_OUTSIDE_FRAME) ? OUTSIDE_FRAME_MASK : 0.5; + return mask; +} + +// Assumes Opacity is already encoded in alpha +vec4 BlendModeMaskLayerMix(vec4 color_under, vec4 color_over, float blend_mode, float mask_mode, float cutout_mode, float dualscreen_mode, float layer_opacity) +{ + if ( blend_mode == 0 || (dualscreen_mode != SHOW_ON_DUALSCREEN_MODE_BOTH && dualscreen_mode != SCREEN_INDEX) ) + return color_under; + + float cutout_mask = 1; + if (cutout_mode == CUTOUT_MODE_INSIDE) + cutout_mask = CUTOUT_MASK; + if (cutout_mode == CUTOUT_MODE_OUTSIDE) + cutout_mask = 1 - CUTOUT_MASK; + + if (blend_mode == BLEND_MODE_OFF) + return color_under; + + color_over.a *= layer_opacity * GetMask(mask_mode) * cutout_mask; + + vec4 out_color = vec4(0); + + if (blend_mode == BLEND_MODE_NORMAL) + { + color_over.rgb *= color_over.a; + out_color = HSM_PreMultAlphaBlend(color_under, color_over); + } + else + { + vec4 blend_color = color_under; + if (blend_mode == BLEND_MODE_ADD) blend_color.rgb = color_under.rgb + color_over.rgb ; + if (blend_mode == BLEND_MODE_MULTIPLY) blend_color.rgb = color_under.rgb * color_over.rgb ; + + out_color = vec4(clamp(mix(color_under.rgb, blend_color.rgb, color_over.a), 0, 1), color_under.a); + } + return out_color; +} + +// Takes a viewport coordinate and gives a new coordinate scaled by the specific scale mode +// Takes into account the default sizes of each scale mode +vec2 HSM_GetScaledCoord(vec2 in_viewport_coord, + vec2 in_viewport_coord_unscaled, + float texture_aspect_mode, + float explicit_texture_aspect, + vec2 offset_pos, + vec2 offset_scale, + float inherited_scale_mode, + float scale_full_with_zoom, + float image_aspect_mode, + float image_fill_mode, + bool apply_default_scale_offset, + float use_inherited_curved_coord, + inout vec2 out_placement_coord, + inout vec2 out_placement_scale) +{ + explicit_texture_aspect = HSM_GetAspectRatioFromMode(texture_aspect_mode, explicit_texture_aspect); + + vec2 inherited_coord = in_viewport_coord / 0.5; + vec2 inherited_placement_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 (scale_full_with_zoom > 0.5) + { + inherited_coord = in_viewport_coord; + inherited_placement_coord = in_viewport_coord; + } + else + { + inherited_coord = in_viewport_coord_unscaled; + inherited_placement_coord = in_viewport_coord_unscaled; + } + + inherited_scale = vec2(1, 1); + default_offset_scale = vec2(1); + } + else if (inherited_scale_mode == INHERITED_SCALE_MODE_SCREEN) + { + inherited_scale = SCREEN_SCALE; + inherited_coord = use_inherited_curved_coord == 1 ? SCREEN_BLACK_EDGE_CURVED_COORD : SCREEN_COORD; + inherited_placement_coord = SCREEN_COORD; + + 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) + { + inherited_scale = BEZEL_OUTSIDE_SCALE; + inherited_coord = use_inherited_curved_coord == 1 ? BEZEL_OUTSIDE_CURVED_COORD : BEZEL_OUTSIDE_COORD; + inherited_placement_coord = BEZEL_OUTSIDE_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) + { + inherited_coord = use_inherited_curved_coord == 1 ? BACKGROUND_CURVED_COORD : BACKGROUND_COORD; + inherited_placement_coord = BACKGROUND_COORD; + inherited_scale = BACKGROUND_SCALE; + default_offset_scale = vec2(1); + } + else if (inherited_scale_mode == INHERITED_SCALE_MODE_DEVICE) + { + inherited_coord = use_inherited_curved_coord == 1 ? DEVICE_CURVED_COORD : DEVICE_COORD; + inherited_placement_coord = DEVICE_COORD; + inherited_scale = DEVICE_SCALE; + default_offset_scale = vec2(1); + } + else if (inherited_scale_mode == INHERITED_SCALE_MODE_DECAL) + { + inherited_coord = use_inherited_curved_coord == 1 ? DECAL_CURVED_COORD : DECAL_COORD; + inherited_placement_coord = DECAL_COORD; + inherited_scale = DECAL_SCALE; + default_offset_scale = vec2(1); + } + + if (apply_default_scale_offset) + { + offset_scale *= default_offset_scale; + } + + float output_aspect = global.OutputSize.x / global.OutputSize.y; + float inherited_aspect = (inherited_scale.x / inherited_scale.y) * (default_offset_scale.x / default_offset_scale.y) * output_aspect; + + // Find the aspect difference so the image can be shown without distortion + // This is before the user edited scale offset + float inherited_aspect_difference = explicit_texture_aspect / inherited_aspect; + + // Get the overall scale for the placement of the texture (No Split/Fill Yet) + out_placement_scale = inherited_scale; + if ( image_aspect_mode == IMAGE_ASPECT_MODE_KEEP_ASPECT ) + out_placement_scale.x *= inherited_aspect_difference; + out_placement_scale = out_placement_scale * offset_scale; + + out_placement_coord = HSM_AddPosScaleToCoord(inherited_placement_coord, inherited_scale, offset_pos, out_placement_scale / inherited_scale); + + vec2 out_coord = vec2(0.5); + + if (use_inherited_curved_coord == 1) + { + out_coord = HSM_AddPosScaleToCoord(inherited_coord, inherited_scale, offset_pos, offset_scale); + } + else + { + vec2 drawing_scale = out_placement_scale; + float slide_x = 0; + + if ( image_fill_mode == FILL_MODE_SPLIT_FILL_HORIZONTAL ) + { + // Correct the aspect so it matches the texture and is never stretched + float placement_aspect = out_placement_scale.x / out_placement_scale.y * output_aspect; + float placement_aspect_difference = explicit_texture_aspect / placement_aspect; + drawing_scale.x *= placement_aspect_difference; + + slide_x = (out_placement_scale.x - drawing_scale.x) / 2;// * out_placement_scale.x; + + if ( out_placement_coord.x < 0.5 ) + slide_x *= -1; + + inherited_coord.x -= slide_x; + } + + // The inherited_coord is already the coord from the inherited space + // We only need to apply an offset from this + out_coord = HSM_AddPosScaleToCoord(inherited_coord, inherited_scale, offset_pos, drawing_scale / inherited_scale); + // out_coord.x -= slide_x; + } + + return out_coord; +} + +//TODO remove this and replace with simpler calls +float GetFade(float current_position, float corner_position, float fade_distance) +{ + return smoothstep(corner_position + fade_distance / 2, corner_position - fade_distance / 2, current_position); +} + +vec3 ApplyAmbientImage(vec3 base_image, vec3 ambient_image, float layer_blend_amount, float applyInAddMode, float layerBlendMode) +{ + vec3 outImage = base_image; + + if (HSM_AMBIENT_LIGHTING_OPACITY > 0 && + (applyInAddMode == 1 || layerBlendMode != BLEND_MODE_ADD) && + layer_blend_amount > 0) + { + outImage = (1 - layer_blend_amount) * base_image.rgb + layer_blend_amount * base_image.rgb * ambient_image.rgb; + } + + return outImage; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma stage vertex + +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 6) out vec2 vTexCoord; +layout(location = 7) out vec2 UNFLIPPED_VIEWPORT_COORD; + +////////////////////////////////////////////////////////////////////////////////////////////////// +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord; + + UNFLIPPED_VIEWPORT_COORD = vTexCoord; + + VIEWPORT_COORD = vTexCoord * 1.0001; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma stage fragment + +layout(location = 6) in vec2 vTexCoord; +layout(location = 7) in vec2 UNFLIPPED_VIEWPORT_COORD; +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 = 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 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 DecalImage; +layout(set = 0, binding = 12) uniform sampler2D CabinetGlassImage; +layout(set = 0, binding = 13) uniform sampler2D TopLayerImage; + +#ifdef LAYERS_OVER_CRT +layout(set = 0, binding = 14) uniform sampler2D BR_LayersOverCRTPassFeedback; +#define PassFeedback BR_LayersOverCRTPassFeedback +#else +layout(set = 0, binding = 14) uniform sampler2D BR_LayersUnderCRTPassFeedback; +#define PassFeedback BR_LayersUnderCRTPassFeedback +#endif + +////////////////////////////////////////////////////////////////////////////////////////////////// +void main() +{ + if (HSM_AB_COMPARE_FREEZE_GRAPHICS == 1 && HSM_GetIsInABCompareArea(vTexCoord)) + { + FragColor = texture(PassFeedback, vTexCoord); + return; + } + + VIEWPORT_UNSCALED_COORD = HSM_GetViewportCoordWithFlip(vTexCoord); + VIEWPORT_COORD = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + + 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()) + { + FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD); + return; + } + + //----------------------------------------------------------------------------------------- + // Night Lighting Image + //----------------------------------------------------------------------------------------- + // Add Multiplied Image for Darkening + // Sample the image and do some color correction + vec4 ambient_lighting_image = vec4(1); + if (HSM_AMBIENT_LIGHTING_OPACITY > 0) + ambient_lighting_image = HSM_GetNightLightingMultiplyColor( HSM_AMBIENT_LIGHTING_SCALE_MODE > 0.5 ? VIEWPORT_UNSCALED_COORD : VIEWPORT_COORD, NightLightingImage ); + + SCREEN_BLACK_EDGE_CURVED_COORD = HSM_GetCurvedCoord(SCREEN_COORD, HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE, SCREEN_ASPECT); + + vec2 tube_curved_coord = HSM_GetTubeCurvedCoord(SCREEN_COORD, 1, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1); + vec2 tube_curved_coord_ctr = tube_curved_coord - 0.5; + vec2 edge_mask_coord = tube_curved_coord_ctr * (1 - (HSM_BZL_INNER_EDGE_THICKNESS / vec2(SCREEN_ASPECT, 1))) + 0.5; + + float bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + if(HSM_BZL_USE_INDEPENDENT_CURVATURE > 0) + bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * DEFAULT_SCREEN_CORNER_RADIUS; + + float edge_mask = HSM_GetCornerMask(edge_mask_coord, SCREEN_ASPECT, bezel_corner_radius, HSM_BZL_INNER_EDGE_SHARPNESS); + + float outside_tube_mask = 1 - HSM_GetCornerMask(tube_curved_coord, SCREEN_ASPECT, bezel_corner_radius, 0.99); + TUBE_MASK = 1 - outside_tube_mask; + + // Shrink the mask by 0.001 to clip off outer edge + SCREEN_MASK = HSM_GetCornerMask(((SCREEN_BLACK_EDGE_CURVED_COORD - 0.5) * 1.001) + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE, HSM_TUBE_BLACK_EDGE_SHARPNESS); + + //---------------------------------------------------- + // Calculate Outside mapping Coords + //---------------------------------------------------- + + /* This first big chunk is to get a mapping of the space outside of the screen which is continuous + This is more complicated than you would expect because since we are using curved coordinates + there are discontinuities outside the normal screen corners, e.g. where x > 1 and y > 1 + So instead of trying to use the coordinates from the screen/tube we use a larger space + and subtract the screen space to see how far we are outside of the sreen + */ + + // Additional scale to be applied to the tube scale to create an expanded mapping area + float outermap_scale = 2.3; + + // Get a range width from the outer tube edge to the outer edge of the outermap + float outermap_range = 0.5 * outermap_scale * 0.7; + vec2 outermap_screen_size_from_center = vec2(0.5, 0.5); + vec2 outermap_warped_outside_screen_vector = (tube_curved_coord_ctr - clamp(tube_curved_coord_ctr, -0.490, 0.490)) * vec2(1 / SCREEN_ASPECT, 1); + float output_aspect = global.OutputSize.x / global.OutputSize.y; + float outside_ratio_warped = clamp(length(outermap_warped_outside_screen_vector) / outermap_range, 0, 1); + vec2 outermap_screen_corner_ctr_coord = vec2(0.5, -0.5); + + // Get a coordinate offset so it is centered around the corner + vec2 outermap_coord_warped_ctr_at_screen_corner = abs(tube_curved_coord_ctr) - vec2(0.5); + + + + // Have to get the scale of the coordinates so we can figure out the size of the onscreen rectangle of the area + HSM_GetBezelCoords(SCREEN_COORD, + SCREEN_SCALE, + TUBE_SCALE, + SCREEN_ASPECT, + true, + BEZEL_OUTSIDE_SCALE, + BEZEL_OUTSIDE_COORD, + BEZEL_OUTSIDE_CURVED_COORD, + FRAME_OUTSIDE_CURVED_COORD); + + OUTSIDE_BEZEL_MASK = 1 - HSM_GetCornerMask(BEZEL_OUTSIDE_CURVED_COORD, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_BZL_OUTER_CORNER_RADIUS_SCALE, 0.9); + + // Get color for the frame area outside of the bezel + vec2 frame_outside_coord_ctr = FRAME_OUTSIDE_CURVED_COORD - 0.5; + float SHADOW_OUTSIDE_FRAME_MASK = 1 - HSM_GetCornerMask(frame_outside_coord_ctr * 1.01 + 0.5, SCREEN_ASPECT, HSM_FRM_OUTER_CORNER_RADIUS, 1); + OUTSIDE_FRAME_MASK = 1 - HSM_GetCornerMask(frame_outside_coord_ctr + 0.5, SCREEN_ASPECT, HSM_FRM_OUTER_CORNER_RADIUS, 1); + OUTSIDE_FRAME_MASK_FOR_IMAGE = 1 - HSM_GetCornerMask(frame_outside_coord_ctr * 0.999 + 0.5, SCREEN_ASPECT, HSM_FRM_OUTER_CORNER_RADIUS, 1); + // Get masks for shadows, from frame as well as sides and top and bottom of viewport + INSIDE_BEZEL_MASK = 1 - OUTSIDE_BEZEL_MASK; + BEZEL_MASK = INSIDE_BEZEL_MASK * outside_tube_mask; + FRAME_MASK = OUTSIDE_BEZEL_MASK * (1 - OUTSIDE_FRAME_MASK); + +#ifdef LAYERS_UNDER_CRT + //---------------------------------------------------- + // Calculate Corner Highlight Mask + //---------------------------------------------------- + const float pi = 3.1415; + + // Get amount to shift the point at the outer corner to match the overall position offset + vec2 pos_shift_offset = vec2(0, HSM_BZL_OUTER_POSITION_Y) * SCREEN_SCALE.y / outermap_scale; + pos_shift_offset *= tube_curved_coord.y > 0.5 ? 1 : -1; + + // Get the direction vector from the inner corner of the bezel pointing at the outer corner + vec2 corner_crease_dir = (outermap_screen_corner_ctr_coord + pos_shift_offset) / vec2(HSM_BZL_HEIGHT + 1, HSM_BZL_WIDTH + 1) - (outermap_screen_corner_ctr_coord) ; + corner_crease_dir *= vec2(SCREEN_ASPECT, 1); + + float aspect_corner_length_scale_offset = SCREEN_ASPECT > 1 ? 0.9 : 1.5; + float corner_crease_length = length(corner_crease_dir * aspect_corner_length_scale_offset); + + // A hack to adjust the angle offset, because without it the corner angle isn't pointing exactly at the corner + // This offset is the opposite direction for vertical and horizontal aspect ratio + float corner_rotation_offset = (SCREEN_COORD.y < 0.5) ? -HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP : -HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM; + + if (HSM_CURVATURE_MODE == 0) + // If we are using a 3d Curvature no offset is necessary + corner_rotation_offset += (SCREEN_ASPECT > 1) ? 2 : 3; + + // Convert direction vector to an angle so we can rotate the corner crease direction + float corner_angle_degrees = atan(corner_crease_dir.y / corner_crease_dir.x) / (2 * pi) * 360; + + corner_angle_degrees += corner_rotation_offset; + float corner_angle_radians = corner_angle_degrees / 360 * 2 * pi; + corner_crease_dir = vec2(cos(corner_angle_radians), sin(corner_angle_radians)); + + // Get the distance perpendicular to the crease direction so we can use it to fade later + float distance_from_crease = HHLP_GetDistanceToLine(outermap_coord_warped_ctr_at_screen_corner.x, outermap_coord_warped_ctr_at_screen_corner.y, 1, corner_crease_dir.y / corner_crease_dir.x, 0 ); + + float fade_out_to_corner = HHLP_QuadraticBezier(clamp(length(outermap_warped_outside_screen_vector) / (corner_crease_length * 2), 0, 1), vec2(0.5, HSM_REFLECT_CORNER_SPREAD_FALLOFF / 100)); + + float corner_fade_width_inner = HSM_REFLECT_CORNER_INNER_SPREAD * (SCREEN_SCALE.x + SCREEN_SCALE.y) * bezel_corner_radius / 10 / 250 * 1.2; + float corner_fade_width_outer = HSM_REFLECT_CORNER_OUTER_SPREAD * (SCREEN_SCALE.x + SCREEN_SCALE.y) * HSM_GLOBAL_CORNER_RADIUS * HSM_BZL_OUTER_CORNER_RADIUS_SCALE / 10 / 250 * 1.6; + float corner_fade_width = (corner_fade_width_inner + fade_out_to_corner * (corner_fade_width_outer - corner_fade_width_inner)); + + // Get a vector perpendicular to the crease that we can shift the crease to blend between bottom/top and sides + vec2 corner_crease_perp_dir = normalize(vec2(corner_crease_dir.y, corner_crease_dir.x)); + vec2 corner_coord_shifted = outermap_coord_warped_ctr_at_screen_corner - corner_crease_perp_dir * corner_fade_width / 2; + vec2 corner_crease_dir_shifted = corner_crease_dir - corner_crease_perp_dir * corner_fade_width / 2; + + // Get the distance to this shifted crease + float distance_from_crease_shifted = HHLP_GetDistanceToLine(corner_coord_shifted.x, corner_coord_shifted.y, 1, corner_crease_dir_shifted.y / corner_crease_dir_shifted.x, 0 ); + + float top_half_mask = smoothstep(0.55, 0.5, tube_curved_coord.y); + + // Get a mask which transitions between sides and top/bottom at the corner crease + float top_bottom_vs_sides_mask = dot(normalize(corner_coord_shifted), normalize(corner_crease_dir_shifted)) > 0 ? 1 - smoothstep(0, corner_fade_width / 2, distance_from_crease_shifted) : 1; + + // Masks isolating specific parts + float sides_mask = 1 - top_bottom_vs_sides_mask; + float top_mask = top_half_mask * top_bottom_vs_sides_mask; + float bottom_mask = (1 -top_half_mask) * top_bottom_vs_sides_mask; + + float corner_mask = smoothstep(corner_fade_width / 2, 0, distance_from_crease); + + float top_corner_mask = corner_mask * top_half_mask; + float bottom_corner_mask = corner_mask * (1 - top_half_mask); + + float frame_inner_edge_mask = (HSM_FRM_INNER_EDGE_THICKNESS == 0) ? 0 : 1 - HSM_GetCornerMask( (BEZEL_OUTSIDE_CURVED_COORD - 0.5) * (1 + (HSM_FRM_INNER_EDGE_THICKNESS / vec2(SCREEN_ASPECT, 1))) + 0.5, + SCREEN_ASPECT, + HSM_BZL_OUTER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS, + 0.9); + float outside_tube_mask_wider = 1 - HSM_GetCornerMask(tube_curved_coord_ctr * 0.996 + 0.5, SCREEN_ASPECT, bezel_corner_radius, 0.9); + float tube_shadow_mask = HSM_GetCornerMask(tube_curved_coord_ctr + 0.5, SCREEN_ASPECT, bezel_corner_radius, 0); + float tube_edge_shadow_mult = HSM_BZL_INNER_EDGE_SHADOW * (tube_shadow_mask) + (1 - HSM_BZL_INNER_EDGE_SHADOW); + + float edge_highlight_mask = 0; + + // ---------------------------------------------------- + // Generated Bezel + // ---------------------------------------------------- + + /* This first bit is to get a mapping of the space outside of the screen which is continuous + This is more complicated than you would expect because since we are using curved coordinates + there are discontinuities outside the normal screen corners, e.g. where x > 1 and y > 1 + So instead of trying to use the coordinates from the screen/tube we use a larger space + and subtract the screen space to see how far we are outside of the sreen + */ + float hmbz_bezel_brightness_top = 0.5; + float hmbz_bezel_brightness_sides = 1; + float hmbz_bezel_brightness_bottom = 2; + + float hmbz_bezel_highlight_edge = 0.9; + float hmbz_bezel_highlight_top = 0.2; + float hmbz_bezel_highlight_bottom = 0.3; + float hmbz_bezel_highlight_sides = 0.2; + + float hmbz_bezel_highlight_falloff_speed = 0.5; + float hmbz_bezel_highlight_width = 0.25; + + float hmbz_bezel_edge_highlight_width = 0.8; + + float hmbz_bezel_brightness_frame_inner_edge = 0.014; + float hmbz_bezel_brightness_frame_outer_edge = 0.0; + float hmbz_brightness_shadow = 0; + float hmbz_frame_brightness = 100; + + // Not sure why we need linearize this but it seems to have a smoother range this way + vec3 base_color = HSM_Linearize(vec4(HSM_HSVtoRGB(vec3(HSM_BZL_COLOR_HUE, HSM_BZL_COLOR_SATURATION, HSM_BZL_COLOR_VALUE)), 1), DEFAULT_SRGB_GAMMA).rgb; + float noise_mask = clamp(fract(sin(dot(tube_curved_coord_ctr + vec2(0.5, 0.5) + 1, vec2(12.9898, 78.233))) * 43758.5453), 0, 1); + vec3 base_color_with_noise = mix(base_color, 1.5 * base_color * noise_mask, HSM_BZL_NOISE); + vec3 top_color = hmbz_bezel_brightness_top * HSM_BZL_BRIGHTNESS * base_color_with_noise; + vec3 bottom_color = hmbz_bezel_brightness_bottom * HSM_BZL_BRIGHTNESS * base_color_with_noise; + vec3 sides_color = hmbz_bezel_brightness_sides * HSM_BZL_BRIGHTNESS * base_color_with_noise; + + vec3 frame_base_color = base_color; + vec3 frame_base_color_with_noise = base_color_with_noise; + if (HSM_FRM_USE_INDEPENDENT_COLOR > 0) + { + frame_base_color = HSM_Linearize(vec4(HSM_HSVtoRGB(vec3(HSM_FRM_COLOR_HUE, HSM_FRM_COLOR_SATURATION, HSM_FRM_COLOR_VALUE)), 1), DEFAULT_SRGB_GAMMA).rgb; + frame_base_color_with_noise = mix(frame_base_color, 1.5 * frame_base_color * noise_mask, HSM_FRM_NOISE); + } + + vec3 frame_color = hmbz_frame_brightness / 100 * mix(frame_base_color, 1.5 * frame_base_color * noise_mask, 0.6 * HSM_BZL_NOISE);; + vec3 outside_frame_color = hmbz_brightness_shadow * base_color_with_noise; + + vec3 bezel_diffuse_color = mix(sides_color, top_color, top_mask); + bezel_diffuse_color = mix(bezel_diffuse_color, bottom_color, bottom_mask); + + float top_center_highlight_mask = hmbz_bezel_highlight_top * top_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.5, hmbz_bezel_highlight_falloff_speed)); + float bottom_center_highlight_mask = hmbz_bezel_highlight_bottom * bottom_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.5, hmbz_bezel_highlight_falloff_speed)); + float sides_highlight_mask = hmbz_bezel_highlight_sides * sides_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_highlight_width, 0, abs(tube_curved_coord_ctr.y)), vec2(0.5, hmbz_bezel_highlight_falloff_speed)); + + float edge_top_center_highlight_mask = hmbz_bezel_highlight_top * top_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.8, 0)); + float edge_bottom_center_highlight_mask = hmbz_bezel_highlight_bottom * bottom_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.8, 0)); + float edge_sides_highlight_mask = hmbz_bezel_highlight_sides * sides_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.y)), vec2(0.8, 0)); + + edge_highlight_mask = hmbz_bezel_highlight_edge * edge_mask * (edge_top_center_highlight_mask + edge_bottom_center_highlight_mask + edge_sides_highlight_mask); + + // Combine all the individual highlights into one mask + float combined_highlight_mask = (1 + 2.5 * HSM_BZL_NOISE) * (1 - noise_mask * 2.5 * HSM_BZL_NOISE) * (top_center_highlight_mask + bottom_center_highlight_mask + sides_highlight_mask); + float bezel_highlight_multiplier = HSM_BZL_HIGHLIGHT * combined_highlight_mask + HSM_BZL_HIGHLIGHT * edge_highlight_mask; + vec3 bezel_color = bezel_diffuse_color * (1 + 15 * bezel_highlight_multiplier) + 1 * bezel_highlight_multiplier; + + // Add the inner edge highlight on top of the bezel color which has it's own highlight + float inner_edge_highlight_multiplier = hmbz_bezel_brightness_frame_inner_edge + HSM_BZL_HIGHLIGHT * 10 * hmbz_bezel_brightness_frame_inner_edge; + vec3 frame_inner_edge_color = frame_base_color * (1 + 15 * inner_edge_highlight_multiplier) + 0.5 * inner_edge_highlight_multiplier; + + bezel_color = mix(bezel_color, frame_inner_edge_color, frame_inner_edge_mask); + + float dist_inside_outer_edge = min(0.50 - abs(frame_outside_coord_ctr.x), 0.50 - abs(frame_outside_coord_ctr.y)); + float frame_outer_edge_width = HSM_FRM_OUTER_EDGE_THICKNESS; + vec3 frame_diffuse_color = mix(frame_color, 0.2 * frame_color, HSM_FRM_OUTER_EDGE_SHADING * smoothstep(frame_outer_edge_width, 0, dist_inside_outer_edge)); + + if (HSM_FRM_TEXTURE_OPACITY > 0) + { + // TODO need to do Mipmapping sample? + vec4 frame_texture_color = HSM_Linearize(texture(FrameTextureImage, FRAME_OUTSIDE_CURVED_COORD), DEFAULT_SRGB_GAMMA); + frame_diffuse_color = HSM_BlendModeLayerMix(vec4(frame_diffuse_color, 1), frame_texture_color, HSM_FRM_TEXTURE_BLEND_MODE, HSM_FRM_TEXTURE_OPACITY).rgb; + } + + // Composite in color from outside the bezel + vec3 bezel_and_frame_rgb = mix(bezel_color, frame_diffuse_color, OUTSIDE_BEZEL_MASK); + + // Get masks on side of frame to multiply together to get a shadow around the frame + // Get vector from the screen edge outward + float frame_edge = 0.495; + float dist_outside_frame = length(clamp(abs(frame_outside_coord_ctr * 1.01) - frame_edge, 0, 1) * vec2(SCREEN_ASPECT, 1)); + + vec4 frame_shadow_layer = vec4(0); + if (HSM_FRM_OPACITY > 0.001) + frame_shadow_layer.a = SHADOW_OUTSIDE_FRAME_MASK * HHLP_QuadraticBezier(smoothstep(HSM_FRM_SHADOW_WIDTH, 0, dist_outside_frame), vec2(1, 0)); + + //---------------------------------------------------- + // Generated Bezel + //---------------------------------------------------- + + vec4 bezel_layer = vec4(0); + vec4 frame_layer = vec4(0); + + if (HSM_BZL_OPACITY > 0 || HSM_FRM_OPACITY > 0) + { + // Create image of bezel & frame with outside of frame transparent + vec4 bezel_and_frame_rgba = vec4(bezel_and_frame_rgb, 1); + + // Cut out Tube Area + if (HSM_STATIC_LAYERS_GAMMA != 1) + bezel_and_frame_rgba = HSM_ApplyGamma(bezel_and_frame_rgba, HSM_STATIC_LAYERS_GAMMA); + + bezel_and_frame_rgba.rgb = ApplyAmbientImage(bezel_and_frame_rgba.rgb, + ambient_lighting_image.rgb, + HSM_BZL_AMBIENT_LIGHTING_MULTIPLIER, + 1, + HSM_BZL_BLEND_MODE); + + float FRAME_AND_BEZEL_MASK = outside_tube_mask * (1 - OUTSIDE_FRAME_MASK); + + if (HSM_BZL_OPACITY > 0 || HSM_FRM_OPACITY > 0) + bezel_layer = clamp(bezel_and_frame_rgba * FRAME_AND_BEZEL_MASK, 0, 1); + + frame_shadow_layer *= HSM_FRM_SHADOW_OPACITY; + + if (HSM_FRM_SHADOW_OPACITY > 0) + bezel_layer = BlendModeMaskLayerMix(frame_shadow_layer, + bezel_layer, + BLEND_MODE_NORMAL, + MASK_MODE_ALL, + 0, + SHOW_ON_DUALSCREEN_MODE_BOTH, + 1); + + + float bezel_opacity_mult = HSM_BZL_OPACITY + OUTSIDE_BEZEL_MASK * (1 - HSM_BZL_OPACITY); + float frame_opacity_mult = HSM_FRM_OPACITY + (1 - OUTSIDE_BEZEL_MASK) * (1 - HSM_FRM_OPACITY); + + bezel_layer *= bezel_opacity_mult * frame_opacity_mult; + } + + float TUBE_MASK_EXPAND = HSM_GetCornerMask((tube_curved_coord - 0.5) * 0.997 + 0.5, SCREEN_ASPECT, bezel_corner_radius, 0.99); + + vec4 tube_bg_layer = vec4(0, 0, 0, TUBE_MASK_EXPAND * HSM_GetTubeDiffuseOpacity()); + +// end of ifndef LAYERS_UNDER_CRT +#endif + + //----------------------------------------------------------------------------------------- + // Background + //----------------------------------------------------------------------------------------- + vec2 bg_size = SCREEN_ASPECT < 1 ? textureSize(BackgroundVertImage, 0) : textureSize(BackgroundImage, 0); + BACKGROUND_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_EXPLICIT, + 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_SCALE_KEEP_ASPECT, + HSM_BG_FILL_MODE, + true, + USE_INHERITED_COORD_OFF, + BACKGROUND_COORD, + BACKGROUND_SCALE); + + if (HSM_BG_MIRROR_WRAP == 1) + BACKGROUND_CURVED_COORD = HSM_GetMirrorWrapCoord(BACKGROUND_CURVED_COORD); + + vec4 bg_image = vec4(0); + if (HSM_BG_OPACITY > 0) + { + if (SCREEN_ASPECT > 1) + bg_image = HSM_GetMipmappedTexSample(BackgroundImage, BACKGROUND_CURVED_COORD, BACKGROUND_SCALE, HSM_BG_MIPMAPPING_BLEND_BIAS); + else + bg_image = HSM_GetMipmappedTexSample(BackgroundVertImage, BACKGROUND_CURVED_COORD, BACKGROUND_SCALE, HSM_BG_MIPMAPPING_BLEND_BIAS); + + // Premultiply Alpha + bg_image = HSM_GetPreMultipliedColorLinear(bg_image, HSM_BG_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA); + + // HSV Adjustments + bg_image.rgb = HSM_ApplyHSVAdjustment(bg_image.rgb, HSM_BG_HUE, HSM_BG_SATURATION, HSM_BG_BRIGHTNESS, HSM_BG_COLORIZE_ON, HSM_BG_GAMMA); + + if (HSM_STATIC_LAYERS_GAMMA != 1) + bg_image = HSM_ApplyGamma(bg_image, HSM_STATIC_LAYERS_GAMMA); + + bg_image.rgb = ApplyAmbientImage(bg_image.rgb, + ambient_lighting_image.rgb, + HSM_BG_AMBIENT_LIGHTING_MULTIPLIER, + HSM_BG_APPLY_AMBIENT_IN_ADD_MODE, + HSM_BG_BLEND_MODE); + } + + //---------------------------------------------------- + // Device Image + //---------------------------------------------------- + vec2 device_size = SCREEN_ASPECT < 1 ? textureSize(DeviceVertImage, 0) : textureSize(DeviceImage, 0); + DEVICE_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_EXPLICIT, + 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_SCALE_KEEP_ASPECT, + HSM_DEVICE_FILL_MODE, + true, + HSM_DEVICE_COPY_INHERITED_COORD, + DEVICE_COORD, + DEVICE_SCALE); + + vec4 device_image = vec4(0); + if (HSM_DEVICE_OPACITY > 0) + { + device_image = SCREEN_ASPECT < 1 ? HSM_GetMipmappedTexSample(DeviceVertImage, DEVICE_CURVED_COORD, DEVICE_SCALE, HSM_DEVICE_MIPMAPPING_BLEND_BIAS) : + HSM_GetMipmappedTexSample(DeviceImage, DEVICE_CURVED_COORD, DEVICE_SCALE, HSM_DEVICE_MIPMAPPING_BLEND_BIAS); + + // Premultiply Alpha + device_image = HSM_GetPreMultipliedColorLinear(device_image, HSM_DEVICE_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA); + + // HSV Adjustments + device_image.rgb = HSM_ApplyHSVAdjustment(device_image.rgb, HSM_DEVICE_HUE, HSM_DEVICE_SATURATION, HSM_DEVICE_BRIGHTNESS, HSM_DEVICE_COLORIZE_ON, HSM_DEVICE_GAMMA); + + if (HSM_STATIC_LAYERS_GAMMA != 1) + device_image = HSM_ApplyGamma(device_image, HSM_STATIC_LAYERS_GAMMA); + + device_image.rgb = ApplyAmbientImage(device_image.rgb, + ambient_lighting_image.rgb, + HSM_DEVICE_AMBIENT_LIGHTING_MULTIPLIER, + HSM_DEVICE_APPLY_AMBIENT_IN_ADD_MODE, + HSM_DEVICE_BLEND_MODE); + } + + //---------------------------------------------------- + // LED Image + //---------------------------------------------------- + vec4 led_image = vec4(0); + if (HSM_LED_OPACITY > 0) + { + vec2 led_size = textureSize(LEDImage, 0); + LED_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_EXPLICIT, + 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_SCALE_KEEP_ASPECT, + HSM_LED_FILL_MODE, + true, + USE_INHERITED_COORD_OFF, + LED_COORD, + LED_SCALE); + + led_image = HSM_GetMipmappedTexSample(LEDImage, LED_CURVED_COORD, LED_SCALE, HSM_LED_MIPMAPPING_BLEND_BIAS); + + // Premultiply Alpha + led_image = HSM_GetPreMultipliedColorLinear(led_image, HSM_LED_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA); + + // HSV Adjustments + led_image.rgb = HSM_ApplyHSVAdjustment(led_image.rgb, HSM_LED_HUE, HSM_LED_SATURATION, HSM_LED_BRIGHTNESS, HSM_LED_COLORIZE_ON, HSM_LED_GAMMA); + + // STATIC GAMMA + if (HSM_STATIC_LAYERS_GAMMA != 1) + led_image = HSM_ApplyGamma(led_image, HSM_STATIC_LAYERS_GAMMA); + + led_image.rgb = ApplyAmbientImage(led_image.rgb, + ambient_lighting_image.rgb, + HSM_LED_AMBIENT_LIGHTING_MULTIPLIER, + HSM_LED_APPLY_AMBIENT_IN_ADD_MODE, + HSM_LED_BLEND_MODE); + } + + //---------------------------------------------------- + // Decal Image + //---------------------------------------------------- + vec2 decal_size = textureSize(DecalImage, 0); + DECAL_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_EXPLICIT, + 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_SCALE_KEEP_ASPECT, + HSM_DECAL_FILL_MODE, + true, + USE_INHERITED_COORD_OFF, + DECAL_COORD, + DECAL_SCALE); + vec4 decal_image = vec4(0); + if (HSM_DECAL_OPACITY > 0) + { + decal_image = HSM_GetMipmappedTexSample(DecalImage, DECAL_CURVED_COORD, DECAL_SCALE, HSM_DECAL_MIPMAPPING_BLEND_BIAS); + + // Premultiply Alpha + decal_image = HSM_GetPreMultipliedColorLinear(decal_image, HSM_DECAL_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA); + + // HSV Adjustments + decal_image.rgb = HSM_ApplyHSVAdjustment(decal_image.rgb, HSM_DECAL_HUE, HSM_DECAL_SATURATION, HSM_DECAL_BRIGHTNESS, HSM_DECAL_COLORIZE_ON, HSM_DECAL_GAMMA); + + // STATIC GAMMA + if (HSM_STATIC_LAYERS_GAMMA != 1) + decal_image = HSM_ApplyGamma(decal_image, HSM_STATIC_LAYERS_GAMMA); + + decal_image.rgb = ApplyAmbientImage(decal_image.rgb, + ambient_lighting_image.rgb, + HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER, + HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE, + HSM_DECAL_BLEND_MODE); + } + +//---------------------------------------------------- +// ADV Get Additional Layers and Composite +//---------------------------------------------------- + vec2 top_size = textureSize(TopLayerImage, 0); + TOP_IMAGE_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_EXPLICIT, + 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_SCALE_KEEP_ASPECT, + HSM_TOP_FILL_MODE, + true, + USE_INHERITED_COORD_OFF, + TOP_IMAGE_COORD, + TOP_IMAGE_SCALE); + + if (HSM_TOP_MIRROR_WRAP == 1) + TOP_IMAGE_CURVED_COORD = HSM_GetMirrorWrapCoord(TOP_IMAGE_CURVED_COORD); + + vec4 top_image = vec4(0); + if (HSM_TOP_OPACITY > 0) + { + // Get the top image color and masking values if needed + top_image = HSM_GetMipmappedTexSample(TopLayerImage, TOP_IMAGE_CURVED_COORD, TOP_IMAGE_SCALE, HSM_TOP_MIPMAPPING_BLEND_BIAS); + + // Premultiply Alpha + top_image = HSM_GetPreMultipliedColorLinear(top_image, HSM_TOP_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA); + + // HSV Adjustments + top_image.rgb = HSM_ApplyHSVAdjustment(top_image.rgb, HSM_TOP_HUE, HSM_TOP_SATURATION, HSM_TOP_BRIGHTNESS, HSM_TOP_COLORIZE_ON, HSM_TOP_GAMMA); + + // STATIC GAMMA + if (HSM_STATIC_LAYERS_GAMMA != 1) + top_image = HSM_ApplyGamma(top_image, HSM_STATIC_LAYERS_GAMMA); + + top_image.rgb = ApplyAmbientImage(top_image.rgb, + ambient_lighting_image.rgb, + HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER, + HSM_TOP_APPLY_AMBIENT_IN_ADD_MODE, + HSM_TOP_BLEND_MODE); + } + + //---------------------------------------------------- + // Cabinet Glass Image + //---------------------------------------------------- + vec4 cab_glass_image = vec4(0); + + if (HSM_CAB_GLASS_OPACITY > 0) + { + vec2 cab_glass_size = textureSize(CabinetGlassImage, 0); + CAB_GLASS_CURVED_COORD = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_EXPLICIT, + 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_SCALE_KEEP_ASPECT, + HSM_CAB_GLASS_FILL_MODE, + true, + USE_INHERITED_COORD_OFF, + CAB_GLASS_COORD, + CAB_GLASS_SCALE); + + // Add Scaling + CAB_GLASS_CURVED_COORD = (CAB_GLASS_CURVED_COORD - 0.5) * 1 / HSM_CAB_GLASS_SCALE + 0.5; + + // Sample Texture + cab_glass_image = HSM_GetMipmappedTexSample(CabinetGlassImage, CAB_GLASS_CURVED_COORD, CAB_GLASS_SCALE, HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS); + + // Premultiply Alpha + cab_glass_image = HSM_GetPreMultipliedColorLinear(cab_glass_image, HSM_CAB_GLASS_SOURCE_MATTE_TYPE, DEFAULT_SRGB_GAMMA); + + // HSV Adjustments + cab_glass_image.rgb = HSM_ApplyHSVAdjustment(cab_glass_image.rgb, HSM_CAB_GLASS_HUE, HSM_CAB_GLASS_SATURATION, HSM_CAB_GLASS_BRIGHTNESS, HSM_CAB_GLASS_COLORIZE_ON, HSM_CAB_GLASS_GAMMA); + + // STATIC GAMMA + if (HSM_STATIC_LAYERS_GAMMA != 1) + cab_glass_image = HSM_ApplyGamma(cab_glass_image, HSM_STATIC_LAYERS_GAMMA); + + cab_glass_image.rgb = ApplyAmbientImage(cab_glass_image.rgb, + ambient_lighting_image.rgb, + HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER, + HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE, + HSM_CAB_GLASS_BLEND_MODE); + } + + + //----------------------------------------------------------------------------------------- + // CUTOUT MASK + //----------------------------------------------------------------------------------------- + CUTOUT_MASK = 1; + + vec2 temp_scale = vec2(0.5); + vec2 temp_coord = vec2(0.5); + + vec2 cutout_base_scale_offset = vec2(0.5); + + if ( HSM_CUTOUT_SCALE_MODE == INHERITED_SCALE_MODE_VIEWPORT ) + cutout_base_scale_offset *= vec2(DEFAULT_UNCORRECTED_BEZEL_SCALE.y * SCREEN_ASPECT / output_aspect, DEFAULT_BEZEL_SCALE.y); + + vec2 cutout_coord = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + HSM_CUTOUT_ASPECT_MODE, + 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_KEEP_ASPECT, + FILL_MODE_STRETCH, + false, + USE_INHERITED_COORD_OFF, + temp_coord, + temp_scale); + + CUTOUT_MASK = 1 - HSM_GetCornerMask(cutout_coord, SCREEN_ASPECT, HSM_CUTOUT_CORNER_RADIUS, 0.8); + + //----------------------------------------------------------------------------------------- + // Full Viewport Vignette + //----------------------------------------------------------------------------------------- + vec4 vignette_layer = vec4(0); + if (HSM_VIEWPORT_VIGNETTE_OPACITY > 0) + { + vec2 vignette_coord = HSM_GetScaledCoord(VIEWPORT_COORD, + VIEWPORT_UNSCALED_COORD, + TEXTURE_ASPECT_MODE_VIEWPORT, + 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, + 0, + FILL_MODE_STRETCH, + false, + USE_INHERITED_COORD_OFF, + temp_coord, + temp_scale); + + vignette_layer.a += 0.75 * HHLP_QuadraticBezier(1 - HSM_GetVignetteFactor(vignette_coord, HSM_VIEWPORT_VIGNETTE_OPACITY, 1), vec2(1, 0.5)); + } + + + //----------------------------------------------------------------------------------------- + // COMPOSITE ALL LAYERS + //----------------------------------------------------------------------------------------- + + vec4 frag_color_linear = vec4(0); + + int start_layer = 0; + int end_layer = int(MAX_LAYER_ORDER); + +#ifdef LAYERS_OVER_CRT + start_layer = int(HSM_CRT_LAYER_ORDER); + end_layer = int(MAX_LAYER_ORDER); +#else + start_layer = 0; + end_layer = int(HSM_CRT_LAYER_ORDER - 1); +#endif + + OUTSIDE_TUBE_MASK_FOR_IMAGE = 1 - HSM_GetCornerMask(tube_curved_coord_ctr * 1.003 + 0.5, SCREEN_ASPECT, HSM_FRM_OUTER_CORNER_RADIUS, 1); + + for(int i=start_layer; i <= end_layer; i++) + { + // BACKGROUND + if (HSM_BG_LAYER_ORDER == i) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + bg_image, + HSM_BG_BLEND_MODE, + HSM_BG_MASK_MODE, + HSM_BG_CUTOUT_MODE, + HSM_BG_DUALSCREEN_VIS_MODE, + HSM_BG_OPACITY); + + // VIGNETTE + if (HSM_VIEWPORT_VIGNETTE_LAYER_ORDER == i) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + vignette_layer, + BLEND_MODE_NORMAL, + HSM_VIEWPORT_VIGNETTE_MASK_MODE, + HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE, + SHOW_ON_DUALSCREEN_MODE_BOTH, + HSM_VIEWPORT_VIGNETTE_OPACITY); + // LED IMAGE + if (HSM_LED_LAYER_ORDER == i) + if (HSM_LED_OPACITY > 0) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + led_image, + HSM_LED_BLEND_MODE, + HSM_LED_MASK_MODE, + HSM_LED_CUTOUT_MODE, + HSM_LED_DUALSCREEN_VIS_MODE, + HSM_LED_OPACITY); + + // DEVICE IMAGE + if (HSM_DEVICE_LAYER_ORDER == i) + if (HSM_DEVICE_OPACITY > 0) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + device_image, + HSM_DEVICE_BLEND_MODE, + HSM_DEVICE_MASK_MODE, + HSM_DEVICE_CUTOUT_MODE, + HSM_DEVICE_DUALSCREEN_VIS_MODE, + HSM_DEVICE_OPACITY); + + // DECAL IMAGE + if (HSM_DECAL_LAYER_ORDER == i) + if (HSM_DECAL_OPACITY > 0) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + decal_image, + HSM_DECAL_BLEND_MODE, + HSM_DECAL_MASK_MODE, + HSM_DECAL_CUTOUT_MODE, + HSM_DECAL_DUALSCREEN_VIS_MODE, + HSM_DECAL_OPACITY); + + // CABINET GLASS + if (HSM_CAB_GLASS_LAYER_ORDER == i) + if (HSM_CAB_GLASS_OPACITY > 0) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + cab_glass_image, + HSM_CAB_GLASS_BLEND_MODE, + HSM_CAB_GLASS_MASK_MODE, + HSM_CAB_GLASS_CUTOUT_MODE, + HSM_CAB_GLASS_DUALSCREEN_VIS_MODE, + HSM_CAB_GLASS_OPACITY); + + + // Top Layer + if (HSM_TOP_LAYER_ORDER == i) + if (HSM_TOP_OPACITY > 0) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + top_image, + HSM_TOP_BLEND_MODE, + HSM_TOP_MASK_MODE, + HSM_TOP_CUTOUT_MODE, + HSM_TOP_DUALSCREEN_VIS_MODE, + HSM_TOP_OPACITY); + } + +#ifdef LAYERS_UNDER_CRT + + // Add background behind tube + frag_color_linear = HSM_PreMultAlphaBlend(frag_color_linear, tube_bg_layer); + + // GENERATED BEZEL LAYER + if (HSM_BZL_OPACITY > 0 || HSM_FRM_OPACITY > 0) + frag_color_linear = BlendModeMaskLayerMix(frag_color_linear, + bezel_layer, + HSM_BZL_BLEND_MODE, + MASK_MODE_ALL, + 0, + SHOW_ON_DUALSCREEN_MODE_BOTH, + 1); +#endif + + //----------------------------------------------------------------------------------------- + // MASK DEBUG DISPLAY + //----------------------------------------------------------------------------------------- + // Show a red overlay on the screen showing the mask for each mask mode + if (HSM_LAYERING_DEBUG_MASK_MODE != -1) + { + float debug_mask = 1; + if (HSM_LAYERING_DEBUG_MASK_MODE == -2) + debug_mask = CUTOUT_MASK; + else + debug_mask = GetMask(HSM_LAYERING_DEBUG_MASK_MODE); + + frag_color_linear = HSM_PreMultAlphaBlend(frag_color_linear, vec4(1, 0, 0, 1) * 0.15 * debug_mask); + frag_color_linear = HSM_PreMultAlphaBlend(frag_color_linear, vec4(0.05, 0.05, 0.05, 1) * 0.15 * (1 - debug_mask)); + frag_color_linear = clamp(frag_color_linear, 0, 1); + } + + FragColor = frag_color_linear; + + if (UNFLIPPED_VIEWPORT_COORD.x < (2 / global.OutputSize.x) && UNFLIPPED_VIEWPORT_COORD.y < (2 / global.OutputSize.y)) + FragColor = vec4(0.01, 0.01, 0.01, -1); + + return; +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang new file mode 100644 index 0000000..b6a49eb --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-horiz.slang @@ -0,0 +1,30 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +// #define VERTICAL_BLUR + +// Import Screen Scale Functions and global structure +#include "hsm-blur-outside-screen.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang new file mode 100644 index 0000000..d73a76d --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen-vert.slang @@ -0,0 +1,31 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +#define VERTICAL_BLUR + +// Import Screen Scale Functions and global structure +#include "hsm-blur-outside-screen.inc" + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen.inc new file mode 100644 index 0000000..25f2352 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-blur-outside-screen.inc @@ -0,0 +1,141 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "common/hsm-globals-and-reflection-params.inc" +#include "common/hsm-common-functions-bezel.inc" + +#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 vec2 VIEWPORT_COORD; + +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord * 1.0001; + VIEWPORT_COORD = vTexCoord; +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 1) in vec2 VIEWPORT_COORD; + +layout(location = 0) out vec4 FragColor; + +layout(set = 0, binding = 2) uniform sampler2D Source; +layout(set = 0, binding = 3) uniform sampler2D BR_MirrorLowResPass; + +layout(set = 0, binding = 4) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 5) uniform sampler2D InfoCachePassFeedback; + +float clamp_0_1(float in_value) +{ + return clamp(in_value, 0, 1); +} + +void main() +{ + if (HSM_REFLECT_BLUR_NUM_SAMPLES > 0) + { + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + vec2 tube_curved_coord_ctr = HSM_GetTubeCurvedCoord(SCREEN_COORD, 1, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1) - 0.5; + + //---------------------------------------------------- + // Calculate Outside mapping Coords + //---------------------------------------------------- + + /* This first big chunk is to get a mapping of the space outside of the screen which is continuous + This is more complicated than you would expect because since we are using curved coordinates + there are discontinuities outside the normal screen corners, e.g. where x > 1 and y > 1 + So instead of trying to use the coordinates from the screen/tube we use a larger space + and subtract the screen space to see how far we are outside of the sreen + */ + + // Additional scale to be applied to the tube scale to create an expanded mapping area + vec2 outermap_scale = vec2(1, 1) * (1.3 + 1); + + // Get a range width from the outer tube edge to the outer edge of the outermap + float outermap_range = 0.5 * (outermap_scale.y) * 0.7; + vec2 outermap_warped_coord_ctr = tube_curved_coord_ctr; + vec2 outermap_warped_outside_screen_vector = outermap_warped_coord_ctr - clamp(outermap_warped_coord_ctr, -0.490, 0.490); + float outside_ratio_warped = clamp(length(outermap_warped_outside_screen_vector) / outermap_range, 0, 1); + + float hbl_sharpness_falloff_distance = 7 * HSM_REFLECT_BLUR_FALLOFF_DISTANCE; + if (HSM_GLASS_BORDER_ON == 1) + hbl_sharpness_falloff_distance = 20; + + float blur_ratio = clamp_0_1(outside_ratio_warped / (hbl_sharpness_falloff_distance / 100)); + float blur_midpoint = 0.12; + float hbl_sharpness_falloff_speed = 1; + blur_ratio = HHLP_QuadraticBezier (clamp_0_1(blur_ratio - blur_midpoint), vec2(0.05, hbl_sharpness_falloff_speed)); + + + blur_ratio = HSM_REFLECT_BLUR_MIN + blur_ratio * (HSM_REFLECT_BLUR_MAX - HSM_REFLECT_BLUR_MIN); + + vec3 col = vec3(0.0); + + #ifdef VERTICAL_BLUR + float dx = 0; + float dy = global.SourceSize.w; + #else + float dx = global.SourceSize.z; + float dy = 0; + #endif + + // This bizarre bit is to try to take the non linear nature of the blur falloff value and make it into a more linear behavior + float last_blur_ratio_blend_point = 0.6; + + float max_blur_range = 7; + float min_blur_range = 10; + float blur_falloff = ( 0.5 + + max_blur_range * smoothstep(1, last_blur_ratio_blend_point, blur_ratio) + + min_blur_range * smoothstep(last_blur_ratio_blend_point, 0, blur_ratio) + ) / 100; + + float blend_with_unblurred = smoothstep(-0.3, 0.3, HHLP_QuadraticBezier(blur_ratio, vec2(0.5, 0.5))); + + float k_total = 0.; + for (float i = -HSM_REFLECT_BLUR_NUM_SAMPLES; i <= HSM_REFLECT_BLUR_NUM_SAMPLES; i++) + { + float k = exp(-blur_falloff * (i) * (i)); + k_total += k; + + vec2 sample_coord = vTexCoord + vec2(float(i) * dx, float(i) * dy); + vec4 sampled_color = texture(Source, sample_coord); + + col += k * sampled_color.rgb; + } + vec4 blurred_color = vec4(col / k_total, 1.0); + + vec4 unblurred_color = texture(BR_MirrorLowResPass, vTexCoord); + FragColor = mix(unblurred_color, blurred_color, blend_with_unblurred); + } + else + { + FragColor = texture(Source, vTexCoord); + } +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang new file mode 100644 index 0000000..4a6b808 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-all-params.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-all-params.inc" +#include "hsm-cache-info.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang new file mode 100644 index 0000000..0ab9dda --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-no-reflect-params.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET + +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-cache-info.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang new file mode 100644 index 0000000..6cf2cc2 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info-screen-scale-params.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-cache-info.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info.inc new file mode 100644 index 0000000..47d2036 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-cache-info.inc @@ -0,0 +1,1087 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +vec2 HSM_GetScreenScaleWithEdgeHeight(vec2 edge_thickness, vec2 screen_scale) +// Edge Height is a 0 to 1 percentage of the screen height +{ + float output_aspect_ratio = global.FinalViewportSize.x / global.FinalViewportSize.y; + + float aspect_ratio = screen_scale.x / screen_scale.y; + //TODO need separate tube width + vec2 edge_width_height_as_scale = vec2(0, 0); + edge_width_height_as_scale.x = 1 + (edge_thickness.x / screen_scale.y) / aspect_ratio / output_aspect_ratio; + edge_width_height_as_scale.y = 1 + edge_thickness.y / screen_scale.y; + + return screen_scale * edge_width_height_as_scale; +} + +// Same as the HSM_GetScreenScale, but adds the width of the black edge +// Used for scaling the overlay outside the black edge +vec2 HSM_GetTubeScale(vec2 screen_scale, float image_placement_screen_height, vec2 edge_thickness) +{ + // Add switch for independent scale + if (HSM_BZL_USE_INDEPENDENT_SCALE == 1) + { + if (HSM_USE_IMAGE_FOR_PLACEMENT == 0) + screen_scale = screen_scale / screen_scale.y * HSM_BZL_INDEPENDENT_SCALE; + else + screen_scale = screen_scale / screen_scale.y * image_placement_screen_height; + } + + float normalized_screen_height = screen_scale.y / DEFAULT_UNCORRECTED_SCREEN_SCALE.y; + return HSM_GetScreenScaleWithEdgeHeight(edge_thickness * vec2(1.2 / 100.0 * normalized_screen_height), screen_scale * HSM_BZL_SCALE_OFFSET); +} + + +// HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE +vec2 HSM_GetScreenScale(float screen_aspect, float screen_height_from_image, vec2 cropped_size) +{ + if (HSM_ASPECT_RATIO_MODE > 5.5) + { + return vec2(1, 1); + } + else + { + float output_aspect_ratio = global.FinalViewportSize.x / global.FinalViewportSize.y; + + bool viewport_is_vertical = (global.FinalViewportSize.x < global.FinalViewportSize.y); + + float vertical_preset_scale_mult = HSM_VERTICAL_PRESET > 0.5 || viewport_is_vertical ? DEFAULT_SCREEN_HEIGHT_PORTRAIT_MULTIPLIER : 1; + float screen_height = HSM_NON_INTEGER_SCALE * vertical_preset_scale_mult; + + if (HSM_DUALSCREEN_MODE > 0) + screen_height *= 0.5; + + if (HSM_INT_SCALE_MODE == 0) + { + if (HSM_USE_PHYSICAL_SIZE_FOR_NON_INTEGER == 1) + { + float monitor_aspect_with_rotation = HSM_VERTICAL_PRESET > 0.5 || viewport_is_vertical ? 1 / HSM_PHYSICAL_MONITOR_ASPECT_RATIO : HSM_PHYSICAL_MONITOR_ASPECT_RATIO; + float monitor_height = HSM_PHYSICAL_MONITOR_DIAGONAL_SIZE / sqrt(monitor_aspect_with_rotation * monitor_aspect_with_rotation + 1); + float sim_screen_height = HSM_PHYSICAL_SIM_TUBE_DIAGONAL_SIZE / sqrt(screen_aspect * screen_aspect + 1); + + screen_height = 0.012 + sim_screen_height / monitor_height; + } + + if (HSM_USE_IMAGE_FOR_PLACEMENT == 1) + screen_height = screen_height_from_image; + + screen_height *= HSM_NON_INTEGER_SCALE_OFFSET; + + // If the integer tolerance is greater than zero see if we can snap to the nearest integer multiple + if (HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE > 0) + { + float integer_scale_multiple_vert = screen_height * global.FinalViewportSize.y / cropped_size.y; + float int_scale_remainder = fract(integer_scale_multiple_vert); + int_scale_remainder = (int_scale_remainder < 1 - int_scale_remainder) ? int_scale_remainder : 1 - int_scale_remainder; + float remainder_percent_of_screen_height = (int_scale_remainder * cropped_size.y) / (screen_height * global.FinalViewportSize.y); + if (remainder_percent_of_screen_height < HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE) + { + integer_scale_multiple_vert = round(integer_scale_multiple_vert); + screen_height = integer_scale_multiple_vert * cropped_size.y / global.FinalViewportSize.y; + } + } + + return vec2(screen_aspect / output_aspect_ratio, 1) * screen_height; + } + + // Get the maximum height that the integer scale needs to fit into + float viewport_res_y_without_border = global.FinalViewportSize.y - (1 - HSM_INT_SCALE_MAX_HEIGHT) * global.FinalViewportSize.y; + float viewport_res_x_without_border = global.FinalViewportSize.x - (1 - HSM_INT_SCALE_MAX_HEIGHT) * global.FinalViewportSize.x; + + if (HSM_DUALSCREEN_MODE == 1) + viewport_res_y_without_border = global.FinalViewportSize.y / 2 - 0.5 * (1 - HSM_INT_SCALE_MAX_HEIGHT) * global.FinalViewportSize.y; + + if (HSM_DUALSCREEN_MODE == 2) + viewport_res_x_without_border *= global.FinalViewportSize.x / 2 - 0.5 * (1 - HSM_INT_SCALE_MAX_HEIGHT) * global.FinalViewportSize.x; + + // If the viewport is taller than it is wide then get the height from the corresponding available width + if (viewport_is_vertical) viewport_res_y_without_border = viewport_res_x_without_border / screen_aspect; + + // If the screen is too high + if ((viewport_res_y_without_border * screen_aspect) > global.FinalViewportSize.x) + { + viewport_res_y_without_border = (1 - 2 * (1 - HSM_INT_SCALE_MAX_HEIGHT)) * global.FinalViewportSize.x / screen_aspect; + } + + float integer_scale_multiple_vert = clamp(floor(viewport_res_y_without_border / cropped_size.y) + HSM_INT_SCALE_MULTIPLE_OFFSET, 1, 100); + float integer_scale_vert = integer_scale_multiple_vert * cropped_size.y / global.FinalViewportSize.y; + + // Get the horizontal scale from the vertical scale and aspect ratio + float integer_scale_horz_from_aspect = screen_aspect / output_aspect_ratio * integer_scale_vert; + + // Get the scale as a multiple of the original x-size + float integer_scale_multiple_horz = integer_scale_horz_from_aspect * global.FinalViewportSize.x / cropped_size.x; + + // If we are using vertical scanlines or integer scale is set to both directions make the horizontal multiple an integer + float final_int_scale_mode = HSM_INT_SCALE_MODE; + if (HSM_INT_SCALE_MODE > 0.5) + { + if (HSM_GetUseVerticalScanlines(screen_aspect) == 1 || HSM_INT_SCALE_MODE == 2) + { + integer_scale_multiple_horz = round(integer_scale_multiple_horz); + final_int_scale_mode = 2; + } + } + + float both_axes = clamp((final_int_scale_mode - 1) * 10000, 0, 1); + integer_scale_multiple_vert += both_axes * abs(clamp((screen_aspect - 1) * 10000, -1, 0)) * HSM_INT_SCALE_MULTIPLE_OFFSET_LONG; + integer_scale_multiple_horz += both_axes * abs(clamp((screen_aspect - 1) * 10000, 0, 1)) * HSM_INT_SCALE_MULTIPLE_OFFSET_LONG; + + integer_scale_vert = integer_scale_multiple_vert * cropped_size.y / global.FinalViewportSize.y; + float integer_scale_horz = integer_scale_multiple_horz * cropped_size.x / global.FinalViewportSize.x; + + return vec2(integer_scale_horz, integer_scale_vert); + } +} + +vec2 HSM_GetScreenScaleFor2ndScreen(vec2 screen_scale, float screen_aspect) +{ + vec2 out_screen_scale = screen_scale; + float output_aspect = global.FinalViewportSize.x / global.FinalViewportSize.y; + + if (HSM_2ND_SCREEN_INDEPENDENT_SCALE == 1) + out_screen_scale = DEFAULT_UNCORRECTED_SCREEN_SCALE.y * 0.5 * vec2(screen_aspect / output_aspect, 1); + else + out_screen_scale = screen_scale.y * vec2(screen_aspect / output_aspect, 1); + + out_screen_scale *= HSM_2ND_SCREEN_SCALE_OFFSET; + + return out_screen_scale; +} + +float HSM_GetIsCorePreppedSizeVertical(float screen_index) +{ + vec2 rotated_original_size = HSM_GetRotatedScreenCorePreppedSize(screen_index); + float aspect_ratio = rotated_original_size.x / rotated_original_size.y; + return aspect_ratio < 1 ? 1 : 0; +} + +bool HSM_ResolutionIsEqual(vec2 in_res, vec2 match_res) +{ + return (in_res == match_res); +} + +float HSM_GetScreenAspect(float screen_index, vec2 cropped_size) +{ + float epsilon = 0.002; + vec2 original_size = HSM_GetRotatedCoreOriginalSize(); + vec2 rotated_original_size = HSM_GetRotatedCoreOriginalSize(); + float core_aspect_ratio = rotated_original_size.x / rotated_original_size.y; + float core_aspect_horizontal = (core_aspect_ratio < 1) ? 1 / core_aspect_ratio : core_aspect_ratio; + float horizontal_aspect = 0; + + vec2 atari_lynx_res = vec2(160, 102); + vec2 atari_2600_res = vec2(160, 228); + vec2 atari_2600_crop_res = vec2(152, 228); + vec2 nintendo_gameboy_advance_res = vec2(240, 160); + vec2 nintendo_gameboy_res = vec2(160, 144); + vec2 nintendo_ds_res = vec2(256, 192); + vec2 nintendo_ds_top_bottom_res = vec2(256, 384); + vec2 nintendo_ds_side_by_side_res = vec2(512, 192); + vec2 nintendo_3ds_top_res = vec2(400, 240); + vec2 nintendo_3ds_bottom_res = vec2(320, 240); + vec2 nintendo_3ds_top_bottom_res = vec2(400, 480); + vec2 nintendo_3ds_side_by_side_res = vec2(720, 240); + vec2 sega_saturn_fmv_res = vec2(352, 480); + vec2 sony_psp = vec2(480, 272); + vec2 sony_ps_fmv_res = vec2(320, 480); + vec2 sony_ps_fmv_res_2 = vec2(512, 480); + + // This should handle some PS games with weird resolutions like Tekken and Driver + float sony_ps_height = 448; + + if (HSM_ASPECT_RATIO_MODE == 0) + { + // If the vertical res is larger than 580 is is probably a modern square pixel resolution + // 576 seems to be PAL vertical resolution used sometimes + if (original_size.y > 580) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(sony_psp, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_gameboy_advance_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_gameboy_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_ds_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_ds_top_bottom_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_ds_side_by_side_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_3ds_top_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_3ds_bottom_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_3ds_top_bottom_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(nintendo_3ds_side_by_side_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(atari_lynx_res, original_size)) horizontal_aspect = core_aspect_horizontal; + else if (HSM_ResolutionIsEqual(atari_2600_res, original_size)) horizontal_aspect = 1.333; + else if (HSM_ResolutionIsEqual(atari_2600_crop_res, original_size)) horizontal_aspect = 1.333; + else if (HSM_ResolutionIsEqual(sony_ps_fmv_res, original_size)) horizontal_aspect = 1.333; + else if (HSM_ResolutionIsEqual(sony_ps_fmv_res_2, original_size)) horizontal_aspect = 1.333; + else if (original_size.y == sony_ps_height) horizontal_aspect = 1.333; + // Fall back to the explicit ratio + else horizontal_aspect = HSM_ASPECT_RATIO_EXPLICIT; + } + else + if (HSM_ASPECT_RATIO_MODE == 1) horizontal_aspect = HSM_ASPECT_RATIO_EXPLICIT; + else if (HSM_ASPECT_RATIO_MODE == 2) horizontal_aspect = 1.3333; + else if (HSM_ASPECT_RATIO_MODE == 3) horizontal_aspect = 1.5; + else if (HSM_ASPECT_RATIO_MODE == 4) horizontal_aspect = 1.7777; + else if (HSM_ASPECT_RATIO_MODE == 5) horizontal_aspect = cropped_size.x / cropped_size.y; + else if (HSM_ASPECT_RATIO_MODE == 6) horizontal_aspect = global.FinalViewportSize.x / global.FinalViewportSize.y; + else horizontal_aspect = 1.333; + + // Find what the vertical aspect would be, either the current horizontal_aspect (if it's already vertical) + // Or changing the horizontal aspect to vertical by taking the reciprocal + float vertical_aspect = 1 / horizontal_aspect; + float final_orientation = HSM_ASPECT_RATIO_ORIENTATION; + + if (HSM_ASPECT_RATIO_ORIENTATION < 0.5) + { + // Catch for Atari 2600 - Stella Emulator which would otherwise show up as a vertical aspect ratio + if ( + HSM_ResolutionIsEqual(atari_2600_res, original_size) || + HSM_ResolutionIsEqual(atari_2600_crop_res, original_size) || + HSM_ResolutionIsEqual(sega_saturn_fmv_res, original_size) || + HSM_ResolutionIsEqual(sony_ps_fmv_res, original_size) || + HSM_ResolutionIsEqual(sony_ps_fmv_res_2, original_size) || + original_size.y == sony_ps_height + ) + { + final_orientation = 1; + } + else + { + final_orientation = (HSM_GetIsCorePreppedSizeVertical(screen_index) > 0.5) ? 2 : 1; + } + } + + float final_aspect_ratio = (final_orientation < 1.5) ? horizontal_aspect : vertical_aspect; + + return final_aspect_ratio; +} + +int HSM_IsCoordIn2DRange(vec2 in_coord, vec4 in_2d_range) +{ + return (in_coord.x > in_2d_range.x && + in_coord.y > in_2d_range.y && + in_coord.x < in_2d_range.z && + in_coord.y < in_2d_range.w ) ? 1 : 0; +} + +// HSM_CROP_BLACK_ONLY +vec4 HSM_GetBlackOnlyCropInPixels(sampler2D in_sampler_2D, vec2 sample_start_pixel_coord, vec2 window_size, float num_samples, vec4 max_crop) +{ + // HSM_GetTexSampleFromSampleStartAndSize(sampler2D in_sampler, vec2 in_screen_coord, vec2 sample_start_pixel_coord, vec2 window_size) + + // Working except Bottom and Right edges jump back and forth and are not very accurate + + vec4 tex_sample = vec4(0); + float brightness = 0; + float test_crop = 0; + + float crop_left_px = max_crop.x; + float crop_top_px = max_crop.y; + float crop_right_px = max_crop.z; + float crop_bottom_px = max_crop.w; + + // Should use as many samples as crop pixels + float final_crop_left_px = crop_left_px; + test_crop = crop_left_px; + for (int i=0; i < crop_left_px; i++) + { + tex_sample = HSM_GetTexSampleFromSampleStartAndSize(in_sampler_2D, vec2((test_crop - 0.5) / window_size.x, 0.5), sample_start_pixel_coord, window_size); + brightness = tex_sample.r + tex_sample.g + tex_sample.b; + if (brightness > HSM_CROP_BLACK_THRESHOLD) + { + final_crop_left_px = min(final_crop_left_px, test_crop); + } + test_crop -= 1; + } + final_crop_left_px -= 1; + + float final_crop_top_px = crop_top_px; + test_crop = crop_top_px; + for (int i=0; i < crop_top_px; i++) + { + tex_sample = HSM_GetTexSampleFromSampleStartAndSize(in_sampler_2D, vec2(0.5, (test_crop - 0.5) / window_size.y), sample_start_pixel_coord, window_size); + brightness = tex_sample.r + tex_sample.g + tex_sample.b; + if (brightness > HSM_CROP_BLACK_THRESHOLD) + { + final_crop_top_px = test_crop; + } + test_crop -= 1; + } + final_crop_top_px -= 1; + + float final_crop_right_px = crop_right_px; + test_crop = crop_right_px; + for (int i=0; i < crop_right_px; i++) + { + tex_sample = HSM_GetTexSampleFromSampleStartAndSize(in_sampler_2D, vec2((window_size.x - test_crop + 0.5) / window_size.x, 0.5), sample_start_pixel_coord, window_size); + brightness = tex_sample.r + tex_sample.g + tex_sample.b; + if (brightness > HSM_CROP_BLACK_THRESHOLD) + { + final_crop_right_px = test_crop; + } + test_crop -= 1; + } + final_crop_right_px -= 2; + + float final_crop_bottom_px = crop_bottom_px; + test_crop = crop_bottom_px; + for (int i=0; i < crop_bottom_px; i++) + { + tex_sample = HSM_GetTexSampleFromSampleStartAndSize(in_sampler_2D, vec2(0.5, (window_size.y - test_crop + 0.5) / window_size.y), sample_start_pixel_coord, window_size); + brightness = tex_sample.r + tex_sample.g + tex_sample.b; + if (brightness > 0) + { + final_crop_bottom_px = test_crop; + } + test_crop -= 1; + } + final_crop_bottom_px -= 2; + + return clamp(vec4(final_crop_left_px, final_crop_top_px, final_crop_right_px, final_crop_bottom_px), 0, 512); +} + +void HSM_GetCroppedRotatedSizeAndPixelSampleAreaStart(float screen_index, sampler2D original_pass, inout vec2 cropped_rotated_size, inout vec2 cropped_rotated_size_with_res_mult, inout vec2 cropped_sample_area_start ) +{ + screen_index = HSM_GetSwappedScreenIndex(screen_index); + vec2 rotated_negative_crop_added_size = HSM_GetRotatedNegativeCropAddedSize(); + float prepped_size_aspect = rotated_negative_crop_added_size.y / rotated_negative_crop_added_size.x; + + float default_crop_left_px = floor(MAX_NEGATIVE_CROP * rotated_negative_crop_added_size.x); + float default_crop_top_px = floor(MAX_NEGATIVE_CROP * rotated_negative_crop_added_size.y); + float default_crop_right_px = floor(MAX_NEGATIVE_CROP * rotated_negative_crop_added_size.x); + float default_crop_bottom_px = floor(MAX_NEGATIVE_CROP * rotated_negative_crop_added_size.y); + + float zoom_crop_left_px = floor(HSM_CROP_PERCENT_ZOOM * rotated_negative_crop_added_size.x); + float zoom_crop_top_px = floor(HSM_CROP_PERCENT_ZOOM * rotated_negative_crop_added_size.y); + float zoom_crop_right_px = floor(HSM_CROP_PERCENT_ZOOM * rotated_negative_crop_added_size.x); + float zoom_crop_bottom_px = floor(HSM_CROP_PERCENT_ZOOM * rotated_negative_crop_added_size.y); + + float crop_left_px = floor(HSM_CROP_PERCENT_LEFT * rotated_negative_crop_added_size.x); + float crop_top_px = floor(HSM_CROP_PERCENT_TOP * rotated_negative_crop_added_size.y); + float crop_right_px = floor(HSM_CROP_PERCENT_RIGHT * rotated_negative_crop_added_size.x); + float crop_bottom_px = floor(HSM_CROP_PERCENT_BOTTOM * rotated_negative_crop_added_size.y); + + float final_crop_left_px = 0; + float final_crop_top_px = 0; + float final_crop_right_px = 0; + float final_crop_bottom_px = 0; + + cropped_rotated_size = vec2(100); + cropped_sample_area_start = vec2(100); + + if (HSM_DUALSCREEN_MODE > 0) + { + float zoom_crop = 0; + if (screen_index == 2) + { + crop_left_px = floor(HSM_2ND_SCREEN_CROP_PERCENT_LEFT * rotated_negative_crop_added_size.x); + crop_top_px = floor(HSM_2ND_SCREEN_CROP_PERCENT_TOP * rotated_negative_crop_added_size.y); + crop_right_px = floor(HSM_2ND_SCREEN_CROP_PERCENT_RIGHT * rotated_negative_crop_added_size.x); + crop_bottom_px = floor(HSM_2ND_SCREEN_CROP_PERCENT_BOTTOM * rotated_negative_crop_added_size.y); + zoom_crop = HSM_2ND_SCREEN_CROP_PERCENT_ZOOM; + + if (HSM_GetCoreImageSplitDirection() == 1) + { + default_crop_top_px = floor(rotated_negative_crop_added_size.y * (0.5 - HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET)); + crop_top_px = floor(crop_top_px / 2); + crop_bottom_px = floor(crop_bottom_px / 2); + } + else + { + default_crop_left_px = floor(rotated_negative_crop_added_size.x * (0.5 - HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET)); + crop_left_px = floor(crop_left_px / 2); + crop_right_px = floor(crop_right_px / 2); + } + } + else + { + zoom_crop = HSM_CROP_PERCENT_ZOOM; + if (HSM_GetCoreImageSplitDirection() == 1) + { + default_crop_bottom_px = floor(rotated_negative_crop_added_size.y * (0.5 + HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET)); + crop_top_px = floor(crop_top_px / 2); + crop_bottom_px = floor(crop_bottom_px / 2); + } + else + { + default_crop_right_px = floor(rotated_negative_crop_added_size.x * (0.5 + HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET)); + crop_left_px = floor(crop_left_px / 2); + crop_right_px = floor(crop_right_px / 2); + } + } + + vec2 base_cropped_size = rotated_negative_crop_added_size - vec2(final_crop_left_px + final_crop_right_px, final_crop_top_px + final_crop_bottom_px); + float crop_percent_zoom = 0; + + if (HSM_GetCoreImageSplitDirection() == 1) + { + zoom_crop_top_px = floor(base_cropped_size.x * zoom_crop / 2); + } + else + { + zoom_crop_left_px = floor(base_cropped_size.y * zoom_crop / 2); + } + + zoom_crop_right_px = zoom_crop_left_px; + zoom_crop_bottom_px = zoom_crop_top_px; + + // TODO currently overwriting split screen + final_crop_top_px += default_crop_top_px + crop_top_px + zoom_crop_top_px; + final_crop_left_px += default_crop_left_px + crop_left_px + zoom_crop_left_px; + final_crop_right_px += default_crop_right_px + crop_right_px + zoom_crop_right_px; + final_crop_bottom_px += default_crop_bottom_px + crop_bottom_px + zoom_crop_bottom_px; + } + else + { + // No Cropping + if (HSM_CROP_MODE == 0) + { + final_crop_left_px = default_crop_left_px; + final_crop_top_px = default_crop_top_px; + final_crop_right_px = default_crop_right_px; + final_crop_bottom_px = default_crop_bottom_px; + } + // Crop Only Black + else if (HSM_CROP_MODE == 1) + { + // vec4 max_crop = vec4(crop_left_px + zoom_crop_left_px, crop_top_px + zoom_crop_top_px, crop_right_px + zoom_crop_right_px, crop_bottom_px + zoom_crop_bottom_px); + vec4 max_crop = vec4(default_crop_left_px + crop_left_px + zoom_crop_left_px, default_crop_top_px + crop_top_px + zoom_crop_top_px, default_crop_right_px + crop_right_px + zoom_crop_right_px, default_crop_bottom_px + crop_bottom_px + zoom_crop_bottom_px); + + // Start and window where we are going to test for the black area + // vec2 black_sample_start_coord_px = vec2(default_crop_left_px, default_crop_top_px); + // vec2 black_sample_window = rotated_negative_crop_added_size - vec2(default_crop_left_px + default_crop_right_px, default_crop_top_px + default_crop_bottom_px); + + vec2 black_sample_start_coord_px = vec2(0); + vec2 black_sample_window = rotated_negative_crop_added_size; + + vec4 cropping = HSM_GetBlackOnlyCropInPixels(original_pass, black_sample_start_coord_px, black_sample_window, 100, max_crop); + + final_crop_left_px = cropping.x; + final_crop_top_px = cropping.y; + final_crop_right_px = cropping.z; + final_crop_bottom_px = cropping.w; + } + else + { + final_crop_top_px = default_crop_top_px + crop_top_px + zoom_crop_top_px; + final_crop_left_px = default_crop_left_px + crop_left_px + zoom_crop_left_px; + final_crop_bottom_px = default_crop_bottom_px + crop_bottom_px + zoom_crop_bottom_px; + final_crop_right_px = default_crop_right_px + crop_right_px + zoom_crop_right_px; + } + + } + + // Make sure we don't actually negatively crop + final_crop_top_px = clamp(final_crop_top_px, 0, 20000); + final_crop_bottom_px = clamp(final_crop_bottom_px, 0, 20000); + final_crop_left_px = clamp(final_crop_left_px, 0, 20000); + final_crop_right_px = clamp(final_crop_right_px, 0, 20000); + + cropped_rotated_size = rotated_negative_crop_added_size - vec2(final_crop_left_px + final_crop_right_px, final_crop_top_px + final_crop_bottom_px); + cropped_sample_area_start = vec2(final_crop_left_px, final_crop_top_px); + + vec2 sampling_mult = HSM_GetResMult(); + sampling_mult = HSM_ROTATE_CORE_IMAGE == 1 ? sampling_mult.yx : sampling_mult.xy; + cropped_rotated_size_with_res_mult = ceil(cropped_rotated_size * sampling_mult.xy); +} + +float HSM_GetParameterSum() +{ + float out_sum = (0 + + + HSM_GLOBAL_GRAPHICS_BRIGHTNESS * 100 + + HSM_STATIC_LAYERS_GAMMA + + // Night Lighting + + HSM_AMBIENT_LIGHTING_OPACITY * 100 + + abs(HSM_AMBIENT_LIGHTING_HUE) * 360 + + HSM_AMBIENT_LIGHTING_SATURATION * 100 + + HSM_AMBIENT_LIGHTING_VALUE * 100 + + HSM_AMBIENT_LIGHTING_SCALE * 100 + + HSM_AMBIENT_LIGHTING_ROTATE + + HSM_AMBIENT_LIGHTING_MIRROR_HORZ + + HSM_AMBIENT_LIGHTING_SCALE_MODE + + HSM_AMBIENT_LIGHTING_DITHERING_SAMPLES + + // Zoom & Pan + + HSM_VIEWPORT_ZOOM * 1000 + + HSM_VIEWPORT_POSITION_X * 1000 + + HSM_VIEWPORT_POSITION_Y * 1000 + + // // FLIP & ROTATE + + HSM_FLIP_VIEWPORT_VERTICAL + + HSM_FLIP_VIEWPORT_HORIZONTAL + // + HSM_FLIP_CORE_VERTICAL + // + HSM_FLIP_CORE_HORIZONTAL + // + HSM_ROTATE_CORE_IMAGE + + // // ASPECT RATIO + + HSM_ASPECT_RATIO_ORIENTATION + + HSM_ASPECT_RATIO_MODE + + HSM_ASPECT_RATIO_EXPLICIT + + // // SCALING + + HSM_INT_SCALE_MODE + + HSM_INT_SCALE_MULTIPLE_OFFSET + + HSM_INT_SCALE_MULTIPLE_OFFSET_LONG + + HSM_INT_SCALE_MAX_HEIGHT + + HSM_VERTICAL_PRESET + + HSM_NON_INTEGER_SCALE + + // // Extended Scale + // + HSM_USE_IMAGE_FOR_PLACEMENT + // + HSM_PLACEMENT_IMAGE_MODE + // + HSM_NON_INTEGER_SCALE_OFFSET * 100 + // + HSM_SNAP_TO_CLOSEST_INT_SCALE_TOLERANCE + + // // Position + // + HSM_SCREEN_POSITION_X * 1000 + // + HSM_SCREEN_POSITION_Y * 1000 + + // // CROPPING + + HSM_CROP_MODE + + HSM_CROP_PERCENT_ZOOM * 100 + + HSM_CROP_PERCENT_TOP * 100 + + HSM_CROP_PERCENT_BOTTOM * 100 + + HSM_CROP_PERCENT_LEFT * 100 + + HSM_CROP_PERCENT_RIGHT * 100 + + HSM_CROP_BLACK_THRESHOLD * 100 + + + HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR + + HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR + + // // DUAL SCREEN + + HSM_DUALSCREEN_MODE + + HSM_DUALSCREEN_CORE_IMAGE_SPLIT_MODE + + HSM_DUALSCREEN_CORE_IMAGE_SWAP_SCREENS + + HSM_DUALSCREEN_CORE_IMAGE_SPLIT_OFFSET * 100 + + HSM_DUALSCREEN_VIEWPORT_SPLIT_LOCATION * 1000 + + HSM_DUALSCREEN_SHIFT_POSITION_WITH_SCALE + + HSM_DUALSCREEN_POSITION_OFFSET_BETWEEN_SCREENS * 1000 + // + HSM_2ND_SCREEN_ASPECT_RATIO_MODE + // + HSM_2ND_SCREEN_INDEPENDENT_SCALE + + HSM_2ND_SCREEN_SCALE_OFFSET * 100 + + HSM_2ND_SCREEN_POS_X * 1000 + + HSM_2ND_SCREEN_POS_Y * 1000 + + HSM_2ND_SCREEN_CROP_PERCENT_ZOOM * 100 + + HSM_2ND_SCREEN_CROP_PERCENT_TOP * 100 + + HSM_2ND_SCREEN_CROP_PERCENT_BOTTOM * 100 + + HSM_2ND_SCREEN_CROP_PERCENT_LEFT * 100 + + HSM_2ND_SCREEN_CROP_PERCENT_RIGHT * 100 + + // // CURVATURE + + HSM_CURVATURE_MODE * 2 + + HSM_CURVATURE_2D_SCALE_LONG_AXIS * 100 + + HSM_CURVATURE_2D_SCALE_SHORT_AXIS * 100 + + HSM_CURVATURE_3D_RADIUS * 100 + + HSM_CURVATURE_3D_VIEW_DIST * 100 + + HSM_CURVATURE_3D_TILT_ANGLE_X * 100 + + HSM_CURVATURE_3D_TILT_ANGLE_Y * 100 + + + HSM_AB_COMPARE_AREA + + HSM_AB_COMPARE_SPLIT_POSITION + + HSM_AB_COMPARE_FREEZE_GRAPHICS + + // // TUBE DIFFUSE + + HSM_TUBE_DIFFUSE_OPACITY + + HSM_TUBE_DIFFUSE_MODE + // + HSM_TUBE_DIFFUSE_IMAGE_DUALSCREEN_VIS_MODE + // + HSM_TUBE_DIFFUSE_IMAGE_COLORIZE_ON + // + HSM_TUBE_DIFFUSE_IMAGE_HUE + // + HSM_TUBE_DIFFUSE_IMAGE_SATURATION + // + HSM_TUBE_DIFFUSE_IMAGE_BRIGHTNESS + // + HSM_TUBE_DIFFUSE_IMAGE_GAMMA + + // // SCREEN BLACK EDGE + + HSM_GLOBAL_CORNER_RADIUS + + HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE * 100 + + HSM_TUBE_BLACK_EDGE_SHARPNESS * 100 + + HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE * 100 + + HSM_TUBE_BLACK_EDGE_THICKNESS * 100 + + HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE * 100 + + HSM_TUBE_BLACK_EDGE_LAYERING_MODE + + // // BEZEL INDEPENDENT SCALE + + HSM_BZL_USE_INDEPENDENT_SCALE + + HSM_BZL_INDEPENDENT_SCALE * 100 + + HSM_BZL_USE_INDEPENDENT_CURVATURE + + HSM_BZL_INDEPENDENT_CURVATURE_SCALE_LONG_AXIS * 100 + + HSM_BZL_INDEPENDENT_CURVATURE_SCALE_SHORT_AXIS * 100 + + // // BEZEL GENERAL + + HSM_BZL_OPACITY * 100 + + HSM_BZL_BLEND_MODE + + HSM_BZL_WIDTH / 0.0008624 + + HSM_BZL_HEIGHT / 0.0008732 + + HSM_BZL_SCALE_OFFSET * 100 + + HSM_BZL_INNER_CURVATURE_SCALE * 100 + + HSM_BZL_INNER_CORNER_RADIUS_SCALE * 100 + +#ifdef HAS_BEZEL_PARAMS + // Bezel Params not in Screen Scale + + HSM_BZL_INNER_EDGE_THICKNESS / 0.00007 + + HSM_BZL_INNER_EDGE_SHARPNESS * 100 + + HSM_BZL_OUTER_POSITION_Y * 2000 + + HSM_BZL_OUTER_CURVATURE_SCALE * 100 + + HSM_BZL_OUTER_CORNER_RADIUS_SCALE * 100 + + HSM_BZL_BRIGHTNESS * 100 + + HSM_BZL_HIGHLIGHT * 100 + + HSM_BZL_INNER_EDGE_SHADOW * 100 + + // Bezel Color + + HSM_BZL_COLOR_HUE * 360 + + HSM_BZL_COLOR_SATURATION * 100 + + HSM_BZL_COLOR_VALUE * 100 + + HSM_BZL_NOISE * 100 + + HSM_BZL_AMBIENT_LIGHTING_MULTIPLIER * 100 + + // Frame Color + + HSM_FRM_USE_INDEPENDENT_COLOR + + HSM_FRM_COLOR_HUE * 360 + + HSM_FRM_COLOR_SATURATION * 100 + + HSM_FRM_COLOR_VALUE * 100 + + HSM_FRM_NOISE * 100 + + // Generated Frame + + HSM_FRM_OPACITY * 100 + + HSM_FRM_BLEND_MODE + + HSM_FRM_TEXTURE_OPACITY * 100 + + HSM_FRM_TEXTURE_BLEND_MODE + + HSM_FRM_INNER_EDGE_THICKNESS / 0.00003 + + HSM_FRM_THICKNESS / 0.0007 + + HSM_FRM_THICKNESS_SCALE_X * 100 + + HSM_FRM_OUTER_POS_Y * 100 + + HSM_FRM_OUTER_CURVATURE_SCALE * 100 + + HSM_FRM_OUTER_CORNER_RADIUS + + HSM_FRM_OUTER_EDGE_THICKNESS / 0.00006 + + HSM_FRM_OUTER_EDGE_SHADING * 100 + + HSM_FRM_SHADOW_OPACITY * 100 + + HSM_FRM_SHADOW_WIDTH * 1000 + + // Corner + + HSM_REFLECT_CORNER_FADE * 100 + + HSM_REFLECT_CORNER_FADE_DISTANCE * 100 + + HSM_REFLECT_CORNER_INNER_SPREAD * 100 + + HSM_REFLECT_CORNER_OUTER_SPREAD * 100 + + HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP + + HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM + + HSM_REFLECT_CORNER_SPREAD_FALLOFF +#endif + +#ifdef HAS_IMAGE_LAYER_PARAMS + + // Layer Order + + HSM_BG_LAYER_ORDER + + HSM_VIEWPORT_VIGNETTE_LAYER_ORDER + + HSM_CRT_LAYER_ORDER + + HSM_DEVICE_LAYER_ORDER + + HSM_CAB_GLASS_LAYER_ORDER + + HSM_DECAL_LAYER_ORDER + + HSM_LED_LAYER_ORDER + + HSM_TOP_LAYER_ORDER + + // Background + + HSM_BG_OPACITY + + HSM_BG_COLORIZE_ON + + HSM_BG_HUE * 360 + + HSM_BG_SATURATION * 100 + + HSM_BG_BRIGHTNESS * 100 + + HSM_BG_GAMMA + + HSM_BG_AMBIENT_LIGHTING_MULTIPLIER * 100 + + HSM_BG_APPLY_AMBIENT_IN_ADD_MODE + + HSM_BG_BLEND_MODE + + HSM_BG_SOURCE_MATTE_TYPE + + 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_FILL_MODE + + HSM_BG_SCALE_KEEP_ASPECT + + HSM_BG_SCALE * 100 + + HSM_BG_SCALE_X * 100 + + HSM_BG_POS_X * 100 + + HSM_BG_POS_Y * 100 + + HSM_BG_MIRROR_WRAP + + HSM_BG_MIPMAPPING_BLEND_BIAS + + // Background Vignette + + HSM_VIEWPORT_VIGNETTE_OPACITY * 100 + + HSM_VIEWPORT_VIGNETTE_MASK_MODE + + HSM_VIEWPORT_VIGNETTE_CUTOUT_MODE + + HSM_VIEWPORT_VIGNETTE_SCALE_MODE + + HSM_VIEWPORT_VIGNETTE_SCALE * 100 + + HSM_VIEWPORT_VIGNETTE_SCALE_X * 100 + + HSM_VIEWPORT_VIGNETTE_POS_X * 100 + + HSM_VIEWPORT_VIGNETTE_POS_Y * 100 + + // Cutout + + HSM_CUTOUT_ASPECT_MODE + + HSM_CUTOUT_EXPLICIT_ASPECT + + HSM_CUTOUT_SCALE_MODE + + HSM_CUTOUT_SCALE_FULL_WITH_ZOOM + + HSM_CUTOUT_KEEP_ASPECT + + HSM_CUTOUT_SCALE * 100 + + HSM_CUTOUT_SCALE_X * 100 + + HSM_CUTOUT_POS_X * 400 + + HSM_CUTOUT_POS_Y * 400 + + HSM_CUTOUT_CORNER_RADIUS + + // LED + + HSM_LED_OPACITY * 100 + + HSM_LED_COLORIZE_ON + + HSM_LED_HUE * 360 + + HSM_LED_SATURATION * 100 + + HSM_LED_BRIGHTNESS * 100 + + HSM_LED_GAMMA + + HSM_LED_AMBIENT_LIGHTING_MULTIPLIER * 100 + + HSM_LED_APPLY_AMBIENT_IN_ADD_MODE + + HSM_LED_BLEND_MODE + + HSM_LED_SOURCE_MATTE_TYPE + + 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_SCALE_KEEP_ASPECT + + HSM_LED_FILL_MODE + + HSM_LED_SCALE * 100 + + HSM_LED_SCALE_X * 100 + + HSM_LED_POS_X * 100 + + HSM_LED_POS_Y * 100 + + HSM_LED_MIPMAPPING_BLEND_BIAS + + // Device + + HSM_DEVICE_OPACITY * 100 + + HSM_DEVICE_COLORIZE_ON + + HSM_DEVICE_HUE * 360 + + HSM_DEVICE_SATURATION * 100 + + HSM_DEVICE_BRIGHTNESS * 100 + + HSM_DEVICE_GAMMA + + HSM_DEVICE_AMBIENT_LIGHTING_MULTIPLIER * 100 + + HSM_DEVICE_APPLY_AMBIENT_IN_ADD_MODE + + HSM_DEVICE_BLEND_MODE + + HSM_DEVICE_SOURCE_MATTE_TYPE + + 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_SCALE_KEEP_ASPECT + + HSM_DEVICE_FILL_MODE + + HSM_DEVICE_SCALE * 100 + + 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 + + HSM_DECAL_OPACITY * 100 + + HSM_DECAL_COLORIZE_ON + + HSM_DECAL_HUE * 360 + + HSM_DECAL_SATURATION * 100 + + HSM_DECAL_BRIGHTNESS * 100 + + HSM_DECAL_GAMMA + + HSM_DECAL_AMBIENT_LIGHTING_MULTIPLIER * 100 + + HSM_DECAL_APPLY_AMBIENT_IN_ADD_MODE + + HSM_DECAL_BLEND_MODE + + HSM_DECAL_SOURCE_MATTE_TYPE + + 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_SCALE_KEEP_ASPECT + + HSM_DECAL_FILL_MODE + + HSM_DECAL_SCALE * 100 + + HSM_DECAL_SCALE_X * 100 + + HSM_DECAL_POS_X * 100 + + HSM_DECAL_POS_Y * 100 + + HSM_DECAL_MIPMAPPING_BLEND_BIAS + + // // Cab Glass + + HSM_CAB_GLASS_OPACITY * 100 + + HSM_CAB_GLASS_COLORIZE_ON + + HSM_CAB_GLASS_HUE * 360 + + HSM_CAB_GLASS_SATURATION * 100 + + HSM_CAB_GLASS_BRIGHTNESS * 100 + + HSM_CAB_GLASS_GAMMA + + HSM_CAB_GLASS_AMBIENT_LIGHTING_MULTIPLIER * 100 + + HSM_CAB_GLASS_APPLY_AMBIENT_IN_ADD_MODE + + HSM_CAB_GLASS_BLEND_MODE + + HSM_CAB_GLASS_SOURCE_MATTE_TYPE + + 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_SCALE_KEEP_ASPECT + + HSM_CAB_GLASS_FILL_MODE + + HSM_CAB_GLASS_SCALE * 100 + + HSM_CAB_GLASS_SCALE_X * 100 + + HSM_CAB_GLASS_POS_X * 100 + + HSM_CAB_GLASS_POS_Y * 100 + + HSM_CAB_GLASS_MIPMAPPING_BLEND_BIAS + + // Top Image + + HSM_TOP_OPACITY * 100 + + HSM_TOP_COLORIZE_ON + + HSM_TOP_HUE * 360 + + HSM_TOP_SATURATION * 100 + + HSM_TOP_BRIGHTNESS * 100 + + HSM_TOP_GAMMA + + HSM_TOP_AMBIENT_LIGHTING_MULTIPLIER * 100 + + HSM_TOP_APPLY_AMBIENT_IN_ADD_MODE + + HSM_TOP_BLEND_MODE + + HSM_TOP_SOURCE_MATTE_TYPE + + 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_SCALE_KEEP_ASPECT + + HSM_TOP_FILL_MODE + + HSM_TOP_SCALE * 100 + + HSM_TOP_SCALE_X * 100 + + HSM_TOP_POS_X * 100 + + HSM_TOP_POS_Y * 100 + + HSM_TOP_MIRROR_WRAP + + HSM_TOP_MIPMAPPING_BLEND_BIAS + + + HSM_RENDER_SIMPLE_MODE + + HSM_LAYERING_DEBUG_MASK_MODE +#endif + + ); + return out_sum; +} + +vec4 HSM_GetColorForScreenInfoCache(vec2 viewport_coord, sampler2D feedback_pass, sampler2D original_pass, sampler2D screen_placement_image) +{ + NEGATIVE_CROP_EXPAND_MULTIPLIER = global.NegativeCropAddedPassSize.y / global.DerezedPassSize.y; + MAX_NEGATIVE_CROP = ((1 - (1 / NEGATIVE_CROP_EXPAND_MULTIPLIER)) / 2); + + vec4 out_color = vec4(0); + vec2 rotated_derezed_size = HSM_GetRotatedScreenDerezedSize(); + vec2 cropped_rotated_size_with_res_mult = vec2(100); + vec2 cropped_rotated_size = vec2(100); + vec2 cropped_sample_area_start_pixel_coord = vec2(100); + HSM_GetCroppedRotatedSizeAndPixelSampleAreaStart(1, original_pass, cropped_rotated_size, cropped_rotated_size_with_res_mult, cropped_sample_area_start_pixel_coord); + + // First Screen + vec3 screen_pos_and_height = HSM_GetScreenPlacementAndHeight(screen_placement_image, 60); + float screen_aspect = HSM_GetScreenAspect(1, cropped_rotated_size); + vec2 screen_scale = HSM_GetScreenScale(screen_aspect, screen_pos_and_height.z, cropped_rotated_size); + vec2 tube_scale = HSM_GetTubeScale(screen_scale, screen_pos_and_height.z, vec2(HSM_TUBE_EMPTY_THICKNESS + HSM_TUBE_BLACK_EDGE_THICKNESS) * vec2(HSM_TUBE_EMPTY_THICKNESS_X_SCALE * HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE, 1)); + vec2 black_edge_scale = HSM_GetTubeScale(screen_scale, screen_pos_and_height.z, vec2(HSM_TUBE_EMPTY_THICKNESS) * vec2(HSM_TUBE_EMPTY_THICKNESS_X_SCALE, 1)); + + vec2 pos_offset = HSM_GetScreenPositionOffset(screen_pos_and_height.xy, screen_scale, 1); + + vec2 rotated_core_preppezd_size = HSM_GetRotatedScreenCorePreppedSize(1); + + vec2 cropped_size_with_res_mult_2nd_screen = vec2(100); + vec2 cropped_size_2nd_screen = vec2(100); + vec2 sample_area_start_pixel_coord_2nd_screen = vec2(100); + HSM_GetCroppedRotatedSizeAndPixelSampleAreaStart(2, original_pass, cropped_size_2nd_screen, cropped_size_with_res_mult_2nd_screen, sample_area_start_pixel_coord_2nd_screen); + float screen_aspect_2nd_screen = HSM_2ND_SCREEN_ASPECT_RATIO_MODE == 1 ? cropped_size_2nd_screen.x/cropped_size_2nd_screen.y : screen_aspect; + vec2 screen_scale_2nd_screen = HSM_GetScreenScaleFor2ndScreen(screen_scale, screen_aspect_2nd_screen); + vec2 tube_scale_2nd_screen = HSM_GetTubeScale(screen_scale_2nd_screen, DEFAULT_UNCORRECTED_SCREEN_SCALE.y, vec2(HSM_TUBE_EMPTY_THICKNESS + HSM_TUBE_BLACK_EDGE_THICKNESS) * vec2(HSM_TUBE_EMPTY_THICKNESS_X_SCALE * HSM_TUBE_BLACK_EDGE_THICKNESS_X_SCALE, 1)); + vec2 black_edge_scale_2nd_screen = HSM_GetTubeScale(screen_scale_2nd_screen, DEFAULT_UNCORRECTED_SCREEN_SCALE.y, vec2(HSM_TUBE_EMPTY_THICKNESS) * vec2(HSM_TUBE_EMPTY_THICKNESS_X_SCALE, 1)); + + vec2 pos_offset_2nd_screen = HSM_GetScreenPositionOffset(vec2(0.5, 0.5), screen_scale_2nd_screen, 2); + + vec4 sample_2d_range = vec4(0); + + // Sample 1, 1 + // r AVERAGE_LUMA + sample_2d_range = HSM_GetCacheSampleRange(1, 1); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.r = HSM_GetAverageLuma(original_pass, global.NegativeCropAddedPassSize.xy); + } + + // Sample 2, 1 + // r SCREEN_ASPECT + // ba SCREEN_SCALE + sample_2d_range = HSM_GetCacheSampleRange(2, 1); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.r = screen_aspect; + out_color.ba = screen_scale; + } + + // Sample 3, 1 + // rg TUBE_SCALE + // ba SCREEN_POS_OFFSET + sample_2d_range = HSM_GetCacheSampleRange(3, 1); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = tube_scale; + out_color.ba = pos_offset; + } + + // Sample 4, 1 + // rg CROPPED_ROTATED_SIZE_WITH_RES_MULT + sample_2d_range = HSM_GetCacheSampleRange(4, 1); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = cropped_rotated_size_with_res_mult; + } + + // Sample 1, 2 + // rg CROPPED_ROTATED_SIZE + // ba SAMPLE_AREA_START_PIXEL_COORD + sample_2d_range = HSM_GetCacheSampleRange(1, 2); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = cropped_rotated_size; + out_color.ba = cropped_sample_area_start_pixel_coord; + } + + // Sample 2, 2 + // r SCREEN_ASPECT_2ND_SCREEN + // g PARAMETER_SUM_SCREEN_SCALE + // ba SCREEN_SCALE_2ND_SCREEN + sample_2d_range = HSM_GetCacheSampleRange(2, 2); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.r = screen_aspect_2nd_screen; + out_color.gb = screen_scale_2nd_screen; + } + + // Sample 3, 2 + // rg TUBE_SCALE + // ba SCREEN_POS_OFFSET + sample_2d_range = HSM_GetCacheSampleRange(3, 2); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = tube_scale_2nd_screen; + out_color.ba = pos_offset_2nd_screen; + } + + // Sample 4, 2 + // rg CROPPED_ROTATED_SIZE_WITH_RES_MULT 2nd screen + sample_2d_range = HSM_GetCacheSampleRange(4, 2); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = cropped_size_with_res_mult_2nd_screen; + } + + // Sample 1, 3 + // rg CROPPED_ROTATED_SIZE 2nd screen + // ba SAMPLE_AREA_START_PIXEL_COORD 2nd screen + sample_2d_range = HSM_GetCacheSampleRange(1, 3); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = cropped_size_2nd_screen; + out_color.ba = sample_area_start_pixel_coord_2nd_screen; + } + + // Sample 2, 3 + // rg CORE_SIZE + sample_2d_range = HSM_GetCacheSampleRange(2, 3); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = global.CorePassSize.xy; + } + + // Sample 3, 3 + // rg VIEWPORT_SCALE + // ba VIEWPORT_POS + sample_2d_range = HSM_GetCacheSampleRange(3, 3); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = vec2(HSM_VIEWPORT_ZOOM, HSM_VIEWPORT_ZOOM); + out_color.ba = vec2(HSM_VIEWPORT_POSITION_X, HSM_VIEWPORT_POSITION_Y); + } + + // Sample 4, 3 + // rg SCREEN_SCALE_2ND_SCREEN + // ba SCREEN_POS_OFFSET_2ND_SCREEN + sample_2d_range = HSM_GetCacheSampleRange(4, 3); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = screen_scale_2nd_screen; + out_color.ba = pos_offset_2nd_screen; + } + + // Sample 1, 4 + sample_2d_range = HSM_GetCacheSampleRange(1, 4); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.r = HSM_GetParameterSum(); + + vec2 sample_coord = HSM_GetCacheSampleCoord(1, 4); + vec4 texture_sample = texture(feedback_pass, sample_coord); + + float last_frame = floor(texture_sample.g); + out_color.g = last_frame + global.FrameDirection * 1; + + out_color.ba = rotated_derezed_size; + } + + // Sample 2, 4 + sample_2d_range = HSM_GetCacheSampleRange(2, 4); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.r = NEGATIVE_CROP_EXPAND_MULTIPLIER; + out_color.g = MAX_NEGATIVE_CROP; + } + + // Sample 3, 4 + // rg BLACK_EDGE_SCALE + // rg BLACK_EDGE_SCALE_2ND_SCREEN + sample_2d_range = HSM_GetCacheSampleRange(3, 4); + if (HSM_IsCoordIn2DRange(viewport_coord, sample_2d_range) == 1) + { + out_color.rg = black_edge_scale; + out_color.ba = black_edge_scale_2nd_screen; + } + + return out_color; +} + +#pragma format R32G32B32A32_SFLOAT + +#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 = 1) uniform sampler2D Source; +layout(set = 0, binding = 2) uniform sampler2D InfoCachePassFeedback; +layout(set = 0, binding = 3) uniform sampler2D ScreenPlacementImage; + +void main() +{ + FragColor = HSM_GetColorForScreenInfoCache(vTexCoord, InfoCachePassFeedback, Source, ScreenPlacementImage); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.slang new file mode 100644 index 0000000..1cb2d4b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes-no-reflect.slang @@ -0,0 +1,5 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET + +#include "hsm-combine-passes.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes.inc new file mode 100644 index 0000000..05fbcb2 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes.inc @@ -0,0 +1,225 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +/////////////// IMPORTS /////////////// +#include "common/hsm-globals-and-image-layers-params.inc" +#include "common/hsm-common-functions-bezel.inc" + + +vec2 UNFLIPPED_VIEWPORT_COORD = vec2(0.5); +vec2 FLIPPED_VIEWPORT_COORD = vec2(0.5); + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma stage vertex + +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 6) out vec2 vTexCoord; +layout(location = 8) out vec3 BEZEL_FRAME_ORIGINAL_COLOR_RGB; + +////////////////////////////////////////////////////////////////////////////////////////////////// +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord; + + // Not sure why we need linearize this but it seems to have a smoother range this way + BEZEL_FRAME_ORIGINAL_COLOR_RGB = HSM_Linearize(vec4(HSM_HSVtoRGB(vec3(HSM_BZL_COLOR_HUE, HSM_BZL_COLOR_SATURATION, HSM_BZL_COLOR_VALUE)), 1), DEFAULT_SRGB_GAMMA).rgb; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma stage fragment + +layout(location = 6) in vec2 vTexCoord; + +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 = 3) uniform sampler2D BR_LayersUnderCRTPass; + +#ifdef IS_NO_REFLECT_PRESET +layout(set = 0, binding = 4) uniform sampler2D MBZ_PostCRTPass; +#define MiddlePass MBZ_PostCRTPass +#else +layout(set = 0, binding = 4) uniform sampler2D BR_CRTAndReflectionPass; +#define MiddlePass BR_CRTAndReflectionPass +#endif + +layout(set = 0, binding = 5) uniform sampler2D BR_LayersOverCRTPass; + +layout(set = 0, binding = 6) uniform sampler2D CombinePassFeedback; +#define PassFeedback CombinePassFeedback + +////////////////////////////////////////////////////////////////////////////////////////////////// +void main() +{ + UNFLIPPED_VIEWPORT_COORD = vTexCoord; + vec2 VIEWPORT_COORD = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + 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(SCREEN_COORD, + SCREEN_SCALE, + TUBE_SCALE, + SCREEN_ASPECT, + false, + BEZEL_OUTSIDE_SCALE, + BEZEL_OUTSIDE_COORD, + BEZEL_OUTSIDE_CURVED_COORD, + FRAME_OUTSIDE_CURVED_COORD); + + 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) + { + FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD); + return; + } + } + + vec4 out_color = texture(BR_LayersUnderCRTPass, vTexCoord); + out_color.rgb *= HSM_GLOBAL_GRAPHICS_BRIGHTNESS; + + vec4 crt_layer = texture(MiddlePass, vTexCoord); + #ifdef IS_NO_REFLECT_PRESET + crt_layer = HSM_Linearize(crt_layer, DEFAULT_SRGB_GAMMA); + #endif + + if (HSM_RENDER_SIMPLE_MODE > 0.5) + crt_layer.rgb = vec3(0); + + float bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + if(HSM_BZL_USE_INDEPENDENT_CURVATURE > 0) + bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * DEFAULT_SCREEN_CORNER_RADIUS; + vec2 tube_curved_coord = HSM_GetTubeCurvedCoord(SCREEN_COORD, 1, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1); + + if (HSM_RENDER_SIMPLE_MODE < 0.5) + out_color.rgb += crt_layer.rgb; + + vec4 over_layer = texture(BR_LayersOverCRTPass, vTexCoord); + over_layer.rgb *= HSM_GLOBAL_GRAPHICS_BRIGHTNESS; + out_color = HSM_PreMultAlphaBlend(out_color, over_layer); + + FragColor = HSM_ApplyGamma(clamp(out_color, 0, 1), DEFAULT_SRGB_GAMMA); + + if (HSM_RENDER_SIMPLE_MODE > 0.5) + { + SCREEN_BLACK_EDGE_CURVED_COORD = HSM_GetCurvedCoord(SCREEN_COORD, HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE, SCREEN_ASPECT); + SCREEN_MASK = HSM_GetCornerMask(((SCREEN_BLACK_EDGE_CURVED_COORD - 0.5) * 1.001) + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_TUBE_BLACK_EDGE_CORNER_RADIUS_SCALE, HSM_TUBE_BLACK_EDGE_SHARPNESS); + + TUBE_MASK = HSM_GetCornerMask(tube_curved_coord, SCREEN_ASPECT, bezel_corner_radius, 0.99); + // float TUBE_MASK_TRIM = HSM_GetCornerMask((tube_curved_coord - 0.5) * 1.003 + 0.5, SCREEN_ASPECT, bezel_corner_radius, 0.99); + + INSIDE_BEZEL_MASK = HSM_GetCornerMask(BEZEL_OUTSIDE_CURVED_COORD, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_BZL_OUTER_CORNER_RADIUS_SCALE, 0.9); + BEZEL_MASK = INSIDE_BEZEL_MASK * (1 - TUBE_MASK); + + OUTSIDE_BEZEL_MASK = 1 - INSIDE_BEZEL_MASK; + OUTSIDE_FRAME_MASK = 1 - HSM_GetCornerMask(FRAME_OUTSIDE_CURVED_COORD, SCREEN_ASPECT, HSM_FRM_OUTER_CORNER_RADIUS, 1); + + FRAME_MASK = OUTSIDE_BEZEL_MASK * (1 - OUTSIDE_FRAME_MASK); + + if ( HSM_RENDER_SIMPLE_MODE == RENDER_SIMPLE_MODE_BLACK_SCREEN ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(0, 0, 0, 1) * (TUBE_MASK)); + + if ( HSM_RENDER_SIMPLE_MODE == RENDER_SIMPLE_MODE_BLACK_SCREEN_AND_BG ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(0, 0, 0, 1) * (TUBE_MASK + OUTSIDE_FRAME_MASK)); + + if ( HSM_RENDER_SIMPLE_MODE == RENDER_SIMPLE_MODE_PINK_MASK ) + { + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_SCREEN ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(1, 0, 1, 1) * (SCREEN_MASK)); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_TUBE ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(1, 0, 1, 1) * (TUBE_MASK)); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_BEZEL_AND_FRAME ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(1, 0, 1, 1) * (TUBE_MASK + OUTSIDE_FRAME_MASK)); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_BEZEL ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(1, 0, 1, 1) * (1 - BEZEL_MASK)); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_FRAME ) + FragColor = HSM_PreMultAlphaBlend(FragColor, vec4(1, 0, 1, 1) * (1 - FRAME_MASK)); + } + if ( HSM_RENDER_SIMPLE_MODE == RENDER_SIMPLE_MODE_BLACK_WHITE_MASK ) + { + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_SCREEN ) + FragColor = vec4(1 - SCREEN_MASK); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_TUBE ) + FragColor = vec4(1 - TUBE_MASK); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_BEZEL_AND_FRAME ) + FragColor = vec4(1 - TUBE_MASK) - OUTSIDE_FRAME_MASK; + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_BEZEL ) + FragColor = vec4(BEZEL_MASK); + + if ( HSM_RENDER_SIMPLE_MASK_TYPE == RENDER_SIMPLE_MASK_TYPE_FRAME ) + FragColor = vec4(FRAME_MASK); + } + } + if (UNFLIPPED_VIEWPORT_COORD.x < (2 / global.OutputSize.x) && UNFLIPPED_VIEWPORT_COORD.y < (2 / global.OutputSize.y)) + FragColor = vec4(0.01, 0.01, 0.01, -1); + + return; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang new file mode 100644 index 0000000..8cc4aef --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-combine-passes.slang @@ -0,0 +1,3 @@ +#version 450 + +#include "hsm-combine-passes.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-delinearize.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-delinearize.slang new file mode 100644 index 0000000..224cbfb --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-delinearize.slang @@ -0,0 +1,48 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "common/hsm-globals-and-screen-scale-params.inc" + +#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 = HSM_Delinearize(texture(Source, vTexCoord), HSM_GAMMA_OUT_CRT); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang new file mode 100644 index 0000000..3f8414b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro-potato.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_POTATO_PRESET + +#include "common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-intro.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro.inc new file mode 100644 index 0000000..81ae6ff --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro.inc @@ -0,0 +1,319 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +// Import so all the mega bezel parameters are the first in the parameter list + +#include "hsm-text-resolution.inc" + +#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.00001; +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D NegativeCropAddedPass; + +#ifndef IS_POTATO_PRESET +layout(set = 0, binding = 3) uniform sampler2D OriginalHistory1; +layout(set = 0, binding = 4) uniform sampler2D OriginalHistory2; +layout(set = 0, binding = 5) uniform sampler2D OriginalHistory3; +layout(set = 0, binding = 7) uniform sampler2D IntroImage; +#endif + +layout(set = 0, binding = 8) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 9) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 10) uniform sampler2D TextPass; + +#define eps 1e-3 + +#ifndef IS_POTATO_PRESET +vec4 AntiFlicker(vec2 in_coord, vec4 current) +{ + // sample the textures + vec4 prev1 = texture(OriginalHistory1, in_coord); + vec4 prev2 = texture(OriginalHistory2, in_coord); + vec4 prev3 = texture(OriginalHistory3, in_coord); + + // get luma for comparison + float cur_lum = dot(current.rgb, vec3(0.2125, 0.7154, 0.0721)); + float prev1_lum = dot(prev1.rgb, vec3(0.2125, 0.7154, 0.0721)); + float prev2_lum = dot(prev2.rgb, vec3(0.2125, 0.7154, 0.0721)); + float prev3_lum = dot(prev3.rgb, vec3(0.2125, 0.7154, 0.0721)); + + // Test whether the luma difference between the pixel in the current frame and that of + // the previous frame exceeds the threshold while the difference between the current frame + // and 2 frames previous is below the threshold. + // Repeat the process for the previous frame's pixel to reduce false-positives + bool flicker = (abs(cur_lum - prev1_lum) > HSM_ANTI_FLICKER_THRESHOLD && abs(cur_lum - prev2_lum) < HSM_ANTI_FLICKER_THRESHOLD) && + (abs(prev1_lum - prev2_lum) > HSM_ANTI_FLICKER_THRESHOLD && abs(prev1_lum - prev3_lum) < HSM_ANTI_FLICKER_THRESHOLD); + + // Average the current frame with the previous frame in linear color space to avoid over-darkening + vec4 blended = (pow(current, vec4(2.2)) + pow(prev1, vec4(2.2))) / 2.0; + + // delinearize the averaged result + blended = pow(blended, vec4(1.0 / 2.2)); + + return (!flicker) ? current : blended; +} + +// ----------------------------------------------------------------------------- +// TV Startup Static Animation +// ----------------------------------------------------------------------------- +vec4 GetColorWithIntro(vec4 in_color, vec2 in_coord, in sampler2D in_logo_image_sampler2d) +{ + vec4 out_color = in_color; + + // in_coord.y = HSM_INTRO_LOGO_FLIP_VERTICAL > 0.5 ? 1 - in_coord.y : in_coord.y; + + 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; + in_coord.y = (in_coord.y - 0.5) * -1 + 0.5; + } + + float frame_count = HSM_INTRO_WHEN_TO_SHOW == 2 ? CURRENT_FRAME_FROM_CACHE_INFO : global.FrameCount; + + float mask_wait = 20 / HSM_INTRO_SPEED; + + float mask_fade_horizontal = 40 / HSM_INTRO_SPEED; + float mask_fade_vertical = 60 / HSM_INTRO_SPEED; + float mask_vert_wait = mask_fade_horizontal * 0.4; + + vec4 solid_color = vec4(HSM_HSVtoRGB(vec3(HSM_INTRO_SOLID_COLOR_HUE, HSM_INTRO_SOLID_COLOR_SAT, HSM_INTRO_SOLID_COLOR_VALUE)), 1); + // vec4 solid_color = HSM_Linearize(vec4(HSM_HSVtoRGB(vec3(HSM_BZL_COLOR_HUE, HSM_BZL_COLOR_SATURATION, HSM_BZL_COLOR_VALUE)), 1), DEFAULT_SRGB_GAMMA).rgb; + + float solid_color_hold = HSM_INTRO_SOLID_COLOR_HOLD / HSM_INTRO_SPEED; + float solid_color_fade_out = HSM_INTRO_SOLID_COLOR_FADE_OUT / HSM_INTRO_SPEED; + + float intro_logo_wait = HSM_INTRO_LOGO_WAIT / HSM_INTRO_SPEED; + float intro_logo_fade_in = HSM_INTRO_LOGO_FADE_IN / HSM_INTRO_SPEED; + float intro_logo_hold = HSM_INTRO_LOGO_HOLD / HSM_INTRO_SPEED; + float intro_logo_fade_out = HSM_INTRO_LOGO_FADE_OUT / HSM_INTRO_SPEED; + + float noise_hold = HSM_INTRO_NOISE_HOLD / HSM_INTRO_SPEED; + float noise_fade_out = HSM_INTRO_NOISE_FADE_OUT / HSM_INTRO_SPEED; + + // Black Hold starts from end of Static Hold + float black_hold = HSM_INTRO_SOLID_BLACK_HOLD / HSM_INTRO_SPEED; + float black_fade_out = HSM_INTRO_SOLID_BLACK_FADE_OUT / HSM_INTRO_SPEED; + + float power_on_seq_length = mask_wait + mask_vert_wait + mask_fade_vertical; + float fade_out_seq_length = max(noise_fade_out, black_hold + black_fade_out); + float logo_seq_length = intro_logo_wait + intro_logo_fade_in + intro_logo_hold + intro_logo_fade_out; + float full_seq_length = max(power_on_seq_length + noise_hold + fade_out_seq_length, logo_seq_length); + + // Loop the animation so we can see the results + if (HSM_INTRO_WHEN_TO_SHOW == 3) + frame_count = mod(frame_count, full_seq_length + 15); + + if (frame_count <= full_seq_length) + { + vec2 noise_res = global.SourceSize.xy; + noise_res = min(noise_res, vec2(640, 480)); + + if (HSM_ROTATE_CORE_IMAGE > 0.5) + noise_res.xy = noise_res.yx; + + vec2 quantized_coord = vec2(floor((in_coord.x + 0.01) * noise_res.x) / noise_res.x, floor((in_coord.y + 0.01) * noise_res.y) / noise_res.y); + + float width = (frame_count - mask_wait) / (mask_fade_horizontal/2); + float height = (clamp((frame_count - mask_wait - mask_vert_wait) / mask_fade_vertical, 0, 1) + 0.005) * 2; + float mask = abs(in_coord.x - 0.5) > width * 0.5 ? 0 : 1; + mask *= HHLP_EasePowerOut(abs(in_coord.y - 0.5), 1.5) > height ? 0 : 1; + + float area = width * height; + + float black_opacity = HHLP_EasePowerIn(clamp(1 - (frame_count - (power_on_seq_length + noise_hold + black_hold)) / black_fade_out, 0, 1), 1.5); + out_color = mix(out_color, vec4(0, 0, 0, 1), black_opacity); + + float solid_color_opacity = HHLP_EasePowerIn(clamp(1 - (frame_count - (mask_wait + mask_fade_horizontal/2.5 + solid_color_hold)) / solid_color_fade_out * 2, 0, 1), 1.5); + // out_color = mix(out_color, vec4(0, 0, 0, 1), solid_color_opacity); + + float noise_opacity = 1 - clamp((frame_count - (power_on_seq_length + noise_hold)) / noise_fade_out, 0, 1); + noise_opacity = HHLP_EasePowerInOut(noise_opacity, 4); + + // Calculate Static Noise + float e = 2.7182818284590452353602874713527; + float G = e + (mod(frame_count, 30)/30 + 1000); + vec2 r = (G * sin(G * quantized_coord.xy)); + vec4 noise_color = vec4(fract(r.x * r.y * (1.0 + quantized_coord.x))); + noise_color.a = 1; + + noise_color.rgb *= 0.60; + + out_color = HSM_BlendModeLayerMix(out_color, noise_color, HSM_INTRO_NOISE_BLEND_MODE, noise_opacity); + + vec2 intro_image_res = textureSize(in_logo_image_sampler2d, 0); + float intro_image_aspect = intro_image_res.x/intro_image_res.y; + + float intro_logo_height = HSM_INTRO_LOGO_HEIGHT; + if (intro_logo_height == 0) + intro_logo_height = HSM_ROTATE_CORE_IMAGE > 0.5 ? intro_image_res.y / global.OriginalSize.y + : intro_image_res.y / global.OriginalSize.x; + + vec2 intro_image_scale = vec2(intro_logo_height * intro_image_aspect / SCREEN_ASPECT, intro_logo_height) * min(SCREEN_ASPECT, 1); + intro_image_scale = floor(intro_image_scale * global.SourceSize.xy) / global.SourceSize.xy; + + if (HSM_DUALSCREEN_MODE > 0.5) + { + if (HSM_GetCoreImageSplitDirection() == 1) + { + in_coord.y = in_coord.y * 2 - MAX_NEGATIVE_CROP; + } + if (HSM_GetCoreImageSplitDirection() == 2) + { + in_coord.x = in_coord.x * 2 - MAX_NEGATIVE_CROP; + } + } + + in_coord.x -= HSM_INTRO_LOGO_POS_X; + in_coord.y += HSM_INTRO_LOGO_POS_Y; + + // Center + vec2 coord_in_intro_image = (in_coord - 0.5) / intro_image_scale + 0.5; + // Top Left + if (HSM_INTRO_LOGO_PLACEMENT == 1) + coord_in_intro_image = in_coord / intro_image_scale; + // Top Right + if (HSM_INTRO_LOGO_PLACEMENT == 2) + coord_in_intro_image = (in_coord - vec2(1 - intro_image_scale.x, 0)) / intro_image_scale; + // Bottom Left + if (HSM_INTRO_LOGO_PLACEMENT == 3) + coord_in_intro_image = (in_coord - vec2(0, 1 - intro_image_scale.y)) / intro_image_scale; + // Bottom Right + if (HSM_INTRO_LOGO_PLACEMENT == 4) + coord_in_intro_image = (in_coord - (1 - intro_image_scale)) / intro_image_scale; + + // Quilez gives a better rescaling weighted more to the center of the pixel like bicubic + vec4 intro_image = HSM_TextureQuilez(IntroImage, intro_image_res, coord_in_intro_image); + float logo_opacity = 1 - HHLP_EasePowerOut(clamp(1 - (frame_count - mask_wait - mask_fade_horizontal/4) / intro_logo_fade_in, 0, 1), 1.5); + logo_opacity *= clamp(clamp((frame_count - intro_logo_wait) / intro_logo_fade_in, 0, 1) - + clamp((frame_count - (intro_logo_wait + intro_logo_fade_in + intro_logo_hold)) / intro_logo_fade_out, 0, 1), + 0, 1); + + // Logo UNDER solid color + if (HSM_INTRO_LOGO_OVER_SOLID_COLOR == 0) + out_color = HSM_BlendModeLayerMix(out_color, intro_image, HSM_INTRO_LOGO_BLEND_MODE, logo_opacity); + + out_color = HSM_BlendModeLayerMix(out_color, solid_color, HSM_INTRO_SOLID_COLOR_BLEND_MODE, solid_color_opacity); + + // Logo OVER solid color + if (HSM_INTRO_LOGO_OVER_SOLID_COLOR == 1) + out_color = HSM_BlendModeLayerMix(out_color, intro_image, HSM_INTRO_LOGO_BLEND_MODE, logo_opacity); + + out_color *= mask; + + HSM_Delinearize(out_color, DEFAULT_SRGB_GAMMA); + } + return out_color; +} +#endif + +// vec4 GetCropOverlay(vec2 viewport_coord) +// { +// vec4 out_color = vec4(0); +// vec4 screen_color = vec4(1, 0, 0, 1); + +// for (int i=1; i < 3; i++) +// { +// vec2 cropped_rotated_size = vec2(0); +// vec2 cropped_rotated_size_with_res_mult = vec2(0); +// vec2 cropped_sample_area_start_pixel_coord = vec2(0); +// HSM_GetCroppedRotatedSizeAndPixelSampleAreaStart(i, NegativeCropAddedPass, cropped_rotated_size, cropped_rotated_size_with_res_mult, cropped_sample_area_start_pixel_coord); + +// vec2 crop_scale = cropped_rotated_size / ROTATED_CORE_PREPPED_SIZE; +// vec2 mask_coord = viewport_coord - cropped_sample_area_start_pixel_coord / ROTATED_CORE_PREPPED_SIZE; +// mask_coord = mask_coord / crop_scale; + +// if (i == 2) +// screen_color = vec4(0, 1, 0, 1); + +// out_color += screen_color * HSM_GetCornerMask(mask_coord, cropped_rotated_size.x/cropped_rotated_size.y, 0, 0.90); +// } + +// return clamp(out_color, 0, 1); +// } + +void main() +{ + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + // Flip the coordinate vertically if desired + vec2 viewport_coord_adjusted = vTexCoord; + viewport_coord_adjusted.x = HSM_FLIP_VIEWPORT_HORIZONTAL * HSM_FLIP_CORE_HORIZONTAL * (viewport_coord_adjusted.x - 0.5) + 0.5; + viewport_coord_adjusted.y = HSM_FLIP_VIEWPORT_VERTICAL * HSM_FLIP_CORE_VERTICAL * (viewport_coord_adjusted.y - 0.5) + 0.5; + + FragColor = texture(NegativeCropAddedPass, viewport_coord_adjusted); + +#ifndef IS_POTATO_PRESET + if (HSM_ANTI_FLICKER_ON == 1) + FragColor = AntiFlicker(viewport_coord_adjusted, FragColor); + + if (HSM_INTRO_WHEN_TO_SHOW > 0) + FragColor = GetColorWithIntro(FragColor, viewport_coord_adjusted, IntroImage); +#endif + + bool cache_info_changed = HSM_CheckCacheInfoChanged(); + 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); + + if (show_update_indicator) + { + float final_aspect = SCREEN_ASPECT; + vec2 corner_offset = vec2(MAX_NEGATIVE_CROP * 2 * 0.8, MAX_NEGATIVE_CROP * 2 * 0.8); + vec2 center_coord = vec2(1 - corner_offset.x * final_aspect, 1 - corner_offset.y); + vec2 test_coord = vec2(1 - (1 - viewport_coord_adjusted.x) * final_aspect, viewport_coord_adjusted.y); + float distance = length(test_coord - center_coord); + + if (distance < 0.04) + { + float modulation = clamp(0.4 + abs(mod(global.FrameCount, 90) / 90 - 0.5) * 1.2, 0, 1); + modulation = HHLP_EasePowerInOut(modulation, 2); + FragColor *= 1 - modulation; + FragColor += modulation * vec4(1, 0, 0, 1); + } + } + + // vec4 overlay_color = GetCropOverlay(vTexCoord); + // FragColor *= 1 - 0.7 * overlay_color.a; + // FragColor += 1 * 0.7 * overlay_color; + + //////// Draw text to show out_colorolutions ////////// + if (HSM_RESOLUTION_DEBUG_ON == 1) + FragColor = HSM_PreMultAlphaBlend(FragColor, texture(TextPass, vTexCoord)); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro.slang new file mode 100644 index 0000000..23f152f --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-intro.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-screen-scale-params.inc" +#include "hsm-intro.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang new file mode 100644 index 0000000..0e387a2 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-linearize-crt.slang @@ -0,0 +1,65 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "common/hsm-globals-and-screen-scale-params.inc" + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + +#include "../../../../../include/compat_macros.inc" + +#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 vec2 blur_dxdy; + +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord; + + const vec2 dxdy_scale = global.SourceSize.xy * global.OutputSize.zw; + blur_dxdy = dxdy_scale * global.SourceSize.zw; +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 1) in vec2 blur_dxdy; +layout(location = 0) out vec4 FragColor; +layout(set = 0, binding = 2) uniform sampler2D MBZ_PostCRTPass; + +#include "../../../../../include/blur-functions.h" + +void main() +{ + FragColor = HSM_Linearize(vec4(tex2Dblur9x9(MBZ_PostCRTPass, vTexCoord, blur_dxdy), 1), DEFAULT_CRT_GAMMA); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-linearize.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-linearize.slang new file mode 100644 index 0000000..e1fc0c0 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-linearize.slang @@ -0,0 +1,56 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "common/hsm-globals-and-screen-scale-params.inc" + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; +} params; + +#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 = HSM_Linearize(texture(Source, vTexCoord), GAMMA_INPUT); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-phosphor-persistence.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-phosphor-persistence.slang new file mode 100644 index 0000000..37e8830 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-phosphor-persistence.slang @@ -0,0 +1,107 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "common/hsm-globals.inc" +#include "hsm-params-0-screen-scale.inc" +#include "common/hsm-common-functions.inc" + +//--------------------------------------------------------------------------------------------------- +// PHOSPHOR PERSISTENCE +//--------------------------------------------------------------------------------------------------- +#pragma parameter HSM_PERSISTENCE_TITLE "[ PHOSPHOR PERSISTENCE ]:" 0 0 0.01 0.01 + +#pragma parameter HSM_PHOSPHOR_PERSISTENCE_BLEND " Amount" 0 0 100 2 +#define HSM_PHOSPHOR_PERSISTENCE_BLEND global.HSM_PHOSPHOR_PERSISTENCE_BLEND / 100 + +#pragma parameter HSM_PHOSPHOR_PERSISTENCE_RED " Red Persistence" 50 0 100 5 +#define HSM_PHOSPHOR_PERSISTENCE_RED global.HSM_PHOSPHOR_PERSISTENCE_RED / 100 + +#pragma parameter HSM_PHOSPHOR_PERSISTENCE_GREEN " Green Persistence" 50 0 100 5 +#define HSM_PHOSPHOR_PERSISTENCE_GREEN global.HSM_PHOSPHOR_PERSISTENCE_GREEN / 100 + +#pragma parameter HSM_PHOSPHOR_PERSISTENCE_BLUE " Blue Persistence" 50 0 100 5 +#define HSM_PHOSPHOR_PERSISTENCE_BLUE global.HSM_PHOSPHOR_PERSISTENCE_BLUE / 100 + + +#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 PersistencePassFeedback; + +#define previous_pass_feedback PersistencePassFeedback +#define eps 1e-3 + +vec4 HSM_ApplyPhosphorPersistence(vec4 in_color, vec4 prev_color, vec2 in_coord) +{ + if (HSM_PHOSPHOR_PERSISTENCE_RED == 0 && HSM_PHOSPHOR_PERSISTENCE_GREEN == 0 && HSM_PHOSPHOR_PERSISTENCE_BLUE == 0) + return in_color; + + vec3 persistence = vec3(HSM_PHOSPHOR_PERSISTENCE_RED, HSM_PHOSPHOR_PERSISTENCE_GREEN, HSM_PHOSPHOR_PERSISTENCE_BLUE); + + float delta_time_red = clamp(5 - 5 * HHLP_EasePowerIn(abs(HSM_PHOSPHOR_PERSISTENCE_RED), 2) + 0.1, 0, 1); + float delta_time_green = clamp(5 - 5 * HHLP_EasePowerIn(abs(HSM_PHOSPHOR_PERSISTENCE_GREEN), 2) + 0.1, 0, 1); + float delta_time_blue = clamp(5 - 5 * HHLP_EasePowerIn(abs(HSM_PHOSPHOR_PERSISTENCE_BLUE), 2) + 0.1, 0, 1); + + prev_color.r *= pow(persistence.r, delta_time_red); + prev_color.g *= pow(persistence.g, delta_time_green); + prev_color.b *= pow(persistence.b, delta_time_blue); + + prev_color *= HSM_PHOSPHOR_PERSISTENCE_BLEND; + + vec4 out_color = in_color; + out_color.r = max(prev_color.r, out_color.r); + out_color.g = max(prev_color.g, out_color.g); + out_color.b = max(prev_color.b, out_color.b); + + return out_color; +} + +void main() +{ + FragColor = texture(Source, vTexCoord); + FragColor = HSM_Linearize(FragColor, DEFAULT_SRGB_GAMMA); + + vec4 prev_color = texture(previous_pass_feedback, vTexCoord); + prev_color = HSM_Linearize(prev_color, DEFAULT_SRGB_GAMMA); + + // Phosphor Persistence + FragColor = HSM_ApplyPhosphorPersistence(FragColor, prev_color, vTexCoord); + + // FragColor = mix(texture(previous_pass_feedback, vTexCoord), texture(Source, vTexCoord), 0.5); + FragColor = HSM_Delinearize(FragColor, DEFAULT_SRGB_GAMMA); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang new file mode 100644 index 0000000..d2f0ea3 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-glass.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-glass-params.inc" +#include "hsm-post-crt-prep.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang new file mode 100644 index 0000000..19f7118 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-image-layers.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-post-crt-prep.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang new file mode 100644 index 0000000..ff0e839 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-no-reflect.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_NO_REFLECT_PRESET + +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-post-crt-prep.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang new file mode 100644 index 0000000..1ad251d --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep-potato.slang @@ -0,0 +1,161 @@ +#version 450 + +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "common/hsm-globals-and-potato-params.inc" + +#pragma stage vertex + +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 0) out vec2 vTexCoord; +layout(location = 7) out vec2 UNFLIPPED_VIEWPORT_COORD; + +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord * 1.00001; + + UNFLIPPED_VIEWPORT_COORD = vTexCoord; +} + +#pragma stage fragment + +layout(location = 0) in vec2 vTexCoord; +layout(location = 7) in vec2 UNFLIPPED_VIEWPORT_COORD; + +layout(location = 0) out vec4 FragColor; + +layout(set = 0, binding = 1) uniform sampler2D Source; + +layout(set = 0, binding = 2) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 3) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 7) uniform sampler2D BackgroundImage; +layout(set = 0, binding = 8) uniform sampler2D BackgroundVertImage; + +layout(set = 0, binding = 11) uniform sampler2D MBZ_PostCRTPassFeedback; +#define PassFeedback MBZ_PostCRTPassFeedback + +vec4 HSM_GetPostCrtPreppedColorPotato(vec4 in_color_with_gamma, vec2 VIEWPORT_COORD, vec2 VIEWPORT_COORD_TRANSFORMED, vec2 screen_curved_coord, in sampler2D BackgroundImage, in sampler2D BackgroundVertImage) +{ + vec2 tube_curved_coord = HSM_GetTubeCurvedCoord(SCREEN_COORD, 1, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1); + float bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + + float outside_tube_mask = 1 - HSM_GetCornerMask(tube_curved_coord, SCREEN_ASPECT, bezel_corner_radius, 0.99); + TUBE_MASK = 1 - outside_tube_mask; + + if (HSM_MONOCHROME_MODE > 0.5 && HSM_GetUseOnCurrentScreenIndex(HSM_MONOCHROME_DUALSCREEN_VIS_MODE)) + in_color_with_gamma = HSM_ApplyMonochrome(in_color_with_gamma); + + vec4 out_color = HSM_Linearize(in_color_with_gamma, DEFAULT_SRGB_GAMMA); + + out_color *= HSM_POST_CRT_BRIGHTNESS; + + vec2 mirrored_screen_coord = HSM_GetMirrorWrappedCoord(screen_curved_coord); + float screen_mask = HSM_GetCornerMask((screen_curved_coord - 0.5) * 0.999 + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS, 0.9); + + if (HSM_GetUseScreenVignette()) + { + // out_color *= HSM_GetScreenVignetteFactor(screen_curved_coord); + + float vignette_factor = HSM_GetScreenVignetteFactor(mirrored_screen_coord); + + // float vignette_factor_outside_screen = HSM_SCREEN_VIGNETTE_IN_REFLECTION * vignette_factor + (1 - HSM_SCREEN_VIGNETTE_IN_REFLECTION) * 1; + if (HSM_SCREEN_VIGNETTE_IN_REFLECTION < 0.5) + vignette_factor = screen_mask * vignette_factor + (1 - screen_mask); + + out_color.rgb *= vignette_factor; + } + + out_color.rgb *= screen_mask; + out_color *= TUBE_MASK; + + if (HSM_BG_OPACITY > 0) + { + //----------------------------------------------------------------------------------------- + // Background + //----------------------------------------------------------------------------------------- + vec2 bg_coord = VIEWPORT_COORD_TRANSFORMED; + // Correct image coordinate for image aspect ratio + vec2 bg_size = textureSize(BackgroundImage, 0); + bg_coord.x = (bg_coord.x - 0.5) / ((bg_size.x / bg_size.y) / (global.FinalViewportSize.x/global.FinalViewportSize.y)) + 0.5; + + vec4 bg_layer = vec4(0); + if (SCREEN_ASPECT > 1) + bg_layer = texture(BackgroundImage, bg_coord); + else + bg_layer = texture(BackgroundVertImage, bg_coord); + bg_layer = HSM_Linearize(bg_layer, DEFAULT_SRGB_GAMMA); + + bg_layer.rgb *= HSM_GLOBAL_GRAPHICS_BRIGHTNESS; + bg_layer.rgb = pow(bg_layer.rgb, vec3(1/HSM_STATIC_LAYERS_GAMMA)); + + if (HSM_CRT_SCREEN_BLEND_MODE == 1) + bg_layer *= (1 - TUBE_MASK); + + bg_layer *= HSM_BG_BRIGHTNESS; + + if (HSM_CRT_SCREEN_BLEND_MODE > 0) + { + if (HSM_POTATO_SHOW_BG_OVER_SCREEN == 1) + out_color = HSM_BlendModeLayerMix(out_color, bg_layer, HSM_BG_BLEND_MODE, HSM_BG_OPACITY); + else + { + bg_layer.rgb *= HSM_BG_OPACITY; + out_color = HSM_BlendModeLayerMix(bg_layer, out_color, HSM_CRT_SCREEN_BLEND_MODE, 1); + } + } + } + + // Apply the final Gamma + out_color = HSM_Delinearize(out_color, DEFAULT_SRGB_GAMMA); + return out_color; +} + +void main() +{ + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + 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()) + { + FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD); + return; + } + } + + FragColor = texture(Source, UNFLIPPED_VIEWPORT_COORD); + + vec2 screen_curved_coord = HSM_GetCurvedCoord(SCREEN_COORD, HSM_CRT_CURVATURE_SCALE, SCREEN_ASPECT); + FragColor = HSM_GetPostCrtPreppedColorPotato(FragColor, vTexCoord, viewportCoordTransformed, screen_curved_coord, BackgroundImage, BackgroundVertImage); + + if (UNFLIPPED_VIEWPORT_COORD.x < (2 / global.OutputSize.x) && UNFLIPPED_VIEWPORT_COORD.y < (2 / global.OutputSize.y)) + FragColor = vec4(0.01, 0.01, 0.01, -1); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep.inc new file mode 100644 index 0000000..06ea426 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep.inc @@ -0,0 +1,355 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 "../hsm/common/hsm-common-functions-bezel.inc" + +#pragma stage vertex + +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 0) out vec2 vTexCoord; +layout(location = 7) out vec2 UNFLIPPED_VIEWPORT_COORD; + +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord * 1.00001; + + UNFLIPPED_VIEWPORT_COORD = vTexCoord; +} + +#pragma stage fragment + +layout(location = 0) in vec2 vTexCoord; +layout(location = 7) in vec2 UNFLIPPED_VIEWPORT_COORD; + +layout(location = 0) out vec4 FragColor; + +layout(set = 0, binding = 1) uniform sampler2D Source; + +layout(set = 0, binding = 2) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 3) uniform sampler2D InfoCachePassFeedback; + +layout(set = 0, binding = 4) uniform sampler2D TubeDiffuseImage; +layout(set = 0, binding = 5) uniform sampler2D TubeShadowImage; +layout(set = 0, binding = 6) uniform sampler2D TubeColoredGelImage; +layout(set = 0, binding = 7) uniform sampler2D TubeStaticReflectionImage; + +layout(set = 0, binding = 8) uniform sampler2D BackgroundImage; +layout(set = 0, binding = 9) uniform sampler2D BackgroundVertImage; + +layout(set = 0, binding = 10) uniform sampler2D NightLightingImage; +layout(set = 0, binding = 11) uniform sampler2D IntroPass; + +layout(set = 0, binding = 12) uniform sampler2D MBZ_PostCRTPassFeedback; +#define PassFeedback MBZ_PostCRTPassFeedback + +// Torridgristle - ScanlineSimple pass - Public domain +vec4 HSM_ApplyScanlineMask(vec4 in_color, vec2 screen_scale, vec2 in_coord, vec2 in_curved_coord) +{ + // Stuff to try implementing + // Option to try to match a integer division of the core resolution + // Curvature Multiplier + // Try mame hlsl darkening + // Check Lottes tone mapping + // Crawl + + in_coord = mix(in_coord, in_curved_coord, HSM_FAKE_SCANLINE_CURVATURE); + + /* Scanlines */ + float scanline_roll_offset = float(mod(global.FrameCount, 1280)) / 1280 * HSM_FAKE_SCANLINE_ROLL; + + // float scans = clamp( 0.35+0.18*sin(6.0*time-curved_uv.y*resolution.y*1.5), 0.0, 1.0); + // float s = pow(scans,0.9); + // col = col * vec3(s); + + vec2 core_prepped_size = HSM_GetRotatedScreenCorePreppedSize(SCREEN_INDEX); + float use_vert_scanlines = USE_VERTICAL_SCANLINES; + vec2 sampling_res = HSM_GetRotatedCorePreppedSizeWithResMult(SCREEN_INDEX); + float scan_axis_res = use_vert_scanlines * sampling_res.x + (1 - use_vert_scanlines) * sampling_res.y; + float scan_axis_pos = use_vert_scanlines * in_coord.x + (1 - use_vert_scanlines) * in_coord.y; + scan_axis_pos += scanline_roll_offset; + + bool apply_scanlines = HSM_FAKE_SCANLINE_OPACITY > 0.001 && (HSM_FAKE_SCANLINE_MODE == 1 || (HSM_FAKE_SCANLINE_MODE == 2 && scan_axis_res > HSM_INTERLACE_TRIGGER_RES)); + + if (!apply_scanlines) + return in_color; + + float pi = 3.141592654; + + vec2 screen_size = global.OutputSize.xy * screen_scale; + float scan_axis_screen_scale_res = use_vert_scanlines * screen_size.x + (1 - use_vert_scanlines) * screen_size.y; + + float simulated_scanline_res = HSM_FAKE_SCANLINE_RES_MODE > 0.5 ? HSM_FAKE_SCANLINE_RES : CROPPED_ROTATED_SIZE.y; + + float scanline_size = scan_axis_screen_scale_res / simulated_scanline_res; + + if (HSM_FAKE_SCANLINE_INT_SCALE == 1) + scanline_size = ceil(scanline_size); + + float scan = mod(scan_axis_pos * scan_axis_screen_scale_res, scanline_size) / scanline_size; + + // Alternate, modulating the scanline width depending on brightness + //float scanline_mask = HHLP_EasePowerOut(1 - abs(scan - 0.5) * 2, 0.5 + 2 * smoothstep(0.4, 0.9, (in_color.r + in_color.g + in_color.b) / 3)); + float color_brightness_modulation = HHLP_EasePowerOut(smoothstep(0.4, 0.99, (in_color.r + in_color.g + in_color.b) / 3), 2); + + float scanline_mask = 1 - abs(scan - 0.5) * 2; + scanline_mask = pow(1 - scanline_mask, 1); + + float final_scanline_mask = clamp(1 * scanline_mask, 0, 1); + + color_brightness_modulation = HHLP_EasePowerOut(smoothstep(0.4, HSM_FAKE_SCANLINE_BRIGHTNESS_CUTOFF + 1.5, (in_color.r + in_color.g + in_color.b) / 3), 2); + final_scanline_mask = clamp(mix(1, mix(final_scanline_mask, 1, color_brightness_modulation), HSM_FAKE_SCANLINE_OPACITY), 0, 1); + + vec4 masked_color = in_color; + masked_color *= 1 + 0.5 * HSM_FAKE_SCANLINE_OPACITY; + masked_color = clamp(final_scanline_mask * masked_color, 0, 1); + masked_color.w = in_color.w; + + // Split Screen for debugging + // masked_color = scan_opposite_axis_pos > 0.7 ? in_color : masked_color; + + return clamp(masked_color, 0, 1); +} + +vec4 HSM_GetPostCrtPreppedColor(vec4 in_color_with_gamma, vec2 VIEWPORT_COORD, vec2 screen_curved_coord, in sampler2D source_pass, bool source_is_linear, in sampler2D TubeDiffuseImage, in sampler2D TubeColoredGelImage, in sampler2D TubeStaticReflectionImage, in sampler2D BackgroundImage, in sampler2D BackgroundVertImage, in sampler2D NightLightingImage) +{ + if (HSM_MONOCHROME_MODE > 0.5 && HSM_GetUseOnCurrentScreenIndex(HSM_MONOCHROME_DUALSCREEN_VIS_MODE)) + in_color_with_gamma = HSM_ApplyMonochrome(in_color_with_gamma); + + vec4 out_color = HSM_Linearize(in_color_with_gamma, DEFAULT_SRGB_GAMMA); + out_color *= HSM_POST_CRT_BRIGHTNESS; + + vec2 mirrored_screen_coord = HSM_GetMirrorWrappedCoord(screen_curved_coord); + float screen_mask = HSM_GetCornerMask((screen_curved_coord - 0.5) * 0.999 + 0.5, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS, 0.9); + + if (HSM_GetUseScreenVignette()) + { + // out_color *= HSM_GetScreenVignetteFactor(screen_curved_coord); + + float vignette_factor = HSM_GetScreenVignetteFactor(mirrored_screen_coord); + + float vignette_factor_outside_screen = HSM_SCREEN_VIGNETTE_IN_REFLECTION * vignette_factor + (1 - HSM_SCREEN_VIGNETTE_IN_REFLECTION) * 1; + vignette_factor = screen_mask * vignette_factor + (1 - screen_mask) * vignette_factor_outside_screen; + + out_color *= vignette_factor; + } + + vec4 ambient_lighting_image = HSM_GetNightLightingMultiplyColor( HSM_AMBIENT_LIGHTING_SCALE_MODE > 0.5 ? VIEWPORT_UNSCALED_COORD : VIEWPORT_COORD, NightLightingImage ); + + // float screen_edge_mask = HSM_GetCornerMask(screen_curved_coord, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS, HSM_TUBE_BLACK_EDGE_SHARPNESS); + // screen_edge_mask = 1 - ((1 - screen_edge_mask) * screen_mask); + + // out_color *= screen_edge_mask; + + if (HSM_AB_COMPARE_SHOW_MODE == 1 && HSM_GetIsInABCompareArea(VIEWPORT_COORD)) + { + vec2 ab_screen_coord = HSM_CRT_CURVATURE_SCALE * screen_curved_coord + (1 - HSM_CRT_CURVATURE_SCALE) * SCREEN_COORD; + ab_screen_coord = HSM_GetMirrorWrappedCoord(ab_screen_coord); + + vec4 source_color = HSM_GetCroppedTexSample(source_pass, ab_screen_coord); + if (!source_is_linear) + source_color = HSM_Linearize(source_color, GAMMA_INPUT); + source_color = HSM_Delinearize(source_color, HSM_GAMMA_OUT_CRT); + source_color = HSM_Linearize(source_color, DEFAULT_SRGB_GAMMA); + + out_color = source_color; + } + + vec2 tube_curved_coord = HSM_GetTubeCurvedCoord(SCREEN_COORD, 1, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1); + vec2 mirrored_tube_coord = HSM_GetMirrorWrappedCoord(tube_curved_coord); + + if (HSM_FAKE_SCANLINE_OPACITY > 0.001 && HSM_FAKE_SCANLINE_MODE > 0.5) + { + vec4 scanline_masked_color = HSM_ApplyScanlineMask(out_color, SCREEN_SCALE, SCREEN_COORD, screen_curved_coord); + + // Darken the outside image a bit + out_color = mix(out_color, out_color * 0.9, HSM_FAKE_SCANLINE_OPACITY); + + // Show scanlines only in the tube area + float tube_highlight_mask = HSM_GetCornerMask((tube_curved_coord - 0.5) * 0.995 + 0.5 , SCREEN_ASPECT, HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS, 0.05); + out_color = mix(out_color, scanline_masked_color, tube_highlight_mask); + } + + vec3 tube_shadow = vec3(1); + if (HSM_TUBE_SHADOW_IMAGE_ON > 0.5) + { + vec2 shadow_coord = SCREEN_COORD; + + // TODO Shadow Coordinate isn't right with 3D Curvature + + shadow_coord.x = (shadow_coord.x - HSM_TUBE_SHADOW_IMAGE_POS_X - 0.5) / HSM_TUBE_SHADOW_IMAGE_SCALE_X + 0.5; + shadow_coord.y = (shadow_coord.y + HSM_TUBE_SHADOW_IMAGE_POS_Y) / HSM_TUBE_SHADOW_IMAGE_SCALE_Y; + shadow_coord = HSM_GetTubeCurvedCoord(shadow_coord, HSM_TUBE_SHADOW_CURVATURE_SCALE, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1); + shadow_coord = HSM_GetMirrorWrappedCoord(shadow_coord); + + shadow_coord.x = HSM_FLIP_VIEWPORT_HORIZONTAL * (shadow_coord.x - 0.5) + 0.5; + shadow_coord.y = HSM_FLIP_VIEWPORT_VERTICAL * (shadow_coord.y - 0.5) + 0.5; + + vec4 tube_shadow_sample = HSM_GetMipmappedTexSample(TubeShadowImage, shadow_coord, TUBE_SCALE * vec2(HSM_TUBE_SHADOW_IMAGE_SCALE_X, HSM_TUBE_SHADOW_IMAGE_SCALE_Y), 0); + tube_shadow_sample = HSM_GLOBAL_GRAPHICS_BRIGHTNESS * HSM_GetPreMultipliedColorLinear(tube_shadow_sample, SOURCE_MATTE_PREMULTIPLIED, DEFAULT_SRGB_GAMMA); + + tube_shadow = (1 - HSM_TUBE_SHADOW_IMAGE_OPACITY) + HSM_TUBE_SHADOW_IMAGE_OPACITY * tube_shadow_sample.rgb; + } + + // If the crt blend mode is multiply then use the diffuse image + float tube_diffuse_mode = HSM_CRT_BLEND_MODE == 2 ? 1 : HSM_TUBE_DIFFUSE_MODE; + vec4 tube_diffuse = vec4(0, 0, 0, 1); + if (tube_diffuse_mode == 1) + { + // TubeDiffuseImage + if (HSM_TUBE_DIFFUSE_MODE == 1 || HSM_CRT_BLEND_MODE == 2) + { + vec2 diffuse_coord = mirrored_tube_coord; + diffuse_coord.x = HSM_FLIP_VIEWPORT_HORIZONTAL * (diffuse_coord.x - 0.5) + 0.5; + diffuse_coord.y = HSM_FLIP_VIEWPORT_VERTICAL * (diffuse_coord.y - 0.5) + 0.5; + + 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); + tube_diffuse = HSM_GLOBAL_GRAPHICS_BRIGHTNESS * HSM_GetPreMultipliedColorLinear(tube_diffuse, SOURCE_MATTE_PREMULTIPLIED, DEFAULT_SRGB_GAMMA); + 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 *= tube_shadow; + } + + // If CRT Blend Mode is Multiply (2) then the tube must be fully opaque + tube_diffuse *= HSM_GetTubeDiffuseOpacity(); + tube_diffuse.rgb *= (1 - HSM_TUBE_DIFFUSE_IMAGE_AMBIENT_LIGHTING) * vec3(1) + HSM_TUBE_DIFFUSE_IMAGE_AMBIENT_LIGHTING * ambient_lighting_image.rgb; + } + out_color.a = in_color_with_gamma.a; + + float bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + if(HSM_BZL_USE_INDEPENDENT_CURVATURE > 0) + bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * DEFAULT_SCREEN_CORNER_RADIUS; + + float tube_mask = HSM_GetCornerMask(tube_curved_coord, SCREEN_ASPECT, bezel_corner_radius, 0.99); + float black_edge_mask_invert = 1 - (tube_mask - screen_mask); + + out_color *= black_edge_mask_invert; + + // Don't apply the CRT images + if (HSM_CRT_BLEND_MODE == 0) + out_color = vec4(0); + + // Apply the CRT image additively to the tube diffuse color + if (HSM_CRT_BLEND_MODE == 1) + out_color = HSM_BlendModeLayerMix(tube_diffuse, out_color, BLEND_MODE_ADD, HSM_CRT_BLEND_AMOUNT); + + // Apply the CRT image with multiply blending + if (HSM_CRT_BLEND_MODE == 2) + out_color = HSM_BlendModeLayerMix(tube_diffuse, out_color, BLEND_MODE_MULTIPLY, HSM_CRT_BLEND_AMOUNT); + + // Add a Colored Gel image on top of the screen, this is what colors games like space invaders or battlezone + if (HSM_GetUseTubeColoredGelImage()) + { + vec2 gel_coord = mirrored_tube_coord; + gel_coord.x = HSM_TUBE_COLORED_GEL_IMAGE_FLIP_HORIZONTAL * (gel_coord.x - 0.5) + 0.5; + gel_coord.y = HSM_TUBE_COLORED_GEL_IMAGE_FLIP_VERTICAL * (gel_coord.y - 0.5) + 0.5; + gel_coord = (gel_coord - 0.5) / HSM_TUBE_COLORED_GEL_IMAGE_SCALE + 0.5; + vec4 gel_image = HSM_GetMipmappedTexSample(TubeColoredGelImage, gel_coord, TUBE_SCALE, 0); + + gel_image = HSM_GLOBAL_GRAPHICS_BRIGHTNESS * HSM_Linearize(gel_image, DEFAULT_SRGB_GAMMA); + + if (HSM_TUBE_COLORED_GEL_IMAGE_MULTIPLY_AMOUNT > 0) + out_color = mix(out_color, out_color * gel_image, HSM_TUBE_COLORED_GEL_IMAGE_MULTIPLY_AMOUNT); + + if (HSM_TUBE_COLORED_GEL_IMAGE_ADDITIVE_AMOUNT > 0) + out_color = mix(out_color, out_color + gel_image, HSM_TUBE_COLORED_GEL_IMAGE_ADDITIVE_AMOUNT); + + if (HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT > 0) + { + gel_image.a = clamp( gel_image.a - HSM_TUBE_COLORED_GEL_IMAGE_TRANSPARENCY_THRESHOLD, 0, 1 ) / (1 - HSM_TUBE_COLORED_GEL_IMAGE_TRANSPARENCY_THRESHOLD); + gel_image.rgb *= HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_BRIGHTNESS; + gel_image.rgb *= tube_shadow; + + if (HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING > 0) + gel_image.rgb *= (1 - HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING) * vec3(1) + HSM_TUBE_COLORED_GEL_IMAGE_AMBIENT_LIGHTING * ambient_lighting_image.rgb; + + if ( HSM_SHOW_CRT_ON_TOP_OF_COLORED_GEL == 0 ) + out_color = HSM_BlendModeLayerMix(out_color, gel_image, BLEND_MODE_NORMAL, HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT); + if ( HSM_SHOW_CRT_ON_TOP_OF_COLORED_GEL == 1 ) + { + vec4 normal_blended = HSM_BlendModeLayerMix(vec4(0, 0, 0, 1), gel_image, BLEND_MODE_NORMAL, HSM_TUBE_COLORED_GEL_IMAGE_NORMAL_AMOUNT); + out_color = normal_blended + out_color; + } + } + } + + #ifdef IS_NO_REFLECT_PRESET + out_color.rgb *= HSM_Get_Screen_Black_Edge_Mask(BLACK_EDGE_COORD, false); + + // TUBE HIGHLIGHT + if (HSM_GetUseTubeStaticReflection()) + out_color += HSM_GetTubeHighlight(tube_curved_coord, false, TubeStaticReflectionImage, ambient_lighting_image); + #endif + + // #ifndef IS_NO_REFLECT_PRESET + // Apply the final Gamma + out_color = HSM_Delinearize(out_color, DEFAULT_SRGB_GAMMA); + // #endif + + return out_color; +} + + +void main() +{ + if (HSM_AB_COMPARE_FREEZE_CRT_TUBE == 1 && HSM_GetIsInABCompareArea(vTexCoord)) + { + FragColor = texture(PassFeedback, vTexCoord); + return; + } + + VIEWPORT_UNSCALED_COORD = HSM_GetViewportCoordWithFlip(vTexCoord); + // VIEWPORT_COORD = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + + vec2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + 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(SCREEN_COORD, + SCREEN_SCALE, + TUBE_SCALE, + SCREEN_ASPECT, + false, + BEZEL_OUTSIDE_SCALE, + BEZEL_OUTSIDE_COORD, + BEZEL_OUTSIDE_CURVED_COORD, + FRAME_OUTSIDE_CURVED_COORD); + + 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) + { + FragColor = vec4(0); + return; + } + + vec2 screen_curved_coord = HSM_GetCurvedCoord(SCREEN_COORD, 1, SCREEN_ASPECT); + + FragColor = texture(Source, UNFLIPPED_VIEWPORT_COORD); + + FragColor = HSM_GetPostCrtPreppedColor(FragColor, vTexCoord, screen_curved_coord, IntroPass, false, TubeDiffuseImage, TubeColoredGelImage, TubeStaticReflectionImage, BackgroundImage, BackgroundVertImage, NightLightingImage); +} diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep.slang new file mode 100644 index 0000000..64aef15 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-post-crt-prep.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-bezel-params.inc" +#include "hsm-post-crt-prep.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang new file mode 100644 index 0000000..fe30a47 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection-glass.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-glass-params.inc" +#include "hsm-reflection.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection.inc new file mode 100644 index 0000000..e79bea8 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection.inc @@ -0,0 +1,467 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +/////////////// IMPORTS /////////////// +#include "common/hsm-common-functions-bezel.inc" + +vec2 VIEWPORT_COORD = vec2(0.5); + +/////////////// Helper Functions /////////////// + +layout(push_constant) uniform Push +{ + vec4 BR_MirrorBlurredPassSize; + vec4 BR_MirrorReflectionDiffusedPassSize; + vec4 BR_MirrorFullscreenGlowPassSize; + +} params; + + +//TODO remove this and replace with simpler calls +float GetFade(float current_position, float corner_position, float fade_distance) +{ + return smoothstep(corner_position + fade_distance / 2, corner_position - fade_distance / 2, current_position); +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma stage vertex + +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 6) out vec2 vTexCoord; +layout(location = 7) out vec2 UNFLIPPED_VIEWPORT_COORD; +layout(location = 8) out vec3 BEZEL_FRAME_ORIGINAL_COLOR_RGB; + +////////////////////////////////////////////////////////////////////////////////////////////////// +void main() +{ + gl_Position = global.MVP * Position; + vTexCoord = TexCoord; + + UNFLIPPED_VIEWPORT_COORD = vTexCoord * 1.0001; + vTexCoord * 1.0001; + + // Not sure why we need linearize this but it seems to have a smoother range this way + BEZEL_FRAME_ORIGINAL_COLOR_RGB = HSM_Linearize(vec4(HSM_HSVtoRGB(vec3(HSM_BZL_COLOR_HUE, HSM_BZL_COLOR_SATURATION, HSM_BZL_COLOR_VALUE)), 1), DEFAULT_SRGB_GAMMA).rgb; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma stage fragment + +layout(location = 6) in vec2 vTexCoord; +layout(location = 7) in vec2 UNFLIPPED_VIEWPORT_COORD; +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 = 3) uniform sampler2D NightLightingImage; +layout(set = 0, binding = 4) uniform sampler2D BackgroundImage; +layout(set = 0, binding = 5) uniform sampler2D ReflectionMaskImage; + +layout(set = 0, binding = 6) uniform sampler2D TubeStaticReflectionImage; +layout(set = 0, binding = 7) uniform sampler2D TubeColoredGelImage; + +layout(set = 0, binding = 8) uniform sampler2D MBZ_PostCRTPass; +layout(set = 0, binding = 9) uniform sampler2D BR_MirrorBlurredPass; +layout(set = 0, binding = 10) uniform sampler2D BR_MirrorReflectionDiffusedPass; +layout(set = 0, binding = 11) uniform sampler2D BR_MirrorFullscreenGlowPass; + +layout(set = 0, binding = 12) uniform sampler2D BR_CRTAndReflectionPassFeedback; +#define PassFeedback BR_CRTAndReflectionPassFeedback + +////////////////////////////////////////////////////////////////////////////////////////////////// +void main() +{ + if (HSM_AB_COMPARE_FREEZE_CRT_TUBE == 1 && HSM_GetIsInABCompareArea(vTexCoord)) + { + FragColor = texture(PassFeedback, vTexCoord); + return; + } + + VIEWPORT_UNSCALED_COORD = HSM_GetViewportCoordWithFlip(vTexCoord); + VIEWPORT_COORD = HSM_GetViewportCoordWithZoomAndPan(vTexCoord); + + 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(SCREEN_COORD, + SCREEN_SCALE, + TUBE_SCALE, + SCREEN_ASPECT, + true, + BEZEL_OUTSIDE_SCALE, + BEZEL_OUTSIDE_COORD, + BEZEL_OUTSIDE_CURVED_COORD, + FRAME_OUTSIDE_CURVED_COORD); + + 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) + { + FragColor = vec4(0); + return; + } + + float avg_lum_mult = smoothstep(0.01, 0.5, pow(AVERAGE_LUMA, 1.3)); + + //---------------------------------------------------- + // CRT Pass + //---------------------------------------------------- + // Get the CRT pass and make it in linear space & mask the area outside the screen + vec4 crt_linear = HSM_Linearize(texture(MBZ_PostCRTPass, UNFLIPPED_VIEWPORT_COORD.xy), DEFAULT_CRT_GAMMA); + crt_linear = HSM_ApplyGamma(crt_linear, DEFAULT_CRT_GAMMA / DEFAULT_SRGB_GAMMA); + + vec4 blurred_reflection_color = HHLP_GetBilinearTextureSample(BR_MirrorBlurredPass, UNFLIPPED_VIEWPORT_COORD.xy, params.BR_MirrorBlurredPassSize); + + SCREEN_BLACK_EDGE_CURVED_COORD = HSM_GetCurvedCoord(SCREEN_COORD, HSM_TUBE_BLACK_EDGE_CURVATURE_SCALE, SCREEN_ASPECT); + + vec2 tube_curved_coord = HSM_GetTubeCurvedCoord(SCREEN_COORD, 1, SCREEN_SCALE, TUBE_SCALE, SCREEN_ASPECT, 1); + vec2 tube_curved_coord_ctr = tube_curved_coord - 0.5; + vec2 edge_mask_coord = tube_curved_coord_ctr * (1 - (HSM_BZL_INNER_EDGE_THICKNESS / vec2(SCREEN_ASPECT, 1))) + 0.5; + + float bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + if(HSM_BZL_USE_INDEPENDENT_CURVATURE > 0) + bezel_corner_radius = HSM_BZL_INNER_CORNER_RADIUS_SCALE * HSM_GLOBAL_CORNER_RADIUS; + + float edge_mask = HSM_GetCornerMask(edge_mask_coord, SCREEN_ASPECT, bezel_corner_radius, HSM_BZL_INNER_EDGE_SHARPNESS); + + float outside_tube_mask = 1 - HSM_GetCornerMask(tube_curved_coord, SCREEN_ASPECT, bezel_corner_radius, 0.99); + TUBE_MASK = 1 - outside_tube_mask; + + OUTSIDE_BEZEL_MASK = 1 - HSM_GetCornerMask(BEZEL_OUTSIDE_CURVED_COORD, SCREEN_ASPECT, HSM_GLOBAL_CORNER_RADIUS * HSM_BZL_OUTER_CORNER_RADIUS_SCALE, 0.9); + + //---------------------------------------------------- + // Calculate Outside mapping Coords + //---------------------------------------------------- + /* This first big chunk is to get a mapping of the space outside of the screen which is continuous + This is more complicated than you would expect because since we are using curved coordinates + there are discontinuities outside the normal screen corners, e.g. where x > 1 and y > 1 + So instead of trying to use the coordinates from the screen/tube we use a larger space + and subtract the screen space to see how far we are outside of the sreen + */ + + // Additional scale to be applied to the tube scale to create an expanded mapping area + float outermap_scale = 2.3; + + // Get a range width from the outer tube edge to the outer edge of the outermap + float outermap_range = 0.5 * outermap_scale * 0.7; + vec2 outermap_screen_size_from_center = vec2(0.5, 0.5); + vec2 outermap_warped_outside_screen_vector = (tube_curved_coord_ctr - clamp(tube_curved_coord_ctr, -0.490, 0.490)) * vec2(1 / SCREEN_ASPECT, 1); + float output_aspect = global.OutputSize.x / global.OutputSize.y; + float outside_ratio_warped = clamp(length(outermap_warped_outside_screen_vector) / outermap_range, 0, 1); + vec2 outermap_screen_corner_ctr_coord = vec2(0.5, -0.5); + + // Get a coordinate offset so it is centered around the corner + vec2 outermap_coord_warped_ctr_at_screen_corner = abs(tube_curved_coord_ctr) - vec2(0.5); + + //---------------------------------------------------- + // Calculate Corner Highlight Mask + //---------------------------------------------------- + const float pi = 3.1415; + + // Get amount to shift the point at the outer corner to match the overall position offset + vec2 pos_shift_offset = vec2(0, HSM_BZL_OUTER_POSITION_Y) * SCREEN_SCALE.y / outermap_scale; + pos_shift_offset *= tube_curved_coord.y > 0.5 ? 1 : -1; + + // Get the direction vector from the inner corner of the bezel pointing at the outer corner + vec2 corner_crease_dir = (outermap_screen_corner_ctr_coord + pos_shift_offset) / vec2(HSM_BZL_HEIGHT + 1, HSM_BZL_WIDTH + 1) - (outermap_screen_corner_ctr_coord) ; + corner_crease_dir *= vec2(SCREEN_ASPECT, 1); + + float aspect_corner_length_scale_offset = SCREEN_ASPECT > 1 ? 0.9 : 1.5; + float corner_crease_length = length(corner_crease_dir * aspect_corner_length_scale_offset); + + // A hack to adjust the angle offset, because without it the corner angle isn't pointing exactly at the corner + // This offset is the opposite direction for vertical and horizontal aspect ratio + float corner_rotation_offset = (SCREEN_COORD.y < 0.5) ? -HSM_REFLECT_CORNER_ROTATION_OFFSET_TOP : -HSM_REFLECT_CORNER_ROTATION_OFFSET_BOTTOM; + + if (HSM_CURVATURE_MODE == 0) + // If we are using a 3d Curvature no offset is necessary + corner_rotation_offset += (SCREEN_ASPECT > 1) ? 2 : 3; + + // Convert direction vector to an angle so we can rotate the corner crease direction + float corner_angle_degrees = atan(corner_crease_dir.y / corner_crease_dir.x) / (2 * pi) * 360; + + corner_angle_degrees += corner_rotation_offset; + float corner_angle_radians = corner_angle_degrees / 360 * 2 * pi; + corner_crease_dir = vec2(cos(corner_angle_radians), sin(corner_angle_radians)); + + // Get the distance perpendicular to the crease direction so we can use it to fade later + float distance_from_crease = HHLP_GetDistanceToLine(outermap_coord_warped_ctr_at_screen_corner.x, outermap_coord_warped_ctr_at_screen_corner.y, 1, corner_crease_dir.y / corner_crease_dir.x, 0 ); + + float fade_out_to_corner = HHLP_QuadraticBezier(clamp(length(outermap_warped_outside_screen_vector) / (corner_crease_length * 2), 0, 1), vec2(0.5, HSM_REFLECT_CORNER_SPREAD_FALLOFF / 100)); + + float corner_fade_width_inner = HSM_REFLECT_CORNER_INNER_SPREAD * (SCREEN_SCALE.x + SCREEN_SCALE.y) * bezel_corner_radius / 10 / 250 * 1.2; + float corner_fade_width_outer = HSM_REFLECT_CORNER_OUTER_SPREAD * (SCREEN_SCALE.x + SCREEN_SCALE.y) * HSM_GLOBAL_CORNER_RADIUS * HSM_BZL_OUTER_CORNER_RADIUS_SCALE / 10 / 250 * 1.6; + float corner_fade_width = (corner_fade_width_inner + fade_out_to_corner * (corner_fade_width_outer - corner_fade_width_inner)); + + // Get a vector perpendicular to the crease that we can shift the crease to blend between bottom/top and sides + vec2 corner_crease_perp_dir = normalize(vec2(corner_crease_dir.y, corner_crease_dir.x)); + vec2 corner_coord_shifted = outermap_coord_warped_ctr_at_screen_corner - corner_crease_perp_dir * corner_fade_width / 2; + vec2 corner_crease_dir_shifted = corner_crease_dir - corner_crease_perp_dir * corner_fade_width / 2; + + // Get the distance to this shifted crease + float distance_from_crease_shifted = HHLP_GetDistanceToLine(corner_coord_shifted.x, corner_coord_shifted.y, 1, corner_crease_dir_shifted.y / corner_crease_dir_shifted.x, 0 ); + + float top_half_mask = smoothstep(0.55, 0.5, tube_curved_coord.y); + + // Get a mask which transitions between sides and top/bottom at the corner crease + float top_bottom_vs_sides_mask = dot(normalize(corner_coord_shifted), normalize(corner_crease_dir_shifted)) > 0 ? 1 - smoothstep(0, corner_fade_width / 2, distance_from_crease_shifted) : 1; + + // Masks isolating specific parts + float sides_mask = 1 - top_bottom_vs_sides_mask; + float top_mask = top_half_mask * top_bottom_vs_sides_mask; + float bottom_mask = (1 -top_half_mask) * top_bottom_vs_sides_mask; + + float corner_mask = smoothstep(corner_fade_width / 2, 0, distance_from_crease); + + float top_corner_mask = corner_mask * top_half_mask; + float bottom_corner_mask = corner_mask * (1 - top_half_mask); + + float frame_inner_edge_mask = (HSM_FRM_INNER_EDGE_THICKNESS == 0) ? 0 : 1 - HSM_GetCornerMask( (BEZEL_OUTSIDE_CURVED_COORD - 0.5) * (1 + (HSM_FRM_INNER_EDGE_THICKNESS / vec2(SCREEN_ASPECT, 1))) + 0.5, + SCREEN_ASPECT, + HSM_GLOBAL_CORNER_RADIUS * HSM_BZL_OUTER_CORNER_RADIUS_SCALE, + 0.9); + float outside_tube_mask_wider = 1 - HSM_GetCornerMask(tube_curved_coord_ctr * 0.996 + 0.5, SCREEN_ASPECT, bezel_corner_radius, 0.9); + float tube_shadow_mask = HSM_GetCornerMask(tube_curved_coord_ctr + 0.5, SCREEN_ASPECT, bezel_corner_radius, 0); + float tube_edge_shadow_mult = HSM_BZL_INNER_EDGE_SHADOW * (tube_shadow_mask) + (1 - HSM_BZL_INNER_EDGE_SHADOW); + + crt_linear.rgb *= tube_edge_shadow_mult * (1 - outside_tube_mask_wider); + crt_linear.a = TUBE_MASK; + + float edge_highlight_mask = 0; + + // ---------------------------------------------------- + // Generated Bezel + // ---------------------------------------------------- + + float hmbz_bezel_highlight_edge = 0.9; + float hmbz_bezel_highlight_top = 0.2; + float hmbz_bezel_highlight_bottom = 0.3; + float hmbz_bezel_highlight_sides = 0.2; + + float hmbz_bezel_edge_highlight_width = 0.8; + if (HSM_GLASS_BORDER_ON == 1) + hmbz_bezel_edge_highlight_width = 0.55; + + float edge_top_center_highlight_mask = hmbz_bezel_highlight_top * top_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.8, 0)); + float edge_bottom_center_highlight_mask = hmbz_bezel_highlight_bottom * bottom_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.8, 0)); + float edge_sides_highlight_mask = hmbz_bezel_highlight_sides * sides_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.y)), vec2(0.8, 0)); + + if (HSM_GLASS_BORDER_ON == 1) + { + edge_top_center_highlight_mask = 0.6 * top_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.8, 1)); + edge_bottom_center_highlight_mask = bottom_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.x)), vec2(0.8, 1)); + edge_sides_highlight_mask = 0.7 * sides_mask * HHLP_QuadraticBezier(smoothstep(hmbz_bezel_edge_highlight_width, 0, abs(tube_curved_coord_ctr.y)), vec2(0.8, 1)); + } + + edge_highlight_mask = hmbz_bezel_highlight_edge * edge_mask * (edge_top_center_highlight_mask + edge_bottom_center_highlight_mask + edge_sides_highlight_mask); + + + //---------------------------------------------------- + // Reflection + //---------------------------------------------------- + vec4 reflection_color = vec4(0); + vec4 edge_reflection_color = vec4(0); + vec4 glass_border_edge_color = vec4(0); + vec4 edge_fullscreen_glow = vec4(0); + if (HSM_REFLECT_GLOBAL_AMOUNT > 0) + { + // Corner Mask for Specular highlights + float fade_out_to_corner = smoothstep(0 + HSM_REFLECT_CORNER_FADE_DISTANCE / 2, 0 - HSM_REFLECT_CORNER_FADE_DISTANCE / 2, outside_ratio_warped); + float corner_fade_mask = (top_corner_mask + bottom_corner_mask) * (HSM_REFLECT_CORNER_FADE) * fade_out_to_corner * 2; + + corner_fade_mask *= 1 - frame_inner_edge_mask; + + // Radial fade - fading away from the edges of the screen + float radial_fade_speed = 100; + float radial_fade_sides = 1 - HHLP_QuadraticBezier(clamp((outside_ratio_warped / (HSM_REFLECT_RADIAL_FADE_WIDTH)), 0, 1), vec2(1 - (radial_fade_speed / 100), 1)); + float radial_fade_top_bottom = 1 - HHLP_QuadraticBezier(clamp((outside_ratio_warped / (HSM_REFLECT_RADIAL_FADE_HEIGHT)), 0, 1), vec2(1 - (radial_fade_speed / 100), 1)); + float radial_fade_mask = clamp((1 - sides_mask) * radial_fade_top_bottom + + sides_mask * radial_fade_sides, 0, 1); + + float radial_inner_fade_mask = clamp(0.3 + 0.7 * HHLP_QuadraticBezier(smoothstep(0.01, 0.3, outside_ratio_warped / (HSM_REFLECT_RADIAL_FADE_WIDTH)), vec2(0.1, 0.3)), 0, 1); + + // Lateral fade - Fading left to right across the bottom or top to bottom along the sides + float distance_ratio = smoothstep(0, 0.075, outside_ratio_warped); + float lateral_outer_fade_distance = HSM_REFLECT_LATERAL_OUTER_FADE_DISTANCE; + lateral_outer_fade_distance = 0.5 * lateral_outer_fade_distance + distance_ratio * 0.5 * lateral_outer_fade_distance; + float lateral_fade_mask = (1 - sides_mask) * GetFade(abs(tube_curved_coord_ctr.x) + (HSM_REFLECT_LATERAL_OUTER_FADE_POSITION) / SCREEN_ASPECT, + outermap_screen_size_from_center.x, + outermap_screen_size_from_center.x * lateral_outer_fade_distance) + + sides_mask * GetFade(abs(tube_curved_coord_ctr.y) + (HSM_REFLECT_LATERAL_OUTER_FADE_POSITION) / SCREEN_ASPECT, + outermap_screen_size_from_center.y, + outermap_screen_size_from_center.y * lateral_outer_fade_distance); + + vec2 screen_coord_ctr = SCREEN_COORD - 0.5; + + float combined_fade_mask = radial_fade_mask * lateral_fade_mask; + + // Put all the fades together into one mask + float final_fade_mask = clamp(HSM_REFLECT_FADE_AMOUNT * combined_fade_mask, 0, 1) + 1 - HSM_REFLECT_FADE_AMOUNT; + + float stoichaic_blur_samples = HSM_REFLECT_NOISE_SAMPLES; + float noise_falloff = 0.3; + float stoichaic_blur_max = HHLP_QuadraticBezier(outside_ratio_warped, vec2(0, noise_falloff)) * 3; + float stoichaic_blur_amount = HSM_REFLECT_NOISE_SAMPLE_DISTANCE; + + // vec4 fullscreen_blurred_sampled_color = HSM_GetStoichaicBlurredSample(BR_MirrorFullscreenGlowPass, VIEWPORT_COORD.xy, stoichaic_blur_samples, (1 - corner_mask) * stoichaic_blur_max * 3, stoichaic_blur_amount); + vec4 fullscreen_blurred_sampled_color = HHLP_GetBilinearTextureSample(BR_MirrorFullscreenGlowPass, UNFLIPPED_VIEWPORT_COORD.xy, params.BR_MirrorFullscreenGlowPassSize); + + vec4 corner_reflection_color = fullscreen_blurred_sampled_color; + + vec4 fullscreen_glow_color = pow(fullscreen_blurred_sampled_color, vec4(HSM_REFLECT_FULLSCREEN_GLOW_GAMMA)); + + vec4 diffused_reflection_color = HHLP_GetBilinearTextureSample(BR_MirrorReflectionDiffusedPass, UNFLIPPED_VIEWPORT_COORD.xy, params.BR_MirrorReflectionDiffusedPassSize); + vec4 diffused_reflection_scatter_color = HSM_GetStoichaicBlurredSample(BR_MirrorReflectionDiffusedPass, UNFLIPPED_VIEWPORT_COORD.xy, stoichaic_blur_samples, stoichaic_blur_max, stoichaic_blur_amount); + vec4 diffused_reflection_blended_color = mix(diffused_reflection_color, diffused_reflection_scatter_color, HSM_REFLECT_NOISE_AMOUNT); + + vec4 blurred_reflection_scatter_color = HSM_GetStoichaicBlurredSample(BR_MirrorBlurredPass, UNFLIPPED_VIEWPORT_COORD.xy, stoichaic_blur_samples, stoichaic_blur_max, stoichaic_blur_amount); + vec4 blurred_reflection_blended_color = mix(blurred_reflection_color, blurred_reflection_scatter_color, HSM_REFLECT_NOISE_AMOUNT); + + // Add Fullscreen Glow + float lateral_fade_outer_mask_for_glow = (lateral_fade_mask - 1) * 0.8 + 1; + + //Combine diffused and undiffused reflection + + vec4 bezel_reflection_color = (HSM_REFLECT_DIRECT_AMOUNT * blurred_reflection_blended_color + HSM_REFLECT_DIFFUSED_AMOUNT * diffused_reflection_blended_color) * final_fade_mask; + + // Add Reflection from corners which is sampled from the fullscreen glow + bezel_reflection_color += HSM_REFLECT_CORNER_FADE * 100 * corner_reflection_color * corner_fade_mask; + + // Add Fullscreen Glow + bezel_reflection_color += HSM_REFLECT_FULLSCREEN_GLOW * 1.5 * fullscreen_glow_color * radial_inner_fade_mask * lateral_fade_outer_mask_for_glow; + + // Add Bezel and Edge reflection together + edge_reflection_color = 1.25 * HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT * (blurred_reflection_color + 0.50 * diffused_reflection_color); + float reflection_area_mask = outside_tube_mask; + + // Edge Reflection + if (HSM_GLASS_BORDER_ON == 1) + { + float vignette_shadow_mask = 0.75 * HHLP_QuadraticBezier(1 - HSM_GetVignetteFactor(VIEWPORT_COORD, HSM_REFLECT_VIGNETTE_AMOUNT, HSM_REFLECT_VIGNETTE_SIZE), vec2(1, 0.5)); + vignette_shadow_mask += 0.5 * HSM_REFLECT_VIGNETTE_AMOUNT * HHLP_QuadraticBezier(smoothstep(outside_ratio_warped, 0, 0.1), vec2(1, 0.5)); + reflection_color += (1 - vignette_shadow_mask) * bezel_reflection_color; + reflection_area_mask *= outside_tube_mask_wider; + } + else + { + reflection_color += (1 - edge_mask) * bezel_reflection_color; + reflection_color += edge_mask * (edge_reflection_color + HHLP_EasePowerIn(corner_mask, 1) * corner_reflection_color); + } + + reflection_color = HSM_REFLECT_GLOBAL_AMOUNT * pow(reflection_color, vec4(HSM_REFLECT_GLOBAL_GAMMA_ADJUST)); + + // Mask reflection to only appear inside the bezel + reflection_color = clamp(reflection_color, 0, 1) * clamp(reflection_area_mask, 0, 1); + + if (HSM_GLASS_BORDER_ON == 1) + { + glass_border_edge_color = HSM_REFLECT_GLOBAL_AMOUNT * pow(edge_reflection_color, vec4(HSM_REFLECT_GLOBAL_GAMMA_ADJUST)); + reflection_color = mix(reflection_color, glass_border_edge_color, edge_mask * outside_tube_mask); + } + // Edge Full Screen Glow + // Add Small amount of static glow on the edge (So when the screen is dark there is some highlight) as well as dynamic light + edge_fullscreen_glow = HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW * edge_highlight_mask * outside_tube_mask * (vec4(0.005) + + (avg_lum_mult + 0.5) * (2 * fullscreen_glow_color + vec4(0.01))); + + // Add Diffused reflection on top of the glass inner edge + if (HSM_GLASS_BORDER_ON == 1) + edge_fullscreen_glow += HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW * 0.5 * edge_highlight_mask * outside_tube_mask * diffused_reflection_color; + + reflection_color += clamp(edge_fullscreen_glow, 0, 1); + reflection_color.a = 1; + + // Modulate amount of refleciton on frame inner edge + reflection_color.rgb *= (1 - HSM_REFLECT_FRAME_INNER_EDGE_AMOUNT) * (1 - frame_inner_edge_mask) + HSM_REFLECT_FRAME_INNER_EDGE_AMOUNT; + + // TODO needs more work, needs Background Coord and Device Coord + // // Apply the mask image on the reflection, usually used to show the uneven brightness of a bumpy surface + // if (HSM_REFLECT_MASK_IMG_AMOUNT > 0) + // { + // vec2 reflection_image_coord = BACKGROUND_CURVED_COORD; + // vec2 reflection_image_scale = BACKGROUND_SCALE; + + // if (HSM_REFLECT_MASK_SCALE_MODE == 1) + // { + // reflection_image_coord = DEVICE_CURVED_COORD; + // reflection_image_scale = DEVICE_SCALE; + // } + + // float reflection_image = HSM_GetMipmappedTexSample(TubeColoredGelImage, mirrored_tube_coord, TUBE_SCALE, 0); + + // reflection_color *= HSM_REFLECT_MASK_IMG_AMOUNT * texture(ReflectionMaskImage, reflection_image_coord).r + (1 - HSM_REFLECT_MASK_IMG_AMOUNT); + // } + } + + if (HSM_TUBE_BLACK_EDGE_LAYERING_MODE > 0.5) + crt_linear.rgb *= (1 - HSM_TUBE_BLACK_EDGE_LAYERING_MODE) + HSM_TUBE_BLACK_EDGE_LAYERING_MODE * HSM_Get_Screen_Black_Edge_Mask(BLACK_EDGE_COORD, false); + + crt_linear.rgb *= TUBE_MASK; + + // Put the frame and bezel over top a black tube + // It must be a little wider than the inside of the bezel so we don't see a gap + crt_linear = HSM_PreMultAlphaBlend(vec4(0, 0, 0, 1 - outside_tube_mask_wider), crt_linear); + + // TUBE HIGHLIGHT + if (HSM_GetUseTubeStaticReflection()) + { + vec4 night_lighting_image = vec4(1); + if (HSM_AMBIENT_LIGHTING_OPACITY > 0) + night_lighting_image = HSM_GetNightLightingMultiplyColor( HSM_AMBIENT_LIGHTING_SCALE_MODE > 0.5 ? VIEWPORT_UNSCALED_COORD : VIEWPORT_COORD, NightLightingImage ); + crt_linear += HSM_GetTubeHighlight(tube_curved_coord, false, TubeStaticReflectionImage, night_lighting_image); + } + + // Clamp otherwise we get artifacts (blue overlays of brighter parts of image) + crt_linear = clamp(crt_linear, 0, 1); + + FragColor = vec4(0); + +#ifdef IS_GLASS_PRESET + vec4 bg_image = HSM_GetMipmappedTexSample(BackgroundImage, VIEWPORT_COORD, vec2(1), 0); + + bg_image = HSM_Linearize(bg_image, DEFAULT_SRGB_GAMMA); + + bg_image.a *= outside_tube_mask_wider * (1 - edge_mask); + + vec4 frag_color_linear = crt_linear; + frag_color_linear = HSM_BlendModeLayerMix(frag_color_linear, bg_image, HSM_BG_BLEND_MODE, HSM_BG_OPACITY); + frag_color_linear += reflection_color; + FragColor = HSM_ApplyGamma(clamp(frag_color_linear, 0, 1), DEFAULT_SRGB_GAMMA); + + return; +#endif + +vec4 crt_and_reflect_layer = vec4(0); +crt_and_reflect_layer = HSM_BlendModeLayerMix(crt_and_reflect_layer, crt_linear, BLEND_MODE_NORMAL, 1); +crt_and_reflect_layer.rgb += reflection_color.rgb; +crt_and_reflect_layer *= 1 - OUTSIDE_BEZEL_MASK; + +FragColor = crt_and_reflect_layer; +return; + +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection.slang new file mode 100644 index 0000000..ebe1351 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-reflection.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-reflection-params.inc" +#include "hsm-reflection.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-stock.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-stock.inc new file mode 100644 index 0000000..e504d51 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-stock.inc @@ -0,0 +1,21 @@ + +#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 = vec4(texture(Source, vTexCoord).rgb, 1.0); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang new file mode 100644 index 0000000..19ea013 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv-glass.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_STD_PRESET + +#include "common/hsm-globals-and-glass-params.inc" +#include "hsm-text.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang new file mode 100644 index 0000000..b8c2a5f --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv-no-reflect.slang @@ -0,0 +1,7 @@ +#version 450 + +#define IS_ADV_PRESET +#define IS_NO_REFLECT_PRESET + +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-text.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv.slang new file mode 100644 index 0000000..1474b64 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-adv.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_ADV_PRESET + +#include "common/hsm-globals-and-all-params.inc" +#include "hsm-text.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-lib.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-lib.inc new file mode 100644 index 0000000..9d3cd99 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-lib.inc @@ -0,0 +1,300 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 HyperspaceMadness - HyperspaceMadness@outlook.com + + Text code is from the Shadertoy "96-bit 8x12" Font by Flyguy + + 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 . +*/ + +#define DOWN_SCALE 2 + +#define MAX_INT_DIGITS 4 + +#define CHAR_SIZE vec2(8, 12) +#define CHAR_SPACING vec2(8, 12) + +#define STRWIDTH(c) (c * CHAR_SPACING.x) +#define STRHEIGHT(c) (c * CHAR_SPACING.y) + +#define NORMAL 0 +#define INVERT 1 +#define UNDERLINE 2 + +int TEXT_MODE = NORMAL; + +/* +-------- +-###---- +##-##--- +##-##--- +-###---- +#####-#- +##-####- +##--##-- +##-###-- +-###-##- +-------- +-------- + +00000000 +01110000 +11011000 +11011000 +01110000 +11111010 +11011110 +11001100 +11011100 +01110110 +00000000 +00000000 + +//Broken up into 4 8x3 (24 bit) chunks for each component of the vec4. +//Hexadecimal is being used to reduce clutter in the code but decimal still works. + +00000000 +01110000 -> 00000000 01110000 11011000 -> 0x0070D8 +11011000 + +11011000 +01110000 -> 11011000 01110000 11111010 -> 0xD870FA +11111010 + +11011110 +11001100 -> 11011110 11001100 11011100 -> 0xDECCDC +11011100 + +01110110 +00000000 -> 01110110 00000000 00000000 -> 0x760000 +00000000 + +vec4(0x0070D8,0xD870FA,0xDECCDC,0x760000) +*/ + +//Automatically generated from the 8x12 font sheet here: +//http://www.massmind.org/techref/datafile/charset/extractor/charset_extractor.htm + +vec4 ch_spc = vec4(0x000000,0x000000,0x000000,0x000000); +vec4 ch_exc = vec4(0x003078,0x787830,0x300030,0x300000); +vec4 ch_quo = vec4(0x006666,0x662400,0x000000,0x000000); +vec4 ch_hsh = vec4(0x006C6C,0xFE6C6C,0x6CFE6C,0x6C0000); +vec4 ch_dol = vec4(0x30307C,0xC0C078,0x0C0CF8,0x303000); +vec4 ch_pct = vec4(0x000000,0xC4CC18,0x3060CC,0x8C0000); +vec4 ch_amp = vec4(0x0070D8,0xD870FA,0xDECCDC,0x760000); +vec4 ch_apo = vec4(0x003030,0x306000,0x000000,0x000000); +vec4 ch_lbr = vec4(0x000C18,0x306060,0x603018,0x0C0000); +vec4 ch_rbr = vec4(0x006030,0x180C0C,0x0C1830,0x600000); +vec4 ch_ast = vec4(0x000000,0x663CFF,0x3C6600,0x000000); +vec4 ch_crs = vec4(0x000000,0x18187E,0x181800,0x000000); +vec4 ch_com = vec4(0x000000,0x000000,0x000038,0x386000); +vec4 ch_dsh = vec4(0x000000,0x0000FE,0x000000,0x000000); +vec4 ch_per = vec4(0x000000,0x000000,0x000038,0x380000); +vec4 ch_lsl = vec4(0x000002,0x060C18,0x3060C0,0x800000); +vec4 ch_0 = vec4(0x007CC6,0xD6D6D6,0xD6D6C6,0x7C0000); +vec4 ch_1 = vec4(0x001030,0xF03030,0x303030,0xFC0000); +vec4 ch_2 = vec4(0x0078CC,0xCC0C18,0x3060CC,0xFC0000); +vec4 ch_3 = vec4(0x0078CC,0x0C0C38,0x0C0CCC,0x780000); +vec4 ch_4 = vec4(0x000C1C,0x3C6CCC,0xFE0C0C,0x1E0000); +vec4 ch_5 = vec4(0x00FCC0,0xC0C0F8,0x0C0CCC,0x780000); +vec4 ch_6 = vec4(0x003860,0xC0C0F8,0xCCCCCC,0x780000); +vec4 ch_7 = vec4(0x00FEC6,0xC6060C,0x183030,0x300000); +vec4 ch_8 = vec4(0x0078CC,0xCCEC78,0xDCCCCC,0x780000); +vec4 ch_9 = vec4(0x0078CC,0xCCCC7C,0x181830,0x700000); +vec4 ch_col = vec4(0x000000,0x383800,0x003838,0x000000); +vec4 ch_scl = vec4(0x000000,0x383800,0x003838,0x183000); +vec4 ch_les = vec4(0x000C18,0x3060C0,0x603018,0x0C0000); +vec4 ch_equ = vec4(0x000000,0x007E00,0x7E0000,0x000000); +vec4 ch_grt = vec4(0x006030,0x180C06,0x0C1830,0x600000); +vec4 ch_que = vec4(0x0078CC,0x0C1830,0x300030,0x300000); +vec4 ch_ats = vec4(0x007CC6,0xC6DEDE,0xDEC0C0,0x7C0000); +vec4 ch_A = vec4(0x003078,0xCCCCCC,0xFCCCCC,0xCC0000); +vec4 ch_B = vec4(0x00FC66,0x66667C,0x666666,0xFC0000); +vec4 ch_C = vec4(0x003C66,0xC6C0C0,0xC0C666,0x3C0000); +vec4 ch_D = vec4(0x00F86C,0x666666,0x66666C,0xF80000); +vec4 ch_E = vec4(0x00FE62,0x60647C,0x646062,0xFE0000); +vec4 ch_F = vec4(0x00FE66,0x62647C,0x646060,0xF00000); +vec4 ch_G = vec4(0x003C66,0xC6C0C0,0xCEC666,0x3E0000); +vec4 ch_H = vec4(0x00CCCC,0xCCCCFC,0xCCCCCC,0xCC0000); +vec4 ch_I = vec4(0x007830,0x303030,0x303030,0x780000); +vec4 ch_J = vec4(0x001E0C,0x0C0C0C,0xCCCCCC,0x780000); +vec4 ch_K = vec4(0x00E666,0x6C6C78,0x6C6C66,0xE60000); +vec4 ch_L = vec4(0x00F060,0x606060,0x626666,0xFE0000); +vec4 ch_M = vec4(0x00C6EE,0xFEFED6,0xC6C6C6,0xC60000); +vec4 ch_N = vec4(0x00C6C6,0xE6F6FE,0xDECEC6,0xC60000); +vec4 ch_O = vec4(0x00386C,0xC6C6C6,0xC6C66C,0x380000); +vec4 ch_P = vec4(0x00FC66,0x66667C,0x606060,0xF00000); +vec4 ch_Q = vec4(0x00386C,0xC6C6C6,0xCEDE7C,0x0C1E00); +vec4 ch_R = vec4(0x00FC66,0x66667C,0x6C6666,0xE60000); +vec4 ch_S = vec4(0x0078CC,0xCCC070,0x18CCCC,0x780000); +vec4 ch_T = vec4(0x00FCB4,0x303030,0x303030,0x780000); +vec4 ch_U = vec4(0x00CCCC,0xCCCCCC,0xCCCCCC,0x780000); +vec4 ch_V = vec4(0x00CCCC,0xCCCCCC,0xCCCC78,0x300000); +vec4 ch_W = vec4(0x00C6C6,0xC6C6D6,0xD66C6C,0x6C0000); +vec4 ch_X = vec4(0x00CCCC,0xCC7830,0x78CCCC,0xCC0000); +vec4 ch_Y = vec4(0x00CCCC,0xCCCC78,0x303030,0x780000); +vec4 ch_Z = vec4(0x00FECE,0x981830,0x6062C6,0xFE0000); +vec4 ch_lsb = vec4(0x003C30,0x303030,0x303030,0x3C0000); +vec4 ch_rsl = vec4(0x000080,0xC06030,0x180C06,0x020000); +vec4 ch_rsb = vec4(0x003C0C,0x0C0C0C,0x0C0C0C,0x3C0000); +vec4 ch_pow = vec4(0x10386C,0xC60000,0x000000,0x000000); +vec4 ch_usc = vec4(0x000000,0x000000,0x000000,0x00FF00); +vec4 ch_a = vec4(0x000000,0x00780C,0x7CCCCC,0x760000); +vec4 ch_b = vec4(0x00E060,0x607C66,0x666666,0xDC0000); +vec4 ch_c = vec4(0x000000,0x0078CC,0xC0C0CC,0x780000); +vec4 ch_d = vec4(0x001C0C,0x0C7CCC,0xCCCCCC,0x760000); +vec4 ch_e = vec4(0x000000,0x0078CC,0xFCC0CC,0x780000); +vec4 ch_f = vec4(0x00386C,0x6060F8,0x606060,0xF00000); +vec4 ch_g = vec4(0x000000,0x0076CC,0xCCCC7C,0x0CCC78); +vec4 ch_h = vec4(0x00E060,0x606C76,0x666666,0xE60000); +vec4 ch_i = vec4(0x001818,0x007818,0x181818,0x7E0000); +vec4 ch_j = vec4(0x000C0C,0x003C0C,0x0C0C0C,0xCCCC78); +vec4 ch_k = vec4(0x00E060,0x60666C,0x786C66,0xE60000); +vec4 ch_l = vec4(0x007818,0x181818,0x181818,0x7E0000); +vec4 ch_m = vec4(0x000000,0x00FCD6,0xD6D6D6,0xC60000); +vec4 ch_n = vec4(0x000000,0x00F8CC,0xCCCCCC,0xCC0000); +vec4 ch_o = vec4(0x000000,0x0078CC,0xCCCCCC,0x780000); +vec4 ch_p = vec4(0x000000,0x00DC66,0x666666,0x7C60F0); +vec4 ch_q = vec4(0x000000,0x0076CC,0xCCCCCC,0x7C0C1E); +vec4 ch_r = vec4(0x000000,0x00EC6E,0x766060,0xF00000); +vec4 ch_s = vec4(0x000000,0x0078CC,0x6018CC,0x780000); +vec4 ch_t = vec4(0x000020,0x60FC60,0x60606C,0x380000); +vec4 ch_u = vec4(0x000000,0x00CCCC,0xCCCCCC,0x760000); +vec4 ch_v = vec4(0x000000,0x00CCCC,0xCCCC78,0x300000); +vec4 ch_w = vec4(0x000000,0x00C6C6,0xD6D66C,0x6C0000); +vec4 ch_x = vec4(0x000000,0x00C66C,0x38386C,0xC60000); +vec4 ch_y = vec4(0x000000,0x006666,0x66663C,0x0C18F0); +vec4 ch_z = vec4(0x000000,0x00FC8C,0x1860C4,0xFC0000); +vec4 ch_lpa = vec4(0x001C30,0x3060C0,0x603030,0x1C0000); +vec4 ch_bar = vec4(0x001818,0x181800,0x181818,0x180000); +vec4 ch_rpa = vec4(0x00E030,0x30180C,0x183030,0xE00000); +vec4 ch_tid = vec4(0x0073DA,0xCE0000,0x000000,0x000000); +vec4 ch_lar = vec4(0x000000,0x10386C,0xC6C6FE,0x000000); + +vec2 textCanvasResolution = vec2(0); +vec2 printPos = vec2(0); + +float epsilon = 0.001; + +//Extracts bit b from the given number. +//Shifts bits right (num / 2^bit) then ANDs the result with 1 (mod(result,2.0)). +float extract_bit(float n, float b) +{ + b = clamp(b,-1.0,24.0); + return floor(mod(floor(n / pow(2.0,floor(b))),2.0)); +} + +//Returns the pixel at uv in the given bit-packed sprite. +float sprite(vec4 spr, vec2 size, vec2 uv) +{ + uv = floor(uv); + + //Calculate the bit to extract (x + y * width) (flipped on x-axis) + float bit = (size.x-uv.x-1.0) + uv.y * size.x; + + //Clipping bound to remove garbage outside the sprite's boundaries. + bool bounds = all(greaterThanEqual(uv,vec2(0))) && all(lessThan(uv,size)); + + float pixels = 0.0; + pixels += extract_bit(spr.x, bit - 72.0); + pixels += extract_bit(spr.y, bit - 48.0); + pixels += extract_bit(spr.z, bit - 24.0); + pixels += extract_bit(spr.w, bit - 00.0); + + return bounds ? pixels : 0.0; +} + +//Prints a character and moves the print position forward by 1 character width. +float GetChar(vec4 ch, vec2 uv) +{ + if( TEXT_MODE == INVERT ) + { + //Inverts all of the bits in the character. + ch = pow(2.0,24.0)-1.0-ch; + } + if( TEXT_MODE == UNDERLINE ) + { + //Makes the bottom 8 bits all 1. + //Shifts the bottom chunk right 8 bits to drop the lowest 8 bits, + //then shifts it left 8 bits and adds 255 (binary 11111111). + ch.w = floor(ch.w/256.0)*256.0 + 255.0; + } + + float px = sprite(ch, CHAR_SIZE, uv - printPos); + printPos.x += CHAR_SPACING.x; + return px; +} + + +//Returns the digit sprite for the given number. +vec4 get_digit(float d) +{ + d = floor(d); + + if(d == 0.0) return ch_0; + if(d == 1.0) return ch_1; + if(d == 2.0) return ch_2; + if(d == 3.0) return ch_3; + if(d == 4.0) return ch_4; + if(d == 5.0) return ch_5; + if(d == 6.0) return ch_6; + if(d == 7.0) return ch_7; + if(d == 8.0) return ch_8; + if(d == 9.0) return ch_9; + return vec4(0.0); +} + +//Prints out the given number starting at pos. +float print_number(float number, vec2 uv, float zeros) +{ + float result = 0.0; + + for(int i = 3;i >= -zeros;i--) + { + float digit = mod( number / pow(10.0, float(i)) , 10.0); + + if (i > -1 || fract(number) > epsilon) + { + if(i == -1 && fract(number) > epsilon) //Add a decimal point. + { + result += GetChar(ch_per, uv); + } + + if(abs(number) > pow(10.0, float(i)) || i == 0) //Clip off leading zeros. + { + result += GetChar(get_digit(digit), uv); + } + } + } + return result; +} + +float print_integer(float number, int zeros, vec2 uv) +{ + float result = 0.0; + + for(int i = MAX_INT_DIGITS;i >= 0;i--) + { + float digit = mod( number / pow(10.0, float(i)) , 10.0); + + if(abs(number) > pow(10.0, float(i)) || zeros > i || i == 0) //Clip off leading zeros. + { + result += GetChar(get_digit(digit), uv); + } + } + return result; +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-potato.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-potato.slang new file mode 100644 index 0000000..cac50be --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-potato.slang @@ -0,0 +1,4 @@ +#version 450 + +#include "common/hsm-globals-and-potato-params.inc" +#include "hsm-text.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-resolution.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-resolution.inc new file mode 100644 index 0000000..65ac5dd --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-resolution.inc @@ -0,0 +1,472 @@ +/* + Text code is from the Shadertoy "96-bit 8x12" Font by Flyguy + + 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 "hsm-text-lib.inc" + +float DrawResolutions(vec2 uv, vec2 viewport_size, vec2 screen_size, vec2 derezed_size, vec2 negative_crop_added_size, vec2 cropped_original_size, vec2 sampling_res, vec2 int_mult) +{ + float col = 0.0; + + float current_line_index = 0; + float margin = STRHEIGHT(1); + + //Resolution Text + printPos = vec2(margin, 0); + + TEXT_MODE = NORMAL; + + // Line 14 Viewport Resolution ---------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + TEXT_MODE = NORMAL; + + col += GetChar(ch_V, uv); + col += GetChar(ch_i, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_w, uv); + col += GetChar(ch_p, uv); + col += GetChar(ch_o, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_t, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(viewport_size.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(viewport_size.y,0, uv); + + + // Line 13 Screen Resolution ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_S, uv); + col += GetChar(ch_c, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(screen_size.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(screen_size.y,0, uv); + + + // Line 12 Final Aspect Ratio ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_F, uv); + col += GetChar(ch_i, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_a, uv); + col += GetChar(ch_l, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_s, uv); + col += GetChar(ch_p, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_c, uv); + col += GetChar(ch_t, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_number(screen_size.x/screen_size.y > 1 ? screen_size.x/screen_size.y : screen_size.y/screen_size.x, uv, 2); + + + // Line 11 Non-Int Scale Percent ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_N, uv); + col += GetChar(ch_o, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_I, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_t, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_S, uv); + col += GetChar(ch_c, uv); + col += GetChar(ch_l, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_pct, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_number(screen_size.y / viewport_size.y * 100, uv, 3); + + + // Line 10 Int Scale Vertical ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_I, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_t, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_S, uv); + col += GetChar(ch_c, uv); + col += GetChar(ch_l, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_V, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_t, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_number(int_mult.y, uv, 3); + + + // Line 09 Int Scale Horizontal ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_I, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_t, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_S, uv); + col += GetChar(ch_c, uv); + col += GetChar(ch_l, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_H, uv); + col += GetChar(ch_o, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_z, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_number(int_mult.x, uv, 3); + + + // Line 08 Sampling Resolution ---------------------------------------------------------- + if (cropped_original_size.x != sampling_res.x || cropped_original_size.y != sampling_res.y) + { + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_S, uv); + col += GetChar(ch_a, uv); + col += GetChar(ch_m, uv); + col += GetChar(ch_p, uv); + col += GetChar(ch_l, uv); + col += GetChar(ch_i, uv); + col += GetChar(ch_n, uv); + col += GetChar(ch_g, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_R, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_s, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(sampling_res.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(sampling_res.y,0, uv); + } + + + // Line 07 CROPPED Resolution ---------------------------------------------------------- + if (cropped_original_size.x != ROTATED_CORE_PREPPED_SIZE.x || cropped_original_size.y != ROTATED_CORE_PREPPED_SIZE.y) + { + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_C, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_o, uv); + col += GetChar(ch_p, uv); + col += GetChar(ch_p, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_d, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(cropped_original_size.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(cropped_original_size.y,0, uv); + } + + + // Line 06 Negative Crop Resolution ---------------------------------------------------------- + if (derezed_size.x != ROTATED_CORE_PREPPED_SIZE.x || derezed_size.y != ROTATED_CORE_PREPPED_SIZE.y) + { + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_N, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_g, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_C, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_o, uv); + col += GetChar(ch_p, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_d, uv); + col += GetChar(ch_d, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(ROTATED_CORE_PREPPED_SIZE.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(ROTATED_CORE_PREPPED_SIZE.y,0, uv); + } + + + // Line 05 DEREZ Resolution ---------------------------------------------------------- + if (derezed_size.x != ROTATED_CORE_ORIGINAL_SIZE.x || derezed_size.y != ROTATED_CORE_ORIGINAL_SIZE.y) + { + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_D, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_z, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_d, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(derezed_size.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(derezed_size.y,0, uv); + } + + + // Line 04 CORE Resolution ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_C, uv); + col += GetChar(ch_o, uv); + col += GetChar(ch_r, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_dsh, uv); + + col += GetChar(ch_spc, uv); + col += print_integer(ROTATED_CORE_ORIGINAL_SIZE.x,0, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_x, uv); + col += GetChar(ch_spc, uv); + col += print_integer(ROTATED_CORE_ORIGINAL_SIZE.y,0, uv); + + + // Line 03 Preset Type ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(2); + +#ifdef IS_ADV_PRESET + col += GetChar(ch_A, uv); + col += GetChar(ch_D, uv); + col += GetChar(ch_V, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_N, uv); + col += GetChar(ch_C, uv); + col += GetChar(ch_E, uv); + col += GetChar(ch_D, uv); +#endif + +#ifdef IS_STD_PRESET + col += GetChar(ch_S, uv); + col += GetChar(ch_T, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_N, uv); + col += GetChar(ch_D, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_R, uv); + col += GetChar(ch_D, uv); +#endif + +#ifdef IS_GLASS_PRESET + col += GetChar(ch_spc, uv); + col += GetChar(ch_G, uv); + col += GetChar(ch_L, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_S, uv); + col += GetChar(ch_S, uv); +#endif + +#ifdef IS_NO_REFLECT_PRESET + col += GetChar(ch_spc, uv); + col += GetChar(ch_N, uv); + col += GetChar(ch_O, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_R, uv); + col += GetChar(ch_E, uv); + col += GetChar(ch_F, uv); + col += GetChar(ch_L, uv); + col += GetChar(ch_E, uv); + col += GetChar(ch_C, uv); + col += GetChar(ch_T, uv); +#endif + +#ifdef IS_POTATO_PRESET + col += GetChar(ch_P, uv); + col += GetChar(ch_0, uv); + col += GetChar(ch_T, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_T, uv); + col += GetChar(ch_O, uv); +#endif + + + // Line 02 Version ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_1, uv); + col += GetChar(ch_per, uv); + col += GetChar(ch_0, uv); + col += GetChar(ch_per, uv); + col += GetChar(ch_0, uv); + col += GetChar(ch_0, uv); + col += GetChar(ch_1, uv); + col += GetChar(ch_spc, uv); + + // Date + col += GetChar(ch_2, uv); + col += GetChar(ch_0, uv); + col += GetChar(ch_2, uv); + col += GetChar(ch_2, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_0, uv); + col += GetChar(ch_6, uv); + col += GetChar(ch_dsh, uv); + col += GetChar(ch_2, uv); + col += GetChar(ch_4, uv); + + // Revision + col += GetChar(ch_spc, uv); + col += GetChar(ch_R, uv); + col += GetChar(ch_e, uv); + col += GetChar(ch_v, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_1, uv); + + + // Line 01 Title ---------------------------------------------------------- + printPos.x = margin; + printPos.y += STRHEIGHT(1); + + col += GetChar(ch_M, uv); + col += GetChar(ch_E, uv); + col += GetChar(ch_G, uv); + col += GetChar(ch_A, uv); + col += GetChar(ch_spc, uv); + col += GetChar(ch_B, uv); + col += GetChar(ch_E, uv); + col += GetChar(ch_Z, uv); + col += GetChar(ch_E, uv); + col += GetChar(ch_L, uv); + col += GetChar(ch_spc, uv); + + + TEXT_MODE = NORMAL; + + return col; +} + +// Returns a +float GetTextMask(vec2 in_coord, vec2 viewport_size, vec2 screen_size, vec2 derezed_size, vec2 negative_crop_added_size, vec2 cropped_original_size, vec2 sampling_res, vec2 int_mult, vec2 canvas_size) +{ + in_coord = (in_coord - 0.5) * vec2(1, -1) + 0.5; + float downscale = 1; + if (canvas_size.y > 600) downscale = 2; + if (canvas_size.y > 1000) downscale = 3; + + textCanvasResolution = global.OutputSize.xy / downscale; + vec2 uv = global.OutputSize.xy * in_coord; + vec2 downscaled_uv = floor(global.OutputSize.xy * in_coord / downscale); + + float pixel = DrawResolutions(downscaled_uv, viewport_size, screen_size, derezed_size, negative_crop_added_size, cropped_original_size, sampling_res, int_mult); + + vec3 col = vec3(1); + pixel *= (1 - distance(mod(uv, vec2(1.0)), vec2(0.65))) * 1.2; + col *= mix(vec3(0), vec3(1, 1, 1), pixel); + + return col.r; +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang new file mode 100644 index 0000000..19ea013 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std-glass.slang @@ -0,0 +1,6 @@ +#version 450 + +#define IS_STD_PRESET + +#include "common/hsm-globals-and-glass-params.inc" +#include "hsm-text.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang new file mode 100644 index 0000000..f6eb427 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std-no-reflect.slang @@ -0,0 +1,7 @@ +#version 450 + +#define IS_STD_PRESET +#define IS_NO_REFLECT_PRESET + +#include "common/hsm-globals-and-image-layers-params.inc" +#include "hsm-text.inc" \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std.slang b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std.slang new file mode 100644 index 0000000..43c958b --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text-std.slang @@ -0,0 +1,7 @@ +#version 450 + +#define IS_STD_PRESET + +#include "common/hsm-globals-and-all-params.inc" +#include "hsm-text.inc" + diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text.inc b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text.inc new file mode 100644 index 0000000..26e4411 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/hsm/hsm-text.inc @@ -0,0 +1,113 @@ +/* + Mega Bezel - Creates a graphic treatment for the game play area to give a retro feel + Copyright (C) 2019-2021 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 . +*/ + +// Import so all the mega bezel parameters are the first in the parameter list + +#include "hsm-text-resolution.inc" + +#pragma alias TextPass + +#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.00001; +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; + +layout(set = 0, binding = 2) uniform sampler2D TextPassFeedback; +#define PassFeedback TextPassFeedback + +layout(set = 0, binding = 8) uniform sampler2D InfoCachePass; +layout(set = 0, binding = 9) uniform sampler2D InfoCachePassFeedback; + +#define eps 1e-3 + +vec2 GetScreenSize(vec2 screen_scale) +{ + vec2 screen_size = global.FinalViewportSize.xy * screen_scale; + // Round this so we get proper integers + screen_size = vec2(ceil(screen_size.x), ceil(screen_size.y)); + return screen_size; +} + +vec2 GetIntegerScaleMult(vec2 screen_size, vec2 cropped_size) +{ + float epsilon = 0.002; + vec2 integer_scale = screen_size / cropped_size; + integer_scale = vec2(fract(integer_scale.x + 0.001) < epsilon ? round(integer_scale.x) : integer_scale.x, + fract(integer_scale.y + 0.001) < epsilon ? round(integer_scale.y) : integer_scale.y); + return integer_scale; +} + +vec4 AddText(vec2 in_coord, vec4 in_color) +{ + in_coord.x = HSM_FLIP_VIEWPORT_HORIZONTAL * HSM_FLIP_CORE_HORIZONTAL * (in_coord.x - 0.5) + 0.5; + in_coord.y = HSM_FLIP_VIEWPORT_VERTICAL * HSM_FLIP_CORE_VERTICAL * (in_coord.y - 0.5) + 0.5; + + vec2 screen_size = GetScreenSize(SCREEN_SCALE); + vec2 int_scale_mult = GetIntegerScaleMult(screen_size, CROPPED_ROTATED_SIZE); + vec2 canvas_size = global.DerezedPassSize.xy; + + vec4 out_color = in_color; + out_color = mix(out_color, vec4(0, 0, 0, 1), GetTextMask(in_coord + 2 * vec2(1/global.OutputSize.x, 0), global.FinalViewportSize.xy, screen_size, ROTATED_DEREZED_SIZE, ROTATED_CORE_PREPPED_SIZE, CROPPED_ROTATED_SIZE, CROPPED_ROTATED_SIZE_WITH_RES_MULT, int_scale_mult, canvas_size)); + out_color = mix(out_color, vec4(0, 0, 0, 1), GetTextMask(in_coord - 2 * vec2(1/global.OutputSize.x, 0), global.FinalViewportSize.xy, screen_size, ROTATED_DEREZED_SIZE, ROTATED_CORE_PREPPED_SIZE, CROPPED_ROTATED_SIZE, CROPPED_ROTATED_SIZE_WITH_RES_MULT, int_scale_mult, canvas_size)); + out_color = mix(out_color, vec4(0, 0, 0, 1), GetTextMask(in_coord + 1 * vec2(0, 1/global.OutputSize.y), global.FinalViewportSize.xy, screen_size, ROTATED_DEREZED_SIZE, ROTATED_CORE_PREPPED_SIZE, CROPPED_ROTATED_SIZE, CROPPED_ROTATED_SIZE_WITH_RES_MULT, int_scale_mult, canvas_size)); + out_color = mix(out_color, vec4(0, 0, 0, 1), GetTextMask(in_coord - 1 * vec2(0, 1/global.OutputSize.y), global.FinalViewportSize.xy, screen_size, ROTATED_DEREZED_SIZE, ROTATED_CORE_PREPPED_SIZE, CROPPED_ROTATED_SIZE, CROPPED_ROTATED_SIZE_WITH_RES_MULT, int_scale_mult, canvas_size)); + out_color = mix(out_color, vec4(1, 1, 0, 1), GetTextMask(in_coord, global.FinalViewportSize.xy, screen_size, ROTATED_DEREZED_SIZE, ROTATED_CORE_PREPPED_SIZE, CROPPED_ROTATED_SIZE, CROPPED_ROTATED_SIZE_WITH_RES_MULT, int_scale_mult, canvas_size)); + return clamp(out_color, 0, 1); +} + +void main() +{ + vec2 UNFLIPPED_VIEWPORT_COORD = vTexCoord; + vec2 VIEWPORT_COORD = vTexCoord; + HSM_UpdateGlobalScreenValuesFromCache(InfoCachePass, InfoCachePassFeedback, vTexCoord); + + FragColor = vec4(0); + + vec4 feedback_color_test = texture(PassFeedback, vec2(0,0)); + if (feedback_color_test.a < 0 && !HSM_CheckCacheInfoChanged()) + { + FragColor = texture(PassFeedback, UNFLIPPED_VIEWPORT_COORD); + return; + } + + // Flip the coordinate vertically if desired + VIEWPORT_COORD.y = HSM_FLIP_VIEWPORT_VERTICAL * HSM_FLIP_CORE_VERTICAL * (VIEWPORT_COORD.y - 0.5) + 0.5; + VIEWPORT_COORD.x = HSM_FLIP_VIEWPORT_HORIZONTAL * HSM_FLIP_CORE_HORIZONTAL * (VIEWPORT_COORD.x - 0.5) + 0.5; + + //////// Draw text to show resolutions ////////// + FragColor = AddText(VIEWPORT_COORD - vec2(MAX_NEGATIVE_CROP, -MAX_NEGATIVE_CROP), FragColor); + + if (UNFLIPPED_VIEWPORT_COORD.x < (2 / global.OutputSize.x) && UNFLIPPED_VIEWPORT_COORD.y < (2 / global.OutputSize.y)) + FragColor = vec4(0.01, 0.01, 0.01, -1); +} \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png new file mode 100644 index 0000000..a25857d Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/BackgroundImage_Carbon_3840x2160.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/BackgroundImage_Transparent_3840x2160.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/BackgroundImage_Transparent_3840x2160.png new file mode 100644 index 0000000..9e977d0 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/BackgroundImage_Transparent_3840x2160.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png new file mode 100644 index 0000000..1b0a194 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background_Vert.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background_Vert.png new file mode 100644 index 0000000..d1c45b4 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_Carbonfiber_Background_Vert.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_MegaBezel_Background.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_MegaBezel_Background.png new file mode 100644 index 0000000..e7c88c2 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Baked_Frame_MegaBezel_Background.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/ColoredGel_Red_Green.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/ColoredGel_Red_Green.png new file mode 100644 index 0000000..383455b Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/ColoredGel_Red_Green.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png new file mode 100644 index 0000000..b837b6e Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Colored_Gel_Rainbow.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png new file mode 100644 index 0000000..d8e38d9 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/FrameTexture_2800x2120.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png new file mode 100644 index 0000000..2fec61f Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/HSM_Duimon_Super_Famicom_3840x2160.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png new file mode 100644 index 0000000..d6563f5 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_192.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_192.png new file mode 100644 index 0000000..4b1d7b3 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_192.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_256.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_256.png new file mode 100644 index 0000000..d6563f5 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_256.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_512.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_512.png new file mode 100644 index 0000000..fa295f4 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/IntroImage_MegaBezelLogo_512.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png new file mode 100644 index 0000000..dffbcb9 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/NightLighting_1920x1080.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_Black_16x16.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_Black_16x16.png new file mode 100644 index 0000000..33e8025 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_Black_16x16.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png new file mode 100644 index 0000000..1349ce5 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_Transparent_16x16.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png new file mode 100644 index 0000000..23fb18c Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Placeholder_White_16x16.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png new file mode 100644 index 0000000..30b3e1c Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TopLayerImageGradient_3840x2160.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png new file mode 100644 index 0000000..6c492da Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_3840x2160.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_Night_3840x2160.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_Night_3840x2160.png new file mode 100644 index 0000000..ae07bfb Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/TubeGlassOverlayImage_Night_3840x2160.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png new file mode 100644 index 0000000..9c0b0f3 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Tube_Diffuse_2390x1792.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png new file mode 100644 index 0000000..8bb2296 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/Tube_Shadow_1600x1200.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/16.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/16.png new file mode 100644 index 0000000..fc0f026 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/16.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/32.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/32.png new file mode 100644 index 0000000..ef5610a Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/32.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/64.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/64.png new file mode 100644 index 0000000..253d12a Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/64.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/GBA-Unaltered_Gamma.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/GBA-Unaltered_Gamma.png new file mode 100644 index 0000000..06585b1 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/GBA-Unaltered_Gamma.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/GBA.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/GBA.png new file mode 100644 index 0000000..6fcb7a7 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/GBA.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D65_EBU.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D65_EBU.png new file mode 100644 index 0000000..e8c7974 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D65_EBU.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D65_Rec601.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D65_Rec601.png new file mode 100644 index 0000000..acd68b0 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D65_Rec601.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D93_Rec601.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D93_Rec601.png new file mode 100644 index 0000000..4801db9 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Kurozumi_64_D93_Rec601.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Mitsubishi_Diamond_Pro_750SB_9300K.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Mitsubishi_Diamond_Pro_750SB_9300K.png new file mode 100644 index 0000000..2d1cb1e Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Mitsubishi_Diamond_Pro_750SB_9300K.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NDS.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NDS.png new file mode 100644 index 0000000..f15b84f Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NDS.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NEC_MultiSync_FE990_9300K.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NEC_MultiSync_FE990_9300K.png new file mode 100644 index 0000000..9d314d5 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NEC_MultiSync_FE990_9300K.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NEC_XM29plus_capture.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NEC_XM29plus_capture.png new file mode 100644 index 0000000..d156174 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/NEC_XM29plus_capture.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Sony_Trinitron_Std_50_no_gamma.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Sony_Trinitron_Std_50_no_gamma.png new file mode 100644 index 0000000..96a843c Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/Sony_Trinitron_Std_50_no_gamma.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/other1_32.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/other1_32.png new file mode 100644 index 0000000..d059c9a Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/other1_32.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/readme.txt b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/readme.txt new file mode 100644 index 0000000..35c3fb0 --- /dev/null +++ b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/readme.txt @@ -0,0 +1 @@ +LUT's kindly provided by torridgristle. \ No newline at end of file diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/sony_trinitron1_32.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/sony_trinitron1_32.png new file mode 100644 index 0000000..87731e8 Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/sony_trinitron1_32.png differ diff --git a/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/sony_trinitron2_32.png b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/sony_trinitron2_32.png new file mode 100644 index 0000000..0f6f48f Binary files /dev/null and b/bezel/Mega_Bezel/shaders/HyperspaceMadness/textures/lut/sony_trinitron2_32.png differ