update crt-royale-kurozumi preset

This commit is contained in:
hunterk 2019-09-23 12:45:24 -05:00
parent 8537d7b8de
commit f46f8e515d
2 changed files with 258 additions and 252 deletions

View file

@ -13,16 +13,16 @@
# 1.) bloom_approx_scale_x = scale_x2 # 1.) bloom_approx_scale_x = scale_x2
# 2.) mask_resize_viewport_scale = float2(scale_x6, scale_y5) # 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 # Finally, shader passes need to know the value of geom_max_aspect_ratio used to
# calculate scale_y5 (among other values): # calculate scale_y6 (among other values):
# 1.) geom_max_aspect_ratio = (geom_max_aspect_ratio used to calculate scale_y5) # 1.) geom_max_aspect_ratio = (geom_max_aspect_ratio used to calculate scale_y5)
shaders = "12" shaders = "13"
# Set an identifier, filename, and sampling traits for the phosphor mask texture. # 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 # Load an aperture grille, slot mask, and an EDP shadow mask, and load a small
# non-mipmapped version and a large mipmapped version. # non-mipmapped version and a large mipmapped version.
# TODO: Test masks in other directories. # 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" 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;SamplerLUT"
mask_grille_texture_small = "../crt/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png" mask_grille_texture_small = "../crt/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png"
mask_grille_texture_large = "../crt/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5Spacing.png" mask_grille_texture_large = "../crt/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5Spacing.png"
mask_slot_texture_small = "../crt/shaders/crt-royale/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png" mask_slot_texture_small = "../crt/shaders/crt-royale/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png"
@ -47,34 +47,39 @@ mask_slot_texture_small_mipmap = "false" # Mipmapping causes artifacts with m
mask_slot_texture_large_mipmap = "true" # Essential for hardware-resized masks 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_small_mipmap = "false" # Mipmapping causes artifacts with manually resized masks without tex2Dlod
mask_shadow_texture_large_mipmap = "true" # Essential for hardware-resized masks mask_shadow_texture_large_mipmap = "true" # Essential for hardware-resized masks
SamplerLUT = "../reshade/shaders/LUT/Kurozumi_64_D65_Rec601.png"
SamplerLUT_linear = true
# Pass0: LUT to correct screen colors.
# Digital Displays different color coordinates for primaries than CRTs (Rec709 vs Rec601).
shader0 = "../reshade/shaders/LUT/LUT.slang"
# Pass0: Linearize the input based on CRT gamma and bob interlaced fields. # Pass1: Linearize the input based on CRT gamma and bob interlaced fields.
# (Bobbing ensures we can immediately blur without getting artifacts.) # (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" shader1 = "../crt/shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang"
alias0 = "ORIG_LINEARIZED" alias1 = "ORIG_LINEARIZED"
filter_linear0 = "false" filter_linear1 = "false"
scale_type0 = "source" scale_type1 = "source"
scale0 = "1.0" scale1 = "1.0"
srgb_framebuffer0 = "true" srgb_framebuffer1 = "true"
# Pass1: Resample interlaced (and misconverged) scanlines vertically. # Pass2: Resample interlaced (and misconverged) scanlines vertically.
# Separating vertical/horizontal scanline sampling is faster: It lets us # Separating vertical/horizontal scanline sampling is faster: It lets us
# consider more scanlines while calculating weights for fewer pixels, and # consider more scanlines while calculating weights for fewer pixels, and
# it reduces our samples from vertical*horizontal to vertical+horizontal. # it reduces our samples from vertical*horizontal to vertical+horizontal.
# This has to come right after ORIG_LINEARIZED, because there's no # This has to come right after ORIG_LINEARIZED, because there's no
# "original_source" scale_type we can use later. # "original_source" scale_type we can use later.
shader1 = "../crt/shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang" shader2 = "../crt/shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang"
alias1 = "VERTICAL_SCANLINES" alias2 = "VERTICAL_SCANLINES"
filter_linear1 = "true" filter_linear2 = "true"
scale_type_x1 = "source" scale_type_x2 = "source"
scale_x1 = "1.0" scale_x2 = "1.0"
scale_type_y1 = "viewport" scale_type_y2 = "viewport"
scale_y1 = "1.0" scale_y2 = "1.0"
#float_framebuffer1 = "true" #float_framebuffer2 = "true"
srgb_framebuffer1 = "true" srgb_framebuffer2 = "true"
# Pass2: Do a small resize blur of ORIG_LINEARIZED at an absolute size, and # Pass3: 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 # 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 # screen to match the phosphor bloom, and absolute scale works best for
# reliable results with a fixed-size bloom. Picking a scale is tricky: # reliable results with a fixed-size bloom. Picking a scale is tricky:
@ -84,36 +89,36 @@ srgb_framebuffer1 = "true"
# b.) 320x240 works well for the "real bloom" version: It's 1-1.5% faster, and # 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 # the only noticeable visual difference is a larger halation spread (which
# may be a good thing for people who like to crank it up). # 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 # Note the 4:4 aspect ratio assumes the input has cropped geom_overscan (so it's
# *intended* for an ~4:3 aspect ratio). # *intended* for an ~4:4 aspect ratio).
shader2 = "../crt/shaders/crt-royale/src/crt-royale-bloom-approx.slang" shader3 = "../crt/shaders/crt-royale/src/crt-royale-bloom-approx.slang"
alias2 = "BLOOM_APPROX" alias3 = "BLOOM_APPROX"
filter_linear2 = "true" filter_linear3 = "true"
scale_type2 = "absolute" scale_type3 = "absolute"
scale_x2 = "320" scale_x3 = "320"
scale_y2 = "240" scale_y3 = "240"
srgb_framebuffer2 = "true" srgb_framebuffer3 = "true"
# Pass3: Vertically blur the input for halation and refractive diffusion. # Pass4: Vertically blur the input for halation and refractive diffusion.
# Base this on BLOOM_APPROX: This blur should be small and fast, and blurring # 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 # a constant portion of the screen is probably physically correct if the
# viewport resolution is proportional to the simulated CRT size. # viewport resolution is proportional to the simulated CRT size.
shader3 = "../blurs/blur5fast-vertical.slang" shader4 = "../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" filter_linear4 = "true"
scale_type4 = "source" scale_type4 = "source"
scale4 = "1.0" scale4 = "1.0"
srgb_framebuffer4 = "true" srgb_framebuffer4 = "true"
# Pass5: Lanczos-resize the phosphor mask vertically. Set the absolute # Pass5: Horizontally blur the input for halation and refractive diffusion.
# Note: Using a one-pass 9x10 blur is about 1% slower.
shader5 = "../blurs/blur5fast-horizontal.slang"
alias5 = "HALATION_BLUR"
filter_linear5 = "true"
scale_type5 = "source"
scale5 = "1.0"
srgb_framebuffer5 = "true"
# Pass6: Lanczos-resize the phosphor mask vertically. Set the absolute
# scale_x5 == mask_texture_small_size.x (see IMPORTANT above). Larger scales # 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 # 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. # based on the viewport size and calculated carefully to avoid artifacts later.
@ -121,7 +126,7 @@ srgb_framebuffer4 = "true"
# Since curvature is computed after the scanline masking pass: # Since curvature is computed after the scanline masking pass:
# num_resized_mask_tiles = 2.0; # num_resized_mask_tiles = 2.0;
# If curvature were computed in the scanline masking pass (it's not): # 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_texel_border = ~3.0 * (1/3.0 + 4.0*sqrt(2.0) + 0.6 + 1.0);
# max_mask_tile_border = max_mask_texel_border/ # max_mask_tile_border = max_mask_texel_border/
# (min_resized_phosphor_triad_size * mask_triads_per_tile); # (min_resized_phosphor_triad_size * mask_triads_per_tile);
# num_resized_mask_tiles = max(2.0, 1.0 + max_mask_tile_border * 2.0); # num_resized_mask_tiles = max(2.0, 1.0 + max_mask_tile_border * 2.0);
@ -131,7 +136,7 @@ srgb_framebuffer4 = "true"
# to relate them to vertical resolution. The widest we expect is: # 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! # 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 # 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 # fraction of the viewport size, and the larger scale_y6 must be to draw a full
# num_resized_mask_tiles. Therefore, we must decide the smallest number of # 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 # 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): # to 3-pixel triads at 768p resolution (the lowest anyone's likely to use):
@ -139,94 +144,94 @@ srgb_framebuffer4 = "true"
# Now calculate the viewport scale that ensures we can draw resized_mask_tiles: # Now calculate the viewport scale that ensures we can draw resized_mask_tiles:
# min_scale_x = resized_mask_tiles * mask_triads_per_tile / # min_scale_x = resized_mask_tiles * mask_triads_per_tile /
# min_allowed_viewport_triads # min_allowed_viewport_triads
# scale_y5 = geom_max_aspect_ratio * min_scale_x # scale_y6 = geom_max_aspect_ratio * min_scale_x
# # Some code might depend on equal scales: # # Some code might depend on equal scales:
# scale_x6 = scale_y5 # scale_x7 = scale_y5
# Given our default geom_max_aspect_ratio and min_allowed_viewport_triads: # 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 # scale_y6 = 4.0/3.0 * 2.0/(341.33334 / 8.0) = 0.0625
# IMPORTANT: The scales MUST be calculated in this way. If you wish to change # 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! # geom_max_aspect_ratio, update that constant in user-cgp-constants.h!
shader5 = "../crt/shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang" shader6 = "../crt/shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang"
filter_linear5 = "true" filter_linear6 = "true"
scale_type_x5 = "absolute" scale_type_x6 = "absolute"
scale_x5 = "64" scale_x6 = "64"
scale_type_y5 = "viewport" scale_type_y6 = "viewport"
scale_y5 = "0.0625" # Safe for >= 341.333 horizontal triads at viewport size scale_y6 = "0.0625" # Safe for >= 341.334 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 #srgb_framebuffer6 = "false" # mask_texture is already assumed linear
# Pass7: Resample (misconverged) scanlines horizontally, apply halation, and # Pass7: Lanczos-resize the phosphor mask horizontally. scale_x7 = scale_y5.
# apply the phosphor mask. # TODO: Check again if the shaders actually require equal scales.
shader7 = "../crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang" shader7 = "../crt/shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang"
alias7 = "MASKED_SCANLINES" alias7 = "MASK_RESIZE"
filter_linear7 = "true" # This could just as easily be nearest neighbor. filter_linear7 = "false"
scale_type7 = "viewport" scale_type_x7 = "viewport"
scale7 = "1.0" scale_x7 = "0.0625"
#float_framebuffer7 = "true" scale_type_y7 = "source"
srgb_framebuffer7 = "true" scale_y7 = "1.0"
#srgb_framebuffer7 = "false" # mask_texture is already assumed linear
# Pass 8: Compute a brightpass. This will require reading the final mask. # Pass8: Resample (misconverged) scanlines horizontally, apply halation, and
shader8 = "../crt/shaders/crt-royale/src/crt-royale-brightpass.slang" # apply the phosphor mask.
alias8 = "BRIGHTPASS" shader8 = "../crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang"
alias8 = "MASKED_SCANLINES"
filter_linear8 = "true" # This could just as easily be nearest neighbor. filter_linear8 = "true" # This could just as easily be nearest neighbor.
scale_type8 = "viewport" scale_type8 = "viewport"
scale8 = "1.0" scale8 = "1.0"
#float_framebuffer8 = "true"
srgb_framebuffer8 = "true" srgb_framebuffer8 = "true"
# Pass 9: Blur the brightpass vertically # Pass 9: Compute a brightpass. This will require reading the final mask.
shader9 = "../crt/shaders/crt-royale/src/crt-royale-bloom-vertical.slang" shader9 = "../crt/shaders/crt-royale/src/crt-royale-brightpass.slang"
alias9 = "BRIGHTPASS"
filter_linear9 = "true" # This could just as easily be nearest neighbor. filter_linear9 = "true" # This could just as easily be nearest neighbor.
scale_type9 = "source" scale_type9 = "viewport"
scale9 = "1.0" scale9 = "1.0"
srgb_framebuffer9 = "true" srgb_framebuffer9 = "true"
# Pass 10: Blur the brightpass horizontally and combine it with the dimpass: # Pass 10: Blur the brightpass vertically
shader10 = "../crt/shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang" shader10 = "../crt/shaders/crt-royale/src/crt-royale-bloom-vertical.slang"
filter_linear10 = "true" filter_linear10 = "true" # This could just as easily be nearest neighbor.
scale_type10 = "source" scale_type10 = "source"
scale10 = "1.0" scale10 = "1.0"
srgb_framebuffer10 = "true" srgb_framebuffer10 = "true"
# Pass 11: Compute curvature/AA: # Pass 11: Blur the brightpass horizontally and combine it with the dimpass:
shader11 = "../crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang" shader11 = "../crt/shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang"
filter_linear11 = "true" filter_linear11 = "true"
scale_type11 = "viewport" scale_type11 = "source"
mipmap_input11 = "true" scale11 = "1.0"
texture_wrap_mode11 = "clamp_to_edge" srgb_framebuffer11 = "true"
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" # Pass 12: Compute curvature/AA:
shader12 = "../crt/shaders/crt-royale/src/crt-royale-last-pass-no-geom.slang"
filter_linear12 = "true"
scale_type12 = "viewport"
mipmap_input12 = "true"
texture_wrap_mode12 = "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;LUT_Size"
crt_gamma = "2.400000" crt_gamma = "2.400000"
lcd_gamma = "2.400000" lcd_gamma = "2.400000"
levels_contrast = "0.740000" levels_contrast = "0.740000"
halation_weight = "0.004600" halation_weight = "0.004400"
diffusion_weight = "0.001000" diffusion_weight = "0.001200"
bloom_underestimate_levels = "0.800000" bloom_underestimate_levels = "0.800000"
bloom_excess = "0.000000" bloom_excess = "0.010000"
beam_min_sigma = "0.020000" beam_min_sigma = "0.020000"
beam_max_sigma = "0.200000" beam_max_sigma = "0.160000"
beam_spot_power = "0.370000" beam_spot_power = "0.380000"
beam_min_shape = "2.000000" beam_min_shape = "2.000000"
beam_max_shape = "4.000000" beam_max_shape = "4.000000"
beam_shape_power = "0.250000" beam_shape_power = "0.250000"
beam_horiz_filter = "0.000000" beam_horiz_filter = "1.000000"
beam_horiz_sigma = "0.545000" beam_horiz_sigma = "0.320000"
beam_horiz_linear_rgb_weight = "1.000000" beam_horiz_linear_rgb_weight = "1.000000"
convergence_offset_x_r = "-0.050000" convergence_offset_x_r = "-0.050000"
convergence_offset_x_g = "0.000000" convergence_offset_x_g = "0.000000"
convergence_offset_x_b = "0.000000" convergence_offset_x_b = "0.000000"
convergence_offset_y_r = "0.100000" convergence_offset_y_r = "0.050000"
convergence_offset_y_g = "-0.050000" convergence_offset_y_g = "-0.050000"
convergence_offset_y_b = "0.100000" convergence_offset_y_b = "0.050000"
mask_type = "0.000000" mask_type = "0.000000"
mask_sample_mode_desired = "0.000000" mask_sample_mode_desired = "0.000000"
mask_specify_num_triads = "0.000000" mask_specify_num_triads = "0.000000"
@ -250,3 +255,4 @@ border_darkness = "0.000000"
border_compress = "2.500000" border_compress = "2.500000"
interlace_bff = "0.000000" interlace_bff = "0.000000"
interlace_1080i = "0.000000" interlace_1080i = "0.000000"
LUT_Size = "64.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB