shaders = 45

shader0 = ../../shaders/base/add-params-all.slang
alias0 = "CorePass"

shader1 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-x.slang
filter_linear1 = false
scale_type_x1 = absolute
scale_x1 = 400
scale_type_y1 = viewport
scaley0 = 1.0
wrap_mode1 = "clamp_to_edge"

shader2 = ../../shaders/hyllian/cubic/hsm-drez-b-spline-y.slang
filter_linear2 = false
scale_type2 = absolute
scale_x2 = 400
scale_y2 = 480
wrap_mode2 = "clamp_to_edge"
alias2 = "DerezedPass"

shader3 = ../../shaders/base/add-negative-crop-area.slang
filter_linear3 = false
mipmap_input3 = false
srgb_framebuffer3 = true
scale_type3 = source
scale_x3 = 1
scale_y3 = 1
alias3 = "NegativeCropAddedPass"

shader4 = ../../shaders/base/cache-info-all-params.slang
filter_linear4 = false
scale_type4 = source
scale4 = 1.0
alias4 = "InfoCachePass"

shader5 = ../../shaders/base/text-std.slang
filter_linear5 = false
float_framebuffer5 = true
scale_type5 = source
scale5 = 1.0
alias5 = "TextPass"

shader6 = ../../shaders/base/intro.slang
filter_linear6 = false
float_framebuffer6 = true
scale_type6 = source
scale6 = 1.0
alias6 = "IntroPass"

shader7 = ../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias7 = LinearGamma

shader8 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass1.slang
shader9 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass2.slang
shader10 = ../../shaders/hyllian/checkerboard-dedither/checkerboard-dedither-pass3.slang
alias10 = "PreMdaptPass"

// De-Dithering - Mdapt
shader11 = ../../shaders/mdapt/hsm-mdapt-pass0.slang
shader12 = ../../shaders/mdapt/hsm-mdapt-pass1.slang
shader13 = ../../shaders/mdapt/hsm-mdapt-pass2.slang
shader14 = ../../shaders/mdapt/hsm-mdapt-pass3.slang
shader15 = ../../shaders/mdapt/hsm-mdapt-pass4.slang

shader16 = ../../shaders/dedither/dedither-gamma-prep-2-after.slang

shader17 = ../../shaders/ps1dither/hsm-PS1-Undither-BoxBlur.slang

shader18 = ../../shaders/guest/extras/hsm-sharpsmoother.slang

// GTU TV Processing
shader19 = ../../shaders/gtu/hsm-gtu-pass1.slang
scale_type19 = source
scale19 = 1.0
float_framebuffer19 = true

shader20 = ../../shaders/gtu/hsm-gtu-pass2.slang
scale_type_x20 = source
scale_x20 = 1.0
scale_type_y20 = source
scale_y20 = 1.0
filter_linear20 = false
float_framebuffer20 = true

shader21 = ../../shaders/base/stock.slang
alias21 = "PreCRTPass"

shader22 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear22 = true
scale_type22 = source
scale22 = 1.0
alias22 = "AfterglowPass"

shader23 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
filter_linear23 = true
scale_type23 = source
mipmap_input23 = true
scale23 = 1.0

// Color Correction with Dogway's awesome Grade shader
// Grade is after Afterglow so that brightening the black level does not break the afterglow
shader24 = ../../shaders/dogway/hsm-grade.slang
filter_linear24 = true
scale_type24 = source
scale24 = 1.0

shader25 =  ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0

shader26 = ../../shaders/base/stock.slang
filter_linear26 = true
scale_type26 = source
scale_x26 = 1.0
scale_y26 = 1.0
alias26 = "PrePass"
mipmap_input26 = true

shader27 = ../../shaders/guest/hsm-avg-lum.slang
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/guest/hsm-interlace-and-linearize.slang
filter_linear28 = true
scale_type28 = source
scale28 = 1.0
float_framebuffer28 = true
alias28 = "LinearizePass"

shader29 = ../../shaders/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/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/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/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/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/guest/hsm-deconvergence.slang
filter_linear34 = true
scale_type34 = viewport
scale_x34 = 1.0
scale_y34 = 1.0

shader35 = ../../shaders/base/post-crt-prep-image-layers.slang
alias35 = "MBZ_PostCRTPass"

// Reduce Resolution  ----------------------------------------------------------------
//      Reduce the resolution to a small static size regardless of final resolution
//      Allows consistent look and faster at different final resolutions for blur
//      Mipmap option allows downscaling without artifacts
shader36 = ../../shaders/base/linearize-crt.slang
mipmap_input36 = true
filter_linear36 = true
scale_type36 = absolute
// scale_x36 = 480
// scale_y36 = 270
// scale_x36 = 960
// scale_y36 = 540
scale_x36 = 800
scale_y36 = 600
alias36 = "BR_MirrorLowResPass"

// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
shader37 = ../../shaders/base/blur-outside-screen-horiz.slang
mipmap_input37 = true
filter_linear37 = true

// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
shader38 = ../../shaders/base/blur-outside-screen-vert.slang
filter_linear38 = true
alias38 = "BR_MirrorBlurredPass"

// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
//      Mipmap option allows smoother downscaling
shader39 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input39 = true
filter_linear39 = true
scale_type39 = absolute
scale_x39 = 128
scale_y39 = 128
alias39 = "BR_MirrorReflectionDiffusedPass"

// Add Diffused glow all around the screen ----------------------------------------------------------------
//      Blurred so much that it's non directional
//      Mipmap option allows downscaling without artifacts
shader40 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input40 = true
filter_linear40 = true
scale_type40 = absolute
scale_x40 = 12
scale_y40 = 12
alias40 = "BR_MirrorFullscreenGlowPass"

// Bezel Reflection ----------------------------------------------------------------
shader41 = ../../shaders/base/reflection.slang
scale_type41 = viewport
float_framebuffer41 = true
alias41 = "BR_CRTAndReflectionPass"

// Bezel Generation & Composite of Image Layers ----------------------------------------------------------------

shader42 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear42 = true
scale_type42 = viewport
float_framebuffer42 = true
alias42 = "BR_LayersUnderCRTPass"

shader43 = ../../shaders/base/bezel-images-over-crt.slang
filter_linear43 = true
scale_type43 = viewport
float_framebuffer43 = true
alias43 = "BR_LayersOverCRTPass"

// Combine Passes ----------------------------------------------------------------
shader44 = ../../shaders/base/combine-passes.slang
scale_type44 = viewport
alias44 = "CombinePass"
// Define textures to be used by the different passes
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"

SamplerLUT1 = ../../shaders/guest/lut/trinitron-lut.png
SamplerLUT1_linear = true 
SamplerLUT2 = ../../shaders/guest/lut/inv-trinitron-lut.png
SamplerLUT2_linear = true 
SamplerLUT3 = ../../shaders/guest/lut/nec-lut.png
SamplerLUT3_linear = true
SamplerLUT4 = ../../shaders/guest/lut/ntsc-lut.png
SamplerLUT4_linear = true

IntroImage = ../../shaders/textures/IntroImage_MegaBezelLogo.png
IntroImage_linear = true
IntroImage_mipmap = 1

ScreenPlacementImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
ScreenPlacementImage_linear = false

TubeDiffuseImage = ../../shaders/textures/Tube_Diffuse_2390x1792.png
TubeDiffuseImage_linear = true
TubeDiffuseImage_mipmap = 1

TubeColoredGelImage = ../../shaders/textures/Colored_Gel_Rainbow.png
TubeColoredGelImage_linear = true
TubeColoredGelImage_mipmap = 1

TubeShadowImage = ../../shaders/textures/Tube_Shadow_1600x1200.png
TubeShadowImage_linear = true
TubeShadowImage_mipmap = 1

TubeStaticReflectionImage = ../../shaders/textures/TubeGlassOverlayImageCropped_1440x1080.png
TubeStaticReflectionImage_linear = true
TubeStaticReflectionImage_mipmap = 1

ReflectionMaskImage = ../../shaders/textures/Placeholder_White_16x16.png
ReflectionMaskImage_linear = true
ReflectionMaskImage_mipmap = 1

FrameTextureImage = ../../shaders/textures/FrameTexture_2800x2120.png
FrameTextureImage_linear = true
FrameTextureImage_mipmap = 1

BackgroundImage = ../../shaders/textures/BackgroundImage_Carbon_3840x2160.png
BackgroundImage_linear = true
BackgroundImage_mipmap = 1

BackgroundVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
BackgroundVertImage_linear = true
BackgroundVertImage_mipmap = 1

CabinetGlassImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
CabinetGlassImage_linear = true
CabinetGlassImage_mipmap = 1

DeviceImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceImage_linear = true
DeviceImage_mipmap = 1

DeviceVertImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceVertImage_linear = true
DeviceVertImage_mipmap = 1

DeviceLEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DeviceLEDImage_linear = true
DeviceLEDImage_mipmap = 1

DecalImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
DecalImage_linear = true
DecalImage_mipmap = 1

NightLightingImage = ../../shaders/textures/NightLightingClose_1920x1080.png
NightLightingImage_linear = true
NightLightingImage_mipmap = 1

NightLighting2Image = ../../shaders/textures/NightLightingFar_1920x1080.png
NightLighting2Image_linear = true
NightLighting2Image_mipmap = 1

LEDImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
LEDImage_linear = true
LEDImage_mipmap = 1

TopLayerImage = ../../shaders/textures/Placeholder_Transparent_16x16.png
TopLayerImage_linear = true
TopLayerImage_mipmap = 1

// Use for matching vanilla GDV-Advanced
// HSM_ASPECT_RATIO_MODE = 6
// HSM_CURVATURE_MODE = 0

// 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

// DREZ Parameters
SHARPEN = 0
