diff --git a/misc/chroma.slang b/misc/chroma.slang new file mode 100644 index 0000000..b87d9fe --- /dev/null +++ b/misc/chroma.slang @@ -0,0 +1,104 @@ +#version 450 + +// Chroma / YIQ +// by torridgristle + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float BrightenLevel; + float BrightenAmount; + float ContrastAmount; + float ChromaLevel; + float IAmount; + float QAmount; + float ITilt; + float QTilt; + float ITiltHigh; + float QTiltHigh; + float ITiltMid; + float QTiltMid; + float ITiltLow; + float QTiltLow; + float LumBoost; +} params; + +#pragma parameter BrightenLevel "Brighten Level" 2.0 1.0 10.0 1.0 +#pragma parameter BrightenAmount "Brighten Amount" 0.0 0.0 1.0 0.1 +#pragma parameter ContrastAmount "Contrast Amount" 0.0 0.0 1.0 0.1 +#pragma parameter ChromaLevel "Chroma Level" 2.0 1.0 10.0 1.0 +#pragma parameter IAmount "I Amount" 0.0 0.0 1.0 0.1 +#pragma parameter QAmount "Q Amount" 0.0 0.0 1.0 0.1 +#pragma parameter ITilt "I Tilt" 0.5 0.4 0.6 0.01 +#pragma parameter QTilt "Q Tilt" 0.5 0.4 0.6 0.01 +#pragma parameter ITiltHigh "I Tilt High" 0.5 0.4 0.6 0.01 +#pragma parameter QTiltHigh "Q Tilt High" 0.5 0.4 0.6 0.01 +#pragma parameter ITiltMid "I Tilt Mid" 0.5 0.4 0.6 0.01 +#pragma parameter QTiltMid "Q Tilt Mid" 0.5 0.4 0.6 0.01 +#pragma parameter ITiltLow "I Tilt Low" 0.5 0.4 0.6 0.01 +#pragma parameter QTiltLow "Q Tilt Low" 0.5 0.4 0.6 0.01 +#pragma parameter LumBoost "Luma Boost" 0.0 0.0 1.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; + +#define RGB_to_YIQ mat3x3( 0.299 , 0.595716 , 0.211456 , 0.587 , -0.274453 , -0.522591 , 0.114 , -0.321263 , 0.311135 ) +#define YIQ_to_RGB mat3x3( 1.0 , 1.0 , 1.0 , 0.9563 , -0.2721 , -1.1070 , 0.6210 , -0.6474 , 1.7046 ) + +vec3 Chroma(vec3 Photo, float Level) { + Photo *= RGB_to_YIQ; + float I_Tilt = ((params.ITilt - 0.5) * 2); + float Q_Tilt = ((params.QTilt - 0.5) * 2); + float LumHigh = max(Photo.x-0.5,0.0)*2.0; + float LumMid = 1-abs(Photo.x-0.5)*2.0; + float LumLow = max((1-Photo.x)-0.5,0.0)*2.0; + float I_TiltHigh = ((params.ITiltHigh - 0.5) * 2) * LumHigh; + float Q_TiltHigh = ((params.QTiltHigh - 0.5) * 2) * LumHigh; + float I_TiltMid = ((params.ITiltMid - 0.5) * 2) * LumMid; + float Q_TiltMid = ((params.QTiltMid - 0.5) * 2) * LumMid; + float I_TiltLow = ((params.ITiltLow - 0.5) * 2) * LumLow; + float Q_TiltLow = ((params.QTiltLow - 0.5) * 2) * LumLow; + Photo.yz = mix(Photo.yz,(1.0-pow(1.0-abs(Photo.yz),vec2(Level)))*sign(Photo.yz),vec2(params.IAmount,params.QAmount)); + Photo.y = Photo.y * (1-abs(I_Tilt)) + I_Tilt; + Photo.z = Photo.z * (1-abs(Q_Tilt)) + Q_Tilt; + Photo.y = Photo.y * (1-abs(I_TiltHigh)) + I_TiltHigh; + Photo.z = Photo.z * (1-abs(Q_TiltHigh)) + Q_TiltHigh; + Photo.y = Photo.y * (1-abs(I_TiltMid)) + I_TiltMid; + Photo.z = Photo.z * (1-abs(Q_TiltMid)) + Q_TiltMid; + Photo.y = Photo.y * (1-abs(I_TiltLow)) + I_TiltLow; + Photo.z = Photo.z * (1-abs(Q_TiltLow)) + Q_TiltLow; + Photo.x = mix(Photo.x,1-pow(1-Photo.x,2.0),params.LumBoost); + Photo *= YIQ_to_RGB; + Photo = clamp(Photo,0.0,1.0); + Photo = mix(Photo,1.0-pow(1.0-Photo,vec3(params.BrightenLevel)),params.BrightenAmount); + Photo = mix(Photo,Photo * Photo * (3 - 2 * Photo),params.ContrastAmount); + return Photo; +} + +void main() +{ + vec3 Picture = texture(Source, vTexCoord).xyz; + + FragColor = vec4(Chroma(Picture,params.ChromaLevel),1.0); +} diff --git a/presets/crt-royale-xm29plus.slangp b/presets/crt-royale-xm29plus.slangp new file mode 100755 index 0000000..fdc98af --- /dev/null +++ b/presets/crt-royale-xm29plus.slangp @@ -0,0 +1,251 @@ +# IMPORTANT: +# Shader passes need to know details about the image in the mask_texture LUT +# files, so set the following constants in user-cgp-constants.h accordingly: +# 1.) mask_triads_per_tile = (number of horizontal triads in mask texture LUT's) +# 2.) mask_texture_small_size = (texture size of mask*texture_small LUT's) +# 3.) mask_texture_large_size = (texture size of mask*texture_large LUT's) +# 4.) mask_grille_avg_color = (avg. brightness of mask_grille_texture* LUT's, in [0, 1]) +# 5.) mask_slot_avg_color = (avg. brightness of mask_slot_texture* LUT's, in [0, 1]) +# 6.) mask_shadow_avg_color = (avg. brightness of mask_shadow_texture* LUT's, in [0, 1]) +# Shader passes also need to know certain scales set in this .slangp, but their +# compilation model doesn't currently allow the .slangp file to tell them. Make +# sure to set the following constants in user-cgp-constants.h accordingly too: +# 1.) bloom_approx_scale_x = scale_x2 +# 2.) mask_resize_viewport_scale = float2(scale_x6, scale_y5) +# Finally, shader passes need to know the value of geom_max_aspect_ratio used to +# calculate scale_y5 (among other values): +# 1.) geom_max_aspect_ratio = (geom_max_aspect_ratio used to calculate scale_y5) + +shaders = "12" + +# Set an identifier, filename, and sampling traits for the phosphor mask texture. +# Load an aperture grille, slot mask, and an EDP shadow mask, and load a small +# non-mipmapped version and a large mipmapped version. +# TODO: Test masks in other directories. +textures = "mask_grille_texture_small;mask_grille_texture_large;mask_slot_texture_small;mask_slot_texture_large;mask_shadow_texture_small;mask_shadow_texture_large" +mask_grille_texture_small = "../crt/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png" +mask_grille_texture_large = "../crt/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5Spacing.png" +mask_slot_texture_small = "../crt/shaders/crt-royale/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png" +mask_slot_texture_large = "../crt/shaders/crt-royale/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png" +mask_shadow_texture_small = "../crt/shaders/crt-royale/TileableLinearShadowMaskEDPResizeTo64.png" +mask_shadow_texture_large = "../crt/shaders/crt-royale/TileableLinearShadowMaskEDP.png" +mask_grille_texture_small_wrap_mode = "repeat" +mask_grille_texture_large_wrap_mode = "repeat" +mask_slot_texture_small_wrap_mode = "repeat" +mask_slot_texture_large_wrap_mode = "repeat" +mask_shadow_texture_small_wrap_mode = "repeat" +mask_shadow_texture_large_wrap_mode = "repeat" +mask_grille_texture_small_linear = "true" +mask_grille_texture_large_linear = "true" +mask_slot_texture_small_linear = "true" +mask_slot_texture_large_linear = "true" +mask_shadow_texture_small_linear = "true" +mask_shadow_texture_large_linear = "true" +mask_grille_texture_small_mipmap = "false" # Mipmapping causes artifacts with manually resized masks without tex2Dlod +mask_grille_texture_large_mipmap = "true" # Essential for hardware-resized masks +mask_slot_texture_small_mipmap = "false" # Mipmapping causes artifacts with manually resized masks without tex2Dlod +mask_slot_texture_large_mipmap = "true" # Essential for hardware-resized masks +mask_shadow_texture_small_mipmap = "false" # Mipmapping causes artifacts with manually resized masks without tex2Dlod +mask_shadow_texture_large_mipmap = "true" # Essential for hardware-resized masks + + +# Pass0: Linearize the input based on CRT gamma and bob interlaced fields. +# (Bobbing ensures we can immediately blur without getting artifacts.) +shader0 = "../crt/shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang" +alias0 = "ORIG_LINEARIZED" +filter_linear0 = "false" +scale_type0 = "source" +scale0 = "1.0" +srgb_framebuffer0 = "true" + +# Pass1: Resample interlaced (and misconverged) scanlines vertically. +# Separating vertical/horizontal scanline sampling is faster: It lets us +# consider more scanlines while calculating weights for fewer pixels, and +# it reduces our samples from vertical*horizontal to vertical+horizontal. +# This has to come right after ORIG_LINEARIZED, because there's no +# "original_source" scale_type we can use later. +shader1 = "../crt/shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang" +alias1 = "VERTICAL_SCANLINES" +filter_linear1 = "true" +scale_type_x1 = "source" +scale_x1 = "1.0" +scale_type_y1 = "viewport" +scale_y1 = "1.0" +#float_framebuffer1 = "true" +srgb_framebuffer1 = "true" + +# Pass2: Do a small resize blur of ORIG_LINEARIZED at an absolute size, and +# account for convergence offsets. We want to blur a predictable portion of the +# screen to match the phosphor bloom, and absolute scale works best for +# reliable results with a fixed-size bloom. Picking a scale is tricky: +# a.) 400x300 is a good compromise for the "fake-bloom" version: It's low enough +# to blur high-res/interlaced sources but high enough that resampling +# doesn't smear low-res sources too much. +# b.) 320x240 works well for the "real bloom" version: It's 1-1.5% faster, and +# the only noticeable visual difference is a larger halation spread (which +# may be a good thing for people who like to crank it up). +# Note the 4:3 aspect ratio assumes the input has cropped geom_overscan (so it's +# *intended* for an ~4:3 aspect ratio). +shader2 = "../crt/shaders/crt-royale/src/crt-royale-bloom-approx.slang" +alias2 = "BLOOM_APPROX" +filter_linear2 = "true" +scale_type2 = "absolute" +scale_x2 = "320" +scale_y2 = "240" +srgb_framebuffer2 = "true" + +# Pass3: Vertically blur the input for halation and refractive diffusion. +# Base this on BLOOM_APPROX: This blur should be small and fast, and blurring +# a constant portion of the screen is probably physically correct if the +# viewport resolution is proportional to the simulated CRT size. +shader3 = "../blurs/blur5fast-vertical.slang" +filter_linear3 = "true" +scale_type3 = "source" +scale3 = "1.0" +srgb_framebuffer3 = "true" + +# Pass4: Horizontally blur the input for halation and refractive diffusion. +# Note: Using a one-pass 9x9 blur is about 1% slower. +shader4 = "../blurs/blur5fast-horizontal.slang" +alias4 = "HALATION_BLUR" +filter_linear4 = "true" +scale_type4 = "source" +scale4 = "1.0" +srgb_framebuffer4 = "true" + +# Pass5: Lanczos-resize the phosphor mask vertically. Set the absolute +# scale_x5 == mask_texture_small_size.x (see IMPORTANT above). Larger scales +# will blur, and smaller scales could get nasty. The vertical size must be +# based on the viewport size and calculated carefully to avoid artifacts later. +# First calculate the minimum number of mask tiles we need to draw. +# Since curvature is computed after the scanline masking pass: +# num_resized_mask_tiles = 2.0; +# If curvature were computed in the scanline masking pass (it's not): +# max_mask_texel_border = ~3.0 * (1/3.0 + 4.0*sqrt(2.0) + 0.5 + 1.0); +# max_mask_tile_border = max_mask_texel_border/ +# (min_resized_phosphor_triad_size * mask_triads_per_tile); +# num_resized_mask_tiles = max(2.0, 1.0 + max_mask_tile_border * 2.0); +# At typical values (triad_size >= 2.0, mask_triads_per_tile == 8): +# num_resized_mask_tiles = ~3.8 +# Triad sizes are given in horizontal terms, so we need geom_max_aspect_ratio +# to relate them to vertical resolution. The widest we expect is: +# geom_max_aspect_ratio = 4.0/3.0 # Note: Shader passes need to know this! +# The fewer triads we tile across the screen, the larger each triad will be as a +# fraction of the viewport size, and the larger scale_y5 must be to draw a full +# num_resized_mask_tiles. Therefore, we must decide the smallest number of +# triads we'll guarantee can be displayed on screen. We'll set this according +# to 3-pixel triads at 768p resolution (the lowest anyone's likely to use): +# min_allowed_viewport_triads = 768.0*geom_max_aspect_ratio / 3.0 = 341.333333 +# Now calculate the viewport scale that ensures we can draw resized_mask_tiles: +# min_scale_x = resized_mask_tiles * mask_triads_per_tile / +# min_allowed_viewport_triads +# scale_y5 = geom_max_aspect_ratio * min_scale_x +# # Some code might depend on equal scales: +# scale_x6 = scale_y5 +# Given our default geom_max_aspect_ratio and min_allowed_viewport_triads: +# scale_y5 = 4.0/3.0 * 2.0/(341.33333 / 8.0) = 0.0625 +# IMPORTANT: The scales MUST be calculated in this way. If you wish to change +# geom_max_aspect_ratio, update that constant in user-cgp-constants.h! +shader5 = "../crt/shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang" +filter_linear5 = "true" +scale_type_x5 = "absolute" +scale_x5 = "64" +scale_type_y5 = "viewport" +scale_y5 = "0.0625" # Safe for >= 341.333 horizontal triads at viewport size +#srgb_framebuffer5 = "false" # mask_texture is already assumed linear + +# Pass6: Lanczos-resize the phosphor mask horizontally. scale_x6 = scale_y5. +# TODO: Check again if the shaders actually require equal scales. +shader6 = "../crt/shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang" +alias6 = "MASK_RESIZE" +filter_linear6 = "false" +scale_type_x6 = "viewport" +scale_x6 = "0.0625" +scale_type_y6 = "source" +scale_y6 = "1.0" +#srgb_framebuffer6 = "false" # mask_texture is already assumed linear + +# Pass7: Resample (misconverged) scanlines horizontally, apply halation, and +# apply the phosphor mask. +shader7 = "../crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang" +alias7 = "MASKED_SCANLINES" +filter_linear7 = "true" # This could just as easily be nearest neighbor. +scale_type7 = "viewport" +scale7 = "1.0" +#float_framebuffer7 = "true" +srgb_framebuffer7 = "true" + +# Pass 8: Compute a brightpass. This will require reading the final mask. +shader8 = "../crt/shaders/crt-royale/src/crt-royale-brightpass.slang" +alias8 = "BRIGHTPASS" +filter_linear8 = "true" # This could just as easily be nearest neighbor. +scale_type8 = "viewport" +scale8 = "1.0" +srgb_framebuffer8 = "true" + +# Pass 9: Blur the brightpass vertically +shader9 = "../crt/shaders/crt-royale/src/crt-royale-bloom-vertical.slang" +filter_linear9 = "true" # This could just as easily be nearest neighbor. +scale_type9 = "source" +scale9 = "1.0" +srgb_framebuffer9 = "true" + +# Pass 10: Blur the brightpass horizontally and combine it with the dimpass: +shader10 = "../crt/shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang" +filter_linear10 = "true" +scale_type10 = "source" +scale10 = "1.0" +srgb_framebuffer10 = "true" + +# Pass 11: Compute curvature/AA: +shader11 = "../crt/shaders/crt-royale/src/crt-royale-last-pass-no-geom.slang" +filter_linear11 = "true" +scale_type11 = "viewport" +mipmap_input11 = "true" +texture_wrap_mode11 = "clamp_to_edge" + +parameters = "crt_gamma;lcd_gamma;levels_contrast;halation_weight;diffusion_weight;bloom_underestimate_levels;bloom_excess;beam_min_sigma;beam_max_sigma;beam_spot_power;beam_min_shape;beam_max_shape;beam_shape_power;beam_horiz_filter;beam_horiz_sigma;beam_horiz_linear_rgb_weight;convergence_offset_x_r;convergence_offset_x_g;convergence_offset_x_b;convergence_offset_y_r;convergence_offset_y_g;convergence_offset_y_b;mask_type;mask_sample_mode_desired;mask_specify_num_triads;mask_triad_size_desired;mask_num_triads_desired;aa_subpixel_r_offset_x_runtime;aa_subpixel_r_offset_y_runtime;aa_cubic_c;aa_gauss_sigma;geom_mode_runtime;geom_radius;geom_view_dist;geom_tilt_angle_x;geom_tilt_angle_y;geom_aspect_ratio_x;geom_aspect_ratio_y;geom_overscan_x;geom_overscan_y;border_size;border_darkness;border_compress;interlace_bff;interlace_1080i" +beam_horiz_filter = "0.000000" +beam_horiz_linear_rgb_weight = "1.000000" +beam_horiz_sigma = "0.555000" +beam_max_shape = "2.000000" +beam_max_sigma = "0.250000" +beam_min_shape = "2.000000" +beam_min_sigma = "0.075000" +beam_shape_power = "0.250000" +beam_spot_power = "0.330000" +bloom_excess = "0.335000" +bloom_underestimate_levels = "1.20" +border_compress = "2.500000" +border_darkness = "0.000000" +border_size = "0.005000" +convergence_offset_x_b = "0.000000" +convergence_offset_x_g = "0.000000" +convergence_offset_x_r = "0.000000" +convergence_offset_y_b = "-0.200000" +convergence_offset_y_g = "0.000000" +convergence_offset_y_r = "0.200000" +crt_gamma = "2.400000" +diffusion_weight = "0.075000" +geom_aspect_ratio_x = "432.000000" +geom_aspect_ratio_y = "329.000000" +geom_mode_runtime = "0.000000" +geom_overscan_x = "1.000000" +geom_overscan_y = "1.000000" +geom_radius = "3.000000" +geom_tilt_angle_x = "0.000000" +geom_tilt_angle_y = "0.000000" +geom_view_dist = "2.000000" +halation_weight = "0.000000" +interlace_1080i = "0.000000" +interlace_bff = "0.000000" +lcd_gamma = "2.400000" +levels_contrast = "0.750000" +mask_specify_num_triads = "0.000000" +mask_triad_size_desired = "3.000000" +mask_sample_mode_desired = "1.000000" +mask_type = "1.000000" +aa_cubic_c = "0.500000" +aa_gauss_sigma = "0.500000" +aa_subpixel_r_offset_x_runtime = "-0.333333" +aa_subpixel_r_offset_y_runtime = "0.000000" diff --git a/reshade/blendoverlay.slangp b/reshade/blendoverlay.slangp new file mode 100644 index 0000000..4c27e85 --- /dev/null +++ b/reshade/blendoverlay.slangp @@ -0,0 +1,5 @@ +shaders = 1 +shader0 = shaders/blendoverlay/blendoverlay.slang + +textures = "overlay" +overlay = shaders/blendoverlay/grayscale_slotmask.png diff --git a/reshade/shaders/LUT/Mitsubishi_Diamond_Pro_750SB_9300K.png b/reshade/shaders/LUT/Mitsubishi_Diamond_Pro_750SB_9300K.png new file mode 100644 index 0000000..2d1cb1e Binary files /dev/null and b/reshade/shaders/LUT/Mitsubishi_Diamond_Pro_750SB_9300K.png differ diff --git a/reshade/shaders/LUT/NEC_MultiSync_FE990_9300K.png b/reshade/shaders/LUT/NEC_MultiSync_FE990_9300K.png new file mode 100644 index 0000000..9d314d5 Binary files /dev/null and b/reshade/shaders/LUT/NEC_MultiSync_FE990_9300K.png differ diff --git a/reshade/shaders/LUT/NEC_XM29plus_capture.png b/reshade/shaders/LUT/NEC_XM29plus_capture.png new file mode 100644 index 0000000..d156174 Binary files /dev/null and b/reshade/shaders/LUT/NEC_XM29plus_capture.png differ diff --git a/reshade/shaders/LUT/Sony_Trinitron_Std_50_no_gamma.png b/reshade/shaders/LUT/Sony_Trinitron_Std_50_no_gamma.png new file mode 100644 index 0000000..96a843c Binary files /dev/null and b/reshade/shaders/LUT/Sony_Trinitron_Std_50_no_gamma.png differ diff --git a/reshade/shaders/blendoverlay/blendoverlay.slang b/reshade/shaders/blendoverlay/blendoverlay.slang new file mode 100644 index 0000000..ff27bcd --- /dev/null +++ b/reshade/shaders/blendoverlay/blendoverlay.slang @@ -0,0 +1,71 @@ +#version 450 + +// blendoverlay +// based on: +// https://github.com/jamieowen/glsl-blend for blendOverlay + +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OriginalSize; + vec4 OutputSize; + uint FrameCount; + float OverlayMix; + float LUTWidth; + float LUTHeight; +} params; + +#pragma parameter OverlayMix "Overlay Mix" 1.0 0.0 1.0 0.05 +#pragma parameter LUTWidth "LUT Width" 6.0 1.0 30.0 1.0 +#pragma parameter LUTHeight "LUT Height" 4.0 1.0 30.0 1.0 + +#define OverlayMix params.OverlayMix +#define LUTWidth params.LUTWidth +#define LUTHeight params.LUTHeight + +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 overlay; + +float blendOverlay(float base, float blend) { + return base<0.5?(2.0*base*blend):(1.0-2.0*(1.0-base)*(1.0-blend)); +} + +void main() +{ + vec3 Picture = texture(Source, vTexCoord).xyz; + + float Luminance = 0.299*Picture.x + 0.587*Picture.y + 0.114*Picture.z; + + vec2 LutCoord = vec2(fract(vTexCoord.x*params.OutputSize.x/LUTWidth),fract(vTexCoord.y*params.OutputSize.y/LUTHeight)); + + vec3 ShadowMask = texture(overlay, LutCoord).xyz; + + vec3 ImageFinal = Picture; + + ImageFinal.r = blendOverlay(ImageFinal.r,ShadowMask.r); + ImageFinal.g = blendOverlay(ImageFinal.g,ShadowMask.g); + ImageFinal.b = blendOverlay(ImageFinal.b,ShadowMask.b); + + ImageFinal = mix(Picture,clamp(ImageFinal,0.0,1.0),OverlayMix); + + FragColor = vec4(ImageFinal,1.0); +} diff --git a/reshade/shaders/blendoverlay/grayscale_slotmask.png b/reshade/shaders/blendoverlay/grayscale_slotmask.png new file mode 100644 index 0000000..315dee6 Binary files /dev/null and b/reshade/shaders/blendoverlay/grayscale_slotmask.png differ