shaders = 42

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

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

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

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

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

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

shader6 = ../../../shaders/dedither/dedither-gamma-prep-1-before.slang
alias6 = LinearGamma

shader7 = ../../../shaders/hyllian/sgenpt-mix/sgenpt-mix-pass1.slang
filter_linear7 = false
scale_type7 = source
scale7 = 1.0

shader8 = ../../../shaders/hyllian/sgenpt-mix/sgenpt-mix-pass2.slang
filter_linear8 = false
scale_type8 = source
scale8 = 1.0

shader9 = ../../../shaders/hyllian/sgenpt-mix/sgenpt-mix-pass3.slang
filter_linear9 = false
scale_type9 = source
scale9 = 1.0
alias9 = CB_Output

shader10 = ../../../shaders/hyllian/sgenpt-mix/sgenpt-mix-pass4.slang
filter_linear10 = false
scale_type10 = source
scale10 = 1.0

shader11 = ../../../shaders/hyllian/sgenpt-mix/sgenpt-mix-pass5.slang
filter_linear11 = false

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

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

shader14 = ../../../shaders/guest/extras/hsm-g-sharp_resampler.slang
alias14 = "DeditherPass"

shader15 = ../../../shaders/guest/extras/hsm-sharpsmoother.slang
# alias15 = "DeditherPass"

shader16 = ../../../shaders/base/stock.slang
alias16 = "PreCRTPass"

shader17 = ../../../shaders/guest/hsm-afterglow0.slang
filter_linear17 = true
scale_type17 = source
scale17 = 1.0
alias17 = "AfterglowPass"

shader18 = ../../../shaders/guest/hsm-pre-shaders-afterglow.slang
filter_linear18 = true
scale_type18 = source
mipmap_input18 = true
scale18 = 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
shader19 = ../../../shaders/dogway/hsm-grade.slang
filter_linear19 = false
scale_type19 = source
scale19 = 1.0
alias19 = "ColorCorrectPass"

shader20 = ../../../shaders/base/stock.slang
alias20 = "PrePass0"

shader21 = ../../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
filter_linear21 = false
float_framebuffer21 = true
scale_type_x21 = source
scale_type_y21 = source
scale_x21 = 4.0
scale_y21 = 1.0
frame_count_mod21 = 2
alias21 = NPass1

shader22 = ../../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
float_framebuffer22 = true
filter_linear22 = true
scale_type22 = source
scale_x22 = 0.5
scale_y22 = 1.0

shader23 = ../../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear23 = true
scale_type23 = source
scale_x23 = 1.0
scale_y23 = 1.0

shader24 =  ../../../shaders/guest/hsm-custom-fast-sharpen.slang
filter_linear24 = true
scale_type24 = source
scale_x24 = 1.0
scale_y24 = 1.0

shader25 = ../../../shaders/base/stock.slang
filter_linear25 = true
scale_type25 = source
scale_x25 = 1.0
scale_y25 = 1.0
alias25 = "PrePass"
mipmap_input25 = true

shader26 = ../../../shaders/guest/hsm-avg-lum.slang
filter_linear26 = true
scale_type26 = source
scale26 = 1.0
mipmap_input26 = true
alias26 = "AvgLumPass"

# Pass referenced by subsequent blurring passes and crt pass
shader27 = ../../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear27 = true
scale_type27 = source
scale27 = 1.0
float_framebuffer27 = true
alias27 = "LinearizePass"

shader28 = ../../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear28 = true
scale_type_x28 = viewport
scale_x28 = 1.0
scale_type_y28 = source
scale_y28 = 1.0
float_framebuffer28 = true
alias28 = Pass1

shader29 = ../../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear29 = true
scale_type_x29 = absolute
scale_x29 = 640.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 = 640.0
scale_type_y30 = absolute
scale_y30 = 480.0
float_framebuffer30 = true
alias30 = GlowPass

shader31 = ../../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear31 = true
scale_type_x31 = absolute
scale_x31 = 640.0
scale_type_y31 = absolute
scale_y31 = 480.0 
float_framebuffer31 = true

shader32 = ../../../shaders/guest/hsm-bloom_vertical.slang
filter_linear32 = true
scale_type_x32 = absolute
scale_x32 = 640.0
scale_type_y32 = absolute
scale_y32 = 480.0
float_framebuffer32 = true
alias32 = BloomPass

shader33 = ../../../shaders/guest/hsm-crt-guest-advanced.slang
filter_linear33 = true
scale_type33 = viewport
scale_x33 = 1.0
scale_y33 = 1.0
float_framebuffer33 = true

shader34 = ../../../shaders/guest/hsm-deconvergence.slang
filter_linear34 = true
scale_type34 = viewport
scale_x34 = 1.0
scale_y34 = 1.0
float_framebuffer34 = true
alias34 = "CRTPass"

shader35 = ../../../shaders/base/post-crt-prep-glass.slang
mipmap_input35 = true
scale_type35 = viewport
float_framebuffer35 = true
alias35 = "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
float_framebuffer36 = true
alias36 = "BR_MirrorLowResPass"

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

# Add Blur for the Reflection (Vertical) ----------------------------------------------------------------
shader38 = ../../../shaders/base/blur-outside-screen-vert.slang
filter_linear38 = true
float_framebuffer38 = 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
float_framebuffer39 = true
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
float_framebuffer40 = true
alias40 = "BR_MirrorFullscreenGlowPass"

# Bezel Reflection ----------------------------------------------------------------
shader41 = ../../../shaders/base/reflection-glass.slang
scale_type41 = viewport
srgb_framebuffer41 = true
alias41 = "ReflectionPass"
# Define textures to be used by the different passes
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;IntroImage;ScreenPlacementImage;TubeDiffuseImage;TubeColoredGelImage;TubeShadowImage;TubeStaticReflectionImage;BackgroundImage;BackgroundVertImage;ReflectionMaskImage;FrameTextureImage;CabinetGlassImage;DeviceImage;DeviceVertImage;DeviceLEDImage;DecalImage;NightLightingImage;NightLighting2Image;LEDImage;TopLayerImage;"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# Parameters
HSM_TUBE_BLACK_EDGE_SHARPNESS = "90.0000"
HSM_TUBE_BLACK_EDGE_THICKNESS = -7
HSM_BG_OPACITY = "1.000000"
HSM_GLASS_BORDER_ON = "1.000000"
HSM_BZL_WIDTH = 3000
HSM_BZL_HEIGHT = 3000
HSM_BZL_INNER_EDGE_THICKNESS = 350
HSM_BZL_INNER_EDGE_SHARPNESS = 30
HSM_BZL_INNER_CORNER_RADIUS_SCALE = "100.000000"
HSM_BZL_INNER_EDGE_SHADOW = "0.000000"
HSM_FRM_OPACITY = "100.000000"
HSM_REFLECT_GLOBAL_AMOUNT = "35.00000"
HSM_REFLECT_GLOBAL_GAMMA_ADJUST = "0.900000"
HSM_REFLECT_BEZEL_INNER_EDGE_AMOUNT = "60.0000"
HSM_REFLECT_BEZEL_INNER_EDGE_FULLSCREEN_GLOW = "40.0000"
HSM_REFLECT_FULLSCREEN_GLOW = "30.000000"
HSM_REFLECT_FULLSCREEN_GLOW_GAMMA = "1.500000"
HSM_REFLECT_FADE_AMOUNT = "20.0000"
HSM_REFLECT_RADIAL_FADE_WIDTH = "500.000000"
HSM_REFLECT_RADIAL_FADE_HEIGHT = "300.000000"
HSM_REFLECT_LATERAL_OUTER_FADE_POSITION = "500.000000"
HSM_REFLECT_CORNER_FADE = "0.000000"
HSM_REFLECT_BLUR_MIN = "30.0000"
HSM_REFLECT_BLUR_MAX = "60.0000"
HSM_REFLECT_NOISE_AMOUNT = "100.000000"
HSM_REFLECT_NOISE_SAMPLES = "4.000000"
HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
HSM_REFLECT_NOISE_SAMPLE_DISTANCE = "15.0000"
HSM_BG_BRIGHTNESS = "0.000000"
HSM_SCREEN_VIGNETTE_STRENGTH = "20.000000"
HSM_SCREEN_VIGNETTE_POWER = "4.000000"
HSM_SCREEN_VIGNETTE_IN_REFLECTION = "0.000000"

g_vignette = "0.0"

# NTSC Parameters
GAMMA_INPUT = 2.0
gamma_out = 1.95
HSM_CORE_RES_SAMPLING_MULT_SCANLINE_DIR = "200.000000"
h_sharp = "15.000000"
s_sharp = "1.500000"
