shaders = 19

shader0 = ../../../shaders/guest/extras/hsm-drez-g-sharp_resampler.slang
filter_linear0 = false
scale_type_x0 = absolute
scale_x0 = 640
scale_type_y0 = absolute
scale_y0 = 480
wrap_mode0 = "clamp_to_edge"
alias0 = "DerezedPass"

shader1 = ../../../shaders/base/cache-info-potato-params.slang
filter_linear1 = false
scale_type1 = source
scale1 = 1.0
alias1 = "InfoCachePass"

shader2 = ../../../shaders/guest/extras/hsm-fetch-drez-output.slang
filter_linear2 = false
srgb_framebuffer2 = true
scale_type2 = source
scale_x2 = 1
scale_y2 = 1

# Color Correction with Dogway's awesome Grade shader
# Grade is after Afterglow so that brightening the black level does not break the afterglow
shader3 = ../../../shaders/dogway/hsm-grade.slang
filter_linear3 = false
scale_type3 = source
scale3 = 1.0
alias3 = "ColorCorrectPass"

shader4 = ../../../shaders/base/stock.slang
alias4 = "PrePass0"

shader5 = ../../../shaders/guest/ntsc/hsm-ntsc-pass1.slang
filter_linear5 = false
float_framebuffer5 = true
scale_type_x5 = source
scale_type_y5 = source
scale_x5 = 4.0
scale_y5 = 1.0
frame_count_mod5 = 2
alias5 = NPass1

shader6 = ../../../shaders/guest/ntsc/hsm-ntsc-pass2.slang
float_framebuffer6 = true
filter_linear6 = true
scale_type6 = source
scale_x6 = 0.5
scale_y6 = 1.0

shader7 = ../../../shaders/guest/ntsc/hsm-ntsc-pass3.slang
filter_linear7 = true
scale_type7 = source
scale_x7 = 1.0
scale_y7 = 1.0

shader8 = ../../../shaders/base/stock.slang
filter_linear8 = true
scale_type8 = source
scale_x8 = 1.0
scale_y8 = 1.0
alias8 = "PrePass"
mipmap_input8 = true

shader9 = ../../../shaders/guest/hsm-avg-lum.slang
filter_linear9 = true
scale_type9 = source
scale9 = 1.0
mipmap_input9 = true
alias9 = "AvgLumPass"

# Pass referenced by subsequent blurring passes and crt pass
shader10 = ../../../shaders/guest/hsm-interlace-and-linearize.slang
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
float_framebuffer10 = true
alias10 = "LinearizePass"

shader11 = ../../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass1.slang
filter_linear11 = true
scale_type_x11 = viewport
scale_x11 = 1.0
scale_type_y11 = source
scale_y11 = 1.0
float_framebuffer11 = true
alias11 = Pass1

shader12 = ../../../shaders/guest/hsm-gaussian_horizontal.slang
filter_linear12 = true
scale_type_x12 = absolute
scale_x12 = 640.0
scale_type_y12 = source
scale_y12 = 1.0 
float_framebuffer12 = true

shader13 = ../../../shaders/guest/hsm-gaussian_vertical.slang
filter_linear13 = true
scale_type_x13 = absolute
scale_x13 = 640.0
scale_type_y13 = absolute
scale_y13 = 480.0
float_framebuffer13 = true
alias13 = GlowPass

shader14 = ../../../shaders/guest/hsm-bloom_horizontal.slang
filter_linear14 = true
scale_type_x14 = absolute
scale_x14 = 640.0
scale_type_y14 = absolute
scale_y14 = 480.0 
float_framebuffer14 = true

shader15 = ../../../shaders/guest/hsm-bloom_vertical.slang
filter_linear15 = true
scale_type_x15 = absolute
scale_x15 = 640.0
scale_type_y15 = absolute
scale_y15 = 480.0
float_framebuffer15 = true
alias15 = BloomPass

shader16 = ../../../shaders/guest/hsm-crt-guest-advanced-ntsc-pass2-potato.slang
filter_linear16 = true
scale_type16 = viewport
scale_x16 = 1.0
scale_y16 = 1.0
float_framebuffer16 = true

shader17 = ../../../shaders/guest/hsm-deconvergence.slang
filter_linear17 = true
scale_type17 = viewport
scale_x17 = 1.0
scale_y17 = 1.0
float_framebuffer17 = true
alias17 = "CRTPass"

shader18 = ../../../shaders/base/post-crt-prep-potato.slang
mipmap_input18 = true
scale_type18 = viewport
float_framebuffer18 = true
alias18 = "PostCRTPass"

# Textures Potato
# Define textures to be used by the different passes
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4;ScreenPlacementImage;BackgroundImage;BackgroundVertImage"

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

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

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

BackgroundVertImage = ../../../shaders/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

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