Sync to koko-aio 1.9.50 (#644)

This commit is contained in:
Antonio Orefice 2024-10-28 20:25:58 +01:00 committed by GitHub
parent 4f3d214b31
commit 66de8e522b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
120 changed files with 2846 additions and 4386 deletions

View File

@ -1,15 +1,14 @@
#reference "FXAA-bloom.slangp"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.39000"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_R = "0.070000"
BEZEL_G = "0.050000"
BEZEL_B = "0.035000"
BEZEL_CON = "2.180000"
BEZEL_REFL_STRENGTH = "0.40"
BEZEL_DIFFUSION_STR = "0.70"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "0.030000"
BEZEL_G = "0.010000"
BEZEL_B = "-0.005000"
BEZEL_CON = "1.0"
BEZEL_REFL_STRENGTH = "0.100000"
BEZEL_DIFFUSION_STR = "0.400000"
BEZEL_SPCL_STRENGTH = "0.3"
BEZEL_RFL_BLR_SHD = "-1.0"
BEZEL_RFL_BLR_SHD = "-0.4"
BEZEL_CORNER_DARK = "0.300000"
BEZEL_LIGHT_NO_FADEOUT = "1.0"
@ -36,5 +35,6 @@ DO_AMBILIGHT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_OFFY = "0.005500"
GLOBAL_ZOOM = "0.721996"

View File

@ -11,14 +11,19 @@ DO_BEZEL = "1.0"
DO_PIXELGRID = "0.000000"
DO_IN_GLOW = "1.0"
IN_GLOW_W = "7.0"
IN_GLOW_H = "7.0"
IN_GLOW_POWER = "1.0"
IN_GLOW_GAMMA = "2.200000"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
IN_GLOW_SPREAD = "1.500000"
IN_GLOW_SPREAD_SHARPNESS = "1.750000"
IN_GLOW_W = "-1.050000"
IN_GLOW_H = "-1.050000"
IN_GLOW_WARPSHARP_X = "0.400000"
IN_GLOW_WARPSHARP_Y = "0.400000"
DO_CCORRECTION = "1.0"
GAMMA_OUT = "0.5"
IN_GLOW_GAMMA = "2.2"
DO_VMASK_AND_DARKLINES = "0.0"

View File

@ -8,9 +8,15 @@ DO_CCORRECTION = "1.0"
DO_SHIFT_RGB = "1.0"
OFFSET_STRENGTH = "0.25"
SHIFT_R = "-20.0"
SHIFT_G = "1.0"
SHIFT_B = "20.0"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.0"
IN_GLOW_POWER = "1.825000"
@ -58,10 +64,10 @@ DO_BEZEL = "0.0"
BEZEL_G = "-0.19"
BEZEL_B = "-0.19"
BEZEL_CON = "2.18"
BEZEL_FRAME_ZOOM = "0.0"
BEZEL_INNER_ZOOM = "-0.215000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_VIGNETTE = "0.0"
V_SIZE = "1.08"

View File

@ -1,6 +1,5 @@
#reference "monitor-Commodore_1084S-Night.slangp"
BEZEL_INNER_ZOOM = "-0.3900"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.030000"
BG_IMAGE_OFFX = "0.001000"
@ -8,6 +7,8 @@ BG_IMAGE_OFFY = "0.001000"
BG_IMAGE_ZOOM = "1.110503"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFX = "-0.000500"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_ZOOM = "0.721999"

View File

@ -6,7 +6,7 @@ BEZEL_G = "-0.03"
BEZEL_B = "-0.045"
BEZEL_LIGHT_NO_FADEOUT = "1.0"
BEZEL_REFL_STRENGTH = "0.4"
BEZEL_REFL_STRENGTH = "0.16"
BEZEL_DIFFUSION_STR = "0.6"
BEZEL_SPCL_STRENGTH = "0.3"
BEZEL_CORNER_DARK = "0.400000"

View File

@ -1,7 +1,6 @@
#reference "monitor-Commodore_1084S.slangp"
BEZEL_INNER_ZOOM = "-0.39"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.030000"
BG_IMAGE_OFFX = "0.001000"
@ -9,6 +8,6 @@ BG_IMAGE_OFFY = "0.001000"
BG_IMAGE_ZOOM = "1.110503"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_OFFX = "0.000000"
GLOBAL_OFFY = "0.004000"
GLOBAL_ZOOM = "0.723001"

View File

@ -15,17 +15,20 @@ DO_CURVATURE = "1.000000"
GEOM_CORNER_SMOOTH = "150.000000"
DO_BEZEL = "1.000000"
BEZEL_R = "0.070000"
BEZEL_G = "0.050000"
BEZEL_B = "0.035000"
BEZEL_INNER_ZOOM = "-0.5200"
BEZEL_FRAME_ZOOM = "-0.245000"
BEZEL_R = "-0.010000"
BEZEL_G = "-0.030000"
BEZEL_B = "-0.045000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.040000"
BEZEL_RFL_OFFSET = "-0.003000"
BEZEL_REFL_STRENGTH = "0.3"
BEZEL_REFL_STRENGTH = "0.200000"
BEZEL_SPCL_STRENGTH = "0.25"
BEZEL_ROUGHNESS = "2.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.660998"
GLOBAL_OFFY = "0.000500"
DO_VIGNETTE = "1.0"
V_POWER = "1.0"
V_SIZE = "0.8"

View File

@ -3,11 +3,13 @@
DO_BLOOM = "1.0"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
# Since SCANLINE_SM_TYPE ="1.0" mitigates moiree,
# but is not used in this preset, use the following to mitigate, instead:
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"
#mitigates moire:
PIXELGRID_MIN_H = "0.250000"
PIXELGRID_MAX_H = "0.700000"

View File

@ -3,7 +3,8 @@
PIXELGRID_MIN_H = "0.200000"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -3,7 +3,7 @@ BEZEL_R = "-0.115000"
BEZEL_G = "-0.115000"
BEZEL_B = "-0.115000"
BEZEL_CON = "4.000000"
BEZEL_REFL_STRENGTH = "1.0"
BEZEL_REFL_STRENGTH = "0.5"
BEZEL_ROUGHNESS = "1.300000"
BEZEL_RFL_BLR_SHD = "0.800000"
BEZEL_DIFFUSION_STR = "0.500000"

View File

@ -1,8 +1,7 @@
#reference "monitor-slotmask-bloom.slangp"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
DO_CURVATURE = 1.0
@ -12,3 +11,6 @@ DO_SPOT = "1.0"
GEOM_CORNER_SIZE = 0.005
GEOM_CORNER_SMOOTH = "150"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -1,9 +1,8 @@
#reference "monitor-slotmask.slangp"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_IMAGE_BORDER = "1.02"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_BLOOM = "1.0"
@ -13,3 +12,6 @@ DO_VIGNETTE = "1.0"
GEOM_CORNER_SIZE = 0.005
GEOM_CORNER_SMOOTH = "150"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -17,10 +17,15 @@ DO_SAT_BLEED = "0.000000"
DO_SHIFT_RGB = "1.0"
OFFSET_STRENGTH = "0.25"
SHIFT_R = "-20.0"
SHIFT_G = "1.0"
SHIFT_B = "20.0"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_SCANLINES = "0.0"
SCANLINE_DARK = "0.700000"
SCANLINE_COMPENSATION = "0.200000"
@ -61,13 +66,14 @@ DO_CURVATURE = "1.0"
DO_BEZEL = "0.0"
BEZEL_R = "-0.19"
BEZEL_G = "-0.19"
BEZEL_B = "-0.19"
BEZEL_CON = "2.18"
BEZEL_FRAME_ZOOM = "0.0"
BEZEL_INNER_ZOOM = "-0.163"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_R = "-0.19"
BEZEL_G = "-0.19"
BEZEL_B = "-0.19"
BEZEL_CON = "2.18"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_AMBILIGHT = 1.0

View File

@ -8,7 +8,7 @@ NTSC_ARTF_NOBLUR = "0.70000"
NTSC_ARTF_NOBLEED = "0.700000"
IN_GLOW_SPREAD = "0.000000"
IN_GLOW_W = "0.350000"
IN_GLOW_W = "0.400000"
IN_GLOW_H = "1.000000"
SAT_BLEED_SIZE = "2.000000"

View File

@ -11,7 +11,7 @@ NTSC_ARTF_NOBLEED = "0.700000"
IN_GLOW_POWER = "2.000000"
IN_GLOW_GAMMA = "2.000000"
IN_GLOW_SPREAD = "0.000000"
IN_GLOW_W = "0.350000"
IN_GLOW_W = "0.400000"
IN_GLOW_H = "1.000000"
SAT_BLEED_SIZE = "2.000000"

View File

@ -15,6 +15,10 @@ DO_SAT_BLEED = "1.000000"
SAT_BLEED_FALLOFF = "1.7"
DOT_C = "1.0"
DOT_C_YUV = "1.0"
DOT_C_SPEED = "10.0"
IN_GLOW_POWER = "1.3"
IN_GLOW_BIAS = "1.0"
@ -22,15 +26,15 @@ HALO_POWER = "0.5"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_SPOT = "1.0"
DO_VIGNETTE = "1.0"
DO_RF_NOISE = "1.0"
RF_NOISE_STRENGTH = "0.025"
RF_NOISE_STRENGTH = "0.08"
RF_NOISE_SPARK = "0.08"
GEOM_CORNER_SIZE = 0.005
GEOM_CORNER_SMOOTH = "150"
@ -39,3 +43,6 @@ BLOOM_GAMMA = "5.000000"
BLOOM_GAMMA_OUT = "1.800000"
BLOOM_EYE_ADPT_SRT = "0.300000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -7,8 +7,7 @@ DO_BEZEL = "1.0"
BEZEL_G = "-0.3"
BEZEL_B = "-0.3"
BEZEL_CON = "1.3"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_CURVATURE = 1.0
@ -18,3 +17,5 @@ DO_CURVATURE = 1.0
DO_VIGNETTE = "1.0"
DO_SPOT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -2,8 +2,8 @@
DO_SHIFT_RGB = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -7,8 +7,6 @@ DO_CCORRECTION = "1.000000"
DO_FXAA = "1.000000"
RF_NOISE_STRENGTH = "0.025000"
SAT_BLEED_PAL = "1.000000"
SAT_BLEED_STRENGTH = "1.750000"
SAT_BLEED_SIZE = "3.000000"
@ -18,6 +16,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_POWER = "1.600000"
@ -41,12 +45,13 @@ DO_BLOOM = "1.000000"
GEOM_CORNER_SMOOTH = "150"
DO_BEZEL = "1.000000"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "-0.190000"
BEZEL_G = "-0.190000"
BEZEL_B = "-0.190000"
BEZEL_CON = "2.180000"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.08"
@ -65,3 +70,6 @@ DO_SPOT = "1.000000"
PIXELGRID_Y_MASK_ON_WHITE = "0.000000"
PIXELGRID_Y_MASK_STEEP = "8.000000"
PIXELGRID_Y_MASK_SHIFT = "0.12"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -7,8 +7,7 @@ DO_BEZEL = "1.0"
BEZEL_G = "-0.3"
BEZEL_B = "-0.3"
BEZEL_CON = "1.3"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
DO_CURVATURE = 1.0
GEOM_CORNER_SIZE = "0.005"
@ -17,3 +16,5 @@ DO_CURVATURE = 1.0
DO_VIGNETTE = "1.0"
DO_SPOT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -3,10 +3,12 @@
DO_SHIFT_RGB = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
BEZEL_RFL_BLR_SHD = "-0.200000"
DO_VIGNETTE = "1.0"
DO_SPOT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -20,6 +20,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "0.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_W = "-0.80000"
@ -95,9 +101,12 @@ DO_AMBILIGHT = 1.0
AMBI_OVER_BEZEL = "0.2"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_IMAGE_BORDER = "1.02"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_RFL_OFFSET = "0.001000"
BEZEL_REFL_ZOOM = "1.0"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -9,17 +9,18 @@ PIXELGRID_OFFSET_CORE = "0.12"
PIXELGRID_COREY_FAKE_SCAN = "-0.0"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.3900"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_R = "0.070000"
BEZEL_G = "0.050000"
BEZEL_B = "0.035000"
BEZEL_CON = "2.180000"
BEZEL_REFL_STRENGTH = "1.5"
BEZEL_DIFFUSION_STR = "0.5"
BEZEL_CORNER_DARK = "0.600000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "0.030000"
BEZEL_G = "0.010000"
BEZEL_B = "-0.005000"
BEZEL_CON = "1.0"
BEZEL_REFL_STRENGTH = "0.30"
BEZEL_DIFFUSION_STR = "0.600000"
BEZEL_CORNER_DARK = "0.500000"
BEZEL_SPCL_STRENGTH = "0.3"
BEZEL_ROUGHNESS = "2.0"
BEZEL_RFL_BLR_SHD = "-0.400000"
BEZEL_LIGHT_NO_FADEOUT = "1.0"
DO_BG_IMAGE = "1.000000"
BG_IMAGE_OVER = "1.000000"
@ -43,9 +44,11 @@ DO_BG_IMAGE = "1.000000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_OFFX = "0.000000"
GLOBAL_OFFY = "0.005500"
GLOBAL_ZOOM = "0.721996"
S_POWER = "0.056"

View File

@ -1,6 +1,6 @@
#reference "Base.slangp"
IN_GLOW_POWER = "1.875"
IN_GLOW_POWER = "1.6"
HALO_POWER = "0.450000"
DO_PIXELGRID = "1.000000"

View File

@ -1,13 +1,12 @@
#reference "Monitor-Screen_Hmask-Screen_SlotMask.slangp"
BEZEL_INNER_ZOOM = "-0.195"
BEZEL_FRAME_ZOOM = "0.021000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "-0.5"
BEZEL_G = "-0.5"
BEZEL_B = "-0.5"
BEZEL_CON = "0.87"
BEZEL_SPCL_STRENGTH = "0.200000"
BEZEL_RFL_BLR_SHD = "-1.5"
BEZEL_REFL_STRENGTH = "1.000000"
BEZEL_REFL_STRENGTH = "0.4"
BEZEL_DIFFUSION_STR = "0.600000"
BEZEL_LIGHT_NO_FADEOUT = "0.500000"
BEZEL_CORNER_DARK = "0.600000"
@ -20,3 +19,5 @@ AMBI_OVER_BEZEL_SIZE = "0.500000"
AMBI_STRETCH = "0.100000"
AMBI_OVER_BEZEL = "1.30000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -10,6 +10,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.500000"
IN_GLOW_SPREAD = "1.500000"
@ -47,9 +53,11 @@ DO_CURVATURE = "1.000000"
GEOM_CORNER_SIZE = "0.005"
GEOM_CORNER_SMOOTH = "150.000000"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.170000"
BEZEL_FRAME_ZOOM = "0.179000"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.000000"
DO_SPOT = "1.000000"
S_POWER = "0.056000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -12,6 +12,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
@ -35,8 +41,8 @@ DO_IN_GLOW = "1.000000"
PIXELGRID_Y_SPARK = "0.0"
PIXELGRID_Y_MASK_ON_WHITE = "0.5"
PIXELGRID_MIN_W = "0.25"
PIXELGRID_MAX_W = "0.25"
PIXELGRID_MIN_W = "0.33"
PIXELGRID_MAX_W = "0.33"
PIXELGRID_GAMMA_W = "4.2"
DO_HALO = "1.000000"
@ -54,3 +60,5 @@ DO_BLOOM = "1.000000"
BLOOM_EYE_ADPT_SRT = "0.600000"
BLOOM_EYE_INERTIA = "750.000000"
BLOOM_OVER_WHITE = "0.000000"
V_SIZE = "1.20"

View File

@ -0,0 +1,25 @@
#reference "Monitor-Screen_Hmask-Screen_SlotMask_Taller.slangp"
IN_GLOW_POWER = "3.000000"
IN_GLOW_GAMMA = "2.000000"
GAMMA_OUT = "0.450000"
DO_PIXELGRID_W = "0.950000"
PIXELGRID_H_PRST = "3.000000"
PIXELGRID_MIN_W = "0.050000"
PIXELGRID_MAX_W = "0.050000"
PIXELGRID_GAMMA_W = "8.000000"
PIXELGRID_Y_MASK = "0.300000"
DO_HALO = "1.0"
HALO_POWER = "0.000000"
HALO_GAMMA = "2.999998"
HALO_DO_MASK_HELPER = "1.000000"
DO_BLOOM = "1.0"
BLOOM_MIX = "0.300000"
BLOOM_SIZE = "1.000000"
BLOOM_GAMMA_OUT = "2.000000"
BLOOM_POWER = "1.000000"
BLOOM_EYE_ADPT_SRT = "0.000000"
BLOOM_OVER_WHITE = "0.500000"

View File

@ -12,6 +12,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "0.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_SPREAD = "0.000000"

View File

@ -12,7 +12,14 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "0.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_SPREAD = "4.000000"
IN_GLOW_W = "-0.799999"
@ -57,11 +64,12 @@ DO_CURVATURE = "1.000000"
GEOM_CORNER_SMOOTH = "150.000000"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.170000"
BEZEL_FRAME_ZOOM = "0.179000"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.080000"
DO_SPOT = "1.000000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -3,10 +3,13 @@ BEZEL_R = "0.090000"
BEZEL_G = "0.060000"
BEZEL_B = "0.025000"
BEZEL_CON = "3.0"
BEZEL_REFL_STRENGTH = "0.700000"
BEZEL_ROUGHNESS = "3.000002"
BEZEL_DIFFUSION_STR = "0.100000"
BEZEL_DIFFUSION_STR = "0.500000"
BEZEL_SPCL_STRENGTH = "0.100000"
BEZEL_REFL_STRENGTH = "0.100000"
BEZEL_RFL_BLR_SHD = "-1.500000"
DO_IN_GLOW = "0.000000"
PIXELGRID_INTR_DISABLE_Y = "2.000000"

View File

@ -9,9 +9,15 @@ TEMPERATURE = "6500"
OFFSET_STRENGTH = "0.300000"
SHIFT_R = "20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_POWER = "1.6"
IN_GLOW_GAMMA = "2.000000"

View File

@ -1,66 +0,0 @@
#reference "Base.slangp"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "1.50000"
IN_GLOW_GAMMA = "2.000000"
GAMMA_OUT = "0.310000"
LUMINANCE = "0.0"
DO_SHIFT_RGB = "1.000000"
OFFSET_STRENGTH = "0.300000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
IN_GLOW_SPREAD = "2.350002"
IN_GLOW_W = "-0.599999"
IN_GLOW_H = "7.000000"
DO_PIXELGRID = "1.000000"
PIXELGRID_H_PRST = "1.000000"
PIXELGRID_MIN_W = "0.200000"
PIXELGRID_MAX_W = "0.400000"
PIXELGRID_MUL_X = "2.000000"
PIXELGRID_GAMMA_W = "4.2"
PIXELGRID_BASAL_GRID = "0.020000"
PIXELGRID_MIN_H = "0.300000"
PIXELGRID_MAX_H = "0.950000"
PIXELGRID_GAMMA_H = "5.2"
PIXELGRID_DECON_R_H = "-0.400000"
PIXELGRID_DECON_B_H = "0.400000"
PIXELGRID_Y_MASK = "0.480000"
PIXELGRID_Y_MASK_COORDS = "1.0"
PIXELGRID_Y_MASK_SHIFT = "0.0"
PIXELGRID_Y_MASK_HEIGHT = "0.625000"
PIXELGRID_Y_MASK_ON_WHITE = "0.670000"
//PIXELGRID_Y_MASK_STEEP = "1.000000"
PIXELGRID_Y_MASK_STEEP = "2.000000"
PIXELGRID_Y_SPARK = "1.5"
DO_HALO = "1.000000"
HALO_NO_PREGAIN = "1.000000"
HALO_POWER = "0.1"
HALO_SHARPNESS = "7.000000"
HALO_GAMMA = "1.999999"
HALO_VS_SCAN = "0.500000"
DO_BLOOM = "1.000000"
BLOOM_MIX = "0.200000"
BLOOM_GAMMA = "2.000000"
BLOOM_POWER = "1.500000"
BLOOM_OVER_WHITE = "0.000000"
DO_VIGNETTE = "1.000000"
DO_SPOT = "1.000000"

View File

@ -1,7 +1,66 @@
#reference "Monitor-for_HiNits.slangp"
#reference "Base.slangp"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "1.6"
IN_GLOW_GAMMA = "2.000000"
GAMMA_OUT = "0.320000"
LUMINANCE = "0.0"
DO_SHIFT_RGB = "1.000000"
OFFSET_STRENGTH = "0.300000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
IN_GLOW_SPREAD = "2.350002"
IN_GLOW_W = "-0.599999"
IN_GLOW_H = "7.000000"
DO_PIXELGRID = "1.000000"
PIXELGRID_H_PRST = "1.000000"
PIXELGRID_MIN_W = "0.200000"
PIXELGRID_MAX_W = "0.400000"
PIXELGRID_MUL_X = "2.000000"
PIXELGRID_GAMMA_W = "4.2"
PIXELGRID_BASAL_GRID = "0.020000"
PIXELGRID_MIN_H = "0.300000"
PIXELGRID_MAX_H = "0.950000"
PIXELGRID_GAMMA_H = "5.2"
PIXELGRID_DECON_R_H = "-0.400000"
PIXELGRID_DECON_B_H = "0.400000"
PIXELGRID_Y_MASK = "0.480000"
PIXELGRID_Y_MASK_COORDS = "1.0"
PIXELGRID_Y_MASK_SHIFT = "0.0"
PIXELGRID_Y_MASK_HEIGHT = "0.625000"
PIXELGRID_Y_MASK_ON_WHITE = "0.670000"
PIXELGRID_Y_MASK_STEEP = "2.000000"
PIXELGRID_Y_SPARK = "0.250000"
DO_HALO = "0.000000"
DO_BLOOM = "1.000000"
BLOOM_MIX = "0.200000"
BLOOM_GAMMA = "2.000000"
BLOOM_POWER = "1.500000"
BLOOM_OVER_WHITE = "0.000000"
DO_VIGNETTE = "1.000000"
DO_SPOT = "1.000000"
PIXELGRID_Y_SPARK = "0.250000"
IN_GLOW_POWER = "1.6"
GAMMA_OUT = "0.320000"
DO_HALO = "0.0"

View File

@ -5,7 +5,7 @@ bg_over = "../textures/overlays/gba.jpg"
DO_CCORRECTION = "1.000000"
GAMMA_OUT = "0.45000"
GAMMA_OUT = "0.40000"
LUMINANCE = "0.100000"
IN_GLOW_POWER = "1.200001"
ADAPTIVE_BLACK = "0.0"

View File

@ -5,8 +5,9 @@ bg_under = "../textures/overlays/psp-e1000.jpg"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "1.300001"
TEMPERATURE = "6500.000000"
GAMMA_OUT = "1.000000"
GAMMA_OUT = "1.0"
IN_GLOW_GAMMA = "1.0"
DO_GLOW = "0.0"
IN_GLOW_W = "7.000000"
IN_GLOW_H = "7.000000"

View File

@ -1,15 +1,14 @@
#reference "FXAA-bloom.slangp"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.39000"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_R = "0.070000"
BEZEL_G = "0.050000"
BEZEL_B = "0.035000"
BEZEL_CON = "2.180000"
BEZEL_REFL_STRENGTH = "0.40"
BEZEL_DIFFUSION_STR = "0.70"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "0.030000"
BEZEL_G = "0.010000"
BEZEL_B = "-0.005000"
BEZEL_CON = "1.0"
BEZEL_REFL_STRENGTH = "0.100000"
BEZEL_DIFFUSION_STR = "0.400000"
BEZEL_SPCL_STRENGTH = "0.3"
BEZEL_RFL_BLR_SHD = "-1.0"
BEZEL_RFL_BLR_SHD = "-0.4"
BEZEL_CORNER_DARK = "0.300000"
BEZEL_LIGHT_NO_FADEOUT = "1.0"
@ -36,5 +35,6 @@ DO_AMBILIGHT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_OFFY = "0.005500"
GLOBAL_ZOOM = "0.721996"

View File

@ -11,14 +11,19 @@ DO_BEZEL = "1.0"
DO_PIXELGRID = "0.000000"
DO_IN_GLOW = "1.0"
IN_GLOW_W = "7.0"
IN_GLOW_H = "7.0"
IN_GLOW_POWER = "1.0"
IN_GLOW_GAMMA = "2.200000"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
IN_GLOW_SPREAD = "1.500000"
IN_GLOW_SPREAD_SHARPNESS = "1.750000"
IN_GLOW_W = "-1.050000"
IN_GLOW_H = "-1.050000"
IN_GLOW_WARPSHARP_X = "0.400000"
IN_GLOW_WARPSHARP_Y = "0.400000"
DO_CCORRECTION = "1.0"
GAMMA_OUT = "0.5"
IN_GLOW_GAMMA = "2.2"
DO_VMASK_AND_DARKLINES = "0.0"

View File

@ -8,9 +8,15 @@ DO_CCORRECTION = "1.0"
DO_SHIFT_RGB = "1.0"
OFFSET_STRENGTH = "0.25"
SHIFT_R = "-20.0"
SHIFT_G = "1.0"
SHIFT_B = "20.0"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.0"
IN_GLOW_POWER = "1.825000"
@ -58,10 +64,10 @@ DO_BEZEL = "0.0"
BEZEL_G = "-0.19"
BEZEL_B = "-0.19"
BEZEL_CON = "2.18"
BEZEL_FRAME_ZOOM = "0.0"
BEZEL_INNER_ZOOM = "-0.215000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_VIGNETTE = "0.0"
V_SIZE = "1.08"

View File

@ -1,6 +1,5 @@
#reference "monitor-Commodore_1084S-Night.slangp"
BEZEL_INNER_ZOOM = "-0.3900"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.030000"
BG_IMAGE_OFFX = "0.001000"
@ -8,6 +7,8 @@ BG_IMAGE_OFFY = "0.001000"
BG_IMAGE_ZOOM = "1.110503"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFX = "-0.000500"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_ZOOM = "0.721999"

View File

@ -6,7 +6,7 @@ BEZEL_G = "-0.03"
BEZEL_B = "-0.045"
BEZEL_LIGHT_NO_FADEOUT = "1.0"
BEZEL_REFL_STRENGTH = "0.4"
BEZEL_REFL_STRENGTH = "0.16"
BEZEL_DIFFUSION_STR = "0.6"
BEZEL_SPCL_STRENGTH = "0.3"
BEZEL_CORNER_DARK = "0.400000"

View File

@ -1,7 +1,6 @@
#reference "monitor-Commodore_1084S.slangp"
BEZEL_INNER_ZOOM = "-0.39"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.030000"
BG_IMAGE_OFFX = "0.001000"
@ -9,6 +8,6 @@ BG_IMAGE_OFFY = "0.001000"
BG_IMAGE_ZOOM = "1.110503"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_OFFX = "0.000000"
GLOBAL_OFFY = "0.004000"
GLOBAL_ZOOM = "0.723001"

View File

@ -15,17 +15,20 @@ DO_CURVATURE = "1.000000"
GEOM_CORNER_SMOOTH = "150.000000"
DO_BEZEL = "1.000000"
BEZEL_R = "0.070000"
BEZEL_G = "0.050000"
BEZEL_B = "0.035000"
BEZEL_INNER_ZOOM = "-0.5200"
BEZEL_FRAME_ZOOM = "-0.245000"
BEZEL_R = "-0.010000"
BEZEL_G = "-0.030000"
BEZEL_B = "-0.045000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.040000"
BEZEL_RFL_OFFSET = "-0.003000"
BEZEL_REFL_STRENGTH = "0.3"
BEZEL_REFL_STRENGTH = "0.200000"
BEZEL_SPCL_STRENGTH = "0.25"
BEZEL_ROUGHNESS = "2.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.660998"
GLOBAL_OFFY = "0.000500"
DO_VIGNETTE = "1.0"
V_POWER = "1.0"
V_SIZE = "0.8"

View File

@ -3,11 +3,13 @@
DO_BLOOM = "1.0"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
# Since SCANLINE_SM_TYPE ="1.0" mitigates moiree,
# but is not used in this preset, use the following to mitigate, instead:
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"
#mitigates moire:
PIXELGRID_MIN_H = "0.250000"
PIXELGRID_MAX_H = "0.700000"

View File

@ -3,7 +3,8 @@
PIXELGRID_MIN_H = "0.200000"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -3,7 +3,7 @@ BEZEL_R = "-0.115000"
BEZEL_G = "-0.115000"
BEZEL_B = "-0.115000"
BEZEL_CON = "4.000000"
BEZEL_REFL_STRENGTH = "1.0"
BEZEL_REFL_STRENGTH = "0.5"
BEZEL_ROUGHNESS = "1.300000"
BEZEL_RFL_BLR_SHD = "0.800000"
BEZEL_DIFFUSION_STR = "0.500000"

View File

@ -1,8 +1,7 @@
#reference "monitor-slotmask-bloom.slangp"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
DO_CURVATURE = 1.0
@ -12,3 +11,6 @@ DO_SPOT = "1.0"
GEOM_CORNER_SIZE = 0.005
GEOM_CORNER_SMOOTH = "150"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -1,9 +1,8 @@
#reference "monitor-slotmask.slangp"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_IMAGE_BORDER = "1.02"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_BLOOM = "1.0"
@ -13,3 +12,6 @@ DO_VIGNETTE = "1.0"
GEOM_CORNER_SIZE = 0.005
GEOM_CORNER_SMOOTH = "150"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -17,10 +17,15 @@ DO_SAT_BLEED = "0.000000"
DO_SHIFT_RGB = "1.0"
OFFSET_STRENGTH = "0.25"
SHIFT_R = "-20.0"
SHIFT_G = "1.0"
SHIFT_B = "20.0"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_SCANLINES = "0.0"
SCANLINE_DARK = "0.700000"
SCANLINE_COMPENSATION = "0.200000"
@ -61,13 +66,14 @@ DO_CURVATURE = "1.0"
DO_BEZEL = "0.0"
BEZEL_R = "-0.19"
BEZEL_G = "-0.19"
BEZEL_B = "-0.19"
BEZEL_CON = "2.18"
BEZEL_FRAME_ZOOM = "0.0"
BEZEL_INNER_ZOOM = "-0.163"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_R = "-0.19"
BEZEL_G = "-0.19"
BEZEL_B = "-0.19"
BEZEL_CON = "2.18"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_AMBILIGHT = 1.0

View File

@ -8,7 +8,7 @@ NTSC_ARTF_NOBLUR = "0.70000"
NTSC_ARTF_NOBLEED = "0.700000"
IN_GLOW_SPREAD = "0.000000"
IN_GLOW_W = "0.350000"
IN_GLOW_W = "0.400000"
IN_GLOW_H = "1.000000"
SAT_BLEED_SIZE = "2.000000"

View File

@ -11,7 +11,7 @@ NTSC_ARTF_NOBLEED = "0.700000"
IN_GLOW_POWER = "2.000000"
IN_GLOW_GAMMA = "2.000000"
IN_GLOW_SPREAD = "0.000000"
IN_GLOW_W = "0.350000"
IN_GLOW_W = "0.400000"
IN_GLOW_H = "1.000000"
SAT_BLEED_SIZE = "2.000000"

View File

@ -15,6 +15,10 @@ DO_SAT_BLEED = "1.000000"
SAT_BLEED_FALLOFF = "1.7"
DOT_C = "1.0"
DOT_C_YUV = "1.0"
DOT_C_SPEED = "10.0"
IN_GLOW_POWER = "1.3"
IN_GLOW_BIAS = "1.0"
@ -22,15 +26,15 @@ HALO_POWER = "0.5"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_SPOT = "1.0"
DO_VIGNETTE = "1.0"
DO_RF_NOISE = "1.0"
RF_NOISE_STRENGTH = "0.025"
RF_NOISE_STRENGTH = "0.08"
RF_NOISE_SPARK = "0.08"
GEOM_CORNER_SIZE = 0.005
GEOM_CORNER_SMOOTH = "150"
@ -39,3 +43,6 @@ BLOOM_GAMMA = "5.000000"
BLOOM_GAMMA_OUT = "1.800000"
BLOOM_EYE_ADPT_SRT = "0.300000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -7,8 +7,7 @@ DO_BEZEL = "1.0"
BEZEL_G = "-0.3"
BEZEL_B = "-0.3"
BEZEL_CON = "1.3"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_CURVATURE = 1.0
@ -18,3 +17,5 @@ DO_CURVATURE = 1.0
DO_VIGNETTE = "1.0"
DO_SPOT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -2,8 +2,8 @@
DO_SHIFT_RGB = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -7,8 +7,6 @@ DO_CCORRECTION = "1.000000"
DO_FXAA = "1.000000"
RF_NOISE_STRENGTH = "0.025000"
SAT_BLEED_PAL = "1.000000"
SAT_BLEED_STRENGTH = "1.750000"
SAT_BLEED_SIZE = "3.000000"
@ -18,6 +16,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_POWER = "1.600000"
@ -41,12 +45,13 @@ DO_BLOOM = "1.000000"
GEOM_CORNER_SMOOTH = "150"
DO_BEZEL = "1.000000"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "-0.190000"
BEZEL_G = "-0.190000"
BEZEL_B = "-0.190000"
BEZEL_CON = "2.180000"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.08"
@ -65,3 +70,6 @@ DO_SPOT = "1.000000"
PIXELGRID_Y_MASK_ON_WHITE = "0.000000"
PIXELGRID_Y_MASK_STEEP = "8.000000"
PIXELGRID_Y_MASK_SHIFT = "0.12"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -7,8 +7,7 @@ DO_BEZEL = "1.0"
BEZEL_G = "-0.3"
BEZEL_B = "-0.3"
BEZEL_CON = "1.3"
BEZEL_FRAME_ZOOM = "0.04"
BEZEL_INNER_ZOOM = "-0.17"
BEZEL_FRAME_ZOOM = "0.179000"
DO_CURVATURE = 1.0
GEOM_CORNER_SIZE = "0.005"
@ -17,3 +16,5 @@ DO_CURVATURE = 1.0
DO_VIGNETTE = "1.0"
DO_SPOT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -3,10 +3,12 @@
DO_SHIFT_RGB = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_IMAGE_BORDER = "1.02"
BEZEL_RFL_BLR_SHD = "-0.200000"
DO_VIGNETTE = "1.0"
DO_SPOT = "1.0"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -20,6 +20,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "0.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_W = "-0.80000"
@ -95,9 +101,12 @@ DO_AMBILIGHT = 1.0
AMBI_OVER_BEZEL = "0.2"
DO_BEZEL = "1.0"
BEZEL_FRAME_ZOOM = "0.17"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_IMAGE_BORDER = "1.02"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_RFL_BLR_SHD = "-0.200000"
BEZEL_RFL_OFFSET = "0.001000"
BEZEL_REFL_ZOOM = "1.0"
BEZEL_REFL_STRENGTH = "0.25"
BEZEL_DIFFUSION_STR = "0.10"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -9,17 +9,18 @@ PIXELGRID_OFFSET_CORE = "0.12"
PIXELGRID_COREY_FAKE_SCAN = "-0.0"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.3900"
BEZEL_FRAME_ZOOM = "-0.140000"
BEZEL_R = "0.070000"
BEZEL_G = "0.050000"
BEZEL_B = "0.035000"
BEZEL_CON = "2.180000"
BEZEL_REFL_STRENGTH = "1.5"
BEZEL_DIFFUSION_STR = "0.5"
BEZEL_CORNER_DARK = "0.600000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "0.030000"
BEZEL_G = "0.010000"
BEZEL_B = "-0.005000"
BEZEL_CON = "1.0"
BEZEL_REFL_STRENGTH = "0.30"
BEZEL_DIFFUSION_STR = "0.600000"
BEZEL_CORNER_DARK = "0.500000"
BEZEL_SPCL_STRENGTH = "0.3"
BEZEL_ROUGHNESS = "2.0"
BEZEL_RFL_BLR_SHD = "-0.400000"
BEZEL_LIGHT_NO_FADEOUT = "1.0"
DO_BG_IMAGE = "1.000000"
BG_IMAGE_OVER = "1.000000"
@ -43,9 +44,11 @@ DO_BG_IMAGE = "1.000000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_OFFX = "-0.001000"
GLOBAL_OFFY = "0.006000"
GLOBAL_ZOOM = "1.000000"
GLOBAL_OFFX = "0.000000"
GLOBAL_OFFY = "0.005500"
GLOBAL_ZOOM = "0.721996"
S_POWER = "0.056"

View File

@ -1,6 +1,6 @@
#reference "Base.slangp"
IN_GLOW_POWER = "1.875"
IN_GLOW_POWER = "1.6"
HALO_POWER = "0.450000"
DO_PIXELGRID = "1.000000"

View File

@ -1,13 +1,12 @@
#reference "Monitor-Screen_Hmask-Screen_SlotMask.slangp"
BEZEL_INNER_ZOOM = "-0.195"
BEZEL_FRAME_ZOOM = "0.021000"
BEZEL_FRAME_ZOOM = "0.179000"
BEZEL_R = "-0.5"
BEZEL_G = "-0.5"
BEZEL_B = "-0.5"
BEZEL_CON = "0.87"
BEZEL_SPCL_STRENGTH = "0.200000"
BEZEL_RFL_BLR_SHD = "-1.5"
BEZEL_REFL_STRENGTH = "1.000000"
BEZEL_REFL_STRENGTH = "0.4"
BEZEL_DIFFUSION_STR = "0.600000"
BEZEL_LIGHT_NO_FADEOUT = "0.500000"
BEZEL_CORNER_DARK = "0.600000"
@ -20,3 +19,5 @@ AMBI_OVER_BEZEL_SIZE = "0.500000"
AMBI_STRETCH = "0.100000"
AMBI_OVER_BEZEL = "1.30000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.857"

View File

@ -10,6 +10,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.500000"
IN_GLOW_SPREAD = "1.500000"
@ -47,9 +53,11 @@ DO_CURVATURE = "1.000000"
GEOM_CORNER_SIZE = "0.005"
GEOM_CORNER_SMOOTH = "150.000000"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.170000"
BEZEL_FRAME_ZOOM = "0.179000"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.000000"
DO_SPOT = "1.000000"
S_POWER = "0.056000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -12,6 +12,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
@ -35,8 +41,8 @@ DO_IN_GLOW = "1.000000"
PIXELGRID_Y_SPARK = "0.0"
PIXELGRID_Y_MASK_ON_WHITE = "0.5"
PIXELGRID_MIN_W = "0.25"
PIXELGRID_MAX_W = "0.25"
PIXELGRID_MIN_W = "0.33"
PIXELGRID_MAX_W = "0.33"
PIXELGRID_GAMMA_W = "4.2"
DO_HALO = "1.000000"
@ -54,3 +60,5 @@ DO_BLOOM = "1.000000"
BLOOM_EYE_ADPT_SRT = "0.600000"
BLOOM_EYE_INERTIA = "750.000000"
BLOOM_OVER_WHITE = "0.000000"
V_SIZE = "1.20"

View File

@ -0,0 +1,25 @@
#reference "Monitor-Screen_Hmask-Screen_SlotMask_Taller.slangp"
IN_GLOW_POWER = "3.000000"
IN_GLOW_GAMMA = "2.000000"
GAMMA_OUT = "0.450000"
DO_PIXELGRID_W = "0.950000"
PIXELGRID_H_PRST = "3.000000"
PIXELGRID_MIN_W = "0.050000"
PIXELGRID_MAX_W = "0.050000"
PIXELGRID_GAMMA_W = "8.000000"
PIXELGRID_Y_MASK = "0.300000"
DO_HALO = "1.0"
HALO_POWER = "0.000000"
HALO_GAMMA = "2.999998"
HALO_DO_MASK_HELPER = "1.000000"
DO_BLOOM = "1.0"
BLOOM_MIX = "0.300000"
BLOOM_SIZE = "1.000000"
BLOOM_GAMMA_OUT = "2.000000"
BLOOM_POWER = "1.000000"
BLOOM_EYE_ADPT_SRT = "0.000000"
BLOOM_OVER_WHITE = "0.500000"

View File

@ -12,6 +12,12 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "0.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_SPREAD = "0.000000"

View File

@ -12,7 +12,14 @@ DO_SHIFT_RGB = "1.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "0.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_SPREAD = "4.000000"
IN_GLOW_W = "-0.799999"
@ -57,11 +64,12 @@ DO_CURVATURE = "1.000000"
GEOM_CORNER_SMOOTH = "150.000000"
DO_BEZEL = "1.000000"
BEZEL_INNER_ZOOM = "-0.011"
BEZEL_FRAME_ZOOM = "0.170000"
BEZEL_FRAME_ZOOM = "0.179000"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.080000"
DO_SPOT = "1.000000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.991500"

View File

@ -3,10 +3,13 @@ BEZEL_R = "0.090000"
BEZEL_G = "0.060000"
BEZEL_B = "0.025000"
BEZEL_CON = "3.0"
BEZEL_REFL_STRENGTH = "0.700000"
BEZEL_ROUGHNESS = "3.000002"
BEZEL_DIFFUSION_STR = "0.100000"
BEZEL_DIFFUSION_STR = "0.500000"
BEZEL_SPCL_STRENGTH = "0.100000"
BEZEL_REFL_STRENGTH = "0.100000"
BEZEL_RFL_BLR_SHD = "-1.500000"
DO_IN_GLOW = "0.000000"
PIXELGRID_INTR_DISABLE_Y = "2.000000"

View File

@ -9,9 +9,15 @@ TEMPERATURE = "6500"
OFFSET_STRENGTH = "0.300000"
SHIFT_R = "20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
SHIFT_R = "-20.000000"
SHIFT_G = "1.000000"
SHIFT_B = "20.000000"
DECON_RX = "0.0"
DECON_RY = "-1.0"
DECON_GX = "1.0"
DECON_GY = "0.0"
DECON_BX = "0.0"
DECON_BY = "1.0"
DO_IN_GLOW = "1.000000"
IN_GLOW_POWER = "1.6"
IN_GLOW_GAMMA = "2.000000"

View File

@ -1,66 +0,0 @@
#reference "Base.slangp"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "1.50000"
IN_GLOW_GAMMA = "2.000000"
GAMMA_OUT = "0.310000"
LUMINANCE = "0.0"
DO_SHIFT_RGB = "1.000000"
OFFSET_STRENGTH = "0.300000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
IN_GLOW_SPREAD = "2.350002"
IN_GLOW_W = "-0.599999"
IN_GLOW_H = "7.000000"
DO_PIXELGRID = "1.000000"
PIXELGRID_H_PRST = "1.000000"
PIXELGRID_MIN_W = "0.200000"
PIXELGRID_MAX_W = "0.400000"
PIXELGRID_MUL_X = "2.000000"
PIXELGRID_GAMMA_W = "4.2"
PIXELGRID_BASAL_GRID = "0.020000"
PIXELGRID_MIN_H = "0.300000"
PIXELGRID_MAX_H = "0.950000"
PIXELGRID_GAMMA_H = "5.2"
PIXELGRID_DECON_R_H = "-0.400000"
PIXELGRID_DECON_B_H = "0.400000"
PIXELGRID_Y_MASK = "0.480000"
PIXELGRID_Y_MASK_COORDS = "1.0"
PIXELGRID_Y_MASK_SHIFT = "0.0"
PIXELGRID_Y_MASK_HEIGHT = "0.625000"
PIXELGRID_Y_MASK_ON_WHITE = "0.670000"
//PIXELGRID_Y_MASK_STEEP = "1.000000"
PIXELGRID_Y_MASK_STEEP = "2.000000"
PIXELGRID_Y_SPARK = "1.5"
DO_HALO = "1.000000"
HALO_NO_PREGAIN = "1.000000"
HALO_POWER = "0.1"
HALO_SHARPNESS = "7.000000"
HALO_GAMMA = "1.999999"
HALO_VS_SCAN = "0.500000"
DO_BLOOM = "1.000000"
BLOOM_MIX = "0.200000"
BLOOM_GAMMA = "2.000000"
BLOOM_POWER = "1.500000"
BLOOM_OVER_WHITE = "0.000000"
DO_VIGNETTE = "1.000000"
DO_SPOT = "1.000000"

View File

@ -1,7 +1,66 @@
#reference "Monitor-for_HiNits.slangp"
#reference "Base.slangp"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "1.6"
IN_GLOW_GAMMA = "2.000000"
GAMMA_OUT = "0.320000"
LUMINANCE = "0.0"
DO_SHIFT_RGB = "1.000000"
OFFSET_STRENGTH = "0.300000"
SHIFT_R = "-20.000000"
SHIFT_G = "0.000000"
SHIFT_B = "20.000000"
DO_IN_GLOW = "1.000000"
IN_GLOW_BIAS = "0.000000"
IN_GLOW_SPREAD = "2.350002"
IN_GLOW_W = "-0.599999"
IN_GLOW_H = "7.000000"
DO_PIXELGRID = "1.000000"
PIXELGRID_H_PRST = "1.000000"
PIXELGRID_MIN_W = "0.200000"
PIXELGRID_MAX_W = "0.400000"
PIXELGRID_MUL_X = "2.000000"
PIXELGRID_GAMMA_W = "4.2"
PIXELGRID_BASAL_GRID = "0.020000"
PIXELGRID_MIN_H = "0.300000"
PIXELGRID_MAX_H = "0.950000"
PIXELGRID_GAMMA_H = "5.2"
PIXELGRID_DECON_R_H = "-0.400000"
PIXELGRID_DECON_B_H = "0.400000"
PIXELGRID_Y_MASK = "0.480000"
PIXELGRID_Y_MASK_COORDS = "1.0"
PIXELGRID_Y_MASK_SHIFT = "0.0"
PIXELGRID_Y_MASK_HEIGHT = "0.625000"
PIXELGRID_Y_MASK_ON_WHITE = "0.670000"
PIXELGRID_Y_MASK_STEEP = "2.000000"
PIXELGRID_Y_SPARK = "0.250000"
DO_HALO = "0.000000"
DO_BLOOM = "1.000000"
BLOOM_MIX = "0.200000"
BLOOM_GAMMA = "2.000000"
BLOOM_POWER = "1.500000"
BLOOM_OVER_WHITE = "0.000000"
DO_VIGNETTE = "1.000000"
DO_SPOT = "1.000000"
PIXELGRID_Y_SPARK = "0.250000"
IN_GLOW_POWER = "1.6"
GAMMA_OUT = "0.320000"
DO_HALO = "0.0"

View File

@ -5,8 +5,9 @@ bg_under = "../../textures/overlays/psp-e1000.jpg"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "1.300001"
TEMPERATURE = "6500.000000"
GAMMA_OUT = "1.000000"
GAMMA_OUT = "1.0"
IN_GLOW_GAMMA = "1.0"
DO_GLOW = "0.0"
IN_GLOW_W = "7.000000"
IN_GLOW_H = "7.000000"

View File

@ -24,7 +24,7 @@
# - The blue channel represents the part of the bezel that will be filled by the game reflection.
textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop"
textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop;sideshade"
monitor_body_curved = "../textures/monitor_body_curved.png"
monitor_body_curved_linear = "true"
@ -48,11 +48,15 @@
bg_over_wrap_mode = "mirrored_repeat"
bg_over_mipmap = "false"
#This is for support for arcade backdrop pictures, enable it in config.inc.
backdrop = "../textures/boothill.jpg"
backdrop_linear = "true"
backdrop_wrap_mode = "mirrored_repeat"
backdrop_mipmap = "true"
backdrop_mipmap = "false"
sideshade = "../textures/side_shade-helper.png"
sideshade_linear = "true"
sideshade_wrap_mode = "mirrored_repeat"
sideshade_mipmap = "false"
shaders = 17
@ -80,8 +84,14 @@ shaders = 17
// previous pass (Original, in this case).
// However it seems that those metadatas are applied to the feedback of the pass itself.
// Now, since we need to compare colortools_and_ntsc_pass and colortools_and_ntsc_passFeedback
// for Deltarender purposes, it is important that they share the same filtering and wrap mode.
// Hence, we have to set the following as the same of float_framebuffer0,filter_linear0 and wrap_mode0
// for Deltarender purposes, it is important that they share the same filtering and wrap mode:
// colortools_and_ntsc_pass wrap_mode and filter_linear_mode
// are set by flick_and_noise_pass (the next one)
// colortools_and_ntsc_passFeedback wrap_mode and filter_linear_mode
// are set by colortools_and_ntsc_pass (the this pass)
// Hence, we have to set colortools_and_ntsc_pass and flick_and_noise_pass with the same filter and wrap_mode
float_framebuffer0 = "true"
filter_linear0 = "true"
wrap_mode0 = "mirrored_repeat"
@ -91,16 +101,12 @@ float_framebuffer0 = "true"
# This pass emulates the flickering observed on crts when the input signal is interlaced
# and there is high brightness difference between adiacent scanlines.
# It also emulates the RF noise.
#
# Note that the wrap_mode is set to "mirrored_repeat".
# This allow to cheaply generate a mirrored image that will be used later on to
# draw reflections on the bezel.
#
# Also, it upscales the input signal to 2X.
# This is needed because FXAA, the glow and the halo pass works best with at least 640x480 resolution.
# Note that this is needed only for lowres content, but if the input signal is already at that
# size, there is no need to scale to 2x, and it is possible to gain performance by turning
# scale_x1 and scale_y1 from 2.0 to 1.0.
# Also, it upscales the input signal to 2X and optionally applies an edge smoothing algorithm.
# Koko-aio will then work internally at 2X, which is needed by several following filters.
# However, if the input signal is already at sufficient resolution, there is no need to scale to 2x
# and it is possible to gain performance by turning the scale to 1x.
#
# A special note for P-UAE core (Commodore Amiga), is needed, because it outputs by default to
# 720 pixel width and about 280p; this means that for P-UAE you can use scale_x1 = 1.0
@ -109,76 +115,53 @@ float_framebuffer0 = "true"
# But this way you loose the emulation for hires content (not much games uses it anyway).
# ASMDEBUG: GLSL30
shader1 = ../shaders-ng/flick_and_noise.slang
alias1 = "flick_and_noise_pass"
shader1 = ../shaders-ng/fxaa.slang
alias1 = "upscale_pass"
scale_type1 = source
scale_x1 = 1.0
scale_y1 = 1.0
scale1 = 1.0
mipmap_input1 = "true"
//(See **Note 0)
// This *has* to be mirrored repeat so that avglum mipmap sampling that samplese from previous
// pass will not pick black.
wrap_mode1 = "mirrored_repeat"
float_framebuffer1 = "true"
filter_linear1 = "true"
# Nvidia fxaa pass:
# works good for "SD" resolutions
# FXAA don't really need any mipmap, but since mipmaps from first_pass are needed by
# some subsequent passes, specify that FXAA_pass wants mipmaps
# makes first_pass mipmaps available to everyone.
# Even if theoretically not needed, texture() occurrence in FXAA_pass needed to be switched
# to textureLod(..,0.0) or it acts weird, don't ask me why.
# ASMDEBUG: GLSL33
shader2 = ../shaders-ng/fxaa.slang
alias2 = "FXAA_pass"
filter_linear2 = true
scale_type2 = source
scale2 = 1.0
//this *has* to be clamp_to_border because specular reflections need to turn to black
//if geometry content override is shifting/zooming out the image.
wrap_mode2 = "clamp_to_border"
# This pass emulates NTSC/PAL composite color bleeding and deconvergence
# deconvergence should really be applied in th final pass, but it is too heavy there.
# This pass also apply the input gamma needed for glow pass.
# This pass also applies the input gamma needed for glow pass.
# ASMDEBUG: GLSL36
shader3 = ../shaders-ng/shift_and_bleed.slang
alias3 = "shift_and_bleed_pass"
filter_linear3 = true
scale3 = 1.0
scale_type3 = source
float_framebuffer3 = true
wrap_mode3 = "mirrored_repeat"
# ASMDEBUG: GLSL33
shader2 = ../shaders-ng/shift_and_bleed.slang
alias2 = "shift_and_bleed_pass"
filter_linear2 = true
scale2 = 1.0
scale_type2 = source
float_framebuffer2 = true
wrap_mode2 = "mirrored_repeat"
# Blur and/or glows and/or sharpens the image as requested
# This passes aims to simulate the signal input power.
# ASMDEBUG: GLSL36
shader3 = ../shaders-ng/in_glow_x.slang
alias3 = "in_glow_pass_x"
filter_linear3 = true
scale3 = 1.0
scale_type3 = source
float_framebuffer3 = true
wrap_mode3 = "clamp_to_edge"
# ASMDEBUG: GLSL39
shader4 = ../shaders-ng/in_glow_x.slang
alias4 = "in_glow_pass_x"
shader4 = ../shaders-ng/in_glow_y.slang
alias4 = "in_glow_pass"
filter_linear4 = true
scale4 = 1.0
scale_type4 = source
float_framebuffer4 = true
wrap_mode4 = "clamp_to_edge"
# ASMDEBUG: GLSL42
shader5 = ../shaders-ng/in_glow_y.slang
alias5 = "in_glow_pass"
filter_linear5 = true
scale5 = 1.0
scale_type5 = source
float_framebuffer5 = true
wrap_mode5 = "clamp_to_border"
wrap_mode4 = "clamp_to_border"
@ -186,26 +169,26 @@ float_framebuffer5 = true
# But the result of this pass will be added (+) to the input signal
# in the final pass.
# ASMDEBUG: GLSL42
shader5 = ../shaders-ng/halo_pre_gamma.slang
alias5 = "halo_pre_gamma_pass"
filter_linear5 = true
scale5 = 1.0
scale_type5 = source
float_framebuffer5 = true
# This has to be clamp_to_border in order for the glow pass to return a black frame
# around it, which is needed so that when using geometry override and zooming out the content,
# it will have black surrounding.
wrap_mode5 = "clamp_to_border"
# ASMDEBUG: GLSL45
shader6 = ../shaders-ng/halo_pre_gamma.slang
alias6 = "halo_pre_gamma_pass"
shader6 = ../shaders-ng/halo.slang
alias6 = "halo_pass"
filter_linear6 = true
scale6 = 1.0
scale_type6 = source
float_framebuffer6 = true
# This has to be clamp_to_border in order for the glow pass to return a black frame
# around it, which is needed so that when using geometry override and zooming out the content,
# it will have black surrounding.
wrap_mode6 = "clamp_to_border"
# ASMDEBUG: GLSL48
shader7 = ../shaders-ng/halo.slang
alias7 = "halo_pass"
filter_linear7 = true
scale7 = 1.0
scale_type7 = source
float_framebuffer7 = true
wrap_mode7 = "clamp_to_border"
@ -223,34 +206,34 @@ float_framebuffer7 = true
# rgb: it puts a small mipmap from colortools_and_ntsc_pass used to light-up the bezel highlights.
# alpha@other coords: simple continuous sampling used to modulate bezel highlights strength.
# ASMDEBUG: GLSL48
shader7 = ../shaders-ng/avglum_pass.slang
alias7 = "avglum_pass"
filter_linear7 = true
scale_type7 = source
scale7 = 0.5
wrap_mode7 = "clamp_to_border"
float_framebuffer7 = "true"
# The following passes emulates soft bezel reflections.
# ASMDEBUG: GLSL51
shader8 = ../shaders-ng/avglum_pass.slang
alias8 = "avglum_pass"
shader8 = ../shaders-ng/reflection_blur_pre.slang
alias8 = "reflected_blurred_pass_pre"
filter_linear8 = true
scale_type8 = source
scale8 = 0.5
scale8 = 1.0
wrap_mode8 = "clamp_to_border"
float_framebuffer8 = "true"
# The following passes will blur the mirrored part of first_pass
# to emulate soft bezel reflections.
# ASMDEBUG: GLSL54
shader9 = ../shaders-ng/reflection_blur_pre.slang
alias9 = "reflected_blurred_pass_pre"
# ASMDEBUG: GLSL54
shader9 = ../shaders-ng/reflection_blur.slang
alias9 = "reflected_blurred_pass"
filter_linear9 = true
scale_type9 = source
scale9 = 1.0
wrap_mode9 = "clamp_to_border"
# ASMDEBUG: GLSL57
shader10 = ../shaders-ng/reflection_blur.slang
alias10 = "reflected_blurred_pass"
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
wrap_mode10 = "mirrored_repeat"
float_framebuffer9 = true
wrap_mode9 = "mirrored_repeat"
# In the following passes we emulate bloom effect.
# Since the radius has to be high, we sample first_pass
@ -258,38 +241,38 @@ float_framebuffer7 = true
# Every blur pass samples radially around the center and offsets
# the starting point in every subsequent pass.
# ASMDEBUG: GLSL60
shader11 = ../shaders-ng/bloom_pass_1.slang
alias11 = "bloom_pass_1"
# ASMDEBUG: GLSL57
shader10 = ../shaders-ng/bloom_pass_1.slang
alias10 = "bloom_pass_1"
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
wrap_mode10 = "mirrored_repeat"
# ASMDEBUG: GLSL54
shader11 = ../shaders-ng/bloom_pass_2.slang
alias11 = "bloom_pass_2"
filter_linear11 = true
scale_type11 = source
scale11 = 1.0
wrap_mode11 = "mirrored_repeat"
scale11 = 0.5
wrap_mode11 = "clamp_to_edge"
# ASMDEBUG: GLSL63
shader12 = ../shaders-ng/bloom_pass_2.slang
alias12 = "bloom_pass_2"
shader12 = ../shaders-ng/bloom_pass_3.slang
alias12 = "bloom_pass_3"
filter_linear12 = true
scale_type12 = source
scale12 = 0.5
scale12 = 1.0
wrap_mode12 = "clamp_to_edge"
# ASMDEBUG: GLSL66
shader13 = ../shaders-ng/bloom_pass_3.slang
alias13 = "bloom_pass_3"
shader13 = ../shaders-ng/bloom_pass_4.slang
alias13 = "bloom_pass_final"
filter_linear13 = true
scale_type13 = source
scale13 = 1.0
wrap_mode13 = "clamp_to_edge"
# ASMDEBUG: GLSL69
shader14 = ../shaders-ng/bloom_pass_4.slang
alias14 = "bloom_pass_final"
filter_linear14 = true
scale_type14 = source
scale14 = 1.0
wrap_mode14 = "mirrored_repeat"
float_framebuffer14 = "true"
wrap_mode13 = "mirrored_repeat"
float_framebuffer13 = "true"
@ -297,14 +280,24 @@ float_framebuffer7 = true
# and temporally smooth led lights.
# Extra logic makes it possible to lower the led reaction time when a scene change is detected.
# this is achieved through average luminance sampling from avglum_pass
# ASMDEBUG: GLSL69
shader14 = ../shaders-ng/ambi_temporal_pass.slang
alias14 = "ambi_temporal_pass"
filter_linear14 = true
scale_type14 = viewport
scale14 = 0.05
wrap_mode14 = "clamp_to_border"
float_framebuffer14 = true
# This is a small helper pass i can use to store values and things
# that don't need high resolution like noise and vignette.
# ASMDEBUG: GLSL72
shader15 = ../shaders-ng/ambi_temporal_pass.slang
alias15 = "ambi_temporal_pass"
filter_linear15 = true
scale_type15 = viewport
scale15 = 0.05
wrap_mode15 = "clamp_to_border"
float_framebuffer15 = true
shader15 = ../shaders-ng/helper_pass.slang
alias15 = "helper_pass"
scale_type15 = absolute
scale15 = 128
filter_linear15 = true
wrap_mode15 = "mirrored_repeat"
# This pass pass will do everything needed to happen at screen coordinates:
@ -321,6 +314,7 @@ float_framebuffer7 = true
filter_linear16 = true
scale_type16 = viewport
scale16 = 1.0
wrap_mode16 = "mirrored_repeat"
//This needs to be clamp_to_edge or displacing vignette would dark screen borders
wrap_mode16 = "clamp_to_edge"

View File

@ -14,21 +14,11 @@
// STATIC FEATURES ENABLE/DISABLE
// Allow texture wrapping as a shader parameter, prepend // to gain some performance:
#define ALLOW_BG_IMAGE_TEXTURE_WRAP_IN_SHADER
// Enable lcd antighosting by using values > 0.0 (try around 0.25)
#define LCD_ANTIGHOSTING 0.0
// APPEARANCE SETTINGS ////////////////////////////////////////////////////////
// Haloing happens on a scanlined/gapped image or not
#define HALO_PRE_SCANLINE_GAP 0.0
// BEZEL STATIC CONFIG ////////////////////////////////////////////////////////
//The following defines the monitor frame resolution in textures/monitor_body_[curved/straight].png
@ -39,7 +29,7 @@
//The following can slightly correct bezel aspect
//eg: #define BEZEL_ASPECT_CORRECTION (1.0 - 0.004) will make it shorter.
#define BEZEL_ASPECT_CORRECTION (1.0)
#define BEZEL_ASPECT_CORRECTION 1.0 //(1- ((SERVICE1-0.5) *0.01)) //(1.0 - 0.004)
//This is used to skip calculations in the reflection blur code.
//set it to minimum value that allows you to see reflection entirely
@ -133,8 +123,8 @@
//Try to keep blur sizes consistent across input resolutions
#define NEW_SCALEMOD_REF_X 360.0
#define NEW_SCALEMOD_REF_Y 270.0
#define NEW_SCALEMOD_X (global.flick_and_noise_passSize.x/(NEW_SCALEMOD_REF_X*2.0) / 2.2)
#define NEW_SCALEMOD_Y (global.flick_and_noise_passSize.y/(NEW_SCALEMOD_REF_Y*2.0) / 2.2)
#define NEW_SCALEMOD_X (global.upscale_passSize.x/(NEW_SCALEMOD_REF_X*2.0) / 2.2)
#define NEW_SCALEMOD_Y (global.upscale_passSize.y/(NEW_SCALEMOD_REF_Y*2.0) / 2.2)
//Hardcoded radius scale factor used by bloom and halo.
#define BLOOM_AND_HALO_SCALE_FACTOR 360.0
@ -146,6 +136,10 @@
// Luminosity tied zoom sampling point
#define DYN_ZOOM_SAMPLING_POINT vec2(0.75)
//Sampling points from test pass
#define SMP_RANGE1 vec4(0.24,0.24 , 0.26,0.26)
#define SMP_POINT1 vec2( 0.25 )
// RESOLUTION SWITCH GLITCH EMULATION ##########################################################################################
//Where to sample alpha from avglum pass to understand if resolution has changed (very internal setting)
#define RESSWITCH_SAMPLING_POINT vec2(0.9)

View File

@ -45,6 +45,8 @@
//
// #define IN_GLOW_GAMMA 2.0 // Gamma In
// #define GAMMA_OUT 0.4 // Gamma out
// #define DO_CCORRECTION 1.0 // ★ Color corrections enable?
// #define IN_GLOW_POWER 1.5 // Input signal gain
@ -53,8 +55,6 @@
// #define CONTRAST 0.0 // Contrast in
// #define ADAPTIVE_BLACK 0.1 // Adaptive Black level range
// #define TEMPERATURE 7700.0 // Temperature in (6500=off)
// #define IN_GLOW_GAMMA 2.0 // Gamma In (applied at the beginning)
// #define GAMMA_OUT 0.4 // Gamma out (applied at the end)
// #define COLOR_MONO_COLORIZE 0.0 // Monochrome screen colorization
// #define COLOR_MONO_HUE1 0.25 // . Hue bright
// #define COLOR_MONO_HUE2 0.3 // . Hue dark
@ -63,7 +63,7 @@
// #define VIBRANCE 0.0 // Vibrance in (0.0=off)
// #define DO_FXAA 0.0 // ★ FXAA enable?
// #define DO_FXAA 0.0 // ★ Antialiasing enable ?
// #define DO_RF_NOISE 0.0 // ★ RF Noise enable?
@ -90,11 +90,14 @@
// #define DO_SAT_BLEED 0.0 // ★ CVBS: Bandwidth limited chroma enable?
// #define SAT_BLEED_PAL 0.0 // Use PAL colorspace, not NTSC
// #define SAT_BLEED_PAL 0.0 // Colorspace (NTSC, PAL)
// #define SAT_BLEED_STRENGTH 1.0 // Strength
// #define SAT_BLEED_SIZE 5.0 // Size (capped to 5.0 in d3d)
// #define SAT_BLEED_FALLOFF 1.7 // Falloff
// #define DOT_C 0.0 // ★ CVBS: Dot crawl
// #define DOT_C_YUV 0.0 // Colorspace (NTSC, PAL)
// #define DOT_C_SPEED 8.0 // Speed
// #define DO_PPERSISTENCE 0.0 // ★ Persistence of phosphors enable?
// #define PPERSISTENCE_START 0.9 // Early decay
@ -103,6 +106,17 @@
// #define DO_SHIFT_RGB 1.0 // ★ Deconvergence enable?
// #define OFFSET_STRENGTH 0.3 // Strength
// #define DECON_RX 0.0 // Red x offset
// #define DECON_RY -1.0 // Red y offset
// #define DECON_GX 1.0 // Green x offset
// #define DECON_GY 0.0 // Green y offset
// #define DECON_BX 0.0 // Blue x offset
// #define DECON_BY 1.0 // Blue y offset
// #define EDGE_DEFOCUS 2.0 // Deconvergence increases near edges
// #define EDGE_DEFOCUS_DO_BLUR 0.0 // Blur increases near edges when glow/blur is enabled
// #define EDGE_DEFOCUS_AREA_INV 0.4 // Focused Area
// #define SHIFT_R -20.0 // Red offset
// #define SHIFT_G 0.0 // Green offset
// #define SHIFT_B 20.0 // Blue offset
@ -187,13 +201,14 @@
// #define DOT_M_SHADOW_OFF 0.0 // . Shadow offset
// #define DO_HALO 1.0 // ★ Halo enable?
// #define HALO_NO_PREGAIN 1.0 // Pre-attenuate input signal gain to 1x
// #define HALO_POWER 0.5 // Strength (negative = 10x precision)
// #define HALO_SHARPNESS 6.5 // Sharpness
// #define HALO_GAMMA 2.0 // Gamma in, the higher, the less the halo on dark colors
// #define HALO_GAMMA_OUT 1.0 // Gamma out
// #define HALO_VS_SCAN 0.7 // Light up scanline gaps and dot grid gaps too
// #define DO_HALO 1.0 // ★ Halo or mask helper enable?
// #define HALO_NO_PREGAIN 1.0 // Halo: Pre-attenuate input signal gain to 1x
// #define HALO_POWER 0.5 // Halo: Strength (negative = 10x precision)
// #define HALO_SHARPNESS 6.5 // Halo: Sharpness
// #define HALO_GAMMA 2.0 // Halo: Gamma in: Higher -> less halo on dark colors
// #define HALO_GAMMA_OUT 1.0 // Halo: Gamma out
// #define HALO_DO_MASK_HELPER 0.0 // Additional brighness if horizontal mask clips
// #define HALO_VS_SCAN 0.7 // Light up scanline gaps and dot grid gaps too
// #define DO_BLOOM 1.0 // ★ Bloom enable?
@ -218,22 +233,26 @@
// #define DO_BEZEL 1.0 // ★ Bezel enable?
// #define BEZEL_USE_STRAIGHT 0.0 // Straight
// #define BEZEL_INNER_ZOOM -0.01 // Inner zoom (ignored with integer scaling)
// #define BEZEL_FRAME_ZOOM 0.17 // Frame zoom
// #define BEZEL_FRAME_ZOOM 0.179 // Frame Alignment
// #define BEZEL_R -0.35 // Color: Red
// #define BEZEL_G -0.35 // Color: Green
// #define BEZEL_B -0.35 // Color: Blue
// #define BEZEL_CON 1.3 // Contrast
// #define BEZEL_RFL_ZOOM 0.0 // Reflections zoom
// #define BEZEL_REFL_STRENGTH 0.5 // Reflections strength
// #define BEZEL_CORNER_DARK 0.8 // Less reflections in corners
// #define BEZEL_RFL_BLR_SHD -0.2 // Reflections sharpness
// #define BEZEL_ROUGHNESS 1.0 // Reflections roughness
// #define BEZEL_ROUGHNESS 1.0 // Surface roughness
// #define BEZEL_DIFFUSION_STR 0.2 // Diffusion strength
// #define BEZEL_LIGHT_NO_FADEOUT 0.5 // Specularity strength
// #define BEZEL_SPCL_STRENGTH 0.5 // Light fadeout distance
// #define BEZEL_CORNER_DARK 0.8 // Darken corners
// #define DO_GLOBAL_SHZO 0.0 // ★ Global shift/zoom enable?
// #define GLOBAL_OFFX 0.0 // X axis shift
// #define GLOBAL_OFFY 0.0 // Y axis shift
// #define GLOBAL_ZOOM 2.0 // Zoom
// #define DO_BG_IMAGE 0.0 // ★ Back/Foreground image enable?
// #define BG_IMAGE_OVER 0.0 // Image over content (alpha channel driven)?
// #define BG_IMAGE_OFFX 0.0 // Shift Image over X axis
@ -277,12 +296,6 @@
// #define S_POWER 0.05 // Power
// #define DO_GLOBAL_SHZO 0.0 // ★ Global shift/zoom enable?
// #define GLOBAL_OFFX 0.0 // X axis shift
// #define GLOBAL_OFFY 0.0 // Y axis shift
// #define GLOBAL_ZOOM 2.0 // Zoom
// #define DO_TILT 0.0 // ★ Tilt enable?
// #define TILT_X 0.25 // Tilt along X axis
@ -302,7 +315,7 @@
// #define AUTOCROP_SAMPLES 0.02 // Transition speed
// #define DO_GAME_GEOM_OVERRIDE 0.0 // ★ Override content geometry enable?
// #define GAME_GEOM_INT_SCALE 0.0 // Integer scale (disables inner zoom) 2=No keep aspect
// #define GAME_GEOM_INT_SCALE 0.0 // Integer scale 2=No keep aspect
// #define GAME_GEOM_INT_SCALE_MAX 10.0 // . Maximum integer scale
// #define GAME_GEOM_INT_SCALE_OVR 1.0 // . Permit integer overscale by
@ -314,8 +327,7 @@
// #define GAME_GEOM_OFF_FIX 0.0 // Sharp hack through offset (0.0=disable)
// #define DELTA_RENDER_FORCE_REFRESH 4.0 //
// #define DELTA_RENDER_CHECK_AREA 1.0 //
////////////////////////////////////////////////////////////////////////////
@ -330,6 +342,20 @@
//Renders only changed parts of screen, set to 1.0 to lower power consumption / mitigate throttling:
#define DELTA_RENDER 0.0
// #define DELTA_RENDER_FORCE_REFRESH 4.0 // Delta render force refresh interval
// #define DELTA_RENDER_CHECK_AREA 1.0 // Delta render area size
// Use higher quality deconvergence flattering rgb scanlines when deconvergence is high
// and by syncing them to the deconvergence settings
// To enable high quality deconvergence, remove leading "//"
// #define HQ_DECON
// Allow texture wrapping as a shader parameter, set to 0.0 to gain some performance.
// But in that case the wrap mode has to be defined in the preset file.
#define ALLOW_BG_IMAGE_TEXTURE_WRAP_IN_SHADER 1.0
//Halve rendering refresh on bezel and ambilight set to 1.0 to spare gpu cycles:
#define HALVE_BORDER_UPDATE 0.0

View File

@ -1,13 +1,20 @@
**koko-aio-slang documentation**
**-KOKO-AIO DOCUMENTAION-**
---------------------------
---------------------------
**REQUIREMENT***
koko-aio needs at least retroarch 1.16
**REQUIREMENTS** <br>
koko-aio needs at least retroarch 1.16 <br>
Also it expects the following options set in Retroarch:
Settings -> Core -> Allow Rotation: ON
Settings -> Video -> Scaling -> Aspect Ratio: Full
**RETROARCH OUTPUT DRIVERS**
**RETROARCH OUTPUT DRIVERS** <br>
koko-aio does not work by default on d3d12 and d3d11.<br>
If you absolutely need it (Xbox?), you can edit the file
config\config-static.inc<br>
and turn the line:
If you absolutely need it (Xbox?), you can edit the file <br>
config\config-static.inc <br>
and turn the line: <br>
// #define D3D_WORKAROUND <br>
into:<br>
#define D3D_WORKAROUND <br>
@ -17,14 +24,17 @@
<br>
d3d10 is completely unsupported.
<br>
Be warned that some functions does not work if you enable the workaround: <br>
Be warned that the following functions do not work if you enable the workaround: <br>
* CRT glitch on resolution changes <br>
* Adaptive Black <br>
* CVBS Bleed size is limited to 5.0
* Ambientlight scene change detection
* Halving border updates refresh
* Lcd antighosting
* Delta render
* CVBS Bleed size is limited to 5.0 <br>
* Ambientlight scene change detection <br>
* Halving border updates refresh <br>
* Lcd antighosting <br>
* Delta render <br>
* Possibly others (?) <br>
---------------------------
**USEFUL LOCATIONS/FILES:**
@ -40,21 +50,39 @@
CON: The parameters can no longer be modified within Retroarch.
textures/background_under.png
This is the image that can is shown by default under the main content and under the bezel.
This is the image that shown by default under the main content and under the bezel.
Read further for details.
textures/background_over.png
This is the image that can is shown by default over the main content and under the bezel.
This is the image that shown by default over the main content and under the bezel.
Read further for details.
textures/monitor_body_curved.png, textures/monitor_body_straight.png
This is the image used to draw the bezel.
Read further for details.
Read further in the bezel section of this document for details.
Texture "sources", including the main gimp project file for the default curved and straight monitor frame
are on the following repo:
textures/side_shade-helper.png
Bezel frame inner area, the reflective part, is shaded by default so that
upper area is less bright and lower area is a bit brighter.
While the shader does not expose controls to change that, if you want,
you can edit this file to alter the shades.
The more a primary color is saturated, the more the shade will turn to dark.
Texture "sources", including the main gimp project file for the <br>
default curved and straight monitor frame are on the following repo: <br>
https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
---------------------------
**PARAMETERS:**
**Gamma in:**
Input Gamma: set it around 2.2 to linearize values.
**Gamma out:**
Output Gamma: set it around "1/Gamma in"; small tweaks allowed.
**Color corrections:**<br>
Modify signal color at "input" stage.<br>
@ -63,10 +91,6 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
self explanatory.
Input signal gain:
Gain applied in the chain just before the crt emulation stages.
Gamma in:
Gamma correction applied at the beginning of the chain.
Gamma out:
Gamma correction applied to the final processed picture.
Adaptive black level range:
On old CRTs the contrast was higher on high luminosity content,
and lower on low luminosity content.
@ -86,13 +110,11 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
Hue bright-dark bias:
Controls the distribution of dark and bright hues.
**FXAA:**<br>
Apply the well known antialiasing effect by Nvidia.<br>
**Antialiasing enable:**<br>
Apply an edge smoothing/antialiasing algotithm.<br>
Use it if you don't want to blur the image and you still don't like<br>
jagged or too much pixelated images.<br>
** RF Noise:**<br>
Emulates radio frequency noise with a given strength<br>
** Dedither:**<br>
Try to smooth dithering patterns.<br>
@ -137,6 +159,10 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
It can be used with RGB shifting and image blurring to give the picture<br>
an ntsc look without dealing with specific encoding/decoding stuffs. <br>
**CVBS: Dot crawl**<br>
Emulates rolling chroma->luma crosstalks observed in composite signals.<br>
You can switch between pal and ntsc.<br>
**Persistence of phosphors:**<br>
This emulates the unexcited phosphors that continue to emit light.
@ -146,9 +172,28 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
**Deconvergence:**<br>
Shift R,G,B components separately to mimic channel deconvergence.<br>
By varying Red, Green and Blue offsets, the relative component will be<br>
shifted column by column, row by row.<br>
Red,Green,Blue X,Y:
The channels deconvergence offsets
Deconvergence increases near edges:
Increase the offsets near screen edge
Blur increases near edges when glow/blur is enabled:
When using Glow/Blur feature, the blur increases near screen edge.
Focused Area:
The area of the screen that will be in focus (affects previous 2 settings)
** RF Noise:**<br>
Emulates radio frequency noise with a given strength<br>
1 produce noise after the Glow/Blur pass, while -1 will move it before it.
Suggestions:
If you're blurring the image, is better to use 1.<br>
If you're glowing the image, prefer -1.<br>
Uniform noise: Balanced noise that ranges from -x to +x.
Snow noise: Sparkling/Rarefied noise
**Glow/Blur:**<br>
Emulate the CRT glowing "feature", so that the brighter areas of<br>
the image will light their surroundings,<br>
@ -174,7 +219,7 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
Embolden bright pixels near dark ones using a warpsharp like algorithm.
This is a cheap way to emulate phosphor glowing.
The Y parameter will also allow scanlines to be higher.
It will also help (if coupled with) FXAA to stay sharp.
It will also help (if coupled with) antialiasing to stay sharp.
Warped Dynamics:
Change the amount of warpsharp applied based on the contrast between
@ -418,31 +463,47 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
So you can use this to restore the brightness and color saturation<br>
loss when using features like scanlines, darklines or RGB masks.<br>
Pre-attenuate input signal gain to 1x:
(Halo): Pre-attenuate input signal gain to 1x:
Nullifies the input gain applied in the color correction section.
This way the halo effect will be consistent and will not depend on
it, avoiding hard to manage cascading effects.
Strength (negative = 10x precision)
(Halo): Strength (negative = 10x precision)
The effect strength.
Negative values are interpreted as positive ones, divided by 10,
when fine tuning is needed.
Sharpness
(Halo): Sharpness
The lower, the wider the halo.
Gamma in
(Halo): Gamma in
Act like a soft treshold; the higher, the less the darker colors
will be "haloed"
Gamma out
(Halo): Gamma out
Post-gamma correction applied to the halo.
Mask Helper: Additional brighness if horizontal mask clips
This function will add more color to the subpixel mask (eg: RGB, RBGX...)
when it is unable to reach the enough brightness.
This will allow to fully exploit subpixel mask capacity while retaining
the desidered brightness.
Please note that a well calibrated monitor is needed.
How to Use Mask Helper:
-----------------------
Adjust "Input signal gain" based on mask size:
~2.0..3.0 for 2-sized (gm, wx)
~3.0..4.0 for 3-sized (gmx, rgb,rbg)
~4.0..5.0 for 4-sized (rgbx, rbgx)
Activate the "Horizontal mask" parameter.
Set "Phosphors width Min, Max" to the minimum.
Set "Phosphors width min->max gamma" to the maximum.
Light up scanline gaps and dot grid gaps too:
Theoretically Halo have to be applied
"over" everything, because that is the way it works in nature.
But you can choose to cheat and instead apply scanlines over the halo
instead.
Do this if you like much more pronunced scanlines, even at the
price of some graphical artifacts visible on high contrasted areas.
The same apply for the grid emulated via dot matrix emulation feature.
Theoretically Halo has to be applied
"over" everything, because that is the way it works in nature.
But you can choose to cheat and prefer to see more scanlines gaps, instead.
Do this if you like much more pronunced scanlines, even at the
cost of some graphical artifacts visible on high contrasted areas.
The same apply for the grid emulated via dot matrix emulation feature.
**Bloom:**<br>
Acts like Halo, but affects a much wider area and is more configurable.<br>
By using this effect and playing with its parameters, you can achieve funny<br>
@ -489,33 +550,29 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
**Bezel:**<br>
Draws a monitor frame with simulated reflections from the game content.<br>
The monitor frame is an image loaded by the shader and is shipped<br>
in the "textures" shader subdirectory, named:
monitor_body_curved.png and monitor_body_straight.png
It has been made with the following rules that may come handy<br>
only if you want to edit it; otherwise go on.<br>
- The red channel represents the luminance information<br>
- The green channel represents the highlights<br>
- The alpha channel in the inner frame represents the part of the bezel<br>
that will be filled by the game content<br>
- The blue channel represents the part of the bezel that will be filled by the game reflection.<br>
in the "textures" shader subdirectory, named:<br>
monitor_body_curved.png and monitor_body_straight.png<br>
It has been made with the following rules that may come handy
only if you want to edit it; otherwise go on:<br>
* The red channel represents the luminance information<br>
* The green channel represents the highlights<br>
* The alpha channel in the inner frame represents the part of the bezel that will be filled by the game content<br>
* The blue channel represents the part of the bezel that will be filled by the game reflection.<br>
Straight
Use a straight bezel instead of a curved one.
Inner zoom:
Allows to shrink or expand the game content to fit the monitor frame.
"Fitting the monitor frame" is the ONLY scope of this option.
To have a smaller or larger than bezel screen, please use "Override content geometry"
options, or the reflections on the bezel will be misaligned.p
Frame zoom:
Allows to shrink or expand the monitor frame to fit the game content.
Frame alignment:
Allows to shrink or expand the monitor frame to fit game content and align reflections.
"Aligning the reflections" is the ONLY scope of this option.
Bezel color (red,green,blue) and contrast:
Allows to choose the color of the monitor frame.
Reflections strength
The amount of reflections
Less reflections in corners
Show less reflections in corners
Reflections sharpness
Modulates from totally blurred to totally sharp reflection appearance.
Reflections roughness
Surface roughness
The amount of material roughness in reflection area
Diffusion strength
Mix an amount of high blurred reflection to simulate light diffusion
@ -523,10 +580,11 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
Modulates the reflected and diffused light fadeout. higher numbers -> no fadeout.
Specularity strength
The amount of specular reflection
Darken corners
How much the bezel corners should be darkened
**Global shift/zoom:**<br>
Zoom and shift everything on screen, but background pictures.<br>
**Backgound image:**<br>
Draws an image on screen picked from the "textures" shader subdirectory,<br>
named by default background_over.png and background_under.png<br>
@ -631,10 +689,13 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
**Spot:**<br>
Simulates external light reflected by the monitor glass.<br>
**Aspect Ratio:**<br>
When using effects that need Retroarch aspect ratio option<br>
to be set to "full", you have to provide the source aspect<br>
ratio to the shader.<br>
**Aspect (active with ambient light or background image only):**<br>
If you set retroarch aspect ratio option to full, you have to provide<br>
the core aspect ratio to the shader manually via the following parameters.<br>
NOTE: The following parameters are ignored when not using ambient lights
or background/foreground images.
In those cases, use options under "Override content geometry" section.
Use -6 for MAME cores that pre-rotates the game (TATE mode)<br>
With Mame 2003 plus and fbneo cores, koko-aio detects if the<br>
game is rotated or not without any user intervention.<br>
@ -653,9 +714,6 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
As long as Aspect Ratio Numerator is positive, this will
be used as the denominator of the fraction.
**Global shift/zoom image:**<br>
Zoom and shift everything on screen, but background pictures.<br>
**Luminosity tied zoom:**<br>
On older CRT monitors, the picture gets bigger when the image was brighter.<br>
Please TURN THIS OFF if you want to use integer scaling, since this obstructs it.
@ -730,7 +788,7 @@ https://github.com/kokoko3k/koko-aio-slang-misc/tree/main
Can be used to adjust the bezel rotation
in relation to the game tilt amount
**Delta Render:**
**Delta Render:**<br>
Koko-aio can render only the part of the screen that has been changed,<br>
leading to a measurable power consumption reduction and mitigate throttling
on mobile devices and laptops.<br>

View File

@ -24,7 +24,7 @@
# - The blue channel represents the part of the bezel that will be filled by the game reflection.
textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop"
textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop;sideshade"
monitor_body_curved = "textures/monitor_body_curved.png"
monitor_body_curved_linear = "true"
@ -48,11 +48,15 @@
bg_over_wrap_mode = "mirrored_repeat"
bg_over_mipmap = "false"
#This is for support for arcade backdrop pictures, enable it in config.inc.
backdrop = "textures/boothill.jpg"
backdrop_linear = "true"
backdrop_wrap_mode = "mirrored_repeat"
backdrop_mipmap = "true"
backdrop_mipmap = "false"
sideshade = "textures/side_shade-helper.png"
sideshade_linear = "true"
sideshade_wrap_mode = "mirrored_repeat"
sideshade_mipmap = "false"
shaders = 17
@ -83,11 +87,11 @@ shaders = 17
// for Deltarender purposes, it is important that they share the same filtering and wrap mode:
// colortools_and_ntsc_pass wrap_mode and filter_linear_mode
// are set by flick_and_noise_pass (the next one)
// are set by upscale_pass (the next one)
// colortools_and_ntsc_passFeedback wrap_mode and filter_linear_mode
// are set by colortools_and_ntsc_pass (the this pass)
// Hence, we have to set colortools_and_ntsc_pass and flick_and_noise_pass with the same filter and wrap_mode
// Hence, we have to set colortools_and_ntsc_pass and next pass (upscale_pass) with the same filter and wrap_mode
float_framebuffer0 = "true"
filter_linear0 = "true"
wrap_mode0 = "mirrored_repeat"
@ -97,16 +101,12 @@ float_framebuffer0 = "true"
# This pass emulates the flickering observed on crts when the input signal is interlaced
# and there is high brightness difference between adiacent scanlines.
# It also emulates the RF noise.
#
# Note that the wrap_mode is set to "mirrored_repeat".
# This allow to cheaply generate a mirrored image that will be used later on to
# draw reflections on the bezel.
#
# Also, it upscales the input signal to 2X.
# This is needed because FXAA, the glow and the halo pass works best with at least 640x480 resolution.
# Note that this is needed only for lowres content, but if the input signal is already at that
# size, there is no need to scale to 2x, and it is possible to gain performance by turning
# scale_x1 and scale_y1 from 2.0 to 1.0.
# Also, it upscales the input signal to 2X and optionally applies an edge smoothing algorithm.
# Koko-aio will then work internally at 2X, which is needed by several following filters.
# However, if the input signal is already at sufficient resolution, there is no need to scale to 2x
# and it is possible to gain performance by turning the scale to 1x.
#
# A special note for P-UAE core (Commodore Amiga), is needed, because it outputs by default to
# 720 pixel width and about 280p; this means that for P-UAE you can use scale_x1 = 1.0
@ -115,76 +115,53 @@ float_framebuffer0 = "true"
# But this way you loose the emulation for hires content (not much games uses it anyway).
# ASMDEBUG: GLSL30
shader1 = shaders-ng/flick_and_noise.slang
alias1 = "flick_and_noise_pass"
shader1 = shaders-ng/fxaa.slang
alias1 = "upscale_pass"
scale_type1 = source
scale_x1 = 2.0
scale_y1 = 2.0
scale1 = 2.0
mipmap_input1 = "true"
//(See **Note 0)
// This *has* to be mirrored repeat so that avglum mipmap sampling that samplese from previous
// pass will not pick black.
wrap_mode1 = "mirrored_repeat"
float_framebuffer1 = "true"
filter_linear1 = "true"
# Nvidia fxaa pass:
# works good for "SD" resolutions
# FXAA don't really need any mipmap, but since mipmaps from first_pass are needed by
# some subsequent passes, specify that FXAA_pass wants mipmaps
# makes first_pass mipmaps available to everyone.
# Even if theoretically not needed, texture() occurrence in FXAA_pass needed to be switched
# to textureLod(..,0.0) or it acts weird, don't ask me why.
# ASMDEBUG: GLSL33
shader2 = shaders-ng/fxaa.slang
alias2 = "FXAA_pass"
filter_linear2 = true
scale_type2 = source
scale2 = 1.0
//this *has* to be clamp_to_border because specular reflections need to turn to black
//if geometry content override is shifting/zooming out the image.
wrap_mode2 = "clamp_to_border"
# This pass emulates NTSC/PAL composite color bleeding and deconvergence
# deconvergence should really be applied in th final pass, but it is too heavy there.
# This pass also apply the input gamma needed for glow pass.
# This pass also applies the input gamma needed for glow pass.
# ASMDEBUG: GLSL36
shader3 = shaders-ng/shift_and_bleed.slang
alias3 = "shift_and_bleed_pass"
filter_linear3 = true
scale3 = 1.0
scale_type3 = source
float_framebuffer3 = true
wrap_mode3 = "mirrored_repeat"
# ASMDEBUG: GLSL33
shader2 = shaders-ng/shift_and_bleed.slang
alias2 = "shift_and_bleed_pass"
filter_linear2 = true
scale2 = 1.0
scale_type2 = source
float_framebuffer2 = true
wrap_mode2 = "mirrored_repeat"
# Blur and/or glows and/or sharpens the image as requested
# This passes aims to simulate the signal input power.
# ASMDEBUG: GLSL36
shader3 = shaders-ng/in_glow_x.slang
alias3 = "in_glow_pass_x"
filter_linear3 = true
scale3 = 1.0
scale_type3 = source
float_framebuffer3 = true
wrap_mode3 = "clamp_to_edge"
# ASMDEBUG: GLSL39
shader4 = shaders-ng/in_glow_x.slang
alias4 = "in_glow_pass_x"
shader4 = shaders-ng/in_glow_y.slang
alias4 = "in_glow_pass"
filter_linear4 = true
scale4 = 1.0
scale_type4 = source
float_framebuffer4 = true
wrap_mode4 = "clamp_to_edge"
# ASMDEBUG: GLSL42
shader5 = shaders-ng/in_glow_y.slang
alias5 = "in_glow_pass"
filter_linear5 = true
scale5 = 1.0
scale_type5 = source
float_framebuffer5 = true
wrap_mode5 = "clamp_to_border"
wrap_mode4 = "clamp_to_border"
@ -192,26 +169,26 @@ float_framebuffer5 = true
# But the result of this pass will be added (+) to the input signal
# in the final pass.
# ASMDEBUG: GLSL42
shader5 = shaders-ng/halo_pre_gamma.slang
alias5 = "halo_pre_gamma_pass"
filter_linear5 = true
scale5 = 1.0
scale_type5 = source
float_framebuffer5 = true
# This has to be clamp_to_border in order for the glow pass to return a black frame
# around it, which is needed so that when using geometry override and zooming out the content,
# it will have black surrounding.
wrap_mode5 = "clamp_to_border"
# ASMDEBUG: GLSL45
shader6 = shaders-ng/halo_pre_gamma.slang
alias6 = "halo_pre_gamma_pass"
shader6 = shaders-ng/halo.slang
alias6 = "halo_pass"
filter_linear6 = true
scale6 = 1.0
scale_type6 = source
float_framebuffer6 = true
# This has to be clamp_to_border in order for the glow pass to return a black frame
# around it, which is needed so that when using geometry override and zooming out the content,
# it will have black surrounding.
wrap_mode6 = "clamp_to_border"
# ASMDEBUG: GLSL48
shader7 = shaders-ng/halo.slang
alias7 = "halo_pass"
filter_linear7 = true
scale7 = 1.0
scale_type7 = source
float_framebuffer7 = true
wrap_mode7 = "clamp_to_border"
@ -229,34 +206,34 @@ float_framebuffer7 = true
# rgb: it puts a small mipmap from colortools_and_ntsc_pass used to light-up the bezel highlights.
# alpha@other coords: simple continuous sampling used to modulate bezel highlights strength.
# ASMDEBUG: GLSL48
shader7 = shaders-ng/avglum_pass.slang
alias7 = "avglum_pass"
filter_linear7 = true
scale_type7 = source
scale7 = 0.5
wrap_mode7 = "clamp_to_border"
float_framebuffer7 = "true"
# The following passes emulates soft bezel reflections.
# ASMDEBUG: GLSL51
shader8 = shaders-ng/avglum_pass.slang
alias8 = "avglum_pass"
shader8 = shaders-ng/reflection_blur_pre.slang
alias8 = "reflected_blurred_pass_pre"
filter_linear8 = true
scale_type8 = source
scale8 = 0.5
scale8 = 1.0
wrap_mode8 = "clamp_to_border"
float_framebuffer8 = "true"
# The following passes will blur the mirrored part of first_pass
# to emulate soft bezel reflections.
# ASMDEBUG: GLSL54
shader9 = shaders-ng/reflection_blur_pre.slang
alias9 = "reflected_blurred_pass_pre"
# ASMDEBUG: GLSL54
shader9 = shaders-ng/reflection_blur.slang
alias9 = "reflected_blurred_pass"
filter_linear9 = true
scale_type9 = source
scale9 = 1.0
wrap_mode9 = "clamp_to_border"
# ASMDEBUG: GLSL57
shader10 = shaders-ng/reflection_blur.slang
alias10 = "reflected_blurred_pass"
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
wrap_mode10 = "mirrored_repeat"
float_framebuffer9 = true
wrap_mode9 = "mirrored_repeat"
# In the following passes we emulate bloom effect.
# Since the radius has to be high, we sample first_pass
@ -264,38 +241,38 @@ float_framebuffer7 = true
# Every blur pass samples radially around the center and offsets
# the starting point in every subsequent pass.
# ASMDEBUG: GLSL60
shader11 = shaders-ng/bloom_pass_1.slang
alias11 = "bloom_pass_1"
# ASMDEBUG: GLSL57
shader10 = shaders-ng/bloom_pass_1.slang
alias10 = "bloom_pass_1"
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
wrap_mode10 = "mirrored_repeat"
# ASMDEBUG: GLSL54
shader11 = shaders-ng/bloom_pass_2.slang
alias11 = "bloom_pass_2"
filter_linear11 = true
scale_type11 = source
scale11 = 1.0
wrap_mode11 = "mirrored_repeat"
scale11 = 0.5
wrap_mode11 = "clamp_to_edge"
# ASMDEBUG: GLSL63
shader12 = shaders-ng/bloom_pass_2.slang
alias12 = "bloom_pass_2"
shader12 = shaders-ng/bloom_pass_3.slang
alias12 = "bloom_pass_3"
filter_linear12 = true
scale_type12 = source
scale12 = 0.5
scale12 = 1.0
wrap_mode12 = "clamp_to_edge"
# ASMDEBUG: GLSL66
shader13 = shaders-ng/bloom_pass_3.slang
alias13 = "bloom_pass_3"
shader13 = shaders-ng/bloom_pass_4.slang
alias13 = "bloom_pass_final"
filter_linear13 = true
scale_type13 = source
scale13 = 1.0
wrap_mode13 = "clamp_to_edge"
# ASMDEBUG: GLSL69
shader14 = shaders-ng/bloom_pass_4.slang
alias14 = "bloom_pass_final"
filter_linear14 = true
scale_type14 = source
scale14 = 1.0
wrap_mode14 = "mirrored_repeat"
float_framebuffer14 = "true"
wrap_mode13 = "mirrored_repeat"
float_framebuffer13 = "true"
@ -303,14 +280,25 @@ float_framebuffer7 = true
# and temporally smooth led lights.
# Extra logic makes it possible to lower the led reaction time when a scene change is detected.
# this is achieved through average luminance sampling from avglum_pass
# ASMDEBUG: GLSL69
shader14 = shaders-ng/ambi_temporal_pass.slang
alias14 = "ambi_temporal_pass"
filter_linear14 = true
scale_type14 = viewport
scale14 = 0.05
wrap_mode14 = "clamp_to_border"
float_framebuffer14 = true
# This is a small helper pass i can use to store values and things
# that don't need high resolution like noise and vignette.
# ASMDEBUG: GLSL72
shader15 = shaders-ng/ambi_temporal_pass.slang
alias15 = "ambi_temporal_pass"
filter_linear15 = true
scale_type15 = viewport
scale15 = 0.05
wrap_mode15 = "clamp_to_border"
float_framebuffer15 = true
shader15 = shaders-ng/helper_pass.slang
alias15 = "helper_pass"
scale_type15 = absolute
float_framebuffer15 = true
scale15 = 128
filter_linear15 = true
wrap_mode15 = "mirrored_repeat"
# This pass pass will do everything needed to happen at screen coordinates:
@ -327,6 +315,7 @@ float_framebuffer7 = true
filter_linear16 = true
scale_type16 = viewport
scale16 = 1.0
wrap_mode16 = "mirrored_repeat"
//This needs to be clamp_to_edge or displacing vignette would dark screen borders
wrap_mode16 = "clamp_to_edge"

View File

@ -72,31 +72,29 @@ void main() {
vSmp_step = (vSmpBorder_max - vSmpBorder_min) / (leds_per_strip-1);
//Calc a lod for a texture sized led_strip x led_strip
lod = log2(global.flick_and_noise_passSize.y / leds_per_strip) - 1;
lod = log2(global.upscale_passSize.y / leds_per_strip) - 1;
//Scale to the original aspect
//Scale to the original aspect, then scale according to zoom modifiers.
float in_aspect = get_in_aspect();
float Do_Tate = need_tate(isrotated);
if ( need_NO_integer_scale() )
bool bNeed_NO_integer_scale = need_NO_integer_scale();
if (bNeed_NO_integer_scale)
pre_pass_coords = get_scaled_coords_aspect(TexCoord,global.FinalViewportSize, in_aspect, isrotated) + vec2(0.00001);
else
pre_pass_coords = integer_scale(TexCoord, in_aspect, isrotated, Do_Tate, GAME_GEOM_INT_SCALE-1.0 ) ;
if (bNeed_NO_integer_scale) {
if (DO_GLOBAL_SHZO >0.5)
pre_pass_coords = zoom(pre_pass_coords + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM );
if (DO_GLOBAL_SHZO >0.5)
pre_pass_coords = zoom(pre_pass_coords + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM );
if (DO_GAME_GEOM_OVERRIDE > 0.5) {
pre_pass_coords = content_geom_override_zoom(pre_pass_coords, GAME_GEOM_ASPECT, get_in_aspect(), GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
if (DO_GAME_GEOM_OVERRIDE > 0.5)
pre_pass_coords = content_geom_override_zoom(pre_pass_coords, GAME_GEOM_ASPECT, get_in_aspect(), GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
}
if (DO_BEZEL > 0.5)
pre_pass_coords = zoomout_coords(pre_pass_coords, -get_BEZEL_INNER_ZOOM());
//Every cycle counts!
vAMBI_POWER = AMBI_POWER -1;

View File

@ -21,10 +21,13 @@ layout(location = 1) out float lod;
layout(location = 2) out vec2 vFuzzy_main_pass_stage_1;
layout(location = 3) out float vReduced_sample_time_is_now;
layout(location = 4) out float vAvglum_needed;
layout(location = 5) out float vBezel_or_Bloom;
layout(location = 6) out float vResSwitch_res_changed;
layout(location = 7) out float vResChanged;
layout(location = 8) out vec2 vTexCoord_unscaled;
layout(location = 9) out float vDo_autocrop;
layout(location = 10) out float vDo_dynzoom;
//layout(location = 9) out vec2 vLods;
#include "includes/functions.include.slang"
@ -42,8 +45,7 @@ void main() {
vReduced_sample_time_is_now = mod(params.FrameCount,AMBI_AVGLUM_DIVIDER);
vAvglum_needed = DO_AMBILIGHT + DO_BEZEL + (DO_DYNZOOM*10.0) + DO_BLOOM + (RESSWITCH_GLITCH_SIZE*10.0) + AUTOCROP_MAX ;
vBezel_or_Bloom = DO_BEZEL + DO_BLOOM;
vAvglum_needed = DO_AMBILIGHT + DO_BEZEL + (DO_DYNZOOM*10.0) + (RESSWITCH_GLITCH_SIZE*10.0) + AUTOCROP_MAX ;
//RESSWITCH shaking:
vResSwitch_res_changed = 0.0;
@ -56,6 +58,12 @@ void main() {
//float lod_max = lodmax(params.OriginalSize.xy);
//vLods.x = lod_max/2.0;
//vLods.y = vLods.x/2.0;
//Disable Autocrop and dynamic zoom when integer scaling is requested.
bool Autocrop_disabled = AUTOCROP_MAX == 0.0 || need_integer_scale();
bool Dynzoom_disabled = DO_DYNZOOM == 0.0 || need_integer_scale();
vDo_autocrop = float(!Autocrop_disabled);
vDo_dynzoom = float(!Dynzoom_disabled);
}
#pragma stage fragment
@ -64,11 +72,12 @@ layout(location = 1) in float lod;
layout(location = 2) in vec2 vFuzzy_main_pass_stage_1;
layout(location = 3) in float vReduced_sample_time_is_now;
layout(location = 4) in float vAvglum_needed;
layout(location = 5) in float vBezel_or_Bloom;
layout(location = 6) in float vResSwitch_res_changed;
layout(location = 7) in float vResChanged;
layout(location = 8) in vec2 vTexCoord_unscaled;
//layout(location = 9) in vec2 vLods;
layout(location = 9) in float vDo_autocrop;
layout(location = 10) in float vDo_dynzoom;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 1) uniform sampler2D colortools_and_ntsc_passFeedback;
@ -98,8 +107,8 @@ float get_avg_lum_from_mip_nocc() {
return rgb_to_gray(mip);
}
//0.1 seems like a good tradeoff that works well with bloom exposire and fullscreen zoom
//...maybe bloom exposure works best at 0.05; you may consider another zone of smooth sampling.
// 0.1 seems like a good tradeoff that works well with exposure and fullscreen zoom
// ...maybe exposure works best at 0.05; you may consider another zone of smooth sampling.
#define SMOOTHNESS_SPEED 0.1
float get_avglum() {
@ -113,7 +122,8 @@ float get_avglum() {
*/
bool reduced_sampling_co = is_first_inside_rect(vTexCoord, vec4(0.24,0.24 , 0.26,0.26) );
bool smoothed_sampling_co = is_first_inside_rect(vTexCoord, vec4(0.74,0.74 , 0.76,0.76) );
//WARNING: Use this for dynamic zoom only, since it returns 0.0 when dynzoom is disabled or when integer scaling is requested.
bool smoothed_sampling_co_dynzoom = is_first_inside_rect(vTexCoord, vec4(0.74,0.74 , 0.76,0.76) );
bool smoothed_sampling_co_nocc = is_first_inside_rect(vTexCoord, vec4(0.49,0.49 , 0.51,0.51)) ;
#ifndef D3D_WORKAROUND
if (reduced_sampling_co) {
@ -126,8 +136,8 @@ float get_avglum() {
return avglum_feedback;
}
if (smoothed_sampling_co) {
return mix(texture(avglum_passFeedback,vTexCoord).a, get_avg_lum_from_mip(), SMOOTHNESS_SPEED);
if (smoothed_sampling_co_dynzoom) {
return mix(texture(avglum_passFeedback,vTexCoord).a, get_avg_lum_from_mip(), SMOOTHNESS_SPEED) * vDo_dynzoom;
}
if (smoothed_sampling_co_nocc) {
@ -328,7 +338,7 @@ float get_autocrop() {
void main() {
/*Grab a mipmap from the flick_and_noise_pass.
/*Grab a mipmap from the colortools_and_ntsc_pass.
Calculate the average luminance from the smallest mipmap and put into the alpha channel
So that can be used:
1 - continuously at coordinate 0.5,0.5
@ -339,8 +349,7 @@ void main() {
if ( vAvglum_needed == 0.0) return;
vec4 pixel_out;
pixel_out.a = 1.0;
//We also reserve a sampling point in alpha channel to store if the resolution has changed.
//The value stored will be used by the first pass as an argument to sin() to shake the image.
@ -357,7 +366,7 @@ void main() {
} else if (is_first_inside_rect(vTexCoord_unscaled, vec4(AUTOCROP_SAMPLING_POINT-0.01, AUTOCROP_SAMPLING_POINT+0.01) )) {
if (AUTOCROP_MAX > 0.001)
if (vDo_autocrop == 1.0)
pixel_out.a = get_autocrop();
} else {
@ -368,7 +377,7 @@ void main() {
//Create a small mipmap to be used to light the bezel corners
//and by the bloom pass to identify bright areas.
if (vBezel_or_Bloom > 0.0)
if (DO_BEZEL > 0.0)
pixel_out.rgb = textureLod(colortools_and_ntsc_pass, vTexCoord, mip_lod).rgb;

View File

@ -144,9 +144,7 @@ void main() {
//Apply other content coords modifiers
//Use mipmap available in avglum_pass to identify bright areas.
//vec3 avglum = texture(avglum_pass,vCo_avglum).rgb;
//Use mipmap available in colortools_and_ntsc_pass to identify bright areas.
#define ZONE_LUMINANCE_LOD 2.0 //Higher values lead to ugly glitch when panning or banding in static content.
vec3 avglum = textureLod(colortools_and_ntsc_pass, vTexCoord, ZONE_LUMINANCE_LOD).rgb;

View File

@ -11,15 +11,15 @@
#define CYELLOW vec3(1.0,1.0,0.0)
#define CCUSTOM vec3(0.3,0.5,0.1)
#define DEBUG_COLOR vec3(0.1)
#define DEBUG_BLINK_TIME 100
#define DEBUG_GRADIENT_STEPS 64
#define DEBUG_COLOR vec3(1,1,1)
#define DEBUG_BLINK_TIME 50
#define DEBUG_GRADIENT_STEPS 255
//#define DEBUG
//#define DEBUG_COLOR_CALIB
#define DEBUG_TIME_FADE
#define DEBUG_COLOR_CALIB
//#define DEBUG_TIME_FADE
//#define DEBUG_SOLID_COLOR
//#define DEBUG_STEP_GRADIENT
//#define DEBUG_STEP_GRADIENT_V
@ -42,11 +42,12 @@
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 1) out vec3 vTemperature_rgb;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec3 vTemperature_rgb;
layout(location = 2) out float vNTSC_FILTER_FC;
layout(location = 3) out float vSubcarrierFrequency_mul_size_mul_TAU;
layout(location = 4) out float vPixelgrid_intr_gamma_adj;
layout(location = 3) out float vPixelgrid_intr_gamma_adj;
layout(location = 4) out vec3 vDebug;
layout(location = 5) out float vNTSC_weights[NTSC_FILTER_WIDTH_MAX];
@ -91,7 +92,6 @@ void main() {
if (DO_NTSC_ARTIFACTS > 0.0) {
vNTSC_FILTER_FC = NTSC_FILTER_FC * 0.1;
vSubcarrierFrequency_mul_size_mul_TAU = NTSC_FILTER_SCF * 0.1 * params.SourceSize.x * TAU;
float sum = 0.0;
float N = NTSC_FILTER_WIDTH;
// Compute sampling weights
@ -116,6 +116,65 @@ void main() {
vPixelgrid_intr_gamma_adj = 1.0;
if (pixelgrid_h_needed() && scanlines_will_alternate(is_interlaced()))
vPixelgrid_intr_gamma_adj = PIXELGRID_INTR_GAMMA_ADJ;
if (DO_TEST == 1.0) {
vDebug = vec3(0.0);
}
else if (DO_TEST == 2.0) {
vDebug = vec3(0.5);
}
else if (DO_TEST == 3.0) {
vDebug = vec3(1.0);
}
else if (DO_TEST == 4.0) {
float cycle = mod(params.FrameCount / DEBUG_BLINK_TIME, 4);
if (cycle <= 0) vDebug = vec3(vTexCoord.x);
else if (cycle <= 1) vDebug = vec3(vTexCoord.x, 0.0, 0.0);
else if (cycle <= 2) vDebug = vec3(0.0,vTexCoord.x,0.0);
else if (cycle <= 3) vDebug = vec3(0.0,0.0,vTexCoord.x);
}
else if (DO_TEST == 5.0) {
float cycle = mod(params.FrameCount / DEBUG_BLINK_TIME, 4);
if (cycle <= 0) vDebug = vec3(vTexCoord.y);
else if (cycle <= 1) vDebug = vec3(vTexCoord.y, 0.0, 0.0);
else if (cycle <= 2) vDebug = vec3(0.0,vTexCoord.y,0.0);
else if (cycle <= 3) vDebug = vec3(0.0,0.0,vTexCoord.y);
}
else if (DO_TEST == 6.0) {
float cycle = mod(params.FrameCount / DEBUG_BLINK_TIME, 6);
if (cycle <= 0) vDebug = vec3(vTexCoord.x, vTexCoord.y, 0.0);
else if (cycle <= 1) vDebug = vec3(vTexCoord.x, 0.0, vTexCoord.y);
else if (cycle <= 2) vDebug = vec3(vTexCoord.y, vTexCoord.x, 0.0);
else if (cycle <= 3) vDebug = vec3(vTexCoord.y, 0.0, vTexCoord.x);
else if (cycle <= 4) vDebug = vec3(0.0, vTexCoord.x, vTexCoord.y);
else if (cycle <= 5) vDebug = vec3(0.0, vTexCoord.y, vTexCoord.x);
}
else if (DO_TEST == 7.0) {
if (mod(params.FrameCount, DEBUG_BLINK_TIME*2) < DEBUG_BLINK_TIME)
vDebug = vec3(0.0) ;
else
vDebug = vec3(1.0) ;
}
else if (DO_TEST == 8.0) {
float time_fade = abs(sin(params.FrameCount/3.14/20));
vec3 color_fade = vec3(1.0) * time_fade;
vDebug = color_fade;
}
else if (DO_TEST == 9.0) {
float time_fade = abs(sin(params.FrameCount/3.14/20));
vec3 color_fade = vec3(1.0,0.0,0.0) * time_fade;
vDebug = color_fade;
}
else if (DO_TEST == 10.0) {
float time_fade = abs(sin(params.FrameCount/3.14/20));
vec3 color_fade = vec3(0.0, 1.0, 0.0) * time_fade;
vDebug = color_fade;
}
else if (DO_TEST == 11.0) {
float time_fade = abs(sin(params.FrameCount/3.14/20));
vec3 color_fade = vec3(0.0, 0.0, 1.0) * time_fade;
vDebug = color_fade;
}
}
@ -127,11 +186,10 @@ void main() {
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec3 vTemperature_rgb;
layout(location = 2) in float vNTSC_FILTER_FC;
layout(location = 3) in float vSubcarrierFrequency_mul_size_mul_TAU;
layout(location = 4) in float vPixelgrid_intr_gamma_adj;
layout(location = 3) in float vPixelgrid_intr_gamma_adj;
layout(location = 4) in vec3 vDebug;
layout(location = 5) in float vNTSC_weights[NTSC_FILTER_WIDTH_MAX];
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
@ -159,9 +217,12 @@ vec4 ntscdec(vec2 uv, vec3 RGB_ori) {
// Sample composite signal and decode to YIQ
vec2 YIQ_processed = vec2(0.0);
vec2 YIQ_processed_shifted = vec2(0.0);
//by doing another ntsc filtering with this shifted phase, we're able to better identify
//artifacts that will drive the blur modulation.
//vec2 YIQ_processed_shifted = vec2(0.0); (*2)
// by doing another ntsc filtering with this shifted phase, we're able to better identify
// artifacts that will drive the blur modulation.
//
// Note: this logic has been abandoned in favour of smoothing them via mipmap sampling
float phase_shift_for_blur;
int N = int(NTSC_FILTER_WIDTH);
@ -177,11 +238,13 @@ vec4 ntscdec(vec2 uv, vec3 RGB_ori) {
//which is controlled by next pass filtering (What a mess RetroArch!)
vec3 smp_mul_weight = vec3((texture_NEAREST(Source, pos, params.SourceSize).rgb * RGB2YIQ).x) * vNTSC_weights[n] ;
float phase = vSubcarrierFrequency_mul_size_mul_TAU * pos.x;
float carrier = (pos.x*params.SourceSize.x * NTSC_FILTER_SCF ) - (pos.y*params.SourceSize.y * NTSC_PHASE_SHIFT);
phase = carrier * (pi * (2/3.0));
//you could animate the artifacts, unsure if it is a real thing (?)
float shift = 0.0;
//float slowness = 1;
//shift = mod(params.FrameCount, params.SourceSize.y*slowness)*params.SourceSize.w/slowness;
float carrier = ((pos.x-shift)* params.SourceSize.x * NTSC_FILTER_SCF ) - ((pos.y)*params.SourceSize.y * NTSC_PHASE_SHIFT);
float phase = carrier * (pi * (2/3.0));
float phase_shift_for_blur = phase + PHASE_SHIFT_FOR_BLUR_K;
phase += ( pos.y * -pi10 ) * (NTSC_PHASE_SHIFT);
@ -189,21 +252,24 @@ vec4 ntscdec(vec2 uv, vec3 RGB_ori) {
//Just sample luminance via yiq:
//vec3 smp_mul_weight = vec3((texture(Source, pos).rgb * RGB2YIQ).x) * vNTSC_weights[n] ; <--- moved up for speedup through parallelism
YIQ_processed += vec2(cos(phase), sin(phase) ) * smp_mul_weight.yz;
YIQ_processed_shifted += vec2(cos(phase_shift_for_blur), sin(phase_shift_for_blur)) * smp_mul_weight.yz;
//Commented because of (*2)
//YIQ_processed_shifted += vec2(cos(phase_shift_for_blur), sin(phase_shift_for_blur)) * smp_mul_weight.yz;
}
vec3 YIQ_result_to_RGB = vec3(YIQ_ori.x, YIQ_ori.yz + YIQ_processed.xy * NTSC_MIX) * YIQ2RGB ;
YIQ_processed = abs(YIQ_processed);
YIQ_processed_shifted = abs(YIQ_processed_shifted);
//Commented because of (*2)
//YIQ_processed_shifted = abs(YIQ_processed_shifted);
//float artifacts_mask = (YIQ_processed.x + YIQ_processed.y) +
// (YIQ_processed_shifted.x + YIQ_processed_shifted.y);
float artifacts_mask = (YIQ_processed.x + YIQ_processed.y) +
(YIQ_processed_shifted.x + YIQ_processed_shifted.y);
float artifacts_mask = (YIQ_processed.x+YIQ_processed.y) * 2.0;
//artifacts_mask = pow(artifacts_mask, 0.25);
return vec4(YIQ_result_to_RGB, artifacts_mask);
}
@ -406,7 +472,7 @@ vec3 persistence(vec3 feedback, vec3 pixel_now, float start_decay, float late_pe
void main() {
vec2 co = vTexCoord;
if (AUTOCROP_MAX > 0.0)
if (AUTOCROP_MAX > 0.0 && need_NO_integer_scale() )
co = clamp(co, params.OriginalSize.zw * AUTOCROP_MIN,
1-params.OriginalSize.zw * AUTOCROP_MIN );
@ -417,6 +483,13 @@ void main() {
#endif
vec3 pixel_in = texture(Source, co).rgb;
//eventually return black pixel
#define _TOL 0.001
#define RECT01 vec4( vec2(0.0-_TOL), vec2(1.0+_TOL) )
if (is_first_outside_rect(co, RECT01))
pixel_in = vec3(0.0);
vec3 pixel_out = pixel_in;
//This will go into alpha channel to make glow aware of it and blur more.
//It could be configurable.
@ -446,6 +519,7 @@ void main() {
pixel_out = pixel_dedither(Source, co, params.SourceSize, tmin, DEDITHER_TRESHMAX, DEDITHER_STRENGTH, DEDITHER_STRENGTH2);
}
pixel_out.rgb = mix(pixel_out, vDebug, min(DO_TEST, 1.0) );
#ifdef DEBUG
//Cant "debug" ntsc artifacts because it samples from source (original)
@ -455,6 +529,7 @@ void main() {
if (DO_CCORRECTION == 1.0) {
pixel_out = color_tools(pixel_out, vTemperature_rgb);
//pixel_out = color_tools(pixel_out, vec3(1.0));
#ifndef D3D_WORKAROUND
if (ADAPTIVE_BLACK > 0.0) {
float avglum = texture(avglum_passFeedback, vec2(0.5,0.5)).a ;
@ -508,6 +583,9 @@ void main() {
pixel_out.rgb = pow(pixel_out.rgb, vec3(vPixelgrid_intr_gamma_adj));
artifact_mask = clamp(artifact_mask, 0.0, 1.0);
//pixel_out = pow(pixel_out, vec3(2.2));
FragColor = vec4(pixel_out, artifact_mask);
}

View File

@ -1,5 +1,8 @@
//Wrap any translation into an ifndef so that we can override them with a static include.
#ifndef DO_TEST
#define DO_TEST global.DO_TEST
#endif
#ifndef DO_CCORRECTION
#define DO_CCORRECTION global.DO_CCORRECTION
@ -121,6 +124,10 @@
#define DO_RF_NOISE global.DO_RF_NOISE
#endif
#ifndef RF_NOISE_SPARK
#define RF_NOISE_SPARK global.RF_NOISE_SPARK
#endif
#ifndef RF_NOISE_STRENGTH
#define RF_NOISE_STRENGTH global.RF_NOISE_STRENGTH
#endif
@ -129,6 +136,18 @@
#define DO_SAT_BLEED global.DO_SAT_BLEED
#endif
#ifndef DOT_C
#define DOT_C global.DOT_C
#endif
#ifndef DOT_C_YIQ
#define DOT_C_YUV global.DOT_C_YUV
#endif
#ifndef DOT_C_SPEED
#define DOT_C_SPEED global.DOT_C_SPEED
#endif
#ifndef SAT_BLEED_SIZE
#define SAT_BLEED_SIZE global.SAT_BLEED_SIZE
#endif
@ -149,16 +168,40 @@
#define DO_SHIFT_RGB global.DO_SHIFT_RGB
#endif
#ifndef SHIFT_R
#define SHIFT_R global.SHIFT_R
#ifndef DECON_RX
#define DECON_RX global.DECON_RX
#endif
#ifndef SHIFT_G
#define SHIFT_G global.SHIFT_G
#ifndef DECON_RY
#define DECON_RY global.DECON_RY
#endif
#ifndef SHIFT_B
#define SHIFT_B global.SHIFT_B
#ifndef DECON_GX
#define DECON_GX global.DECON_GX
#endif
#ifndef DECON_GY
#define DECON_GY global.DECON_GY
#endif
#ifndef DECON_BX
#define DECON_BX global.DECON_BX
#endif
#ifndef DECON_BY
#define DECON_BY global.DECON_BY
#endif
#ifndef EDGE_DEFOCUS
#define EDGE_DEFOCUS global.EDGE_DEFOCUS
#endif
#ifndef EDGE_DEFOCUS_AREA_INV
#define EDGE_DEFOCUS_AREA_INV global.EDGE_DEFOCUS_AREA_INV
#endif
#ifndef EDGE_DEFOCUS_DO_BLUR
#define EDGE_DEFOCUS_DO_BLUR global.EDGE_DEFOCUS_DO_BLUR
#endif
#ifndef OFFSET_STRENGTH
@ -226,6 +269,10 @@
#define DO_HALO global.DO_HALO
#endif
#ifndef HALO_DO_MASK_HELPER
#define HALO_DO_MASK_HELPER params.HALO_DO_MASK_HELPER
#endif
#ifndef HALO_SHARPNESS
#define HALO_SHARPNESS params.HALO_SHARPNESS
#endif
@ -334,10 +381,6 @@
#define BEZEL_CON global.BEZEL_CON
#endif
#ifndef BEZEL_INNER_ZOOM
#define BEZEL_INNER_ZOOM global.BEZEL_INNER_ZOOM
#endif
#ifndef BEZEL_FRAME_ZOOM
#define BEZEL_FRAME_ZOOM global.BEZEL_FRAME_ZOOM
#endif

View File

@ -18,6 +18,8 @@ layout(push_constant) uniform Push {
float HALO_GAMMA ;
float HALO_GAMMA_OUT;
float HALO_VS_SCAN ;
float HALO_DO_MASK_HELPER;
float DO_BLOOM ; //4
float BLOOM_QUALITY ; //1
float AMBI_ADD_ON_BLACK;
@ -25,6 +27,7 @@ layout(push_constant) uniform Push {
float AMBI_STRETCH_VERTICAL;
float AMBI_INT_OFFSET ;
float AMBI_SMP_INT_OFFSET ;
} params;
layout(std140, set = 0, binding = 0) uniform UBO {
@ -33,10 +36,10 @@ layout(std140, set = 0, binding = 0) uniform UBO {
vec4 FinalViewportSize;
vec4 final_passFeedbackSize;
vec4 in_glow_passSize;
vec4 FXAA_passSize;
vec4 placeholder;
vec4 avglum_passSize;
vec4 flick_and_noise_passSize;
vec4 upscale_passSize;
vec4 colortools_and_ntsc_passSize;
vec4 colortools_and_ntsc_passFeedbackSize;
@ -99,7 +102,7 @@ layout(std140, set = 0, binding = 0) uniform UBO {
float BEZEL_G;
float BEZEL_B;
float BEZEL_CON;
float BEZEL_INNER_ZOOM;
float BEZEL_FRAME_ZOOM;
float BEZEL_USE_STRAIGHT;
float BEZEL_RFL_BLR_SHD;
@ -147,9 +150,6 @@ layout(std140, set = 0, binding = 0) uniform UBO {
float BG_IMAGE_WRAP_MODE;
float DO_SHIFT_RGB;
float SHIFT_R;
float SHIFT_G;
float SHIFT_B;
float OFFSET_STRENGTH;
float DO_GLOBAL_SHZO;
@ -286,14 +286,40 @@ layout(std140, set = 0, binding = 0) uniform UBO {
float IN_GLOW_WARPSHARP_Y;
float IN_GLOW_WARPSHARP_GAMMA;
float DO_TEST ;
float DECON_RX;
float DECON_RY;
float DECON_GX;
float DECON_GY;
float DECON_BX;
float DECON_BY;
float EDGE_DEFOCUS;
float EDGE_DEFOCUS_AREA_INV;
float EDGE_DEFOCUS_DO_BLUR;
float RF_NOISE_SPARK;
float DOT_C;
float DOT_C_YUV;
float DOT_C_SPEED;
} global;
#pragma parameter LABEL0000 "Read the documentation in docs-ng.md text file" 0.0 0.0 0.0 0.0
#pragma parameter LABEL0001 "==================================================" 0.0 0.0 0.0 0.0
#pragma parameter LABEL0002 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0000 "Read the documentation in docs-ng.md text file" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0001 "==================================================" 0.0 0.0 0.0 1.0
#pragma parameter DO_TEST "★ Show test pattern ==>" 0.0 0.0 12.0 1.0
#pragma parameter LABELTEST " " 0.0 0.0 0.0 1.0
// Color correction
#pragma parameter IN_GLOW_GAMMA "★ Gamma In " 2.0 0.5 10.0 0.01
#pragma parameter GAMMA_OUT "★ Gamma out " 0.5 0.1 5.0 0.01
#pragma parameter LABEL0054 " " 0.0 0.0 0.0 1.0
// Color correction
#pragma parameter DO_CCORRECTION "★ Color corrections enable? (co) ==>" 0.0 0.0 1.0 1.0
#pragma parameter IN_GLOW_POWER " Input signal gain" 1.0 0.0 5.0 0.05
#pragma parameter LUMINANCE " Luminance push (>1.0=clip)" 0.0 0.0 1.5 0.05
@ -301,35 +327,28 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter CONTRAST " Contrast in (0.0=off)" 0.0 -1.0 1.0 0.01
#pragma parameter ADAPTIVE_BLACK " Adaptive black level range" 0.0 0.0 1.0 0.01
#pragma parameter TEMPERATURE " Temperature in (6500=off)" 6500.0 3000 14000.0 50.0
#pragma parameter IN_GLOW_GAMMA " Gamma In (applied at the beginning)" 1.0 1.0 10.0 0.1
#pragma parameter GAMMA_OUT " Gamma out (applied at the end)" 0.69 0.1 4.0 0.01
#pragma parameter COLOR_MONO_COLORIZE " Monochrome screen colorization" 0.0 0.0 1.0 0.1
#pragma parameter COLOR_MONO_HUE1 " . Hue bright" 0.25 0.0 1.0 0.01
#pragma parameter COLOR_MONO_HUE2 " . Hue dark" 0.3 0.0 1.0 0.01
#pragma parameter COLOR_MONO_HUE_BIAS " . Hue bright-dark bias" 0.0 -2.0 2.0 0.01
#pragma parameter SATURATION " Saturation in (1.0=off)" 1.0 0.0 2.0 0.01
#pragma parameter VIBRANCE " Vibrance in (0.0=off)" 0.0 0.0 5.0 0.1
#pragma parameter LABEL0003 " " 0.0 0.0 0.0 0.0
#pragma parameter VIBRANCE " Vibrance in (0.0=off)" 0.0 0.0 5.0 0.01
#pragma parameter LABEL0003 " " 0.0 0.0 0.0 1.0
// FXAA
// Apply an antialiasing filter via FXAA from Nvidia.
#pragma parameter DO_FXAA "★ FXAA enable? (*f) ==>" 0.0 0.0 1.0 1.0
#pragma parameter LABEL0004 " " 0.0 0.0 0.0 0.0
// AA
// Apply an antialiasing filters.
#pragma parameter DO_FXAA "★ Antialiasing enable? (fxaa|ddt-xbr-lv1) ==>" 0.0 0.0 2.0 1.0
#pragma parameter LABEL0004 " " 0.0 0.0 0.0 1.0
// RF Noise
#pragma parameter DO_RF_NOISE "★ RF Noise enable? (rf) ==>" 0.0 0.0 1.0 1.0
#pragma parameter RF_NOISE_STRENGTH " Strength" 0.05 0.0 1.0 0.005
#pragma parameter LABEL0005 " " 0.0 0.0 0.0 0.0
// Dedithering
#pragma parameter DO_DEDITHER "★ Dedither enable? (not with NTSC artifacts) ==>" 0.0 0.0 1.0 1.0
#pragma parameter DEDITHER_TRESHMAX " Sensitivity" 1.2 0.0 3.0 0.1
#pragma parameter DEDITHER_STRENGTH " Basic search strength" 0.8 0.0 1.0 0.1
#pragma parameter DEDITHER_STRENGTH2 " Extensive search strength" 0.0 0.0 1.0 0.1
#pragma parameter LABEL0006 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0006 " " 0.0 0.0 0.0 1.0
// NTSC color artifacting
#pragma parameter DO_NTSC_ARTIFACTS "★ CVBS: NTSC color artifacts enable? (nt) ==>" 0.0 0.0 1.0 1.0
@ -338,41 +357,56 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter NTSC_FILTER_SCF " Subcarrier Frequency mul" 4.57 1.0 10.0 0.01
#pragma parameter NTSC_FILTER_FC " Frequency cutoff" 2.5 0.0 10.0 0.1
#pragma parameter NTSC_PHASE_SHIFT " Phase shift" 0.0 0.0 1.0 1.0
#pragma parameter label_blut_ntsc " 1 and 2 need Glow or Bandwidth Limited chroma" 0.0 0.0 0.0 0.0
#pragma parameter label_blut_ntsc " 1 and 2 need Glow or Bandwidth Limited chroma" 0.0 0.0 0.0 1.0
#pragma parameter NTSC_ARTF_TRSH " . Consider artifacts above this treshold" 0.1 0.0 1.0 0.01
#pragma parameter NTSC_SHOW_ARTF_MASK " . Show selected artifacts mask (need glow/blur enabled)" 0.0 0.0 1.0 1.0
#pragma parameter NTSC_ARTF_NOBLUR " . 1* Under treshold: Cancel blur (Glow)" 0.0 0.0 8.0 0.01
#pragma parameter NTSC_ARTF_NOBLEED " . 2* Under treshold: Cancel Bandwidth limited chroma" 0.0 0.0 1.0 0.01
#pragma parameter NTSC_ARTF_ZAP " . 3* Under treshold: Cancel artifacts" 0.0 0.0 1.0 0.01
#pragma parameter LABEL0007 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0007 " " 0.0 0.0 0.0 1.0
// YIQ/YUV bandwidth limited chroma bleeding.
#pragma parameter DO_SAT_BLEED "★ CVBS: Bandwidth limited chroma enable? (cv) ==>" 0.0 0.0 1.0 1.0
#pragma parameter SAT_BLEED_PAL " Use PAL colorspace, not NTSC" 0.0 0.0 1.0 1.0
#pragma parameter SAT_BLEED_PAL " Colorspace (NTSC, PAL)" 0.0 0.0 1.0 1.0
#pragma parameter SAT_BLEED_STRENGTH " Strength" 1.0 0.0 5.0 0.01
#pragma parameter SAT_BLEED_SIZE " Size (capped to 5.0 in d3d)" 5.0 1.0 20.0 1.0
#pragma parameter SAT_BLEED_FALLOFF " Falloff" 1.7 1.0 2.0 0.01
#pragma parameter LABEL0008 " " 0.0 0.0 0.0 0.0
#pragma parameter SAT_BLEED_FALLOFF " Falloff" 1.7 1.0 2.0 0.01
#pragma parameter LABEL0008 " " 0.0 0.0 0.0 1.0
#pragma parameter DOT_C "★ CVBS: Dot crawl ==>" 0.0 0.0 2.0 0.01
#pragma parameter DOT_C_YUV " Colorspace (NTSC, PAL)" 0.0 0.0 1.0 1.0
#pragma parameter DOT_C_SPEED " Speed (<0.0 = vertical)" 10.0 -10.0 10.0 0.5
#pragma parameter LABEL0056 " " 0.0 0.0 0.0 1.0
//Phosphor persistence
#pragma parameter DO_PPERSISTENCE "★ Persistence of phosphors enable? (ppe) ==>" 0.0 0.0 1.0 1.0
#pragma parameter PPERSISTENCE_START " Early decay" 0.9 0.0 1.0 0.05
#pragma parameter PPERSISTENCE_END " Late Persistence" 0.5 0.0 2.0 0.05
#pragma parameter LABEL0009 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0009 " " 0.0 0.0 0.0 1.0
//Deconvergence
#pragma parameter DO_SHIFT_RGB "★ Deconvergence enable? (de) ==>" 0.0 0.0 1.0 1.0
#pragma parameter OFFSET_STRENGTH " Strength" 0.6 0.0 1.0 0.05
#pragma parameter SHIFT_R " Red offset" -40.0 -210.0 189.0 1
#pragma parameter SHIFT_G " Green offset" 2.0 -210.0 189.0 1
#pragma parameter SHIFT_B " Blue offset" 40.0 -210.0 189.0 1
#pragma parameter LABEL0010 " " 0.0 0.0 0.0 0.0
#pragma parameter DO_SHIFT_RGB "★ Deconvergence/Defocus enable? (de) ==>" 0.0 0.0 1.0 1.0
#pragma parameter OFFSET_STRENGTH " Strength" 0.6 0.0 1.0 0.05
#pragma parameter DECON_RX " Red x offset" 0.0 -50.0 50.0 0.25
#pragma parameter DECON_RY " Red y offset" -1.0 -50.0 50.0 0.25
#pragma parameter DECON_GX " Green x offset" 1.0 -50.0 50.0 0.25
#pragma parameter DECON_GY " Green y offset" 0.0 -50.0 50.0 0.25
#pragma parameter DECON_BX " Blue x offset" 0.0 -50.0 50.0 0.25
#pragma parameter DECON_BY " Blue y offset" 1.0 -50.0 50.0 0.25
#pragma parameter EDGE_DEFOCUS " . Deconvergence increases near edges (1=no increase)" 2.0 1.0 10.0 0.1
#pragma parameter EDGE_DEFOCUS_DO_BLUR " . Blur increases near edges when glow/blur is enabled" 0.0 0.0 1.0 0.05
#pragma parameter EDGE_DEFOCUS_AREA_INV " . Focused Area" 0.4 0.0 0.5 0.01
#pragma parameter LABEL0010 " " 0.0 0.0 0.0 1.0
// RF Noise
#pragma parameter DO_RF_NOISE "★ RF Noise? (Pre glow, Off, Post glow) ==>" 0.0 -1.0 1.0 1.0
#pragma parameter RF_NOISE_STRENGTH " Uniform noise" 0.05 0.0 1.0 0.01
#pragma parameter RF_NOISE_SPARK " Snow noise" 0.07 0.0 1.0 0.01
#pragma parameter LABEL0005 " " 0.0 0.0 0.0 1.0
// Input Blur / light glowing
#pragma parameter DO_IN_GLOW "★ Glow/Blur enable? (gl) ==>" 0.0 0.0 1.0 1.0
@ -384,31 +418,31 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter IN_GLOW_WARPSHARP_X " Warped glow (X)" 0.4 0.0 2.0 0.01
#pragma parameter IN_GLOW_WARPSHARP_Y " Warped glow (Y)" 0.4 0.0 2.0 0.01
#pragma parameter IN_GLOW_WARPSHARP_GAMMA " Warped glow dynamics (1.0=linear)" 1.0 0.01 1.0 0.01
#pragma parameter LABEL0011 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0011 " " 0.0 0.0 0.0 1.0
#pragma parameter TATE "★ Tate mode (0:disabled 1:auto 2:forced)" 1.0 0.0 2.0 1.0
#pragma parameter LABEL0012 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0012 " " 0.0 0.0 0.0 1.0
#pragma parameter RESSWITCH_GLITCH_SIZE "★ Glitch amount if vertical resolution changes" 0.1 0.0 0.5 0.05
#pragma parameter LABEL0013 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0013 " " 0.0 0.0 0.0 1.0
#pragma parameter LABEL_INTERLACE "★ Hi-resolution scanlines handling" 1.0 1.0 1.0 0.0
#pragma parameter MIN_LINES_INTERLACED " . Consider Hi-Resolution above # lines (0=never):" 380.0 0.0 1024 1.0
#pragma parameter PIXELGRID_INTR_DISABLE_Y " . Hi-Res scanlines type (read docs):" -1.0 -2.0 2.0 1.0
#pragma parameter LABEL0036 " (-2: Faker-Interlaced, -1: Fake-Interlaced)" 0.0 0.0 0.0 0.0
#pragma parameter LABEL0037 " ( 0: Interlaced, 1: No scanlines, 2: Don't interlace)" 0.0 0.0 0.0 0.0
#pragma parameter LABEL0036 " (-2: Faker-Interlaced, -1: Fake-Interlaced)" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0037 " ( 0: Interlaced, 1: No scanlines, 2: Don't interlace)" 0.0 0.0 0.0 1.0
#pragma parameter PIXELGRID_INTR_GAMMA_ADJ " . Interlaced brighness push (less is more, not for OLEDs)" 0.9 0.5 1.0 0.01
#pragma parameter PIXELGRID_INTR_FLICK_MODE " . Scanlines flicker (0=off,1=on,2=if Hi-Res)" 2.0 0.0 2.0 1.0
#pragma parameter PIXELGRID_INTR_FLICK_POWR " . Flicker power" 0.12 0.0 8.0 0.01
#pragma parameter LABEL0014 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0014 " " 0.0 0.0 0.0 1.0
// pixel Grid
#pragma parameter DO_PIXELGRID "★ Low level Phosphor grid enable? (ph) ==>" 0.0 0.0 1.0 1.0
#pragma parameter PIXELGRID_OVERMASK " Overmask (1.0 = neutral)" 1.0 0.0 2.0 0.02
#pragma parameter LABEL0015 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0015 " " 0.0 0.0 0.0 1.0
#pragma parameter DO_PIXELGRID_H " ★ Scanlines (0 to disable)" 1.0 0.0 1.25 0.05
#pragma parameter PIXELGRID_DOUBLESCAN " . Double-scan low input resolutions" 0.0 0.0 1.0 1.0
@ -425,24 +459,24 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter PIXELGRID_DECON_B_H " . Deconvergence Y: B phosphor" 0.0 -1.6 1.6 0.1
#pragma parameter PIXELGRID_H_DEDOT " . Dedot mask between scanlines (use only if needed!)" 0.0 0.0 2.0 0.1
#pragma parameter LABEL0016 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0016 " " 0.0 0.0 0.0 1.0
#pragma parameter DO_PIXELGRID_W " ★ Horizontal mask (0 to disable)" 1.0 0.0 1.0 0.05
#pragma parameter DO_PIXELGRID_W " ★ Horizontal mask (0 to disable)" 1.0 0.0 1.0 0.01
#pragma parameter PIXELGRID_SIZE_W " . Resolution: (core or screen)" 1.0 0.0 1.0 1.0
#pragma parameter PIXELGRID_MUL_X " . Cell size multiplier x (neg=divider):" 1.0 -8.0 8.0 0.125
#pragma parameter PIXELGRID_H_PRST " . Mask type preset (0: for manual)" 3.0 0.0 7.0 1.0
#pragma parameter LABEL0038 " (1:gm 2:gmx 3:rgb 4:rgbx 5:rbg 6:rbgx 7:wx)" 0.0 0.0 0.0 0.0
#pragma parameter PIXELGRID_H_PRST " . Mask type preset (0: for manual)" 3.0 0.0 8.0 1.0
#pragma parameter LABEL0038 " (1:gm 2:gmx 3:rgb 4:rgbx 5:rbg 6:rbgx 7:wx 8:rgxb)" 0.0 0.0 0.0 1.0
#pragma parameter PIXELGRID_H_COUNT " . 0: Phosphors+gap count (mask size)" 3.0 1.0 4.0 1.0
#pragma parameter PIXELGRID_R_SHIFT " . 0: R phospor position" 0.0 0.0 4.0 0.1
#pragma parameter PIXELGRID_G_SHIFT " . 0: G phospor position" 1.0 0.0 4.0 0.1
#pragma parameter PIXELGRID_B_SHIFT " . 0: B phospor position" 2.0 0.0 4.0 0.1
#pragma parameter PIXELGRID_MIN_W " . Phosphors width Min" 0.25 0.05 1.0 0.01
#pragma parameter PIXELGRID_MAX_W " . Phosphors width Max" 0.25 0.05 1.0 0.01
#pragma parameter PIXELGRID_MIN_W " . Phosphors width Min" 0.25 0.05 1.0 0.05
#pragma parameter PIXELGRID_MAX_W " . Phosphors width Max" 0.25 0.05 1.0 0.05
#pragma parameter PIXELGRID_GAMMA_W " . Phosphors width min->max gamma:" 4.2 1.0 8.00 0.1
#pragma parameter PIXELGRID_BASAL_GRID " . Black level of the unexcided phosphor grid" 0.0 0.0 10.0 0.01
#pragma parameter LABEL0017 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0017 " " 0.0 0.0 0.0 1.0
#pragma parameter PIXELGRID_Y_MASK " ★ Vertical cell Mask (aperturegrille/slotmask)" 0.5 0.0 1.0 0.05
#pragma parameter PIXELGRID_Y_MASK_COORDS " . Resolution: (core or screen)" 1.0 0.0 1.0 1.0
@ -453,14 +487,14 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter PIXELGRID_Y_MASK_ON_WHITE " . Fadeout under light" 0.5 0.0 2.0 0.01
#pragma parameter PIXELGRID_Y_SPARK " . Sparkling look punch" 0.0 0.0 8.0 0.1
#pragma parameter LABEL0018 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0018 " " 0.0 0.0 0.0 1.0
#pragma parameter PIXELGRID_DO_SHADOWMASK " ★ Shadowmask " 0.0 0.0 1.0 1.0
#pragma parameter PIXELGRID_SHADOWMASK_SHIFT " . X staggering " 1.0 0.5 4.0 0.5
#pragma parameter PIXELGRID_SHADOWMASK_H " . Phosphor height " 1.0 1.0 10.0 1.0
#pragma parameter LABEL0019 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0019 " " 0.0 0.0 0.0 1.0
// Dot matrix emulation
@ -473,20 +507,22 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter DOT_M_MBLUR_MODE " . Inertia on: both,white,black" 0.0 0.0 2.0 1.0
#pragma parameter DOT_M_SHADOW_STR " Shadow strength (disables deconvergence)" 0.0 0.0 1.0 0.01
#pragma parameter DOT_M_SHADOW_OFF " . Shadow offset" 0.0 -1.0 1.0 0.01
#pragma parameter LABEL0020 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0020 " " 0.0 0.0 0.0 1.0
// Halo
#pragma parameter DO_HALO "★ Halo enable? (ha) ==>" 0.0 0.0 1.0 1.0
#pragma parameter HALO_NO_PREGAIN " Pre-attenuate input signal gain to 1x" 0.0 0.0 1.0 1.0
#pragma parameter HALO_POWER " Strength (negative = 10x precision)" 0.9 -50.0 5.0 0.01
#pragma parameter HALO_SHARPNESS " Sharpness" 3.00 0.05 7.0 0.05
#pragma parameter HALO_GAMMA " Gamma in, the higher, the less the halo on dark colors" 2.0 1.0 10.0 0.05
#pragma parameter HALO_GAMMA_OUT " Gamma out" 1.0 0.25 4.0 0.1
#pragma parameter HALO_VS_SCAN " Light up scanline gaps and dot grid gaps too" 0.0 0.0 1.0 0.01
#pragma parameter LABEL0021 " " 0.0 0.0 0.0 0.0
#pragma parameter DO_HALO "★ Halo or Mask helper enable? (ha) ==>" 0.0 0.0 1.0 1.0
#pragma parameter HALO_NO_PREGAIN " Halo: Pre-attenuate input signal gain to 1x" 0.0 0.0 1.0 1.0
#pragma parameter HALO_POWER " Halo: Strength (negative = 10x precision)" 0.9 -50.0 5.0 0.01
#pragma parameter HALO_SHARPNESS " Halo: Sharpness" 3.00 0.05 7.0 0.05
#pragma parameter HALO_GAMMA " Halo: Gamma in: Higher -> less halo on dark colors" 2.0 1.0 10.0 0.05
#pragma parameter HALO_GAMMA_OUT " Halo: Gamma out" 1.0 0.25 4.0 0.05
#pragma parameter HALO_DO_MASK_HELPER " Mask helper: Additional brighness if horizontal mask clips" 0.0 0.0 1.0 0.05
#pragma parameter LABEL_HALO_HELP " (Mask helper: read docs-ng.md for help)" 0.0 0.0 0.0 1.0
#pragma parameter HALO_VS_SCAN " Both: Light scanlines and dot grid gaps" 0.0 0.0 1.0 0.01
#pragma parameter LABEL0021 " " 0.0 0.0 0.0 1.0
@ -502,7 +538,7 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter BLOOM_EYE_INERTIA " Modulate: Time before eye adaption starts" 1500 10.0 10000 50.0
#pragma parameter BLOOM_OVER_WHITE " Modulate: Strength on bright areas (0 = aura)" 0.5 0.0 1.0 0.05
#pragma parameter BLOOM_BYPASS " Bypass/Solo (1=Unmodulated, 2=Modulated)" 0.0 0.0 2.0 1.0
#pragma parameter LABEL0022 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0022 " " 0.0 0.0 0.0 1.0
@ -512,56 +548,58 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter GEOM_WARP_Y " Warp Y" 0.32 0.0 6.0 0.01
#pragma parameter GEOM_CORNER_SIZE " Corners radius" 0.005 0.002 0.1 0.001
#pragma parameter GEOM_CORNER_SMOOTH " Edges sharpness" 200.0 50.0 1000.0 10.0
#pragma parameter LABEL0023 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0023 " " 0.0 0.0 0.0 1.0
//Bezel related
#pragma parameter DO_BEZEL "★ Bezel enable? (be) ==>" 0.0 0.0 1.0 1.0
#pragma parameter BEZEL_USE_STRAIGHT " Straight" 0.0 0.0 1.0 1.0
#pragma parameter BEZEL_INNER_ZOOM " Inner zoom (ignored with integer scaling)" -0.18 -1.5 0.5 0.001
#pragma parameter BEZEL_FRAME_ZOOM " Frame zoom" 0.0 -1.5 0.5 0.001
#pragma parameter BEZEL_FRAME_ZOOM " Frame Alignment" 0.179 -1.5 0.5 0.001
#pragma parameter BEZEL_R " Color: Red" -0.35 -1.0 1.0 0.005
#pragma parameter BEZEL_G " Color: Green" -0.35 -1.0 1.0 0.005
#pragma parameter BEZEL_B " Color: Blue" -0.35 -1.0 1.0 0.005
#pragma parameter BEZEL_CON " Contrast" 1.3 0.0 10.0 0.01
#pragma parameter BEZEL_RFL_ZOOM " Reflections zoom" 0.05 -1.5 0.5 0.01
#pragma parameter BEZEL_REFL_STRENGTH " Reflections strength" 0.5 0.0 2.0 0.01
#pragma parameter BEZEL_CORNER_DARK " Less reflections in corners" 0.8 0.0 1.0 0.05
#pragma parameter BEZEL_RFL_BLR_SHD " Reflections sharpness" -0.2 -1.5 0.8 0.01
#pragma parameter BEZEL_ROUGHNESS " Reflections roughness" 1.0 0.0 5.0 0.1
#pragma parameter BEZEL_ROUGHNESS " Surface roughness" 1.0 0.0 5.0 0.1
#pragma parameter BEZEL_DIFFUSION_STR " Diffusion strength" 0.2 0.0 1.0 0.01
#pragma parameter BEZEL_SPCL_STRENGTH " Specularity strength" 0.5 0.0 3.0 0.05
#pragma parameter BEZEL_LIGHT_NO_FADEOUT " Light fadeout distance" 0.5 0.0 1.0 0.01
#pragma parameter BEZEL_CORNER_DARK " Darken corners" 0.8 0.0 2.0 0.05
#pragma parameter LABEL0024 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0024 " " 0.0 0.0 0.0 1.0
//Global Zoom/Offset
#pragma parameter DO_GLOBAL_SHZO "★ Global shift/zoom enable? (ignored if integer scaling) ==>" 0.0 0.0 1.0 1.0
#pragma parameter GLOBAL_OFFX " X axis shift " 0.0 -1.0 1.0 0.0005
#pragma parameter GLOBAL_OFFY " Y axis shift " 0.0 -1.0 1.0 0.0005
#pragma parameter GLOBAL_ZOOM " Zoom" 1.2 0.0 3.0 0.0005
#pragma parameter LABEL0029 " " 0.0 0.0 0.0 1.0
//Background Image
#pragma parameter DO_BG_IMAGE "★ Back/Foreground image enable? (ba) ==>" 0.0 0.0 1.0 1.0
#pragma parameter LABEL0039 " !! RetroArch aspect needs to be set to Full" 1.0 1.0 1.0 1.0
#pragma parameter LABEL0039 " !! RetroArch aspect needs to be set to Full" 0.0 0.0 0.0 1.0
#pragma parameter BG_IMAGE_OVER " Image over content (alpha channel driven)?" 0.0 0.0 1.0 1.0
#pragma parameter BG_IMAGE_OFFX " Shift Image over X axis" 0.0 -1.0 1.0 0.0005
#pragma parameter BG_IMAGE_OFFY " Shift Image over Y axis" 0.0 -1.0 1.0 0.0005
#pragma parameter BG_IMAGE_ZOOM " Zoom Image" 1.0 -1.0 3.0 0.0005
#pragma parameter BG_IMAGE_ROTATION " Rotate/flip (0=auto,1/-1=no change,<0 for rotated games)" 0.0 -8.0 8.0 1.0
#pragma parameter BG_IMAGE_ROTATION " Rotate/flip (0=auto,1=no change,<0 for rotated games)" 0.0 -8.0 8.0 1.0
#pragma parameter BG_IMAGE_NIGHTIFY " Nightify image" 0.0 0.0 1.0 0.1
#pragma parameter BG_IMAGE_WRAP_MODE " Wrap mode: default, clamp to border, edge, repeat" 0.0 0.0 3.0 1.0
#pragma parameter LABEL0025 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0025 " " 0.0 0.0 0.0 1.0
//Backdrop image
#pragma parameter DO_BACKDROP "★ Backdrop mirrored image enable? ==>" 0.0 0.0 1.0 1.0
#pragma parameter BACKDROP_OFFX " Shift backdrop over X axis" 0.0 -1.0 1.0 0.0005
#pragma parameter BACKDROP_OFFY " Shift backdrop over Y axis" 0.0 -1.0 1.0 0.0005
#pragma parameter BACKDROP_ZOOM " Zoom backdrop" 1.0 -1.0 3.0 0.0005
#pragma parameter LABEL0026 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0026 " " 0.0 0.0 0.0 1.0
//Back leds
//Emulates leds under the monitor frame that slowly reacts to image contents
#pragma parameter DO_AMBILIGHT "★ Ambient light leds enable? (am) ==> " 1.0 0.0 1.0 1.0
#pragma parameter LABEL0040 " !! RetroArch aspect needs to be set to Full" 1.0 1.0 1.0 1.0
#pragma parameter LABEL0040 " !! RetroArch aspect needs to be set to Full" 0.0 0.0 0.0 1.0
#pragma parameter AMBI_STEPS " Slowness" 60.0 5.0 1000.0 5.0
#pragma parameter AMBI_FALLOFF " Led power/falloff" 0.4 0.1 3.0 0.01
#pragma parameter AMBI_POWER " Led Saturation" 1.8 0.0 100.0 0.05
@ -575,7 +613,7 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter AMBI_BG_IMAGE_BLEND_MODE " Back/Foreground image alpha blend (0=mix, 1=add)" 0.0 0.0 1.0 1.0
#pragma parameter AMBI_ADD_ON_BLACK " Foggy (power on dark colors, add mode only) " 1.0 0.0 1.0 0.05
#pragma parameter AMBI_BG_IMAGE_FORCE " Always colorize Back/Foreground image (add mode only) " 0.0 0.0 1.0 0.1
#pragma parameter LABEL0027 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0027 " " 0.0 0.0 0.0 1.0
@ -589,27 +627,19 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter S_POSITION_Y " Y Position" 0.5 -2.0 2.0 0.05
#pragma parameter S_SIZE " Size" 0.36 0.0 3.0 0.01
#pragma parameter S_POWER " Power" 0.12 0.01 1.0 0.01
#pragma parameter LABEL0028 " " 0.0 0.0 1.0 1.0
#pragma parameter LABEL0028 " " 0.0 0.0 0.0 1.0
//Global Zoom/Offset
#pragma parameter DO_GLOBAL_SHZO "★ Global shift/zoom enable? (zo) ==>" 0.0 0.0 1.0 1.0
#pragma parameter GLOBAL_OFFX " X axis shift " 0.0 -1.0 1.0 0.0005
#pragma parameter GLOBAL_OFFY " Y axis shift " 0.0 -1.0 1.0 0.0005
#pragma parameter GLOBAL_ZOOM " Zoom" 1.2 0.0 3.0 0.0005
#pragma parameter LABEL0029 " " 0.0 0.0 1.0 1.0
//Tilt
#pragma parameter DO_TILT "★ Tilt enable? (ti) ==>" 0.0 0.0 1.0 1.0
#pragma parameter TILT_X " Tilt along X axis" 0.25 -0.5 0.5 0.01
#pragma parameter LABEL0035 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0035 " " 0.0 0.0 0.0 1.0
//Aspect Ratio
#pragma parameter label_ar "★ Aspect Ratio (as) " 1.0 1.0 1.0 0.0
#pragma parameter ASPECT_X " Aspect Ratio Numerator (<=0 for a preset)" 0.0 -6.0 256. 1.0
#pragma parameter label_ar "★ Aspect (active with ambient light or background image only)" 1.0 1.0 1.0 0.0
#pragma parameter ASPECT_X " Aspect Ratio Numerator (<=0 for a preset)" 0.0 -7.0 256. 1.0
#pragma parameter ASPECT_Y " Aspect Ratio Denominator" 3.0 0.0 256. 1.0
#pragma parameter LABEL0042 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0042 " " 0.0 0.0 0.0 1.0
#pragma parameter LABEL0043 " Presets reference list:" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0044 " (0 = MAME 1.33)" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0045 " (-1 = NTSC 1.5)" 0.0 0.0 0.0 1.0
@ -618,42 +648,42 @@ layout(std140, set = 0, binding = 0) uniform UBO {
#pragma parameter LABEL0048 " (-4 = Megadrive 10/7)" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0049 " (-5 = Uncorrected)" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0050 " (-6 = MAME rotated/TATE 0.75)" 0.0 0.0 0.0 1.0
#pragma parameter LABEL0051 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0051 " " 0.0 0.0 0.0 1.0
//Modulate the image zooming depending on the image luminosity.
#pragma parameter DO_DYNZOOM "★ Luminosity tied zoom (!!OBSTRUCTS integer scale!!) ==>" 0.015 0.0 1.0 0.005
#pragma parameter LABEL0032 " " 0.0 0.0 0.0 0.0
#pragma parameter DO_DYNZOOM "★ Luminosity tied zoom (ignored if integer scaling) ==>" 0.015 0.0 1.0 0.005
#pragma parameter LABEL0032 " " 0.0 0.0 0.0 1.0
//Autocrop
#pragma parameter AUTOCROP_MAX "★ Autocrop: maximum amount (!!OBSTRUCTS integer scale!!) ==>" 0.0 0.0 0.5 0.01
#pragma parameter AUTOCROP_MAX "★ Autocrop: maximum amount (ignored if integer scaling) ==>" 0.0 0.0 0.5 0.01
#pragma parameter AUTOCROP_MIN " Number of mandatory lines to crop" 1.0 0.0 10.0 1.0
#pragma parameter AUTOCROP_SAMPLES " Samples per frame (faster response, higher gpu use)" 20.0 0.0 300.0 1.0
#pragma parameter AUTOCROP_SAMPLE_SIZE " Sample size (big speedup, less accurate)" 2.0 0.0 5.0 1.0
#pragma parameter AUTOCROP_STEADINESS " Scene change treshold (0 = continuous cropping)" 0.2 0.0 0.5 0.01
#pragma parameter AUTOCROP_TRANSITION_SPEED " Transition speed" 0.1 0.05 1.0 0.05
#pragma parameter LABEL0033 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0033 " " 0.0 0.0 0.0 1.0
//Content geomerty overrides
#pragma parameter DO_GAME_GEOM_OVERRIDE "★ Override content geometry enable? (ov)==>" 0.0 0.0 1.0 1.0
#pragma parameter GAME_GEOM_INT_SCALE " Integer scale (disables inner zoom) 2=No keep aspect" 0.0 0.0 2.0 1.0
#pragma parameter GAME_GEOM_INT_SCALE " Integer scale (2=No keep aspect)" 0.0 0.0 2.0 1.0
#pragma parameter GAME_GEOM_INT_SCALE_MAX " . Maximum integer scale" 10.0 1.0 100.0 1.0
#pragma parameter GAME_GEOM_INT_SCALE_OVR " . Permit integer overscale by" 1.04 1.00 1.1 0.01
#pragma parameter LABEL0052 " !! The following will override integer scale" 1.0 1.0 1.0 1.0
#pragma parameter LABEL0052 " !! The following will override integer scale" 0.0 0.0 0.0 1.0
#pragma parameter GAME_GEOM_ASPECT " Aspect (0 = unchanged)" 0.0 0.0 3.0 0.005
#pragma parameter GAME_GEOM_VSHIFT " Vertical position" 0.0 -10.0 10.0 0.01
#pragma parameter GAME_GEOM_HSHIFT " Horizontal position" 0.0 -10.0 10.0 0.01
#pragma parameter GAME_GEOM_ZOOM " Zoom" 1.0 0.0 2.0 0.01
#pragma parameter GAME_GEOM_OFF_FIX " Sharp hack through offset (0.0=disable)" 0.0 0.0 100.0 1
#pragma parameter LABEL0034 " " 0.0 0.0 0.0 0.0
#pragma parameter LABEL0034 " " 0.0 0.0 0.0 1.0
//Delta render
#pragma parameter LABEL0053 " !THE FOLLOWING FEATURES ARE STATIC, SEE docs-ng.md TO ENABLE" 1.0 1.0 1.0 1.0
#pragma parameter LABEL0053 " !THE FOLLOWING FEATURES ARE STATIC, SEE docs-ng.md TO ENABLE" 0.0 0.0 0.0 1.0
#pragma parameter DELTA_RENDER_FORCE_REFRESH "★ Delta render force refresh interval ? ==>" 4.0 1.0 3600.0 1.0
#pragma parameter DELTA_RENDER_CHECK_AREA " Delta render area size" 1.0 0.0 10.0 1.0
#pragma parameter LABEL0041 " " 0.0 0.0 1.0 1.0
#pragma parameter LABEL0041 " " 0.0 0.0 0.0 1.0
#pragma parameter SERVICE1 "Don't use me, for debug purposes only" 0.5 0.0 1.0 0.01
#pragma parameter SERVICE1 "Don't use me, for debug purposes only" 0.0 -5.0 5.0 0.01
// This is for a patched retroarch version I'm testing (24/03/04)
#pragma inject_preset_code DEFINES_FROM_PRESET

View File

@ -30,11 +30,11 @@ layout(location = 3) out float vIsRotated;
layout(location = 4) out float vScanlinePeriod;
layout(location = 5) out float vInterlace_offset;
layout(location = 6) out float vIn_aspect;
layout(location = 7) out float vBEZEL_INNER_ZOOM_adapted;
//NOTE location 7 is free to use (freed, was a float)
layout(location = 8) out float vDo_Tate;
layout(location = 9) out vec3 vDotMat_Grid_Color;
layout(location = 10) out vec4 vPG_offsets_and_size;
layout(location = 11) out vec2 vPG_freq_base_screen;
layout(location = 12) out vec2 vPG_freq_base_screen_unfloored;
layout(location = 13) out float vPG_period_multiplier_x;
layout(location = 14) out vec2 vPG_OriginalSize_tated_mul_pi;
@ -72,17 +72,19 @@ vec2 get_bg_image_coords(vec2 in_vOutputCoord, bool isrotated) {
// >+1 = manual rotation for straight games
// <-1 = manual rotation for rotated games
//Auto rotation, no user change allowed:
//handle automatic rotation of bg image for rotated games
if (BG_IMAGE_ROTATION == 0.0 && isrotated ) {
//handle automatic rotation of bg image for rotated games
bg_img_coords.xy = bg_img_coords.yx;
bg_img_coords.y = 1 - bg_img_coords.y;
bg_img_coords += vec2( BG_IMAGE_OFFX,BG_IMAGE_OFFY);
bg_img_coords=zoom(bg_img_coords, BG_IMAGE_ZOOM);
return bg_img_coords; // <-- for legibility
}
//User say image is rotated (selected a negative value),
//flip coords but allow user customization.
//flip coords.
//This is needed for correct aspect handling on rotated games.
if (BG_IMAGE_ROTATION < 0.0) {
bg_img_coords.xy = bg_img_coords.yx;
@ -140,20 +142,19 @@ vec2 get_zooms_modifier(float do_tate, bool bNeed_NO_integer_scale, bool isrotat
co_scaled_max = integer_scale(co_scaled_max, vIn_aspect, isrotated, do_tate, GAME_GEOM_INT_SCALE-1.0 );
}
co_scaled_min = (zoom(co_scaled_min + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ) * DO_GLOBAL_SHZO) +
(co_scaled_min * (1-DO_GLOBAL_SHZO) );
co_scaled_max = (zoom(co_scaled_max + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ) * DO_GLOBAL_SHZO) +
(co_scaled_max * (1-DO_GLOBAL_SHZO) );
if (DO_BEZEL == 1.0) {
co_scaled_min = zoomout_coords(co_scaled_min, -vBEZEL_INNER_ZOOM_adapted);
co_scaled_max = zoomout_coords(co_scaled_max, -vBEZEL_INNER_ZOOM_adapted);
}
if (DO_GAME_GEOM_OVERRIDE == 1.0) {
co_scaled_min = content_geom_override_zoom(co_scaled_min, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
co_scaled_max = content_geom_override_zoom(co_scaled_max, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
//Other zoom modifiers allowed only without integer scaling.
if ( bNeed_NO_integer_scale ) {
co_scaled_min = (zoom(co_scaled_min + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ) * DO_GLOBAL_SHZO) +
(co_scaled_min * (1-DO_GLOBAL_SHZO) );
co_scaled_max = (zoom(co_scaled_max + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ) * DO_GLOBAL_SHZO) +
(co_scaled_max * (1-DO_GLOBAL_SHZO) );
if (DO_GAME_GEOM_OVERRIDE == 1.0) {
co_scaled_min = content_geom_override_zoom(co_scaled_min, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
co_scaled_max = content_geom_override_zoom(co_scaled_max, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM);
}
}
//vfprintvalue = 1/(co_scaled_max.y - co_scaled_min.y);
return 1 / vec2(co_scaled_max.x - co_scaled_min.x,
@ -183,18 +184,16 @@ void main() {
//if (DO_GLOBAL_SHZO >0.5)
// vTexCoord = zoom(vTexCoord + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM );
//..unbranched previous
//Global zoom, but only if not integer scaling
if (bNeed_NO_integer_scale) {
vTexCoord = (zoom(vTexCoord + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ) * DO_GLOBAL_SHZO) +
(vTexCoord * (1-DO_GLOBAL_SHZO) );
(vTexCoord * (1-DO_GLOBAL_SHZO) );
}
vOutputCoord = TexCoord ;
vBg_img_coords = get_bg_image_coords(vOutputCoord, bIsRotated);
vBEZEL_INNER_ZOOM_adapted = get_BEZEL_INNER_ZOOM() * DO_BEZEL;
//Help scanline/pixelgrid code too:
bool bIs_Interlaced = is_interlaced();
@ -247,7 +246,6 @@ void main() {
// screen coords needs flooring, but unfortunately floor() does not work well in vertex shader, so calc as much as possible without floor()
vPG_period_multiplier_x = 1/PIXELGRID_MUL_X;
vPG_freq_base_screen = pi * vec2(1/PG_H_COUNT, 0.5);
//the following unfloored coords are needed by sin/cos later to understand if we are on an even or odd mask
vPG_freq_base_screen_unfloored = pi * vec2(1/PG_H_COUNT, 0.5) * (vPG_OutputCoord_tated * vPG_OutputSize_tated);
@ -286,7 +284,7 @@ void main() {
vDotMat_Grid_Sharpness = DOT_M_G_SHARP;
if (DOT_M_G_SHARP == 0.0) {
float zooms_modifier = get_zooms_modifier(vDo_Tate, bNeed_NO_integer_scale, bIsRotated).y;
float dotmat_insize = global.flick_and_noise_passSize.y;
float dotmat_insize = global.upscale_passSize.y;
float dotmat_outsize = global.FinalViewportSize.y * zooms_modifier;
#ifdef DEBUG_PRINT_VALUE
vfprintvalue = dotmat_outsize / dotmat_insize;
@ -377,7 +375,7 @@ void main() {
vInterlace_offset+=1.0;
}
}
@ -390,12 +388,11 @@ layout(location = 3) in float vIsRotated;
layout(location = 4) in float vScanlinePeriod;
layout(location = 5) in float vInterlace_offset;
layout(location = 6) in float vIn_aspect;
layout(location = 7) in float vBEZEL_INNER_ZOOM_adapted;
//NOTE location 7 is free to use (freed, was a float)
layout(location = 8) in float vDo_Tate;
layout(location = 9) in vec3 vDotMat_Grid_Color;
layout(location = 10) in vec4 vPG_offsets_and_size;
layout(location = 11) in vec2 vPG_freq_base_screen;
layout(location = 12) in vec2 vPG_freq_base_screen_unfloored;
layout(location = 13) in float vPG_period_multiplier_x;
layout(location = 14) in vec2 vPG_OriginalSize_tated_mul_pi;
@ -430,6 +427,7 @@ layout(set = 0, binding = 12) uniform sampler2D halo_pass;
#ifndef D3D_WORKAROUND
layout(set = 0, binding = 13) uniform sampler2D final_passFeedback;
#endif
layout(set = 0, binding = 14) uniform sampler2D helper_pass;
layout(set = 0, binding = 15) uniform sampler2D DEBUG_TEXTURE;
@ -446,6 +444,18 @@ vec2 get_vOutputCoord_adapted() {
return vOutputCoord_adapted;
}
vec2 get_scaled_coords_for_bezel(vec2 co, float isrotated) {
co = zoomout_coords(co, -BEZEL_FRAME_ZOOM); //FIXME COULD BE FASTER.
//co.y = zoom1D(co.y, BEZEL_ASPECT_CORRECTION );
//co = zoomxy(co, vec2(1+SERVICE1*0.001, 1-SERVICE1*0.001));
if (DO_TILT == 1.0) {
return tilt_bezel( co, isrotated, TILT_X);
} else {
return co;
}
}
vec3 fn_pixel_nightify(vec3 color_in, float strength, vec3 ambilight) {
if (strength == 0.0) return color_in;
@ -486,7 +496,7 @@ vec3 morph_shape_full_vec3(vec3 shape, vec3 l, float steep, float gamma ) {
return (s2/(steep)) + s1;
}
vec3 morph_shape_full_no_steepness_vec3(vec3 shape, vec3 l, float gamma ) {
vec3 morph_shape_full_no_steepness_vec3(vec3 shape, vec3 l, float gamma) {
vec3 l_pow = pow(l,vec3(gamma));
vec3 l2 = min(l_pow * 16, 1);
vec3 s1 = pow(shape, inversesqrt(l2));
@ -552,9 +562,6 @@ vec3 downsample_x( sampler2D tex, vec2 uv, vec4 sourcesize, float sharpness_add
vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inLum) {
//Scanlines: compute each phosphor height according to input luminance, puttin it here helps parallelism a bit.
vec3 phosphor_height = map_range(pixel_in.rgb, min_inLum, max_inLum, PIXELGRID_MIN_H, clamp(PIXELGRID_MAX_H, PIXELGRID_MIN_H, 1.0));
//Tate ? (other outputsize,originalsize and outputcoords "tated" in vertex shader.)
if (vDo_Tate == 1.0) in_coords.xy = in_coords.yx;
@ -573,8 +580,9 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
//Floor x screen coords when using non 1.0x sizes.
//y screen coords appear to work just fine even if we don't floor them,
vec2 freq_base_screen;
#define PG_freq_base_screen_x (pi/vPG_offsets_and_size.a)
if (PIXELGRID_MUL_X == 1.0) {
freq_base_screen = vec2(vPG_freq_base_screen.x * floor(vPG_OutputCoord_tated.x * vPG_OutputSize_tated.x ), vPG_freq_base_screen_unfloored.y);
freq_base_screen = vec2( (PG_freq_base_screen_x) * floor(vPG_OutputCoord_tated.x * vPG_OutputSize_tated.x ), vPG_freq_base_screen_unfloored.y);
} else {
freq_base_screen = vPG_freq_base_screen_unfloored;
}
@ -590,10 +598,9 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
//shadowmask
//works by staggering odd rows by 1.5X triad
PG_offsets = vPG_offsets_and_size.rgb + //base offsets staggered (+)
float(
PIXELGRID_DO_SHADOWMASK * // user wants shadowmask
sin(freq_base_screen.y * 2.0 / PIXELGRID_SHADOWMASK_H ) > 0.0 // sin > 0.0 means the row is even
) * PIXELGRID_SHADOWMASK_SHIFT ; // stagger by 1.5
float( PIXELGRID_DO_SHADOWMASK * // user wants shadowmask
sin(freq_base_screen.y * 2.0 / PIXELGRID_SHADOWMASK_H ) > 0.0 // sin > 0.0 means the row is even
) * PIXELGRID_SHADOWMASK_SHIFT ; // stagger by 1.5
vec3 freq_rgb = freq_base.xxx - PG_offsets;
@ -622,7 +629,9 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
//Pixelgrid: do horizontal if enabled, but skip it if user doesn't want it on interlaced content.
//if (DO_PIXELGRID_H > 0.0 && !(PIXELGRID_INTR_DISABLE_Y==1.0 && vIsInterlaced==1.0)) { //103.1
if (vDo_pixelgrid_h > 0.5) {
//Scanlines: compute each phosphor height according to input luminance
vec3 phosphor_height = map_range(pixel_in.rgb, min_inLum, max_inLum, PIXELGRID_MIN_H, clamp(PIXELGRID_MAX_H, PIXELGRID_MIN_H, 1.0));
//Since we emulate scanlines, take into account current scanline phase:
float interlacing_adapt_period = vScanlinePeriod;
@ -630,8 +639,14 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
float fakeslot_stagger_offset = is_even * PIXELGRID_OFFSET_CORE * pi;
//get 3 sines with applied the optional staggered offset for slotmask, and single phosphors staggering for y deconvergence.
vec3 decon_stagger = vec3( PIXELGRID_DECON_R_H, PIXELGRID_DECON_G_H, PIXELGRID_DECON_B_H);
#ifdef HQ_DECON
float dist_from_edge = distance_from_edge_linear(in_coords, EDGE_DEFOCUS_AREA_INV)*(DO_SHIFT_RGB);
float offset_multiplier = mix(EDGE_DEFOCUS, 1.0, dist_from_edge) * NEW_SCALEMOD_Y;
decon_stagger = vec3(DECON_RY,DECON_GY,DECON_BY)*pi/2.0;
decon_stagger *= offset_multiplier;
#endif
vec3 rgb_h_sin = vec3(1.0);
if (PIXELGRID_H_ANTIMOIRE > 0.0) {
@ -651,18 +666,19 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
dedot_mix = vec3( fma( -PIXELGRID_H_DEDOT, rgb_h_sin.x, PIXELGRID_H_DEDOT)); //ASM PROOF: SAME
dedot_mix = dedot_mix *(pixel_in.rgb/max_inLum);
// Compute each phosphor height according to input luminance,
// Moved outside the branch to help parallelism a bit
//float extragain_h = max(PIXELGRID_MAX_H, 1.0); //Handle
//vec3 phosphor_height = map_range(pixel_in.rgb*extragain_h, min_inLum, max_inLum, PIXELGRID_MIN_H, clamp(PIXELGRID_MAX_H, PIXELGRID_MIN_H, 1.0));
// Phosphor height computation has been moved
// outside the branch to help parallelism a bit
//Finally get 3 sines out of the previous one by applying height modifiers
rgb_h = morph_shape(rgb_h_sin, phosphor_height, PIXELGRID_NO_INTERBLEED_H, PIXELGRID_GAMMA_H);
rgb_h = mix(vec3(1.0), rgb_h, DO_PIXELGRID_H);
rgb_h = clamp(rgb_h, 0.0,1.0);
#ifdef HQ_DECON
rgb_h = mix(rgb_h, pixel_in.rgb, (1-dist_from_edge) * (DO_SHIFT_RGB * EDGE_DEFOCUS_DO_BLUR) );
#endif
}
@ -672,16 +688,14 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
vec3 rgb_grille_basal = vec3(0.0);
if (DO_PIXELGRID_W > 0.0) { //4%
//get 3 sines in black/white
rgb_w = sin(freq_rgb);
//make them always positive and double frequency:
rgb_w = (rgb_w * rgb_w);
//Scale Max width according to pre-gains:
// get 3 sines in black/white, | sin(freq_rgb)
// make them always positive and double frequency | sin(freq_rgb) * sin(freq_rgb)
// and scale Max width according to pre-gains:
vec3 phosphor_width = map_range(pixel_in.rgb, min_inLum, max_inLum, PIXELGRID_MIN_W, PIXELGRID_MAX_W);
//Get final phosphor width:
//rgb_w = morph_shape(rgb_w, phosphor_width, PIXELGRID_NO_INTERBLEED_W, PIXELGRID_GAMMA_W); //2%
rgb_w = morph_shape_full_no_steepness_vec3(rgb_w, phosphor_width, PIXELGRID_GAMMA_W); //2%
rgb_w = morph_shape_full_no_steepness_vec3( sin(freq_rgb) * sin(freq_rgb), phosphor_width, PIXELGRID_GAMMA_W); //2%
//Dedot rgb mask between h mask.
//This work only when there are dots and have the countereffect when there are not.
//This happen because flattening the rgb mask will make unflattened rgb triads
@ -704,12 +718,16 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
vec3 pixel_in_unsparkled = pixel_in.rgb;
if (PIXELGRID_Y_MASK > 0.0) {
//Compute phosphors height mask with the right reference coords.
float ph_mask_height;
if ( PIXELGRID_Y_MASK_COORDS == 1.0 )
ph_mask_height = freq_base_screen.y * vPG_mask_height;
else
ph_mask_height = freq_base_core.y * vPG_mask_height;
// Faster than if/then (ASM proof and tests):
float ph_mask_height = vPG_mask_height * mix(freq_base_core.y, freq_base_screen.y, PIXELGRID_Y_MASK_COORDS);
/*float ph_mask_height;
if ( PIXELGRID_Y_MASK_COORDS == 1.0 )
ph_mask_height = freq_base_screen.y * vPG_mask_height;
else
ph_mask_height = freq_base_core.y * vPG_mask_height;
*/
//phosphors mask stagger
#define PH_MASH_OFFSET (PIXELGRID_Y_MASK_OFFSET * HALF_PI )
@ -745,31 +763,19 @@ vec4 fn_pixel_grid(vec2 in_coords, vec4 pixel_in, float min_inLum, float max_inL
darklines_mask = (darklines_mask-0.5) * (1+PG_spark) + 0.5 ;
}
//Finally put H mask, Scanlines and darklines masks together:
vec3 mask = rgb_w * rgb_h * darklines_mask;
float TEST_OVERMASK_NEW = 0.0;
//Apply Overmask:
if (TEST_OVERMASK_NEW == 1.0) {
vec3 mask_overmask = PIXELGRID_OVERMASK * (mask - 0.5) + 0.5;
vec3 pixel_in_overmask = mix(pixel_in.rgb, pixel_in.rgb * PIXELGRID_OVERMASK, PIXELGRID_OVERMASK);
//Adaptive overmask experiment
//different mix levels:
mask = mix(mask, mask_overmask, abs(mask - vec3(0.5)) );
pixel_in.rgb = mix(pixel_in.rgb, pixel_in_overmask, abs( pixel_in.rgb - vec3(0.5) ) );
//Same mix levels:
//mask = mix(mask_overmask, mask, pow( abs( pixel_in - vec3(0.5))*2.0, vec3(1.0)) );
//pixel_in = mix(pixel_in_overmask, pixel_in, pow(abs( pixel_in - vec3(0.5))*2.0, vec3(1.0)) );
//Mix level applied to overmask:
//vec3 overmask_adapted = mix(vec3(PIXELGRID_OVERMASK), vec3(1.0), abs(pixel_in - 0.5)*2.0 );
//mask = overmask_adapted * (mask - 0.5) + 0.5;
//pixel_in = mix(pixel_in, pixel_in * overmask_adapted, overmask_adapted);
} else {
mask = PIXELGRID_OVERMASK * (mask - 0.5) + 0.5;
pixel_in.rgb = mix(pixel_in.rgb, pixel_in.rgb * PIXELGRID_OVERMASK, PIXELGRID_OVERMASK);
}
//mask = mix(vec3(1.0), mask * PIXELGRID_OVERMASK * 1.2, PIXELGRID_OVERMASK);
//Apply the mask to pixel_in and clamp the minimum to the unexcited grille.
vec3 mask_and_grille = max(mask * pixel_in.rgb, rgb_grille_basal);
@ -945,13 +951,11 @@ vec3 pixel_blank_alternate(vec3 strength, vec3 pixel_in) {
*/
vec3 bezel_color(float lum) {
//Colorize bezel frame
vec3 col = vec3(BEZEL_R,BEZEL_G,BEZEL_B) + lum;
float con_max = fma(0.5, BEZEL_CON, 0.5); // <<- same as: float con_max = 0.5 * BEZEL_CON + 0.5;
col = scale_to_range_vec3(col, -con_max+1, con_max);
col= scale_to_range_vec3(col, -con_max+1, con_max);
return clamp(col,0.0,1.0);
}
@ -971,23 +975,7 @@ float create_ambi_colorize_shade(vec2 co) {
return 1 - min ( fuzzyrect(co, size, radius, blur) * 2, 1.0);
}
vec2 get_scaled_coords_for_bezel(vec2 co, float isrotated) {
//This function is here because compiler gets mad if i calc coords_for_bezel
//outside the main branch "if DO_BEZEL then compose_bezel_over"
//performances falls down for no apparent reason.
//But still, i need to access it twice in the code.
//So this is a function that ensures me that i always calc it the same way.
co = zoomout_coords(co, -BEZEL_FRAME_ZOOM); //FIXME COULD BE FASTER.
co.y = zoom1D(co.y, BEZEL_ASPECT_CORRECTION );
if (DO_TILT == 1.0) {
return tilt_bezel( co, isrotated, TILT_X);
} else {
return co;
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
@ -1081,7 +1069,7 @@ vec3 fn_pixel_content(vec2 coords) {
#ifdef USE_QUILEZ
pixel_glowed = texture(in_glow_pass, coords_QULEZ(coords, global.flick_and_noise_passSize));
pixel_glowed = texture(in_glow_pass, coords_QULEZ(coords, global.upscale_passSize));
pixel_out = pixel_glowed.rgb;
#else
pixel_glowed = texture(in_glow_pass, coords);
@ -1124,44 +1112,26 @@ vec3 fn_pixel_content(vec2 coords) {
vec2 halo_coords = coords;
if (HALO_PRE_SCANLINE_GAP == 1.0 && vDo_pixelgrid_h == 1.0) {
//FIXME dot_mat lasciato indietro
halo_coords.y += (DO_PIXELGRID_H * global.in_glow_passSize.w) * ( 0.5 * (0.75-HALO_VS_SCAN) );
//halo_coords.y += (DO_PIXELGRID_H * global.in_glow_passSize.w) * ( 0.375-0.5*HALO_VS_SCAN ); //ASM PROOF SLOWER
vec3 pixel_haloed = texture(halo_pass, halo_coords).rgb;
//pixel_haloed = blur_px(halo_pre_gamma_pass, halo_coords, vec2(SERVICE1*0.1)) ;
pixel_out += pixel_haloed;
} else {
vec3 pixel_haloed = texture(halo_pass, halo_coords).rgb;
//Halo only on scanlines:
//pixel_out += pixel_haloed * dot_mat_or_pixelgrid ;
//Halo over scanlines gap too:
//pixel_out += (pixel_haloed * HALO_VS_SCAN) * (1 - dot_mat_or_pixelgrid) ;
//ASM proof faster: less operations/cycles:
//p=p+h⋅(m+b⋅(1m))
pixel_out = pixel_out + pixel_haloed * (dot_mat_or_pixelgrid + HALO_VS_SCAN * (1-dot_mat_or_pixelgrid));
}
vec3 pixel_haloed = texture(halo_pass, halo_coords).rgb;
//Halo only on scanlines:
//pixel_out += pixel_haloed * dot_mat_or_pixelgrid ;
//Halo over scanlines gap too:
//pixel_out += (pixel_haloed * HALO_VS_SCAN) * (1 - dot_mat_or_pixelgrid) ;
//ASM proof faster: less operations/cycles:
//p=p+h⋅(m+b⋅(1m))
//pixel_out = pixel_out + pixel_haloed * (dot_mat_or_pixelgrid + HALO_VS_SCAN * (1-dot_mat_or_pixelgrid));
//same, clearer.
pixel_out = pixel_out + pixel_haloed * mix( dot_mat_or_pixelgrid , 1.0, HALO_VS_SCAN);
//pixel_out = pixel_haloed;
}
// Apply gamma out:
if (DO_CCORRECTION == 1.0)
pixel_out = pow(max(pixel_out, vec3(0.0)),vec3(GAMMA_OUT));
pixel_out = pow(max(pixel_out, vec3(0.0)),vec3(GAMMA_OUT));
//Bloom
/* if (DO_BLOOM == 1.0 ) {
vec3 bloomed=texture(bloom_pass_final, coords).rgb ;
if (BLOOM_BYPASS != 1.0 ) {
vec3 lum = clamp(pixel_glowed, 0.0,1.0);
vec3 darkness=(1-lum) * (1-lum);
bloomed = mix( bloomed * darkness , bloomed, BLOOM_OVER_WHITE);
}
pixel_out = bloomed + float(BLOOM_BYPASS < 0.5) * pixel_out;
}*/
//Bloom
if (DO_BLOOM == 1.0 ) {
vec3 bloomed=texture(bloom_pass_final, coords).rgb ;
@ -1222,16 +1192,20 @@ vec4 fn_pixel_bezel(vec2 coords_for_bezel, vec2 coords_for_mirror, float nightif
//Sample the reflection pass with small offset to simulate the roughness
pixel_mirrored = texture(reflected_blurred_pass, coords_for_mirror + roughness);
float fcorners_shade = 1 - corners_shade(coords_for_bezel, 1.0) * BEZEL_CORNER_DARK;
//Show less reflections in the corners
pixel_mirrored.rgb *= fcorners_shade;
//oldest way, all done in final pass.
//float fcorners_shade = 1 - corners_shade(coords_for_bezel, 1.0) * BEZEL_CORNER_DARK;
//pixel_mirrored.rgb *= fcorners_shade;
//successive way, reflection pass did half of the job
//float fcorners_shade = pixel_mirrored.a; //modified way
//pixel_mirrored.rgb *= fcorners_shade;
//Actual way, all done in reflection pass.
//Push it over the specular areas and apply the reflection modifier
//pixel_mirrored.rgb = pixel_mirrored.rgb * (1 + lut_specular);
//pixel_mirrored.rgb = pixel_mirrored.rgb + pixel_mirrored.rgb * lut_specular; //ASM PROOF: FASTER
pixel_mirrored.rgb = fma( pixel_mirrored.rgb, vec3(lut_specular), +pixel_mirrored.rgb); //ASM PROOF: FASTER
pixel_mirrored.rgb = fma( pixel_mirrored.rgb, vec3(lut_specular), +pixel_mirrored.rgb); //ASM PROOF: FASTER
}
//Yes, we already passed ambilight as parameter, but if geometry content is overridden
@ -1266,6 +1240,21 @@ vec4 fn_pixel_bezel(vec2 coords_for_bezel, vec2 coords_for_mirror, float nightif
return vec4(bezel_out, bezel_in.a);
}
float quasirandom(float n) {
//n has to be integer for this to work.
// https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
return fract(n*0.754877626895905);
//return abs(sin(n));
}
vec2 quasirandom(vec2 n) {
//n has to be integer for this to work.
// https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
return fract(n*0.754877626895905);
//return abs(sin(n));
}
void main() {
//Initial content coords
@ -1274,44 +1263,25 @@ void main() {
//Tilt?
if (DO_TILT == 1.0)
co_content = tilt(co_content, vIsRotated, TILT_X);
//Precalc Bezel coords, since it modifies content coords.
vec2 co_bezel = vec2(0.0);
if (DO_BEZEL == 1.0) {
co_content = zoomout_coords(co_content, -vBEZEL_INNER_ZOOM_adapted);
co_bezel = get_scaled_coords_for_bezel(vTexCoord, vIsRotated);
}
//Curvature
//Curvature has to come after inner zoom or bezel curved border will not match content
//curved border when inner zoom changes.
if ( curvature_needed() > 0.0 ) {
co_content = Warp_koko(co_content, vec2(GEOM_WARP_X, GEOM_WARP_Y), 0.5);
co_content = Warp_koko(co_content, vec2(GEOM_WARP_X, GEOM_WARP_Y*float(need_NO_integer_scale())), 0.5);
}
//Mirror coords needs to be calculated here, before geom override, but after curvature.
//It is still not perfect but a reasonable tradeoff by now.
vec2 co_mirror = zoom(co_content, 1/BEZEL_REFL_ZOOMOUT_ROOM);
/* float anaborderstart = 0.5;
float anabordersize = anaborderstart + SERVICE1;
float side_zoom = 1-smoothstep_fast(anaborderstart-0.5, anabordersize-0.5,abs(co_content.x-0.5)) ;
co_content.x = zoom1D(co_content.x, 1/side_zoom);
//FragColor = vec4(side_zoom) ; return;
*/
float canvas_busy = 0.0; //<-- this allow for paint over not painted areas (spares gpu cycles)
//Create an alpha mask to write content into, it holds opacity info that will be used to compose:
float canvas_busy = 0.0; //<-- Use this to save GPU cycles by skipping already processed areas.
//Create an alpha mask to store opacity information for composing content:
if (DO_CURVATURE == 1.0) {
canvas_busy = fn_border(co_content);
} else {
canvas_busy = float(is_first_inside_rect(co_content, RECT01)); //FIXME: is step() faster?
canvas_busy = float(is_first_inside_rect(co_content, RECT01));
}
@ -1323,14 +1293,14 @@ void main() {
if (DELTA_RENDER == 1.0) {
bool reuse_old = bool( float( texture(in_glow_pass, co_content).a == 0.0) * canvas_busy * vDeltaRenderOk ) ;
if (reuse_old) {
FragColor.rgb = texture(final_passFeedback, vOutputCoord).rgb;// * vec4(1,0,0,0);
FragColor.rgb = texture(final_passFeedback, vOutputCoord).rgb;
return;
}
}
#endif
//Dynamic lum dependant full screen zoom?
//Dynamic lum dependant full screen zoom and autocrop
#ifndef D3D_WORKAROUND
if (DO_DYNZOOM > 0.0)
co_content = zoom(co_content, get_dyn_zoom(avglum_pass) );
@ -1341,13 +1311,11 @@ void main() {
vec3 pixel_ambi = vec3(0.0);
vec3 pixel_under_content = vec3(0.0);
vec3 pixel_out = vec3(0.0);
//Draw content only over the alpha mask, and sample ambientlight outside it to spare gpu cycles.
//Draw content only over the alpha mask, and sample ambientlight outside it to save gpu cycles.
if (canvas_busy > 0.5) {
pixel_out = fn_pixel_content(co_content) * canvas_busy;
@ -1403,7 +1371,9 @@ void main() {
//Draw Bezel
vec4 pixel_bezel;
//SKIP LOGIC is inside fn_pixel_bezel
vec2 co_bezel = vec2(0.0);
if (DO_BEZEL == 1.0) {
co_bezel = get_scaled_coords_for_bezel(vTexCoord, vIsRotated);
pixel_bezel = fn_pixel_bezel(co_bezel, co_mirror, BG_IMAGE_NIGHTIFY * DO_BG_IMAGE, pixel_ambi);
//If we used a smooth_border, canvas_busy is it, but since the content is in the bezel,
//we can safely use it to smooth/darken the game border
@ -1423,32 +1393,19 @@ void main() {
//canvas_bezel_screen = rect_bezel - rect_bezel* pixel_bezel.a; //ASM PROOF: SLOWER
}
if (canvas_bezel_screen > 0.5) {
//Vignette
if (DO_VIGNETTE == 1.0) {
float spot_vignette_noise = random_fast(vTexCoord) * (NOISEPOWER*2);
vec2 sinco = cos((co_content-0.5) / V_SIZE) ;
pixel_out = (pixel_out * V_POWER) * (sinco.y * sinco.x) + spot_vignette_noise;
}
//Spot
if (DO_SPOT == 1.0) {
float dist = length( vec2( (co_content.x-0.5) * vIn_aspect, co_content.y-0.5) +
vec2( S_POSITION_X * vIn_aspect, S_POSITION_Y) );
//pixel_out += smoothstep_fast(S_SIZE,0.0,dist) * (S_POWER * canvas_bezel_screen); //ASM PROOF FASTER
//pixel_out += smoothstep_cos(S_SIZE,0.0,dist) * (S_POWER * canvas_bezel_screen); //ASM PROOF MORE INSTRUCTIONS, LESS CYCLES
//pixel_out += smoothstep(S_SIZE,0.0,dist) * (S_POWER * canvas_bezel_screen);
pixel_out += smoothstep_fast(S_SIZE * 0.90 ,0.0,dist) * (S_POWER * canvas_bezel_screen);
//pixel_out = mix(pixel_out, vec3(1.0), smoothstep(S_SIZE,0.0,dist) * S_POWER * canvas_bezel_screen); //<-- this is a bit slower, but more realistic.
}
//CONTENT STROBING
//pixel_out = adaptive_strobe_checkerboard(pixel_out, vOutputCoord, global.FinalViewportSize.xy);
//pixel_out = adaptive_strobe(pixel_out);
//pixel_out = strobe(pixel_out);
if ( DO_SPOT + DO_VIGNETTE > 0.0 ) {
float perlin = (random_fast(vTexCoord)-0.5) * (1/255.0);
vec2 vignette_spot = texture(helper_pass, vTexCoord).zw;
pixel_out = pixel_out * vignette_spot.x;
pixel_out = max(pixel_out, vignette_spot.y * canvas_bezel_screen);
pixel_out += perlin;
}
}
//Background image have, no need to paint if not in the outer border:
if (DO_BG_IMAGE == 1.0 && BG_IMAGE_OVER == 0.0 && canvas_busy < 1.0) {
if ( (DO_BG_IMAGE == 1.0 && BG_IMAGE_OVER == 0.0) && (canvas_busy < 1.0) ) {
vec4 pixel_bg_image = fn_pixel_fgbg_image(bg_under);
//pixel_bg_image.rgb = scale_to_range_vec3(pixel_bg_image.rgb, -pixel_ambi, 1+pixel_ambi);
@ -1546,7 +1503,7 @@ void main() {
if (clip > 1.0)
pixel_out = 1-pixel_out;//;-clip;
#endif
FragColor.rgb = pixel_out;
}

View File

@ -1,120 +0,0 @@
#version 450
#include "config.inc"
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out float vDynamicSeed;
layout(location = 3) out float vDo_flickering;
layout(location = 4) out vec2 vFlickerCoords;
#include "includes/functions.include.slang"
void main() {
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
//Generate a seed that changes over time for temporal random noise
vDynamicSeed = mod(params.FrameCount, 120.0001);
vDo_flickering = float ( scanline_have_to_flicker(is_interlaced()) || FLICKER_IN_MOTION == 1.0 ) ;
if (vDo_flickering == 1.0) {
//Flicker one over 3 frames:
float ModFlicker = params.FrameCount % 3;
//Compute y flicker offset:
float FlickerOffset = 0.0;
float line_tick = is_interlaced() ? 1 : 2 ;
if (ModFlicker == 1.0 )
FlickerOffset = params.OriginalSize.w/line_tick;
else if (ModFlicker == 2.0)
FlickerOffset = -params.OriginalSize.w/line_tick;
//Export flicker coords for Fragment shader here:
vFlickerCoords = vec2(TexCoord.x, TexCoord.y + FlickerOffset);
}
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in float vDynamicSeed;
layout(location = 3) in float vDo_flickering;
layout(location = 4) in vec2 vFlickerCoords;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D colortools_and_ntsc_pass;
layout(set = 0, binding = 4) uniform sampler2D colortools_and_ntsc_passFeedback;
#include "includes/functions.include.slang"
vec4 pixel_flickering() {
/* Simulates the flickering effect of the interlaced screens.
* As I remember, it was visible when a line and the next had high
* luminosity differences.
* So we need to sample the current line and the previous one
* (eventually applying color corrections to both).
*
* Repeating the following:
* On frame 0, return the "clean" pixel
* On frame 1, mix the upper pixel with the current one
* On frame 2, mix the lower pixel with the current one
*
* The effect of the mix is the flickering itself, and we modulate
* the mix according to the luminance difference between the current
* pixel and the mixed one.
*
* We choose to alternate on a period of 3,
* (thus considering the upper pixel and the lower one)
* or else the high pixel persistance of lcd displays wont allow
* to see the effect (the lcd panel would just mix the pixels by itself (meh).
*/
vec4 pixel_cur = texture_NEAREST(Source,vTexCoord, params.OriginalSize);
vec3 flickline = texture_NEAREST(Source,vFlickerCoords, params.OriginalSize).rgb;
//float lumdiff = abs( flickline.r + flickline.g + flickline.b - pixel_cur.r - pixel_cur.g - pixel_cur.b);
//float lumdiff = abs( (flickline.r + flickline.g) + (flickline.b - pixel_cur.r) - (pixel_cur.g + pixel_cur.b) ); //1687 1754 2946 ASM PROOF: FASTER
float lumdiff = abs( dot(flickline.rgb, vec3(1.0)) - dot(pixel_cur.rgb, vec3(1.0)));// 1685 1750 2948 //ASM PROOF: Faster on SIMD8 and SIMD16, slower on SIMD32
lumdiff = min(lumdiff * PIXELGRID_INTR_FLICK_POWR, 1.0);
if (FLICKER_IN_MOTION == 1.0) {
lumdiff = 0.4;
vec3 prev_frame = texture(colortools_and_ntsc_passFeedback, vTexCoord).rgb;
vec3 cur_frame = texture(colortools_and_ntsc_pass, vTexCoord).rgb;
float is_moving = float(prev_frame != cur_frame);
lumdiff *= is_moving;
}
return vec4( mix(pixel_cur.rgb,flickline.rgb,lumdiff),
pixel_cur.a); //<-- wee need to return the alpha channel because it carries ntsc artifact mask
}
void main() {
vec4 pixel_out;
if (vDo_flickering==1.0)
pixel_out = pixel_flickering(); //<-alpha carries ntsc artifacts mask
else
pixel_out = texture_NEAREST(Source, vTexCoord, params.OriginalSize); //<-alpha carries ntsc artifacts mask
if (DO_RF_NOISE > 0.0) {
float anoise = random_fast(vTexCoord * vDynamicSeed);
pixel_out.rgb += scale_to_range(anoise, -RF_NOISE_STRENGTH, RF_NOISE_STRENGTH);
}
FragColor = pixel_out;
}

File diff suppressed because it is too large Load Diff

View File

@ -9,32 +9,26 @@ layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 vHALO_SHARPNESS;
layout(location = 2) out float vHALO_POWER;
layout(location = 3) out float vDeltaRenderOk;
vec2 radius_blur_adapt(vec2 bsize, vec4 sourcesize){
vec2 r;
r.x = bsize.x / BLOOM_AND_HALO_SCALE_FACTOR;
r.y = r.x * get_in_aspect();
float aspect = (sourcesize.x/sourcesize.y);
r = r / vec2(1.0, aspect);
return r;
}
layout(location = 4) out float vMask_helper_max_power;
layout(location = 5) out float vMask_helper_gamma_compensation;
layout(location = 6) out float vMask_helper_gain;
void main() {
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
//Shift texel coord to optimize blurring.
//inverted the previous pass shift.
float m = map_range(HALO_SHARPNESS, 0.0, GLOW_SHARP_MAX, 0.0, 1.0);
vTexCoord += mix( params.SourceSize.zw*0.5, vec2(0.0), m);
//Adapt to the old params range
vHALO_SHARPNESS = vec2(GLOW_SHARP_MAX - HALO_SHARPNESS);
vHALO_SHARPNESS = vHALO_SHARPNESS/6.0;
vHALO_SHARPNESS = vHALO_SHARPNESS/7.5;
//20..1 10...2 prova 5..3
//Correct aspect
vHALO_SHARPNESS = radius_blur_adapt(vHALO_SHARPNESS, params.SourceSize);
vHALO_SHARPNESS = radius_blur_adapt(vHALO_SHARPNESS);
if (HALO_POWER >= 0.0)
vHALO_POWER = HALO_POWER;
@ -44,6 +38,37 @@ void main() {
bool bIs_Interlaced = is_interlaced();
vDeltaRenderOk = is_deltarender_allowed(bIs_Interlaced);
//Horizontal mask helper variables:
//Lower strength if the mask saturated too late and have no visible room to reach full bright.
//(Use a gray gamma ramp to debug)
vMask_helper_max_power = smoothstep_fast( 1.0, 3.0, IN_GLOW_POWER ) * HALO_DO_MASK_HELPER;
vMask_helper_max_power *= DO_PIXELGRID_W;
//Tune mask helper compensation gamma:
vMask_helper_gain = 1.0;
float out_monitor_gamma = 2.2; //A well calibrated monitor should be 2.2
vMask_helper_gamma_compensation = out_monitor_gamma;
if (DO_CCORRECTION == 1.0) {
if (DO_PIXELGRID == 1.0) {
//Scanlines alters visible output gamma
vMask_helper_gamma_compensation = mix(out_monitor_gamma, out_monitor_gamma - 0.6, DO_PIXELGRID_H);
//Vertical mask alters visible output gamma (contrast).
vMask_helper_gamma_compensation = mix(vMask_helper_gamma_compensation, vMask_helper_gamma_compensation - 0.6, PIXELGRID_Y_MASK);
vMask_helper_gamma_compensation = mix(vMask_helper_gamma_compensation, vMask_helper_gamma_compensation + 0.6,
PIXELGRID_Y_MASK_ON_WHITE * PIXELGRID_Y_MASK);
}
//GAMMA_OUT out alters visible output gamma:
vMask_helper_gamma_compensation = (1.0/vMask_helper_gamma_compensation) / GAMMA_OUT ;
vMask_helper_gain = max(IN_GLOW_POWER, 1.0);
}
vMask_helper_gain = vMask_helper_gain + eps - 1;
}
#pragma stage fragment
@ -51,27 +76,49 @@ layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 vHALO_SHARPNESS;
layout(location = 2) in float vHALO_POWER;
layout(location = 3) in float vDeltaRenderOk;
layout(location = 4) in float vMask_helper_max_power;
layout(location = 5) in float vMask_helper_gamma_compensation;
layout(location = 6) in float vMask_helper_gain;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 4) uniform sampler2D Source;
layout(set = 0, binding = 5) uniform sampler2D in_glow_pass_x;
layout(set = 0, binding = 5) uniform sampler2D in_glow_pass;
vec3 get_mask_helper() {
vec3 mask_helper_pixel_in = texture(in_glow_pass, vTexCoord).rgb;
vec3 mask_helper = (mask_helper_pixel_in.rgb - 1) / vMask_helper_gain ;
mask_helper = clamp(mask_helper, vec3(0.0), vec3(300.0));
mask_helper = pow( mask_helper, vec3(vMask_helper_gamma_compensation) );
return mask_helper * vMask_helper_max_power;
}
void main() {
if (DO_HALO == 0.0 ) return;
vec3 mask_helper = vec3(0.0);
if (HALO_DO_MASK_HELPER > 0.00)
mask_helper = get_mask_helper();
//Pass the right texture unchanged for tighter blurs:
if (HALO_SHARPNESS >= GLOW_SHARP_MAX) {
FragColor.rgb = pow(texture(Source, vTexCoord).rgb * vHALO_POWER, vec3(HALO_GAMMA_OUT));
FragColor.rgb = mask_helper + pow(texture(Source, vTexCoord).rgb * vHALO_POWER, vec3(HALO_GAMMA_OUT));
return;
}
//pixel_haloed = blur5_x(Source, vTexCoord, params.SourceSize.xy, vHALO_SHARPNESS, 0.0);
vec3 pixel_haloed = blur_px(Source, vTexCoord, vHALO_SHARPNESS) * vHALO_POWER;
pixel_haloed = pow(pixel_haloed, vec3(HALO_GAMMA_OUT));
FragColor.rgb = pixel_haloed;
FragColor.rgb = mask_helper + pixel_haloed;
}

View File

@ -16,13 +16,12 @@ layout(location = 7) out float vDeltaRenderOk;
void main() {
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
//Shift texel coord to optimize blurring.
//will invert the shift in the second pass.
float m = map_range(HALO_SHARPNESS, 0.0, GLOW_SHARP_MAX, 0.0, 1.0);
vTexCoord -= mix( params.SourceSize.zw*0.5, vec2(0.0), m);
if (HALO_PRE_SCANLINE_GAP == 1.0) {
vScanline_gap = 1-DO_PIXELGRID_H;
vScanline_gap = mix( vScanline_gap, 1.0, HALO_VS_SCAN);
vScanline_gap = clamp(vScanline_gap, 0.0,1.0);
}
vDo_pixelgrid_h = float(pixelgrid_h_needed());
vTexCoord_mul_sourcesizey = vTexCoord.y * global.in_glow_passSize.y;
@ -50,32 +49,13 @@ layout(set = 0, binding = 4) uniform sampler2D in_glow_pass;
void main() {
if (DO_HALO == 0.0 ) return;
vec3 pixel_haloed = texture(in_glow_pass, vTexCoord).rgb;
/* if (DELTA_RENDER == 1.0) {
if (vDeltaRenderOk == 1.0) {
//No need to process halo if we're using deltarender and content did not change.
//Produces glitches; disable by now.
if (pixel_haloed.a > 3.0)
return;
}
}
*/
if (HALO_NO_PREGAIN == 1.0) pixel_haloed/= vHALO_UNGAIN_FACTOR;
pixel_haloed = pow(pixel_haloed, vHALO_GAMMA);
//Prepaint scanlines gaps?
if (HALO_PRE_SCANLINE_GAP == 1.0) {
if (vDo_pixelgrid_h == 1.0) {
if (mod( vTexCoord_mul_sourcesizey, 2.0) < 1.0) {
//Scanline gap fades away for high luminosity pixels
pixel_haloed = pixel_haloed * vScanline_gap;
}
}
}
FragColor.rgb = pixel_haloed;
}

View File

@ -0,0 +1,75 @@
#version 450
#include "config.inc"
#include "includes/functions.include.slang"
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out float vIn_aspect;
layout(location = 2) out vec2 vTexCoord_rotated_maybe;
void main() {
gl_Position = global.MVP * Position;
vTexCoord = TexCoord + 0.0001;
vIn_aspect = get_in_aspect();
vTexCoord_rotated_maybe = vTexCoord;
if (params.Rotation == 3.0) { // 270
vTexCoord_rotated_maybe.x = 1-vTexCoord_rotated_maybe.x;
} else
if (params.Rotation == 1.0) { // 90
vTexCoord_rotated_maybe.y = 1-vTexCoord_rotated_maybe.y;
}
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in float vIn_aspect;
layout(location = 2) in vec2 vTexCoord_rotated_maybe;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D monitor_body_curved;
void main() {
bool smp_range_1 = is_first_inside_rect(vTexCoord, SMP_RANGE1 );
FragColor = vec4(0.0);
/*if ( smp_range_1 ) {
//x
FragColor.x = float(DO_CURVATURE * (GEOM_WARP_X + GEOM_WARP_Y) > 0.0 );
//y
#ifndef BEZEL_RES
vec2 bezel_lut_size = textureSize(monitor_body_curved, 0);
float bezel_frame_lod = log2(bezel_lut_size.y * (BEZEL_FRAME_ZOOM+1.0) * global.FinalViewportSize.w);
#else
//float bezel_frame_lod = log2( fma( BEZEL_RES.y, BEZEL_FRAME_ZOOM, BEZEL_RES.y) * global.FinalViewportSize.w); //ASM PROOF: UNDECIDED
float bezel_frame_lod = log2( BEZEL_RES.y * (BEZEL_FRAME_ZOOM+1.0) * global.FinalViewportSize.w);
#endif
FragColor.y = bezel_frame_lod;
}*/
//Vignette/Spot:
//Vignette defaults to 1.0 (multiplied in final pass), spot to 0.0 (added in final pass)
FragColor.zw = vec2(1.0, 0.0);
if (DO_VIGNETTE == 1.0) {
vec2 sinco = cos((vTexCoord-0.5) / V_SIZE) ;
FragColor.z = V_POWER * (sinco.y * sinco.x);
}
//Spot:
if (DO_SPOT == 1.0) {
float dist = length( vec2( (vTexCoord_rotated_maybe.x-0.5) * vIn_aspect, vTexCoord_rotated_maybe.y-0.5) +
vec2( S_POSITION_X * vIn_aspect, S_POSITION_Y) );
FragColor.w = smoothstep(S_SIZE,0.0,dist) * S_POWER;
}
}

View File

@ -16,6 +16,8 @@ layout(location = 3) out float vSharp_sub;
layout(location = 4) out float vShowArtifactsMask;
layout(location = 12) out float vWarpedglow_scale_tated;
layout(location = 13) out vec2 vWarpedglow_offsets;
layout(location = 14) out float vIn_glow_edge_sharpness;
layout(location = 15) out float vIn_glow_edge_defocus_normalized;
void main() {
gl_Position = global.MVP * Position;
@ -51,6 +53,13 @@ void main() {
vWarpedglow_scale_tated = vWarpedglow_scale_tated * 0.6 / 1400.0 * 3.0;
if (EDGE_DEFOCUS_DO_BLUR*DO_SHIFT_RGB > 0.001) {
vIn_glow_edge_defocus_normalized = EDGE_DEFOCUS_DO_BLUR;
} else {
vIn_glow_edge_defocus_normalized = 0.0;
}
vIn_glow_edge_sharpness = mix(abs(in_glow_w), 0.3, vIn_glow_edge_defocus_normalized);
//vIn_glow_edge_sharpness = max(vIn_glow_edge_sharpness, MIN_IN_GLOW_SHARP);
}
@ -63,6 +72,8 @@ layout(location = 3) in float vSharp_sub;
layout(location = 4) in float vShowArtifactsMask;
layout(location = 12) in float vWarpedglow_scale_tated;
layout(location = 13) in vec2 vWarpedglow_offsets;
layout(location = 14) in float vIn_glow_edge_sharpness;
layout(location = 15) in float vIn_glow_edge_defocus_normalized;
layout(location = 0) out vec4 FragColor;
@ -71,11 +82,11 @@ layout(set = 0, binding = 6) uniform sampler2D colortools_and_ntsc_passFeedback;
layout(set = 0, binding = 7) uniform sampler2D shift_and_bleed_pass;
vec3 blur_select_wrap(sampler2D texture_in, vec2 co, vec4 sourcesize, float sharpness, bool use_gauss) {
vec3 blur_select_wrap(sampler2D texture_in, vec2 co, vec4 sourcesize, float sharpness, float sharp_sub, bool use_gauss) {
if (use_gauss)
return blur9_x(texture_in, co, sourcesize.xy, sharpness);
else
return blur9_x_box(texture_in, co, sourcesize.xy, sharpness, vSharp_sub);
return blur9_x_box(texture_in, co, sourcesize.xy, sharpness, sharp_sub);
}
@ -112,48 +123,49 @@ void main() {
//Don't do anything if IN_GLOW_H is are over the upper limit
//and IN_GLOW_W is outside the allowed interval;
if ( glow_h_and_w_outside_interval == 1.0) {
if ( glow_w_inside_interval == 0.0) {
//passthrough
FragColor =vec4(texture(shift_and_bleed_pass, vTexCoord).rgb, warpedglow_x);
return;
}
//Modulate glow power via ntsc artifact mask:
//"add" them to the configured sharpness (-> less blur)
//float in_glow_w_adapted = abs(IN_GLOW_W);
//in_glow_w_adapted = in_glow_w_adapted + DO_NTSC_ARTIFACTS * ((1-ntsc_artifacts) * NTSC_ARTF_NOBLUR);
//Same as before, but faster (ASM PROOF)
float in_glow_w_adapted = fma(
DO_NTSC_ARTIFACTS,
fma(-NTSC_ARTF_NOBLUR, ntsc_artifacts, NTSC_ARTF_NOBLUR),
abs(IN_GLOW_W)
);
//Modulate glow power via ntsc artifact mask:
//"add" them to the configured sharpness (-> less blur)
//float in_glow_w_adapted = abs(IN_GLOW_W);
//in_glow_w_adapted = in_glow_w_adapted + DO_NTSC_ARTIFACTS * ((1-ntsc_artifacts) * NTSC_ARTF_NOBLUR);
//Same as before, but faster (ASM PROOF)
float in_glow_w_adapted = fma(
DO_NTSC_ARTIFACTS,
fma(-NTSC_ARTF_NOBLUR, ntsc_artifacts, NTSC_ARTF_NOBLUR),
abs(IN_GLOW_W)
);
//don't allow lower values that look bad:
//in_glow_w_adapted = max(in_glow_w_adapted, MIN_IN_GLOW_SHARP);
//Scale it for box
if (IN_GLOW_W < 0.0)
in_glow_w_adapted = in_glow_w_adapted/1.2;
//Scale it for box
if (IN_GLOW_W < 0.0)
in_glow_w_adapted = in_glow_w_adapted/1.2;
// Edge defocus:
float dist_from_edge = 1.0;
if (vIn_glow_edge_defocus_normalized > 0.0) {
dist_from_edge = distance_from_edge_linear(vTexCoord, EDGE_DEFOCUS_AREA_INV);
in_glow_w_adapted = mix(vIn_glow_edge_sharpness, in_glow_w_adapted, dist_from_edge );
//FragColor = vec4(vec3(dist_from_edge), 0.0); return;
}
//Make it resolution independent.
in_glow_w_adapted = in_glow_w_adapted / NEW_SCALEMOD_X;
//Make it resolution independent.
in_glow_w_adapted = in_glow_w_adapted / NEW_SCALEMOD_X;
//Also, a little hacky adaption for when upscale_pass does not scale to 2X
if (params.OutputSize.xy == params.OriginalSize.xy)
in_glow_w_adapted*=1.5;
//Also, a little hacky adaption for when flick_and_noise_pass does not scale to 2X
if (params.OutputSize.xy == params.OriginalSize.xy)
in_glow_w_adapted*=1.5;
//Finally blur horizontally
if (glow_w_inside_interval == 1.0) {
FragColor = vec4(blur_select_wrap(shift_and_bleed_pass, vTexCoord, global.flick_and_noise_passSize, in_glow_w_adapted, (IN_GLOW_W >= 0.0)), warpedglow_x);
} else {
FragColor = vec4(texture(shift_and_bleed_pass, vTexCoord).rgb, warpedglow_x);
}
//sharp_sub goes to 1.0 (no unsharp mask) as the picture gets unfocused near edges
float sharp_sub = mix(vSharp_sub, 1.0, (1-dist_from_edge)*vIn_glow_edge_defocus_normalized );
FragColor = vec4(blur_select_wrap(shift_and_bleed_pass, vTexCoord, global.upscale_passSize, in_glow_w_adapted, sharp_sub, (IN_GLOW_W >= 0.0)), warpedglow_x);
}

View File

@ -16,6 +16,7 @@ layout(location = 4) out float vSharp_sub;
layout(location = 11) out float vDeltaRenderOk;
layout(location = 12) out float vWarpedglow;
layout(location = 13) out vec2 vWarpedglow_offsets;
layout(location = 14) out float vDynamicSeed;
void main() {
gl_Position = global.MVP * Position;
@ -60,7 +61,9 @@ void main() {
float warpedglow_delta = params.OriginalSize.w * 0.5;
vWarpedglow_offsets = vec2(0.0, +warpedglow_delta);
//Generate a seed that changes over time for temporal random noise
vDynamicSeed = mod(params.FrameCount, 120.0001);
}
@ -74,11 +77,11 @@ layout(location = 4) in float vSharp_sub;
layout(location = 11) in float vDeltaRenderOk;
layout(location = 12) in float vWarpedglow;
layout(location = 13) in vec2 vWarpedglow_offsets;
layout(location = 14) in float vDynamicSeed;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 5) uniform sampler2D shift_and_bleed_pass;
layout(set = 0, binding = 6) uniform sampler2D Source;
layout(set = 0, binding = 7) uniform sampler2D in_glow_passFeedback;
layout(set = 0, binding = 8) uniform sampler2D colortools_and_ntsc_passFeedback;
layout(set = 0, binding = 9) uniform sampler2D colortools_and_ntsc_pass;
@ -163,13 +166,13 @@ void main() {
//Make it resolution independent.
IN_GLOW_H_ADAPTED = IN_GLOW_H_ADAPTED / NEW_SCALEMOD_Y;
//Also, a little hacky adaption for when flick_and_noise_pass does not scale to 2X
//Also, a little hacky adaption for when upscale_pass does not scale to 2X
if (params.OutputSize.xy == params.OriginalSize.xy)
IN_GLOW_H_ADAPTED*=1.5;
//If over the max sharp, then just passthrough, else do the blur.
if (glow_h_inside_interval == 1.0) {
pixel_glowed = blur_select_wrap(Source, vTexCoord, global.flick_and_noise_passSize, IN_GLOW_H_ADAPTED, (IN_GLOW_H >= 0.0) );
pixel_glowed = blur_select_wrap(Source, vTexCoord, global.upscale_passSize, IN_GLOW_H_ADAPTED, (IN_GLOW_H >= 0.0) );
//pixel_glowed = blur9_y(Source, vTexCoord, params.SourceSize.xy, IN_GLOW_H_ADAPTED);
} else {
pixel_glowed = texture(Source, vTexCoord).rgb;
@ -180,11 +183,21 @@ void main() {
//Series of conditions to do in glow bias done in vertex shader:
if (vDoInGlowBias == 1.0) {
pixel_glowed = glow_blur_bias(shift_and_bleed_pass, vTexCoord, pixel_glowed, IN_GLOW_BIAS);
//pixel_glowed = antialias_blur_bias(shift_and_bleed_pass, vTexCoord, pixel_glowed, IN_GLOW_BIAS);
//edge defocus: the more near edge, the more the blur
float dist_from_edge = distance_from_edge_linear(vTexCoord, EDGE_DEFOCUS_AREA_INV);
float in_glow_bias_faded = mix(IN_GLOW_BIAS, 1.0, (1-dist_from_edge) * (DO_SHIFT_RGB * EDGE_DEFOCUS_DO_BLUR ) );
//float in_glow_bias_faded = mix(IN_GLOW_BIAS, 1.0, (1-dist_from_edge) * (DO_SHIFT_RGB * EDGE_DEFOCUS_DO_BLUR) );
//FragColor = vec4(vec3(in_glow_bias_faded), 0.0);
//return;
pixel_glowed = glow_blur_bias(shift_and_bleed_pass, vTexCoord, pixel_glowed, in_glow_bias_faded);
}
if (DO_RF_NOISE > 0.1) {
pixel_glowed += get_rf_noise(vTexCoord * vDynamicSeed);
pixel_glowed = max(pixel_glowed, vec3(0.0));
}
FragColor = vec4(pixel_glowed * vGlow_Gain, warpedglow_or_DR);
}

View File

@ -1,12 +1,5 @@
#define bdirections 8
vec2 radius_blur_adapt(vec2 bsize){
vec2 r;
r.x = bsize.x / BLOOM_AND_HALO_SCALE_FACTOR;
r.y = r.x * get_in_aspect();
return r;
}
vec3 bloom_gamma_power(sampler2D smp, vec2 uv, vec4 smpsize, vec2 bsize, float quality, float gamma, float power, float start_offset, float lod) {
vec2 r = radius_blur_adapt(bsize) ;
vec3 lookup;

View File

@ -109,6 +109,11 @@ vec4 texture_QUILEZ(sampler2D tex, vec2 co, vec4 texsize) {
}
vec2 coords_NEAREST(vec2 co, vec4 texsize) {
vec2 integerCoords = floor(co.xy * texsize.xy);
return (integerCoords + 0.5) * texsize.zw;
}
vec4 texture_NEAREST(sampler2D tex, vec2 co_linear, vec4 tex_size) {
//return nearest sampling from a linear filtered texture
vec2 integerCoords = floor(co_linear.xy * tex_size.xy);
@ -116,6 +121,13 @@ vec4 texture_NEAREST(sampler2D tex, vec2 co_linear, vec4 tex_size) {
return texture(tex, co_nearest);
}
vec4 texture_NEAREST_lod(sampler2D tex, vec2 co_linear, vec4 tex_size, float lod) {
//return nearest sampling from a linear filtered texture
vec2 integerCoords = floor(co_linear.xy * tex_size.xy);
vec2 co_nearest = (integerCoords + 0.5) * tex_size.zw; // Aggiungi 0.5 per centrare il texel
return textureLod(tex, co_nearest, 0.0);
}
float DigitBin( const int x )
{
return x==0?480599.0:x==1?139810.0:x==2?476951.0:x==3?476999.0:x==4?350020.0:x==5?464711.0:x==6?464727.0:x==7?476228.0:x==8?481111.0:x==9?481095.0:0.0;
@ -278,9 +290,9 @@ vec3 pixel_push_luminance(vec3 c, float strength) {
vec3 apply_fuzzy_main_pass(vec3 color_in) {
vec3 color_out = color_in;
if (DO_CCORRECTION == 1.0) {
color_out = pow(color_out, vec3(IN_GLOW_GAMMA * GAMMA_OUT));
}
color_out = pow(color_out, vec3(IN_GLOW_GAMMA * GAMMA_OUT));
if (DO_IN_GLOW == 1.0)
color_out = color_out*IN_GLOW_POWER;
@ -334,14 +346,17 @@ vec2 apply_fuzzy_main_pass_stage_1() {
}
if (HALO_POWER < 0.0)
halo_power_adapted = -halo_power_adapted/10.0;
color_out = pow(color_in, GAMMA_OUT); //<- nonsense ?
gamma_out = gamma_out * GAMMA_OUT;
gamma_out = gamma_out * IN_GLOW_GAMMA;
color_out = pow(color_out,IN_GLOW_GAMMA);
if (DO_CCORRECTION == 1.0) {
color_out = pow(color_in, GAMMA_OUT); //<- nonsense
gamma_out = gamma_out * GAMMA_OUT;
gamma_out = gamma_out * IN_GLOW_GAMMA;
color_out = pow(color_out,IN_GLOW_GAMMA)*IN_GLOW_POWER;
color_out *= IN_GLOW_POWER;
}
if (DO_PIXELGRID == 1.0) {
color_out *= 1- DO_PIXELGRID_H * 0.5 ; //Half color if scanline.
color_out *= 1- DO_PIXELGRID_W * 0.5 ; //Half color if Hmask.
@ -383,9 +398,10 @@ vec2 apply_fuzzy_main_pass_stage_1_no_gamma_in() {
if (HALO_POWER < 0.0)
halo_power_adapted = -halo_power_adapted/10.0;
color_out = pow(color_in, GAMMA_OUT); //<- nonsense ?
gamma_out = gamma_out * GAMMA_OUT;
if (DO_CCORRECTION == 1.0) {
color_out = pow(color_in, GAMMA_OUT); //<- nonsense
gamma_out = gamma_out * GAMMA_OUT;
color_out = color_out * IN_GLOW_POWER;
}
@ -404,7 +420,6 @@ vec2 apply_fuzzy_main_pass_stage_1_no_gamma_in() {
if (DO_VIGNETTE == 1.0)
color_out *= 0.8 * (V_POWER);
return vec2(color_out/color_in, gamma_out );
}
@ -614,6 +629,22 @@ float random_fast(vec2 seed) {
return noise_out;
}
vec3 screen_space_dither(vec2 frag_coord) {
// Iestyn's RGB dither (7 asm instructions) from Portal 2 X360, slightly modified for VR.
vec3 dither = vec3(dot(vec2(171.0, 231.0), frag_coord));
dither.rgb = fract(dither.rgb / vec3(103.0, 71.0, 97.0));
// Subtract 0.5 to avoid slightly brightening the whole viewport.
return (dither.rgb - 0.5) / 255.0;
}
vec2 screen_space_displacement(vec2 co, vec2 outputsize, float size) {
// Based on // Iestyn's RGB dither (7 asm instructions) from Portal 2 X360, slightly modified for VR.
vec2 d = vec2(dot(vec2(171.0, 231.0), co*outputsize.xy));
d.xy = fract(d.xy / vec2(97.0, 71.0));
return d*size;
}
//CURVATURE
@ -692,15 +723,14 @@ float random_fast(vec2 seed) {
}
vec2 Warp_koko(vec2 co, vec2 w, float protrusion) {
//Keep protrusion higher than ~0.5
vec2 coff = w * 0.625;
float czoom = 1 - distance(co, vec2(0.5));
czoom = mix(czoom, czoom * protrusion, czoom);
czoom = mix(czoom, czoom * 0.5, czoom);
vec2 czoom2d = mix(vec2(1.0), vec2(czoom), w);
vec2 coff = mix( vec2(0.0), vec2(0.625), w);
return zoomxy(co, coff + czoom2d );
}
vec2 Warp_fast(vec2 uv, vec2 v_exp, vec2 arg2, float cut_ears) {
/*This version is exact and faster than the other implementation,
@ -770,7 +800,7 @@ float random_fast(vec2 seed) {
//#define ar_tolerance 0.005 //To compensate when comparing different A/R
bool is_rotated() {
return params.Rotation != 0.0;
return (params.Rotation == 1.0 || params.Rotation == 3.0);
/*
For some reason, probably retroarch rotates the view only on final viewport stage, transparent to the shader passes,
The OutputSize of a pass that scales to viewport will have different aspect from the real final viewport.
@ -782,6 +812,7 @@ float random_fast(vec2 seed) {
}
float get_in_aspect() {
if (!border_needed()) return global.FinalViewportSize.x/global.FinalViewportSize.y; //image adapts to game window.
if (ASPECT_X == 0) return 1.3333333333333; //all mame games, not rotated
if (ASPECT_X == -1) return 1.5; // ntsc
if (ASPECT_X == -2) return 1.25; // pal
@ -789,6 +820,7 @@ float random_fast(vec2 seed) {
if (ASPECT_X == -4) return 1.428; // 10/7 megadrive
if (ASPECT_X == -5) return params.OriginalSize.x/params.OriginalSize.y; //uncorrected
if (ASPECT_X == -6) return 0.75; // 3/4, pre-rotated (TATE) 1.33 games.
return ASPECT_X / ASPECT_Y ;
}
@ -909,11 +941,6 @@ float random_fast(vec2 seed) {
}
float get_BEZEL_INNER_ZOOM() {
//Disables bezel inner zoom when using integer scaling
return BEZEL_INNER_ZOOM * float( !need_integer_scale() );
}
vec2 content_geom_override_shift(vec2 co, float aspect, float in_aspect, float vshift, float hshift, float out_zoom){
//Aspect (ASM PROOF: IFTHEN is better)
//shift
@ -962,6 +989,14 @@ float random_fast(vec2 seed) {
//Blur/Glow
#define PI 3.14159265359
vec2 radius_blur_adapt(vec2 bsize){
vec2 r;
r.x = bsize.x / BLOOM_AND_HALO_SCALE_FACTOR;
r.y = r.x * get_in_aspect();
return r;
}
float sinc_lanczos(float x) {
if (abs(x) < 0.001)
return 1.0;
@ -1115,17 +1150,17 @@ vec3 blur_px(sampler2D smp, vec2 co, vec2 r) {
//float c1 = 0.75;
//float c2 = 1.25;
#define c1 1.0
#define c2 1.0
#define KAIO_c1 1.0
#define KAIO_c2 1.0
c += texture(smp, co + vec2(0.0, 1.0) * r).rgb * c1;
c += texture(smp, co + vec2(0.7071, 0.7071) * r).rgb * c2;
c += texture(smp, co + vec2(1.0, 0.0) * r).rgb * c1 ;
c += texture(smp, co + vec2(0.7071, -0.7071) * r).rgb * c2;
c += texture(smp, co + vec2(0.0, -1.0) * r).rgb * c1;
c += texture(smp, co + vec2(-0.7071, -0.7071) * r).rgb * c2;
c += texture(smp, co + vec2(-1.0, 0.0) * r).rgb * c1;
c += texture(smp, co + vec2(-0.7071, 0.7071) * r).rgb * c2;
c += texture(smp, co + vec2(0.0, 1.0) * r).rgb * KAIO_c1;
c += texture(smp, co + vec2(0.7071, 0.7071) * r).rgb * KAIO_c2;
c += texture(smp, co + vec2(1.0, 0.0) * r).rgb * KAIO_c1 ;
c += texture(smp, co + vec2(0.7071, -0.7071) * r).rgb * KAIO_c2;
c += texture(smp, co + vec2(0.0, -1.0) * r).rgb * KAIO_c1;
c += texture(smp, co + vec2(-0.7071, -0.7071) * r).rgb * KAIO_c2;
c += texture(smp, co + vec2(-1.0, 0.0) * r).rgb * KAIO_c1;
c += texture(smp, co + vec2(-0.7071, 0.7071) * r).rgb * KAIO_c2;
//vec3 c0 = texture(smp, co + vec2(0.0, 0.0) * r).rgb;
//return min(c0, c/8.0);
@ -1173,8 +1208,8 @@ vec3 blur_px(sampler2D smp, vec2 co, vec2 r) {
}
*/
vec3 blur5_x(sampler2D image, vec2 uv, vec2 sourcesize, float sharpness_x, float lod) {
float resolution = sourcesize.x * sharpness_x;
vec3 blur5_x(sampler2D image, vec2 uv, float sourcesize_x, float sharpness_x, float lod) {
float resolution = sourcesize_x * sharpness_x;
vec3 color = vec3(0.0);
vec2 off1 = vec2(1.333333333333 / resolution, 0.0);
color += textureLod(image, uv, lod).rgb * 0.29411764705882354;
@ -1183,8 +1218,8 @@ vec3 blur_px(sampler2D smp, vec2 co, vec2 r) {
return color;
}
vec3 blur5_y(sampler2D image, vec2 uv, vec2 sourcesize, float sharpness_y, float lod) {
float resolution = sourcesize.y * sharpness_y;
vec3 blur5_y(sampler2D image, vec2 uv, float sourcesize_y, float sharpness_y, float lod) {
float resolution = sourcesize_y * sharpness_y;
vec3 color = vec3(0.0);
vec2 off1 = vec2(0.0, 1.333333333333 / resolution) ;
color += textureLod(image, uv, lod).rgb * 0.29411764705882354;
@ -1292,7 +1327,6 @@ vec2 tilt2D(vec2 co, float is_rotated, vec2 tilt) {
vec2 tilt(vec2 co, float is_rotated, float tilt) {
//ASM PROOF: if then is worse.
vec2 r_tilt = vec2( mix_step(tilt, 0.0, is_rotated),
mix_step(0.0, -tilt, is_rotated)
);
@ -1303,15 +1337,11 @@ vec2 tilt(vec2 co, float is_rotated, float tilt) {
// X Tilt
float tilt_x_range = scale_to_range(co.y, tilt_min.x, tilt_max.x);
co = vec2( zoom1D(co.x, tilt_x_range),
zoom1D(co.y, tilt_x_range)
);
co = zoomxy(co, vec2(tilt_x_range));
// Y Tilt
float tilt_y_range = scale_to_range(co.x, tilt_min.y, tilt_max.y);
co = vec2( zoom1D(co.x, tilt_y_range),
zoom1D(co.y, tilt_y_range)
);
co = zoomxy(co, vec2(tilt_y_range));
if (is_rotated > 0.5) //ASM PROOF
co.xy += -vec2(tilt, 0.0) * 0.5;
@ -1521,9 +1551,15 @@ vec4 PG_get_hmask_preset_floored() {
return vec4( vec3(2.0,
4.0,
3.0), 4); //rbgx, mask size 4
//if (PIXELGRID_H_PRST == 7.0) // Implicit, because we need a default return value (DX/D3D)
if (PIXELGRID_H_PRST == 7.0)
return vec4( vec3(0.0), 2); //WX, mask size 2
//if (PIXELGRID_H_PRST == 8.0) // Implicit, because we need a default return value (DX/D3D)
return vec4( vec3(1.0,
2.0,
4.0), 4); //rgxb, mask size 4
}
vec4 PG_get_hmask_preset_unfloored() {
@ -1560,8 +1596,15 @@ vec4 PG_get_hmask_preset_unfloored() {
+1/4.0,
0.0 )*4, 4); //rbgx, mask size 4
//if (PIXELGRID_H_PRST == 7.0) // Implicit, because we need a default return value (DX/D3D)
if (PIXELGRID_H_PRST == 7.0)
return vec4( vec3(0.0), 2); //WX, mask size 2
//if (PIXELGRID_H_PRST == 8.0) // Implicit, because we need a default return value (DX/D3D)
return vec4( vec3(-1/4.0,
0.0,
+2/4.0)*4, 4); //rgxb, mask size 4 cambialo
}
@ -1672,4 +1715,30 @@ float delta_render_changed(sampler2D smp_past, sampler2D smp_now, vec2 co, float
float max3(vec3 v){
return max((v.x,v.y),v.z);
}
}
float distance_from_edge(vec2 co, float gamma) {
float aoe=0.2;
vec2 s = smoothstep_fast( vec2(0.5), vec2(aoe), abs(co-0.5));
float dfe=(s.x*s.y);
return dfe;
vec2 sinpi = sin(co*pi);
float dist_from_edge = (sinpi.x*sinpi.y);
return pow(dist_from_edge, gamma);
}
float distance_from_edge_linear(vec2 co, float aoe_inv) {
vec2 s = smoothstep_fast( vec2(0.5+eps), vec2(aoe_inv), abs(co-0.5));
float dfe=(s.x*s.y);
return dfe;
}
float get_rf_noise(vec2 seed) {
// Eg: seed = vTexCoord * mod(params.FrameCount, 120.0001);
float anoise = random_fast(seed);
return (anoise - 0.5) * RF_NOISE_STRENGTH*RF_NOISE_STRENGTH
+ smoothstep_fast(0.98, 1.0, anoise) * RF_NOISE_SPARK;
}

View File

@ -1,138 +0,0 @@
#version 450
#include "config.inc"
#define eps 1e-8
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 vTexCoord_zoom;
#include "functions.include.slang"
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
vTexCoord_zoom = TexCoord;
if (DO_BEZEL==1.0 && BEZEL_INNER_ZOOM !=0.0) vTexCoord_zoom = zoomout_coords(TexCoord, -BEZEL_INNER_ZOOM , 1.0);
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 vTexCoord_zoom;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Original;
layout(set = 0, binding = 3) uniform sampler2D main_pass;
layout(set = 0, binding = 4) uniform sampler2D isrotated_pass;
bool border_updown(){
//Return if black bars are up and down or left and right.
//Why this one work?
return ((params.OriginalSize.x > params.OriginalSize.y) && (global.main_passSize.x < global.main_passSize.y )) ||
(params.OriginalSize.x < params.OriginalSize.y) && (global.main_passSize.x > global.main_passSize.y ) ;
}
vec3 main_wrap(){
float myborder = 0.025; //20% border to be displaced
vec2 newcoords = vTexCoord_zoom;
vec3 pixel_out;
float mydiv;
float myoffset;
if (!border_updown()) {
mydiv = vTexCoord.x / myborder;
myoffset = (1.0-myborder) * floor(mydiv);
if (vTexCoord.x < 0.5)
newcoords.x = newcoords.x - ( myborder * floor(mydiv) ) ;
else
newcoords.x = (1 - myborder) + ( newcoords.x - (myborder*floor(mydiv)) ) ;
return texture(Original, newcoords).rgb;
}
//Is rotated
mydiv = vTexCoord.y / myborder;
myoffset = (1.0-myborder) * floor(mydiv);
if (vTexCoord.y < 0.5)
newcoords.y = newcoords.y - ( myborder * floor(mydiv) ) ;
else
newcoords.y = (1 - myborder) + ( newcoords.y - (myborder*floor(mydiv)) ) ;
return texture(Original, newcoords).rgb;
}
#include "functions.include.slang"
float mborder(vec2 coord,float aspect,float corner_size, float corner_smooth) {
coord = (coord - vec2(0.5)) + vec2(0.5, 0.5);
coord = min(coord, vec2(1.0) - coord) * aspect;
vec2 cdist = vec2(corner_size);
coord = (cdist - min(coord, cdist));
float dist = sqrt(dot(coord, coord));
return clamp((cdist.x - dist)*corner_smooth, 0.0, 1.0);
}
vec2 bget_scaled_coords(vec2 pTexCoord, vec4 destsize){
if (!border_needed()) return pTexCoord;
//else
float scale_x = 1.0;
float scale_y = 1.0;
float offset_x = 0.0 ;
float offset_y = 0.0 ;
float in_aspect = get_in_aspect();
if (is_rotated()) {
//scale_y = params.OutputSize.y/(params.OutputSize.x / in_aspect );
//scale_y = global.FinalViewportSize.y/(global.FinalViewportSize.x / in_aspect );
scale_y = destsize.y/(destsize.x / in_aspect );
offset_y = (0.5 * scale_y ) - 0.5 ;
} else {
//scale_x = params.OutputSize.x/(params.OutputSize.y * in_aspect);
//scale_x = global.FinalViewportSize.x/(global.FinalViewportSize.y * in_aspect);
scale_x = destsize.x/(destsize.y * in_aspect);
offset_x = (0.5 * scale_x ) - 0.5 ;
}
vec2 scale_coord=vec2(pTexCoord.x*scale_x - offset_x , pTexCoord.y*scale_y - offset_y);
return scale_coord;
}
void main() {
if (DO_AMBILIGHT != 1.0) return;
//bool is_rotated = texture(isrotated_pass,vec2(0.5,0.5)).r > 0.5;
//Disegna un rettangolo sul gioco.
//samplo main_pass per riferimento.
vec4 pixel_Original = texture(Original,vTexCoord);
FragColor = pixel_Original;
/*
float dist = 1-length(vTexCoord-0.5);
FragColor = vec4(main_wrap(),1.0);
float corner_size = 0.25;
float corner_smooth = 4.0;
float zoom = 0.4;
vec2 co = get_scaled_coords(zoomout_coords(vTexCoord, -zoom , 1.0),global.FinalViewportSize);
float ss=pow(mborder(co,1.0,corner_size, corner_smooth),2.0);
//ss = ss * smoothstep(shade_end,shade_start, vTexCoord.x);
FragColor = vec4(ss);
vec2 ccords = get_scaled_coords(vTexCoord,global.FinalViewportSize);
ccords = zoomout_coords(ccords,-BEZEL_INNER_ZOOM,1.0);
//FragColor = texture(Original,ccords)*ss;
*/
}

View File

@ -1,61 +0,0 @@
#version 450
#include "config.inc"
#define eps 1e-8
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 vOutputCoord;
#include "functions.include"
void main() {
gl_Position = global.MVP * Position;
vTexCoord = get_scaled_coords(TexCoord);
vOutputCoord = TexCoord;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 vOutputCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D final_pass;
layout(set = 0, binding = 4) uniform sampler2D ambi_temporal_pass;
#include "functions.include"
vec4 pixel_border() {
vec3 ambi = texture(ambi_temporal_pass, vOutputCoord).rgb;
float l = length(ambi);
float sat = 1.25;
float bright = 1.25;
ambi = normalize( pow(ambi.rgb + vec3(eps), vec3(sat)))*l * bright ;
ambi*=bright;
return vec4(ambi,0.0);
}
vec3 ambi_noised() {
return pixel_border().rgb + random();
}
void main() {
vec4 psample = texture(final_pass, vOutputCoord);
if (DO_AMBILIGHT == 1) {
vec3 ambinoised = ambi_noised();
if (is_outer_frame(psample)) {
FragColor = mark_outer_frame(ambi_noised());
} else {
FragColor = vec4(mix(ambinoised.rgb,psample.rgb,min(psample.a*1.5,1.0)),psample.a);
}
} else {
FragColor = psample ;
}
//FragColor = vec4(ambi_noised(), 1.0);
}

View File

@ -1,28 +0,0 @@
#version 450
#include "config.inc"
#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;
void main() {
if (DO_AMBILIGHT == 1.0)
FragColor = texture(Source, vTexCoord);
else
return;
}

View File

@ -1,33 +0,0 @@
#version 450
/* This pass apply an pre-gain to the leds on the rear of the virtual screen
* it is intended to produce a mipmap to be used by the next pass */
#include "config.inc"
#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 first_pass;
#include "includes/functions.include.slang"
void main() {
if (DO_AMBILIGHT != 1.0) return;
vec3 pixel_out = texture(first_pass, vTexCoord).rgb;
pixel_out = apply_fuzzy_main_pass(pixel_out);
pixel_out = pixel_push_luminance(pixel_out, AMBI_POWER-1);
FragColor = vec4(pixel_out, 1.0);
}

View File

@ -1,36 +0,0 @@
#version 450
#include "config.inc"
#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 main_pass;
void main() {
vec2 coords = vTexCoord;
if (DO_BLOOM == 1) {
if (DO_CURVATURE == 1.0) {
if ((GEOM_WARP_X > 0.0) || (GEOM_WARP_Y > 0.0))
coords = Warp(vTexCoord,GEOM_WARP_X,GEOM_WARP_Y);
}
FragColor = texture(main_pass,coords);
return;
} else {
//No bloom requested
return;
}
}

View File

@ -1,12 +0,0 @@
vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction, float lod) {
vec4 color = vec4(0.0);
vec2 off1 = vec2(1.3846153846) * direction;
vec2 off2 = vec2(3.2307692308) * direction;
color += textureLod(image, uv, lod) * 0.2270270270;
color += textureLod(image, uv + (off1 / resolution), lod) * 0.3162162162;
color += textureLod(image, uv - (off1 / resolution), lod) * 0.3162162162;
color += textureLod(image, uv + (off2 / resolution), lod) * 0.0702702703;
color += textureLod(image, uv - (off2 / resolution), lod) * 0.0702702703;
return color;
}

View File

@ -1,226 +0,0 @@
#version 450
#include "config.inc"
/*
CRT Shader by EasyMode
License: GPL
Modified by kokoko3k, stripped to keep just curvature related code.
*/
#define FIX(c) max(abs(c), 1e-5)
#define PI 3.141592653589
#define TEX2D(c) texture(tex, c)
#define in_texture final_pass
#define in_textureSize final_passSize
//#define in_textureSize SourceSize
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 vOutputCoord;
#include "functions.include"
void main() {
gl_Position = global.MVP * Position;
vTexCoord = get_scaled_coords(TexCoord);
vOutputCoord = TexCoord;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 vOutputCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D in_texture;
float curve_distance(float x, float sharp)
{
float x_step = step(0.5, x);
float curve = 0.5 - sqrt(0.25 - (x - x_step) * (x - x_step)) * sign(0.5 - x);
return mix(x, curve, sharp);
}
mat4x4 get_color_matrix(sampler2D tex, vec2 co, vec2 dx)
{
return mat4x4(TEX2D(co - dx), TEX2D(co), TEX2D(co + dx), TEX2D(co + 2.0 * dx));
}
vec4 filter_lanczos(vec4 coeffs, mat4x4 color_matrix)
{
vec4 col = color_matrix * coeffs;
vec4 sample_min = min(color_matrix[1], color_matrix[2]);
vec4 sample_max = max(color_matrix[1], color_matrix[2]);
col = clamp(col, sample_min, sample_max);
return col;
}
vec2 curve_coordinate(vec2 co, float curvature_x, float curvature_y)
{
vec2 curve = vec2(curvature_x, curvature_y);
vec2 co2 = co + co * curve - curve / 2.0;
vec2 co_weight = vec2(co.y, co.x) * 2.0 - 1.0;
co = mix(co, co2, co_weight * co_weight);
return co;
}
float get_corner_weight(vec2 co, vec2 corner, float smoothfunc)
{
float corner_weight;
co = min(co, vec2(1.0) - co) * vec2(1.0, 0.75);
co = (corner - min(co, corner));
corner_weight = clamp((corner.x - sqrt(dot(co, co))) * smoothfunc, 0.0, 1.0);
corner_weight = mix(1.0, corner_weight, ceil(corner.x));
return corner_weight;
}
#define GEOM_ANTIALIAS 1.0
vec3 curve_antialias(vec2 xy,vec2 tex_size){
vec2 midpoint = vec2(0.5, 0.5);
vec2 co = vOutputCoord * tex_size * params.in_textureSize.zw;
vec2 co2 = vTexCoord * tex_size * params.in_textureSize.zw;
vec3 col;
float corner_weight = get_corner_weight(curve_coordinate(co2, GEOM_BORDER_WX, GEOM_BORDER_WY ), vec2(GEOM_CORNER_SIZE), GEOM_CORNER_SMOOTH);
if ( (GEOM_WARP_X > 0) || (GEOM_WARP_Y > 0) ) {
xy *= params.in_textureSize.xy / tex_size;
vec2 dx = vec2(1.0 / tex_size.x, 0.0);
vec2 dy = vec2(0.0, 1.0 / tex_size.y);
vec2 pix_co = xy * tex_size - midpoint;
vec2 tex_co = (floor(pix_co) + midpoint) / tex_size;
vec2 dist = fract(pix_co);
float curve_x, curve_y;
vec3 col2, diff;
curve_x = curve_distance(dist.x, SHARPNESS_H * SHARPNESS_H);
curve_y = curve_distance(dist.y, SHARPNESS_V * SHARPNESS_V);
vec4 coeffs_x = PI * vec4(1.0 + curve_x, curve_x, 1.0 - curve_x, 2.0 - curve_x);
vec4 coeffs_y = PI * vec4(1.0 + curve_y, curve_y, 1.0 - curve_y, 2.0 - curve_y);
coeffs_x = FIX(coeffs_x);
coeffs_x = 2.0 * sin(coeffs_x) * sin(coeffs_x / 2.0) / (coeffs_x * coeffs_x);
coeffs_x /= dot(coeffs_x, vec4(1.0));
coeffs_y = FIX(coeffs_y);
coeffs_y = 2.0 * sin(coeffs_y) * sin(coeffs_y / 2.0) / (coeffs_y * coeffs_y);
coeffs_y /= dot(coeffs_y, vec4(1.0));
mat4x4 color_matrix;
color_matrix[0] = filter_lanczos(coeffs_x, get_color_matrix(in_texture, tex_co - dy, dx));
color_matrix[1] = filter_lanczos(coeffs_x, get_color_matrix(in_texture, tex_co, dx));
color_matrix[2] = filter_lanczos(coeffs_x, get_color_matrix(in_texture, tex_co + dy, dx));
color_matrix[3] = filter_lanczos(coeffs_x, get_color_matrix(in_texture, tex_co + 2.0 * dy, dx));
col = filter_lanczos(coeffs_y, color_matrix).rgb;
} else {
col = texture(in_texture, vOutputCoord).rgb;
}
col *= vec3(corner_weight);
return col;
}
vec2 Warp2(vec2 texCoord){
vec2 curvedCoords = texCoord * 2.0 - 1.0;
vec2 CRT_Distortion = vec2(GEOM_WARP_X, GEOM_WARP_Y) * 15.;
float curvedCoordsDistance = sqrt(curvedCoords.x*curvedCoords.x+curvedCoords.y*curvedCoords.y);
curvedCoords = curvedCoords / curvedCoordsDistance;
curvedCoords = curvedCoords * (1.0-pow(vec2(1.0-(curvedCoordsDistance/1.4142135623730950488016887242097)),(1.0/(1.0+CRT_Distortion*0.2))));
curvedCoords = curvedCoords / (1.0-pow(vec2(0.29289321881345247559915563789515),(1.0/(vec2(1.0)+CRT_Distortion*0.2))));
curvedCoords = curvedCoords * 0.5 + 0.5;
return curvedCoords;
}
vec3 do_curvature_antialias(){
vec2 tex_size = params.in_textureSize.xy ;
vec2 co = vOutputCoord * tex_size * params.in_textureSize.zw;
vec2 co2 = vTexCoord * tex_size * params.in_textureSize.zw;
vec2 curved_xy = curve_coordinate(co, GEOM_WARP_X,GEOM_WARP_Y );
vec3 col;
//float corner_weight = get_corner_weight(curve_coordinate(co2, GEOM_BORDER_WX, GEOM_BORDER_WY ), vec2(GEOM_CORNER_SIZE), GEOM_CORNER_SMOOTH);
float corner_weight = get_corner_weight(Warp2(co), vec2(GEOM_CORNER_SIZE), GEOM_CORNER_SMOOTH);
if ( (GEOM_WARP_X > 0) || (GEOM_WARP_Y > 0) ) {
if (GEOM_ANTIALIAS == 1.0)
col = curve_antialias(curved_xy,tex_size);
else
col = texture(in_texture,curved_xy).rgb;
} else {
col = texture(in_texture, vOutputCoord).rgb;
}
col *= vec3(corner_weight) ;
return col;
}
const vec2 corner_aspect = vec2(1.0, 0.75);
float corner2(vec2 coord)
{
coord = (coord - vec2(0.5)) + vec2(0.5, 0.5);
coord = min(coord, vec2(1.0) - coord) * corner_aspect;
vec2 cdist = vec2(GEOM_CORNER_SIZE);
coord = (cdist - min(coord, cdist));
float dist = sqrt(dot(coord, coord));
return clamp((cdist.x - dist)*GEOM_CORNER_SMOOTH, 0.0, 1.0);
}
vec3 do_curvature_alias(){
vec2 curved_xy = Warp2(vOutputCoord);
return texture(in_texture,curved_xy ).rgb * corner2(curved_xy);
}
vec4 main_wrap()
{
if (DO_CURVATURE == 1.0) {
return vec4(do_curvature_antialias(), 1.0);
} else {
return texture(in_texture, vOutputCoord);
}
}
#include "functions.include"
void main() {
vec4 psample = texture(in_texture, vOutputCoord);
if ( border_needed() ) {
if (is_outer_frame(psample))
FragColor = mark_outer_frame(vec3(0.0));
else
FragColor = main_wrap();
} else {
FragColor = main_wrap();
}
}

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More