shaders = 36

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

shader1 =  ../../shaders/base/stock.slang
filter_linear1 = false
srgb_framebuffer1 = true
scale_type1 = source
scale_x1 = 1
scale_y1 = 1
alias1 = "DerezedPass"

shader2 = ../../shaders/base/add-negative-crop-area.slang
filter_linear2 = false
mipmap_input2 = false
srgb_framebuffer2 = true
scale_type2 = source
scale_x2 = 1
scale_y2 = 1
alias2 = "NegativeCropAddedPass"

shader3 = ../../shaders/base/cache-info-all-params.slang
filter_linear3 = false
scale_type3 = source
scale3 = 1.0
alias3 = "InfoCachePass"

shader4 = ../../shaders/base/text-std.slang
filter_linear4 = false
float_framebuffer4 = true
scale_type4 = source
scale4 = 1.0
alias4 = "TextPass"

shader5 = ../../shaders/base/intro.slang
filter_linear5 = false
float_framebuffer5 = true
scale_type5 = source
scale5 = 1.0
alias5 = "IntroPass"

shader6 = ../../shaders/base/stock.slang
alias6 = "PreCRTPass"

shader7 = ../../shaders/guest/hsm-afterglow0.slang
filter_linear7 = true
scale_type7 = source
scale7 = 1.0
alias7 = "AfterglowPass"

shader8 = ../../shaders/guest/hsm-pre-shaders-afterglow.slang
filter_linear8 = true
scale_type8 = source
mipmap_input8 = true
scale8 = 1.0

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

shader10 =  ../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear10 = true
scale_type10 = source
scale_x10 = 1.0
scale_y10 = 1.0

shader11 = ../../shaders/base/stock.slang
// filter_linear11 = "false"
// wrap_mode11 = "clamp_to_border"
// mipmap_input11 = "false"
// float_framebuffer11 = "false"
// srgb_framebuffer11 = "true"
alias11 = XbrSource

shader12 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass0.slang
filter_linear12 = "false"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
float_framebuffer12 = "false"
srgb_framebuffer12 = "true"

shader13 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass1.slang
filter_linear13 = "false"
wrap_mode13 = "clamp_to_border"
mipmap_input13 = "false"
alias13 = ""
float_framebuffer13 = "false"
srgb_framebuffer13 = "true"
scale_type_x13 = "source"
scale_x13 = "2.000000"
scale_type_y13 = "source"
scale_y13 = "2.000000"

shader14 = ../../shaders/hyllian/crt-super-xbr/super-xbr-pass2.slang
filter_linear14 = "false"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = ""
float_framebuffer14 = "false"
srgb_framebuffer14 = "true"
scale_type_x14 = "source"
scale_x14 = "1.000000"
scale_type_y14 = "source"
scale_y14 = "1.000000"

shader15 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-X.slang
filter_linear15 = "false"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = ""
float_framebuffer15 = "false"
srgb_framebuffer15 = "true"
scale_type_x15 = "source"
scale_x15 = "1.000000"
scale_type_y15 = "source"
scale_y15 = "1.000000"

shader16 = ../../shaders/hyllian/crt-super-xbr/custom-bicubic-y.slang
filter_linear16 = false
scale_type_x16 = source
scale_x16 = 1
scale_type_y16 = source
scale_y16 = 0.5
wrap_mode16 = "clamp_to_edge"

shader17 = ../../shaders/base/stock.slang
filter_linear17 = true
scale_type17 = source
scale_x17 = 1.0
scale_y17 = 1.0
alias17 = "PrePass"
mipmap_input17 = true

shader18 = ../../shaders/guest/hsm-avg-lum.slang
filter_linear18 = true
scale_type18 = source
scale18 = 1.0
mipmap_input18 = true
alias18 = "AvgLumPass"

// Pass referenced by subsequent blurring passes and crt pass
shader19 = ../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear19 = true
scale_type19 = source
scale19 = 1.0
float_framebuffer19 = true
alias19 = "LinearizePass"

shader20 = ../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear20 = true
scale_type_x20 = absolute
scale_x20 = 800.0
scale_type_y20 = source
scale_y20 = 1.0 
float_framebuffer20 = true

shader21 = ../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear21 = true
scale_type_x21 = absolute
scale_x21 = 800.0
scale_type_y21 = absolute
scale_y21 = 600.0
float_framebuffer21 = true
alias21 = GlowPass

shader22 = ../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear22 = true
scale_type_x22 = absolute
scale_x22 = 800.0
scale_type_y22 = absolute
scale_y22 = 600.0 
float_framebuffer22 = true

shader23 = ../../shaders/guest/hsm-bloom_vertical.slang
filter_linear23 = true
scale_type_x23 = source
scale_x23 = 1.0
scale_type_y23 = source
scale_y23 = 1.0
float_framebuffer23 = true
alias23 = BloomPass

shader24 = ../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear24 = true
float_framebuffer24 = true
scale_type24 = viewport
scale_x24 = 1.0
scale_y24 = 1.0

shader25 = ../../shaders/guest/hsm-deconvergence.slang
filter_linear25 = true
scale_type25 = viewport
scale_x25 = 1.0
scale_y25 = 1.0

shader26 = ../../shaders/base/post-crt-prep-image-layers.slang
alias26 = "MBZ_PostCRTPass"

// Reduce Resolution  ----------------------------------------------------------------
//      Reduce the resolution to a small static size regardless of final resolution
//      Allows consistent look and faster at different final resolutions for blur
//      Mipmap option allows downscaling without artifacts
shader27 = ../../shaders/base/linearize-crt.slang
mipmap_input27 = true
filter_linear27 = true
scale_type27 = absolute
// scale_x27 = 480
// scale_y27 = 270
// scale_x27 = 960
// scale_y27 = 540
scale_x27 = 800
scale_y27 = 600
alias27 = "BR_MirrorLowResPass"

// Add Blur for the Reflection (Horizontal) ----------------------------------------------------------------
shader28 = ../../shaders/base/blur-outside-screen-horiz.slang
mipmap_input28 = true
filter_linear28 = true

// Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
shader29 = ../../shaders/base/blur-outside-screen-vert.slang
filter_linear29 = true
alias29 = "BR_MirrorBlurredPass"

// Reduce resolution ----------------------------------------------------------------
// Reduced to a very small amount so we can create a blur which will create a glow from the screen
//      Mipmap option allows smoother downscaling
shader30 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input30 = true
filter_linear30 = true
scale_type30 = absolute
scale_x30 = 128
scale_y30 = 128
alias30 = "BR_MirrorReflectionDiffusedPass"

// Add Diffused glow all around the screen ----------------------------------------------------------------
//      Blurred so much that it's non directional
//      Mipmap option allows downscaling without artifacts
shader31 = ../../../../blurs/shaders/royale/blur9x9.slang
mipmap_input31 = true
filter_linear31 = true
scale_type31 = absolute
scale_x31 = 12
scale_y31 = 12
alias31 = "BR_MirrorFullscreenGlowPass"

// Bezel Reflection ----------------------------------------------------------------
shader32 = ../../shaders/base/reflection.slang
scale_type32 = viewport
float_framebuffer32 = true
alias32 = "BR_CRTAndReflectionPass"

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

shader33 = ../../shaders/base/bezel-images-under-crt.slang
filter_linear33 = true
scale_type33 = viewport
float_framebuffer33 = true
alias33 = "BR_LayersUnderCRTPass"

shader34 = ../../shaders/base/bezel-images-over-crt.slang
filter_linear34 = true
scale_type34 = viewport
float_framebuffer34 = true
alias34 = "BR_LayersOverCRTPass"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SMOOTH-ADV
HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600

HSM_DEDITHER_MODE = 3

SHARPSMOOTHER_ON = 1
max_w = 0.05
min_w = 0
smoot = 0.4
lumad = 0.5
mtric = 0.3

SUPERXBR_ON = 1

ntsc_scale = 0.55

SHARPEN = 0.5

HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = 600
HSM_CORE_RES_SAMPLING_MULT_OPPOSITE_DIR = 100
HSM_DOWNSAMPLE_BLUR_SCANLINE_DIR = 0
HSM_DOWNSAMPLE_BLUR_OPPOSITE_DIR = 0

// gamma_c = 0.9
// gsl = -1
// scanline1 = 3
// shadowMask = 3
// maskDark = 0.4
// maskLight = 1.2
// mask_gamma = 4
