From 25431250808ecb9f4b9b17adc0642730386a2a3d Mon Sep 17 00:00:00 2001 From: Sefinek Date: Tue, 25 Apr 2023 19:47:17 +0200 Subject: [PATCH] Update --- data/presets/2. Other/Silhouettes.ini | 900 +++++++++++ .../2. Other/Standard-Smooth Experience.ini | 1350 +++++++++++++++++ data/reshade/shaders/Effects/CRT_Lottes.fx | 245 --- data/reshade/shaders/Effects/CRT_Lottes.fxh | 548 ------- data/reshade/shaders/Effects/CRT_Yee64.fx | 196 --- data/reshade/shaders/Effects/CRT_Yeetron.fx | 149 -- .../shaders/Effects/PD80_02_Bonus_LUT_pack.fx | 15 - .../shaders/Effects/PD80_02_LUT_Creator.fx | 118 -- .../Effects/PD80_03_Color_Space_Curves.fx | 230 --- .../shaders/Effects/PD80_03_Curved_Levels.fx | 570 ------- .../Effects/PD80_03_Filmic_Adaptation.fx | 170 --- .../reshade/shaders/Effects/PD80_03_Levels.fx | 220 --- .../PD80_03_Shadows_Midtones_Highlights.fx | 412 ----- .../shaders/Effects/PD80_04_BlacknWhite.fx | 378 ----- .../shaders/Effects/PD80_04_Color_Balance.fx | 221 --- .../Effects/PD80_04_Color_Gradients.fx | 362 ----- .../Effects/PD80_04_Color_Isolation.fx | 117 -- .../Effects/PD80_04_Color_Temperature.fx | 95 -- .../PD80_04_Contrast_Brightness_Saturation.fx | 371 ----- .../Effects/PD80_04_Magical_Rectangle.fx | 364 ----- .../Effects/PD80_04_Saturation_Limit.fx | 71 - .../Effects/PD80_04_Selective_Color.fx | 683 --------- .../Effects/PD80_04_Selective_Color_v2.fx | 1182 --------------- .../shaders/Effects/PD80_04_Technicolor.fx | 192 --- .../shaders/Effects/PD80_05_Sharpening.fx | 276 ---- .../Effects/PD80_06_Chromatic_Aberration.fx | 306 ---- .../shaders/Effects/PD80_06_Depth_Slicer.fx | 149 -- .../shaders/Effects/PD80_06_Film_Grain.fx | 474 ------ .../shaders/Effects/PD80_06_Luma_Fade.fx | 153 -- .../Effects/PD80_06_Posterize_Pixelate.fx | 152 -- 30 files changed, 2250 insertions(+), 8419 deletions(-) create mode 100644 data/presets/2. Other/Silhouettes.ini create mode 100644 data/presets/2. Other/Standard-Smooth Experience.ini delete mode 100644 data/reshade/shaders/Effects/CRT_Lottes.fx delete mode 100644 data/reshade/shaders/Effects/CRT_Lottes.fxh delete mode 100644 data/reshade/shaders/Effects/CRT_Yee64.fx delete mode 100644 data/reshade/shaders/Effects/CRT_Yeetron.fx delete mode 100644 data/reshade/shaders/Effects/PD80_02_Bonus_LUT_pack.fx delete mode 100644 data/reshade/shaders/Effects/PD80_02_LUT_Creator.fx delete mode 100644 data/reshade/shaders/Effects/PD80_03_Color_Space_Curves.fx delete mode 100644 data/reshade/shaders/Effects/PD80_03_Curved_Levels.fx delete mode 100644 data/reshade/shaders/Effects/PD80_03_Filmic_Adaptation.fx delete mode 100644 data/reshade/shaders/Effects/PD80_03_Levels.fx delete mode 100644 data/reshade/shaders/Effects/PD80_03_Shadows_Midtones_Highlights.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_BlacknWhite.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Color_Balance.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Color_Gradients.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Color_Isolation.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Color_Temperature.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Contrast_Brightness_Saturation.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Magical_Rectangle.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Saturation_Limit.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Selective_Color.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Selective_Color_v2.fx delete mode 100644 data/reshade/shaders/Effects/PD80_04_Technicolor.fx delete mode 100644 data/reshade/shaders/Effects/PD80_05_Sharpening.fx delete mode 100644 data/reshade/shaders/Effects/PD80_06_Chromatic_Aberration.fx delete mode 100644 data/reshade/shaders/Effects/PD80_06_Depth_Slicer.fx delete mode 100644 data/reshade/shaders/Effects/PD80_06_Film_Grain.fx delete mode 100644 data/reshade/shaders/Effects/PD80_06_Luma_Fade.fx delete mode 100644 data/reshade/shaders/Effects/PD80_06_Posterize_Pixelate.fx diff --git a/data/presets/2. Other/Silhouettes.ini b/data/presets/2. Other/Silhouettes.ini new file mode 100644 index 00000000..96b06f78 --- /dev/null +++ b/data/presets/2. Other/Silhouettes.ini @@ -0,0 +1,900 @@ +PreprocessorDefinitions=RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=1,INFINITE_BOUNCES=1,SKYCOLOR_MODE=2,MATERIAL_TYPE=1,FADEOUT_MODE=0,IMAGEBASEDLIGHTING=1,BLOOM_ENABLE_CA=0,BLOOM_QUALITY_0_TO_2=2,BLOOM_USE_FOCUS_BLOOM=0,HALFRES_INPUT=0,ENABLE_MISC_CONTROLS=1 +Techniques=DisplayDepth@DisplayDepth.fx,Tint@Sepia.fx,qUINT_ReGrade@qUINT_regrade.fx,prod80_04_SelectiveColor_v2@PD80_04_Selective_Color_v2.fx,prod80_02_Cinetools_LUT@PD80_02_Cinetools_LUT.fx,AdaptiveTonemapper@AdaptiveTonemapper.fx,Lightroom@qUINT_lightroom.fx,MagicHDR@MagicHDR.fx,DELC_Sharpen@qUINT_sharp.fx,ArtisticVignette@ArtisticVignette.fx +TechniqueSorting=DisplayDepth@DisplayDepth.fx,AtmosphericDensity@AtmosphericDensity.fx,DepthHaze@DepthHaze.fx,Tint@Sepia.fx,qUINT_ReGrade@qUINT_regrade.fx,prod80_04_SelectiveColor_v2@PD80_04_Selective_Color_v2.fx,prod80_02_Cinetools_LUT@PD80_02_Cinetools_LUT.fx,AdaptiveTonemapper@AdaptiveTonemapper.fx,Lightroom@qUINT_lightroom.fx,MagicHDR@MagicHDR.fx,DELC_Sharpen@qUINT_sharp.fx,ArtisticVignette@ArtisticVignette.fx,ReVeil_Top@ReVeil.fx,RTGlobalIllumination@qUINT_rtgi.fx,ReVeil_Bottom@ReVeil.fx,prod80_02_Bloom@PD80_02_Bloom.fx,pd80_02_Bonus_LUT_pack@PD80_02_Bonus_LUT_pack.fx,CinematicDOF@CinematicDOF.fx,ADOF@qUINT_dof.fx,AdaptiveFog@AdaptiveFog.fx,FilmicAnamorphSharpen@FilmicAnamorphSharpen.fx,AdvancedCRT@CRT.fx,After@Splitscreen.fx,After@BeforeAfter.fx,ContrastAdaptiveSharpen@CAS.fx,ApplyLUT@LUTTools.fx,ArcaneBloom@ArcaneBloom.fx,ASCII@ASCII.fx,AspectRatioPS@AspectRatio.fx,AspectRatioSuite@AspectRatioSuite.fx,Before@Splitscreen.fx,Before@BeforeAfter.fx,Border@Border.fx,CA@ChromaticAberration.fx,Cartoon@Cartoon.fx,Checkerboard@Checkerboard.fx,Chromakey@Chromakey.fx,ChromaticAberration@Prism.fx,ColorLab@ColorLab.fx,ColorMatrix@ColorMatrix.fx,CRT_Lottes@CRT_Lottes.fx,CRT_Yee64@CRT_Yee64.fx,CRT_Yeetron@CRT_Yeetron.fx,Cursor@Cursor.fx,Curves@Curves.fx,Daltonize@Daltonize.fx,Deband@Deband.fx,Debanding@qUINT_deband.fx,DepthAlpha@DepthAlpha.fx,DirectionalDepthBlur@DirectionalDepthBlur.fx,DisplayLUT@LUTTools.fx,Dither@Dither.fx,DPX@DPX.fx,Emphasize@Emphasize.fx,EyeAdaption@EyeAdaption.fx,FilmGrain@FilmGrain.fx,FilmicSharpen@FilmicSharpen.fx,Flashlight@Flashlight.fx,FlexibleCA@FlexibleCA.fx,Flipbook@Flipbook.fx,FocalDOF@FocalDOF.fx,FramerateLimiter@FramerateLimiter.fx,FXAA@FXAA.fx,GaussianBlurCS@GaussianBlurCS.fx,GrainSpread@GrainSpread.fx,HDR@FakeHDR.fx,HexLensFlare@HexLensFlare.fx,Interlaced@Interlaced.fx,Layer@Layer.fx,Letterbox@Letterbox.fx,Levels@Levels.fx,LiftGammaGain@LiftGammaGain.fx,LiquidLens@LiquidLens.fx,LocalContrastCS@LocalContrastCS.fx,LumaSharpen@LumaSharpen.fx,LUT@LUT.fx,MagicBorder@MagicBorder.fx,MBMB@MBMB.fx,MinimalColorGrading@MinimalColorGrading.fx,Monochrome@Monochrome.fx,MultiFX@MultiFX.fx,MultiLUT@MultiLUT.fx,MXAO@qUINT_mxao.fx,NeoBloom@NeoBloom.fx,NormalMap@NormalMap.fx,Nostalgia@Nostalgia.fx,Oilify@Oilify.fx,Overlay@Overlay.fx,PandaFX@PandaFX.fx,PerfectPerspective@PerfectPerspective.fx,PiecewiseFilmicTonemap@PiecewiseFilmicTonemap.fx,PiecewiseFilmicTonemap_Debug@PiecewiseFilmicTonemap.fx,Pong@Pong.fx,prod80_01A_RT_Correct_Contrast@PD80_01A_RT_Correct_Contrast.fx,prod80_01B_RT_Correct_Color@PD80_01B_RT_Correct_Color.fx,prod80_01_Color_Gamut@PD80_01_Color_Gamut.fx,prod80_02_LUT_Creator@PD80_02_LUT_Creator.fx,prod80_03_Color_Space_Curves@PD80_03_Color_Space_Curves.fx,prod80_03_CurvedLevels@PD80_03_Curved_Levels.fx,prod80_03_FilmicTonemap@PD80_03_Filmic_Adaptation.fx,prod80_03_Levels@PD80_03_Levels.fx,prod80_03_Shadows_Midtones_Highlights@PD80_03_Shadows_Midtones_Highlights.fx,prod80_04_Black_and_White@PD80_04_BlacknWhite.fx,prod80_04_ColorBalance@PD80_04_Color_Balance.fx,prod80_04_ColorGradient@PD80_04_Color_Gradients.fx,prod80_04_ColorIsolation@PD80_04_Color_Isolation.fx,prod80_04_ColorTemperature@PD80_04_Color_Temperature.fx,prod80_04_ContrastBrightnessSaturation@PD80_04_Contrast_Brightness_Saturation.fx,prod80_04_Magical_Rectangle@PD80_04_Magical_Rectangle.fx,prod80_04_Saturation_Limiter@PD80_04_Saturation_Limit.fx,prod80_04_SelectiveColor@PD80_04_Selective_Color.fx,prod80_04_Technicolor@PD80_04_Technicolor.fx,prod80_05_LumaSharpen@PD80_05_Sharpening.fx,prod80_06_ChromaticAberration@PD80_06_Chromatic_Aberration.fx,prod80_06_Depth_Slicer@PD80_06_Depth_Slicer.fx,prod80_06_FilmGrain@PD80_06_Film_Grain.fx,prod80_06_LumaFade_End@PD80_06_Luma_Fade.fx,prod80_06_LumaFade_Start@PD80_06_Luma_Fade.fx,prod80_06_Posterize_Pixelate@PD80_06_Posterize_Pixelate.fx,RetroFog@RetroFog.fx,SCurve@SCurve.fx,SimpleGrain@SimpleGrain.fx,Sketch@Sketch.fx,SMAA@SMAA.fx,SSR@qUINT_ssr.fx,SunsetFilter@SunsetFilter.fx,Technicolor@Technicolor.fx,Technicolor2@Technicolor2.fx,ImageTest@Image.fx,TiltShift@TiltShift.fx,Tonemap@Tonemap.fx,TrackingRays@TrackingRays.fx,UIDetect@UIDetect.fx,UIDetect_After@UIDetect.fx,UIDetect_Before@UIDetect.fx,UIDetect_ShowPixel@UIDetect.fx,UIMaskCreator@UIMaskCreator.fx,UIMask_Bottom@UIMask.fx,UIMask_Top@UIMask.fx,UnrealLens@UnrealLens.fx,Unsharp@Unsharp.fx,VariableRateShading@VRS_Map.fx,Vibrance@Vibrance.fx,Vignette@Vignette.fx,VirtualResolution@VirtualResolution.fx,WhitepointerFixer@WhitepointFixer.fx,DH_Anime@dh_anime.fx,ContrastStretch@ContrastStretch.fx,Clarity2@Clarity2.fx,VHSM@VHSM.fx,WatchDogsTonemapping@WatchDogs.fx,Bloom@qUINT_bloom.fx,qUINT_Solaris@qUINT_solaris.fx,qUINT_Insight_GenerateHistogram@qUINT_insight.fx,qUINT_Insight@qUINT_insight.fx + +[AdaptiveFog.fx] +BloomPower=10.000000 +BloomThreshold=10.250000 +BloomWidth=0.200000 +FogColor=1.000000,0.999997,0.999990 +FogCurve=1.370000 +FogStart=0.000000 +MaxFogFactor=0.579000 + +[AdaptiveTonemapper.fx] +AdaptFocalPoint=0.500000,0.500000 +AdaptPrecision=0 +AdaptRange=0.000000,1.000000 +AdaptSensitivity=1.000000 +AdaptTime=1.000000 +Amount=0.049000 +Exposure=6.000000 +FixWhitePoint=1 +TonemapOperator=2 + +[ArcaneBloom.fx] +uAdapt_DoLimits=1 +uAdapt_Intensity=1.000000 +uAdapt_Limits=0.000000,1.000000 +uAdapt_Precision=0 +uAdapt_Sensitivity=1.000000 +uAdapt_Time=1.000000 +uBloomIntensity=1.000000 +uExposure=1.000000 +uMaxBrightness=100.000000 + +[ArtisticVignette.fx] +BlendMode=0 +VignetteColor=0.000000,0.000000,0.000000,1.000000 +VignetteRatio=0.000000 +VignetteShape=6 +VignetteStartEnd=0.660000,1.390000 +_Help=0 + +[AtmosphericDensity.fx] +AUTO_COLOR=2 +BLEND=100 +BLUR_WIDTH=100 +DISTANCE=65 +FOG_SAT=100 +FOG_TINT=1.000000,0.999995,0.999990 +HIGHLIGHT_DIST=100 +WIDTH=100 + +[CAS.fx] +Contrast=0.000000 +Sharpening=1.000000 + +[CinematicDOF.fx] +AutoFocusPoint=0.500000,0.500000 +AutoFocusTransitionSpeed=1.000000 +BlurQuality=12.000000 +BokehBusyFactor=1.000000 +FarPlaneMaxBlur=0.670000 +FNumber=2.200000 +FocalLength=92.000000 +FocusCrosshairColor=1.000000,0.000000,1.000000,1.000000 +FocusPlaneColor=0.000000,0.000000,1.000000 +HighlightAnamorphicAlignmentFactor=0.000000 +HighlightAnamorphicFactor=0.010000 +HighlightAnamorphicSpreadFactor=1.000000 +HighlightGainFarPlane=5.000000 +HighlightGainNearPlane=0.000000 +HighlightThresholdFarPlane=1.000000 +HighlightThresholdNearPlane=0.000000 +ManualFocusPlane=150.000000 +NearPlaneMaxBlur=0.000000 +OutOfFocusPlaneColor=0.800000,0.800000,0.800000 +OutOfFocusPlaneColorTransparency=0.700000 +PostBlurSmoothing=0.000000 +ShowCoCValues=0 +ShowOutOfFocusPlaneOnMouseDown=0 +UseAutoFocus=0 +UseMouseDrivenAutoFocus=0 + +[Clarity2.fx] +BlendIfRange=0.200000 +ClarityBlendIfDarkTwo=50 +ClarityBlendIfLightTwo=255 +ClarityBlendModeTwo=2 +ClarityDarkIntensityTwo=0.400000 +ClarityLightIntensityTwo=0.000000 +ClarityOffsetTwo=8.000000 +ClarityRadiusTwo=3 +ClarityStrengthTwo=0.337000 +DitherStrength=1.000000 +MaskContrast=0.162000 +PreprocessorDefinitions=0 + +[ContrastStretch.fx] +DarkMax=0.450000 +DarkPeak=0.500000 +DarkThreshold=0.333000 +Debug=0 +LightMax=0.300000 +LightPeak=0.450000 +LightThreshold=0.667000 +Maximum=1.000000 +MaxVariance=1.000000 +MidMax=0.450000 +MidPeak=0.550000 +Minimum=0.000000 + +[CRT.fx] +Amount=1.000000 +Angle=0.000000,0.000000 +Brightness=0.900000 +CornerSize=0.010000 +Curvature=0 +CurvatureRadius=1.500000 +Gamma=2.400000 +MonitorGamma=2.200000 +Oversample=1 +Overscan=1.010000 +Resolution=1.150000 +ScanlineGaussian=1 +ScanlineIntensity=2 +ViewerDistance=2.000000 + +[Deband.fx] +custom_avgdiff=1.800000 +custom_maxdiff=4.000000 +custom_middiff=2.000000 +debug_output=0 +iterations=1 +range=24.000000 +threshold_preset=0 + +[DepthHaze.fx] +EffectStrength=0.000000 +FogColor=1.000000,0.999990,0.999990 +FogFactor=0.997000 +FogStart=0.409000 + +[dh_anime.fx] +fBlackLineThreshold=0.065000 +fSaturation=1.000000 +iBlackLineThickness=2 +iShadingSteps=95.000000 +iSurfaceBlur=0.000000 + +[DirectionalDepthBlur.fx] +BlurAngle=0.150000 +BlurLength=0.004000 +BlurQuality=0.500000 +BlurType=0 +FocusPlane=0.010000 +FocusPlaneMaxRange=41.000000 +FocusPoint=0.500000,0.500000 +FocusPointBlendColor=0.000000,0.000000,0.000000 +FocusPointBlendFactor=1.000000 +FocusRange=0.088000 +HighlightGain=0.500000 +ScaleFactor=1.000000 + +[DisplayDepth.fx] +Advanced_help=0 +bUIShowOffset=0 +bUIUseLivePreview=1 +Depth_help=0 +fUIDepthMultiplier=1.000000 +fUIFarPlane=1000.000000 +fUIScale=1.000000,1.000000 +iUIOffset=0,0 +iUIPresentType=0 + +[DPX.fx] +Colorfulness=2.500000 +Contrast=0.100000 +RGB_C=0.360000,0.360000,0.340000 +RGB_Curve=8.000000,8.000000,8.000000 +Saturation=3.000000 +Strength=0.200000 + +[FilmicAnamorphSharpen.fx] +Clamp=0.581000 +Coefficient=0 +DepthMask=0 +DepthMaskContrast=128 +Offset=0.100000 +Preview=0 +Strength=60.000000 +UseMask=0 + +[FlexibleCA.fx] +Mode=1 +Multiplier=1.000000 +Ratio=-1.000000,0.000000,1.000000 + +[FXAA.fx] +EdgeThreshold=0.125000 +EdgeThresholdMin=0.000000 +Subpix=0.250000 + +[LUT.fx] +fLUT_AmountChroma=1.000000 +fLUT_AmountLuma=1.000000 + +[LUTTools.fx] +LutChromaLuma=1.000000,1.000000 +LutRes=32 +VerticalOrietation=0 + +[MagicBorder.fx] +BorderColor=1.000000,1.000000,1.000000,1.000000 +LeftBottomCornerDepth=1.000000 +LeftTopCornerDepth=1.000000 +PictureFrameColor=0.700000,0.700000,0.700000,1.000000 +PictureFrameLeftBottom=0.100000,0.900000 +PictureFrameLeftTop=0.100000,0.100000 +PictureFrameRightBottom=0.900000,0.900000 +PictureFrameRightTop=0.900000,0.100000 +RightBottomCornerDepth=1.000000 +RightTopCornerDepth=1.000000 +ShowDepths=0 + +[MagicHDR.fx] +BlendingAmount=0.500000 +BlendingBase=0.800000 +BloomAmount=0.195000 +BloomBrightness=1.913000 +BloomSaturation=0.163000 +BlurSize=0.573000 +Exposure=0.000000 +InputExposure=0.059000 +InvTonemap=0 +ShowBloom=0 +Tonemap=5 +_Credits=0 +_Help=0 +_WipWarn=0 + +[MinimalColorGrading.fx] +ColorFilter=1.000000,1.000000,1.000000 +Contrast=1.000000 +Exposure=0.000000 +Saturation=1.000000 +SaturationMode=2 + +[MultiLUT.fx] +fLUT_AmountChroma=1.000000 +fLUT_AmountLuma=1.000000 +fLUT_LutSelector=0 + +[NeoBloom.fx] +BloomBlendMode=1 +ColorFilter=1.000000,1.000000,1.000000 +Intensity=1.000000 +MagicMode=0 +MaxBrightness=100.000000 +Mean=0.000000 +NormalizeBrightness=1 +Padding=0.100000 +Saturation=1.000000 +Sigma=4.000000 +Variance=5.000000 +_Help=0 + +[Oilify.fx] +ExtraSamples=1 +NoDepth=0 +SampleDistance=3.030000 +Shear=0 +Strength=1.000000 + +[Overlay.fx] +bFollowMouse=0 +bKeepAspectRatio=0 +f2Center=0.500000,0.500000 +fOpacity=1.000000 +fStretch=1.000000 + +[PandaFX.fx] +Bleach_Bypass_Amount=0.500000 +Blend_Amount=0.500000 +Contrast_B=0.800000 +Contrast_G=0.800000 +Contrast_R=0.900000 +Diffusion_1_Amount=0.300000 +Diffusion_1_Gamma=0.700000 +Diffusion_1_Quality=2.000000 +Diffusion_1_Radius=8.000000 +Diffusion_2_Amount=0.200000 +Diffusion_2_Gamma=0.500000 +Diffusion_2_Quality=16.000000 +Diffusion_2_Radius=5.000000 +Diffusion_3_Amount=1.000000 +Diffusion_3_Gamma=5.000000 +Diffusion_3_Quality=3.000000 +Diffusion_3_Radius=7.400000 +Enable_Bleach_Bypass=1 +Enable_Diffusion=1 +Enable_Dither=0 +Enable_Static_Dither=1 +Gamma_B=0.990000 +Gamma_G=1.000000 +Gamma_R=1.000000 + +[PD80_01A_RT_Correct_Contrast.fx] +enable_fade=1 +freeze=0 +rt_bp_str=1.000000 +rt_enable_blackpoint_correction=1 +rt_enable_whitepoint_correction=0 +rt_wp_str=1.000000 +transition_speed=0.500000 + +[PD80_01B_RT_Correct_Color.fx] +debug_mode=0 +dither_strength=1.000000 +enable_dither=1 +enable_fade=1 +freeze=0 +midCC_scale=0.500000 +mid_use_alt_method=1 +rt_blackpoint_method=1 +rt_blackpoint_respect_luma=0 +rt_bp_rl_str=1.000000 +rt_bp_str=1.000000 +rt_enable_blackpoint_correction=1 +rt_enable_midpoint_correction=1 +rt_enable_whitepoint_correction=1 +rt_midpoint_respect_luma=1 +rt_whitepoint_method=0 +rt_whitepoint_respect_luma=1 +rt_wp_rl_str=1.000000 +rt_wp_str=1.000000 +transition_speed=0.500000 + +[PD80_01_Color_Gamut.fx] +colorgamut=0 + +[PD80_02_Bloom.fx] +bExposure=0.301000 +BKelvin=6500 +BloomLimit=0.284000 +BloomMix=0.190000 +BloomSaturation=0.850000 +BlurSigma=30.000000 +BlurSigmaNarrow=15.000000 +CA=0.423000 +CA_strength=0.704000 +CA_type=0 +debugBloom=0 +degrees=159 +dither_strength=2.000000 +enableBKelvin=0 +fBloomStrength=0.250000 +GreyValue=0.279000 +use_only_ca=0 + +[PD80_02_Bonus_LUT_pack.fx] +dither_strength=1.000000 +enable_dither=1 +ib=0.000000,0.000000,0.000000 +ig=1.000000 +iw=1.000000,1.000000,1.000000 +ob=0.000000,0.000000,0.000000 +ow=1.000000,1.000000,1.000000 +PD80_Intensity=0.518000 +PD80_LutSelector=19 +PD80_MixChroma=1.000000 +PD80_MixLuma=1.000000 + +[PD80_02_Cinetools_LUT.fx] +dither_strength=1.000000 +enable_dither=1 +ib=0.000000,0.000000,0.000000 +ig=1.000000 +iw=1.000000,1.000000,1.000000 +ob=0.000000,0.000000,0.000000 +ow=1.000000,1.000000,1.000000 +PD80_Intensity=1.000000 +PD80_LutSelector=1 +PD80_MixChroma=1.000000 +PD80_MixLuma=1.000000 + +[PD80_03_Color_Space_Curves.fx] +colorsat=0.000000 +color_space=1 +dither_strength=1.000000 +enable_dither=1 +pos0_shoulder_grey=0.800000 +pos0_toe_grey=0.200000 +pos1_shoulder_grey=0.800000 +pos1_toe_grey=0.200000 + +[PD80_03_Curved_Levels.fx] +black_in_grey=0.000000 +black_out_grey=0.000000 +dither_strength=1.000000 +enable_dither=1 +pos0_shoulder_grey=0.750000 +pos0_toe_grey=0.250000 +pos1_shoulder_grey=0.750000 +pos1_toe_grey=0.250000 +white_in_grey=255.000000 +white_out_grey=255.000000 + +[PD80_03_Filmic_Adaptation.fx] +adj_linear=1.000000 +adj_shoulder=1.000000 +adj_toe=1.000000 + +[PD80_03_Levels.fx] +dither_strength=1.000000 +enable_dither=1 +ib=0.000000,0.000000,0.000000 +ig=1.000000 +iw=1.000000,1.000000,1.000000 +ob=0.000000,0.000000,0.000000 +ow=1.000000,1.000000,1.000000 + +[PD80_04_BlacknWhite.fx] +bluechannel=-0.600000 +bw_mode=13 +curve_str=1.500000 +cyanchannel=0.000000 +dither_strength=1.000000 +enable_dither=1 +greenchannel=0.600000 +magentachannel=-0.200000 +redchannel=0.200000 +show_clip=0 +tinthue=0.083000 +tintsat=0.120000 +use_tint=0 +yellowchannel=0.400000 + +[PD80_04_Color_Balance.fx] +h_BlueShift=0.000000 +h_GreenShift=0.000000 +h_RedShift=0.000000 +m_BlueShift=0.000000 +m_GreenShift=0.000000 +m_RedShift=0.000000 +preserve_luma=1 +separation_mode=0 +s_BlueShift=0.000000 +s_GreenShift=0.000000 +s_RedShift=0.000000 + +[PD80_04_Color_Gradients.fx] +blendcolor_ds_m=0.000000,0.365000,1.000000 +blendcolor_ds_s=0.000000,0.039000,0.588000 +blendcolor_ls_m=0.980000,0.588000,0.000000 +blendcolor_ls_s=0.000000,0.365000,1.000000 +blendmode_ds_m=10 +blendmode_ds_s=10 +blendmode_ls_m=10 +blendmode_ls_s=5 +CGdesat=0.000000 +dither_strength=1.000000 +enable_dither=1 +enable_ds=1 +finalmix=0.333000 +luma_mode=0 +maxlevel=0.300000 +minlevel=0.125000 +opacity_ds_m=1.000000 +opacity_ds_s=1.000000 +opacity_ls_m=1.000000 +opacity_ls_s=0.300000 +separation_mode=0 + +[PD80_04_Color_Temperature.fx] +Kelvin=6827 +kMix=1.000000 +LumPreservation=1.000000 + +[PD80_04_Magical_Rectangle.fx] +blendmode_1=0 +center=0.500000,0.500000 +depthpos=0.000000 +depth_smoothing=0.002000 +dither_strength=0.000000 +enable_gradient=0 +gradient_curve=0.250000 +gradient_type=0 +intensity_boost=1.000000 +invert_shape=0 +mr_brightness=0.000000 +mr_contrast=0.000000 +mr_exposure=0.000000 +mr_hue=0.000000 +mr_saturation=0.000000 +mr_vibrance=0.000000 +opacity=1.000000 +reccolor=0.500000,0.500000,0.500000 +ret_size_x=0.125000 +ret_size_y=0.125000 +rotation=45 +shape=0 +smoothing=0.010000 + +[PD80_04_Selective_Color_v2.fx] +bk_adj_bla=-0.082000 +bk_adj_cya=0.000000 +bk_adj_mag=0.000000 +bk_adj_sat=0.606000 +bk_adj_yel=0.000000 +bm_adj_bla=0.459000 +bm_adj_cya=-0.200000 +bm_adj_lig=0.081000 +bm_adj_lig_curve=0.318000 +bm_adj_mag=0.273000 +bm_adj_sat=0.155000 +bm_adj_yel=0.448000 +b_adj_bla=-0.299000 +b_adj_cya=0.295000 +b_adj_lig=-0.149000 +b_adj_lig_curve=0.138000 +b_adj_mag=0.194000 +b_adj_sat=0.408000 +b_adj_yel=0.082000 +cb_adj_bla=0.437000 +cb_adj_cya=0.460000 +cb_adj_lig=0.000000 +cb_adj_lig_curve=0.296000 +cb_adj_mag=0.713000 +cb_adj_sat=0.172000 +cb_adj_yel=-0.402000 +corr_method=1 +c_adj_bla=0.007000 +c_adj_cya=-0.128000 +c_adj_lig=0.081000 +c_adj_lig_curve=0.000000 +c_adj_mag=0.000000 +c_adj_sat=0.000000 +c_adj_yel=0.000000 +gc_adj_bla=-0.287000 +gc_adj_cya=-0.143000 +gc_adj_lig=0.517000 +gc_adj_lig_curve=-0.161000 +gc_adj_mag=0.362000 +gc_adj_sat=0.253000 +gc_adj_yel=0.138000 +g_adj_bla=-0.011000 +g_adj_cya=-0.218000 +g_adj_lig=-0.172000 +g_adj_lig_curve=-0.138000 +g_adj_mag=0.046000 +g_adj_sat=0.345000 +g_adj_yel=0.230000 +mr_adj_bla=0.000000 +mr_adj_cya=0.000000 +mr_adj_lig=-0.144000 +mr_adj_lig_curve=0.000000 +mr_adj_mag=0.000000 +mr_adj_sat=0.000000 +mr_adj_yel=0.000000 +m_adj_bla=0.128000 +m_adj_cya=-0.104000 +m_adj_lig=-0.008000 +m_adj_lig_curve=0.040000 +m_adj_mag=0.064000 +m_adj_sat=0.168000 +m_adj_yel=0.016000 +n_adj_bla=-0.025000 +n_adj_cya=-0.031000 +n_adj_mag=0.070000 +n_adj_sat=0.335000 +n_adj_yel=0.076000 +o_adj_bla=0.177000 +o_adj_cya=0.014000 +o_adj_lig=0.054000 +o_adj_lig_curve=0.087000 +o_adj_mag=0.124000 +o_adj_sat=0.121000 +o_adj_yel=0.082000 +r_adj_bla=0.104000 +r_adj_cya=-0.245000 +r_adj_lig=0.065000 +r_adj_lig_curve=0.200000 +r_adj_mag=0.087000 +r_adj_sat=0.095000 +r_adj_yel=0.095000 +w_adj_bla=-0.025000 +w_adj_cya=0.070000 +w_adj_mag=-0.065000 +w_adj_sat=-0.099000 +w_adj_yel=0.054000 +yg_adj_bla=-0.162000 +yg_adj_cya=-0.181000 +yg_adj_lig=0.103000 +yg_adj_lig_curve=0.322000 +yg_adj_mag=0.229000 +yg_adj_sat=0.313000 +yg_adj_yel=0.467000 +y_adj_bla=-0.115000 +y_adj_cya=0.070000 +y_adj_lig=-0.046000 +y_adj_lig_curve=0.333000 +y_adj_mag=-0.042000 +y_adj_sat=0.425000 +y_adj_yel=0.184000 + +[PD80_06_Chromatic_Aberration.fx] +CA=-12.000000 +CA_curve=1.000000 +CA_shapeX=1.000000 +CA_shapeY=1.000000 +CA_strength=1.000000 +CA_type=0 +CA_width=1.000000 +degrees=135 +depthCurve=1.000000 +depthEnd=0.100000 +depthStart=0.000000 +display_depth=0 +enable_depth_int=0 +enable_depth_width=0 +oX=0.000000 +oY=0.000000 +sampleSTEPS=24 +show_CA=0 +vignetteColor=0.000000,0.000000,0.000000 + +[PerfectPerspective.fx] +BorderColor=0.027000,0.027000,0.027000,0.784000 +BorderCorner=0.062000 +BorderVignette=0 +DebugPreview=0 +FOV=90 +K=1.000000 +MirrorBorder=1 +Offset=0.000000,0.000000 +Projection=0 +ResScaleScreen=1920 +ResScaleVirtual=1920 +Type=0 +Vertical=1.000000 +VerticalScale=0.980000 +Vignette=1 +Zooming=1.000000 + +[PiecewiseFilmicTonemap.fx] +FixWhitepoint=1 +Gamma=1.000000 +ShoulderAngle=0.000000 +ShoulderLength=0.500000 +ShoulderStrength=0.000000 +ToeLength=0.500000 +ToeStrength=0.000000 + +[qUINT_bloom.fx] +BLOOM_ADAPT_EXPOSURE=0.000000 +BLOOM_ADAPT_SPEED=2.000000 +BLOOM_ADAPT_STRENGTH=0.500000 +BLOOM_CURVE=1.786000 +BLOOM_INTENSITY=1.138000 +BLOOM_LAYER_MULT_1=0.055000 +BLOOM_LAYER_MULT_2=0.050000 +BLOOM_LAYER_MULT_3=0.050000 +BLOOM_LAYER_MULT_4=0.100000 +BLOOM_LAYER_MULT_5=0.500000 +BLOOM_LAYER_MULT_6=0.010000 +BLOOM_LAYER_MULT_7=1.000000 +BLOOM_SAT=2.524000 +BLOOM_TONEMAP_COMPRESSION=4.000000 + +[qUINT_dof.fx] +bADOF_AutofocusEnable=1 +fADOF_AutofocusCenter=0.500000,0.500000 +fADOF_AutofocusRadius=0.600000 +fADOF_AutofocusSpeed=0.100000 +fADOF_BokehIntensity=0.300000 +fADOF_FarBlurCurve=1.500000 +fADOF_HyperFocus=0.100000 +fADOF_ManualfocusDepth=0.001000 +fADOF_NearBlurCurve=6.000000 +fADOF_RenderResolutionMult=0.500000 +fADOF_ShapeAnamorphRatio=1.000000 +fADOF_ShapeChromaAmount=-0.100000 +fADOF_ShapeCurvatureAmount=1.000000 +fADOF_ShapeRadius=20.500000 +fADOF_ShapeRotation=0.000000 +fADOF_SmootheningAmount=4.000000 +iADOF_BokehMode=2 +iADOF_ShapeChromaMode=2 +iADOF_ShapeQuality=5 +iADOF_ShapeVertices=6 + +[qUINT_lightroom.fx] +LIGHTROOM_AQUA_EXPOSURE=0.000000 +LIGHTROOM_AQUA_HUESHIFT=0.000000 +LIGHTROOM_AQUA_SATURATION=-0.026000 +LIGHTROOM_BLUE_EXPOSURE=0.070000 +LIGHTROOM_BLUE_HUESHIFT=-0.097000 +LIGHTROOM_BLUE_SATURATION=-0.068000 +LIGHTROOM_ENABLE_CLIPPING_DISPLAY=0 +LIGHTROOM_ENABLE_CURVE_DISPLAY=0 +LIGHTROOM_ENABLE_LUT=0 +LIGHTROOM_ENABLE_VIGNETTE=0 +LIGHTROOM_GLOBAL_BLACKS_CURVE=0.100000 +LIGHTROOM_GLOBAL_BLACK_LEVEL=0.000000 +LIGHTROOM_GLOBAL_CONTRAST=-0.021000 +LIGHTROOM_GLOBAL_EXPOSURE=-0.095000 +LIGHTROOM_GLOBAL_GAMMA=0.010000 +LIGHTROOM_GLOBAL_HIGHLIGHTS_CURVE=0.057000 +LIGHTROOM_GLOBAL_MIDTONES_CURVE=0.035000 +LIGHTROOM_GLOBAL_SATURATION=0.030000 +LIGHTROOM_GLOBAL_SHADOWS_CURVE=0.120000 +LIGHTROOM_GLOBAL_TEMPERATURE=-0.017000 +LIGHTROOM_GLOBAL_TINT=0.045000 +LIGHTROOM_GLOBAL_VIBRANCE=0.188000 +LIGHTROOM_GLOBAL_WHITES_CURVE=0.000000 +LIGHTROOM_GLOBAL_WHITE_LEVEL=255.000000 +LIGHTROOM_GREEN_EXPOSURE=0.030000 +LIGHTROOM_GREEN_HUESHIFT=0.000000 +LIGHTROOM_GREEN_SATURATION=0.055000 +LIGHTROOM_LUT_SCROLL=0 +LIGHTROOM_LUT_TILE_COUNT=16 +LIGHTROOM_LUT_TILE_SIZE=16 +LIGHTROOM_MAGENTA_EXPOSURE=0.000000 +LIGHTROOM_MAGENTA_HUESHIFT=0.000000 +LIGHTROOM_MAGENTA_SATURATION=0.000000 +LIGHTROOM_ORANGE_EXPOSURE=-0.108000 +LIGHTROOM_ORANGE_HUESHIFT=0.000000 +LIGHTROOM_ORANGE_SATURATION=-0.032000 +LIGHTROOM_RED_EXPOSURE=-0.080000 +LIGHTROOM_RED_HUESHIFT=0.060000 +LIGHTROOM_RED_SATURATION=0.000000 +LIGHTROOM_VIGNETTE_AMOUNT=1.000000 +LIGHTROOM_VIGNETTE_BLEND_MODE=1 +LIGHTROOM_VIGNETTE_CURVE=1.000000 +LIGHTROOM_VIGNETTE_HEIGHT=0.000000 +LIGHTROOM_VIGNETTE_RADIUS_INNER=0.000000 +LIGHTROOM_VIGNETTE_RADIUS_OUTER=1.000000 +LIGHTROOM_VIGNETTE_SHOW_RADII=0 +LIGHTROOM_VIGNETTE_WIDTH=0.000000 +LIGHTROOM_YELLOW_EXPOSURE=0.000000 +LIGHTROOM_YELLOW_HUESHIFT=0.021000 +LIGHTROOM_YELLOW_SATURATION=0.000000 + +[qUINT_mxao.fx] +MXAO_BLEND_TYPE=0 +MXAO_DEBUG_VIEW_ENABLE=0 +MXAO_FADE_DEPTH_END=0.400000 +MXAO_FADE_DEPTH_START=0.050000 +MXAO_GLOBAL_RENDER_SCALE=1.000000 +MXAO_GLOBAL_SAMPLE_QUALITY_PRESET=2 +MXAO_SAMPLE_NORMAL_BIAS=0.200000 +MXAO_SAMPLE_RADIUS=2.500000 +MXAO_SSAO_AMOUNT=1.000000 + +[qUINT_regrade.fx] +CB_BALANCE_BL=0.000000,0.000000,0.000000 +CB_BALANCE_CR=0.000000,0.000000,0.000000 +CB_BALANCE_GM=0.000000,0.000000,0.000000 +CB_HI=0.000000,0.000000 +CB_MID=0.000000,0.000000 +CB_SHAD=0.000000,0.000000 +COLOR_REMAP_AQUA=0.000000,0.000000,0.000000 +COLOR_REMAP_BLUE=0.000000,0.000000,0.000000 +COLOR_REMAP_GREEN=0.000000,0.000000,0.000000 +COLOR_REMAP_MAGENTA=0.000000,0.000000,0.000000 +COLOR_REMAP_ORANGE=-0.066000,0.000000,-0.095000 +COLOR_REMAP_RED=0.000000,0.000000,0.020000 +COLOR_REMAP_YELLOW=-0.089000,0.000000,-0.020000 +DITHER_BIT_DEPTH=2 +ENABLE_VIGNETTE=0 +GRADE_CONTRAST=0.006000 +GRADE_EXPOSURE=-0.309000 +GRADE_GAMMA=-0.112000 +GRADE_SATURATION=-0.100000 +GRADE_VIBRANCE=0.330000 +HISTOGRAM_MODE=1 +HISTOGRAM_UIENABLE=1 +INPUT_BLACK_LVL=0.000000 +INPUT_COLOR_TEMPERATURE=6140.000000 +INPUT_GAIN_COLOR=0.500000,0.500000,0.500000 +INPUT_GAMMA_COLOR=0.500000,0.500000,0.500000 +INPUT_LIFT_COLOR=0.500000,0.500000,0.500000 +INPUT_WHITE_LVL=255.000000 +NODE1=2 +NODE2=5 +NODE3=4 +NODE4=6 +NODE5=7 +NODE6=0 +NODE7=0 +NODE8=0 +NODE9=0 +OUTPUT_BLACK_LVL=0.000000 +OUTPUT_WHITE_LVL=255.000000 +SHOW_CLIPPING=0 +SPECIAL_BLEACHBP=0.000000 +SPECIAL_GAMMA_LUM_CHROM=0.000000,0.000000 +SPLITTONE_BALANCE=0.500000 +SPLITTONE_HIGHLIGHTS=0.684597,0.696078,0.607363 +SPLITTONE_SHADOWS=0.676687,0.676687,0.730392 +TONECURVE_DARKS=0.210000 +TONECURVE_DARKWASH_INT=0.015000 +TONECURVE_DARKWASH_RANGE=0.200000 +TONECURVE_HIGHLIGHTS=0.000000 +TONECURVE_LIGHTS=0.039000 +TONECURVE_SHADOWS=-0.297000 +UIHELP=0 +VIGNETTE_BLEND_MODE=1 +VIGNETTE_BLURRYNESS_MECH=0.800000 +VIGNETTE_RADIUS_MECH=0.525000 +VIGNETTE_RADIUS_SENSOR=1.000000 +VIGNETTE_RATIO=0.000000 + +[qUINT_rtgi.fx] +FADEOUT_MODE_UI=2 +RT_ALTERNATE_INTERSECT_TEST=1 +RT_AO_AMOUNT=4.690000 +RT_BACKFACE_MIRROR=1 +RT_DEBUG_VIEW=0 +RT_DO_RENDER=0 +RT_FADE_DEPTH=0.112000 +RT_HIGHP_LIGHT_SPREAD=1 +RT_IBL_AMOUT=0.370000 +RT_IL_AMOUNT=2.060000 +RT_IL_BOUNCE_WEIGHT=0.310000 +RT_RAY_AMOUNT=5 +RT_RAY_STEPS=20 +RT_ROUGHNESS=0.820000 +RT_SAMPLE_RADIUS=8.520000 +RT_SAMPLE_RADIUS_FAR=1.000000 +RT_SPECULAR=0.040000 +RT_USE_FALLBACK=0 +RT_Z_THICKNESS=0.310000 +SKY_COLOR_AMBIENT_MIX=0.000000 +SKY_COLOR_AMT=0.000000 +SKY_COLOR_SAT=1.880000 +UIHELP=0 +UIHELP2=0 + +[qUINT_sharp.fx] +DEPTH_MASK_ENABLE=1 +RMS_MASK_ENABLE=1 +SHARPEN_MODE=1 +SHARP_STRENGTH=0.575000 + +[ReVeil.fx] +Debug=0 +DepthMultiplier=-0.025000 +TransmissionMultiplier=-0.228000 +UseVRS=1 +VarianceCutoff=0.151000 + +[Sepia.fx] +Strength=1.000000 +Tint=0.529412,0.215398,0.215417 + +[UnrealLens.fx] +BokehAngle=0.250000 +BokehDefinition=0.200000 +BokehSize=1.000000 +Brightness=0.100000 +EdgesMasking=0.300000 +Saturation=0.700000 +Scale1=0.600000 +Scale2=0.200000 +Scale3=0.100000 +Scale4=0.050000 +Scale5=-1.000000 +Scale6=-1.000000 +Scale7=-1.000000 +ShowLens=0 +Threshold=0.700000 +Tint1=1.000000,1.000000,1.000000,1.000000 +Tint2=1.000000,1.000000,1.000000,1.000000 +Tint3=1.000000,1.000000,1.000000,1.000000 +Tint4=1.000000,1.000000,1.000000,1.000000 +Tint5=1.000000,1.000000,1.000000,1.000000 +Tint6=1.000000,1.000000,1.000000,0.000000 +Tint7=1.000000,1.000000,1.000000,0.000000 +Tonemapper=2 +_WipWarn=0 + +[Unsharp.fx] +Amount=1.000000 +BlurScale=1.000000 + +[VHSM.fx] +CHROMA_SHIFT=50 +SHIFT_MODE=0 +TAPE_SELECT=2 + +[WatchDogs.fx] +LinearColor=1.250000 +LinearWhite=1.250000 + +[WhitepointFixer.fx] +Whitepoint=1.000000 +_Help=0 + diff --git a/data/presets/2. Other/Standard-Smooth Experience.ini b/data/presets/2. Other/Standard-Smooth Experience.ini new file mode 100644 index 00000000..b2845489 --- /dev/null +++ b/data/presets/2. Other/Standard-Smooth Experience.ini @@ -0,0 +1,1350 @@ +KeyHistogramGraphs=33,0,0,0 +PreprocessorDefinitions=RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=1,RESHADE_DEPTH_INPUT_IS_REVERSED=1,INFINITE_BOUNCES=1,MATERIAL_TYPE=1,SKYCOLOR_MODE=2,WINDOW_SIZE=15,SECOND_PASS=0,MXAO_ENABLE_IL=1 +Techniques=prod80_01B_RT_Correct_Color@PD80_01B_RT_Correct_Color.fx,qUINT_ReGrade@qUINT_regrade.fx,Tint@Sepia.fx,prod80_02_Cinetools_LUT@PD80_02_Cinetools_LUT.fx,MXAO@qUINT_mxao.fx,DELC_Sharpen@qUINT_sharp.fx,ArtisticVignette@ArtisticVignette.fx +TechniqueSorting=prod80_01B_RT_Correct_Color@PD80_01B_RT_Correct_Color.fx,qUINT_ReGrade@qUINT_regrade.fx,Tint@Sepia.fx,prod80_02_Cinetools_LUT@PD80_02_Cinetools_LUT.fx,MXAO@qUINT_mxao.fx,DELC_Sharpen@qUINT_sharp.fx,ArtisticVignette@ArtisticVignette.fx,SSR@qUINT_ssr.fx,Lightroom@qUINT_lightroom.fx,prod80_04_ColorTemperature@PD80_04_Color_Temperature.fx,ADOF@qUINT_dof.fx,Bloom@qUINT_bloom.fx,DepthHaze@DepthHaze.fx,MagicHDR@MagicHDR.fx,MultiLUT@MultiLUT.fx,pd80_02_Bonus_LUT_pack@PD80_02_Bonus_LUT_pack.fx,prod80_02_Bloom@PD80_02_Bloom.fx,prod80_04_SelectiveColor_v2@PD80_04_Selective_Color_v2.fx,Unsharp@Unsharp.fx,Clarity2@Clarity2.fx,AdaptiveTonemapper@AdaptiveTonemapper.fx,ReVeil_Top@ReVeil.fx,ReVeil_Bottom@ReVeil.fx,ContrastStretch@ContrastStretch.fx,Debanding@qUINT_deband.fx,ArcaneBloom@ArcaneBloom.fx,prod80_06_Depth_Slicer@PD80_06_Depth_Slicer.fx,LiquidLens@LiquidLens.fx,ASCII@ASCII.fx,prod80_06_FilmGrain@PD80_06_Film_Grain.fx,AspectRatioPS@AspectRatio.fx,prod80_06_LumaFade_Start@PD80_06_Luma_Fade.fx,prod80_06_LumaFade_End@PD80_06_Luma_Fade.fx,LocalContrastCS@LocalContrastCS.fx,prod80_06_Posterize_Pixelate@PD80_06_Posterize_Pixelate.fx,LumaSharpen@LumaSharpen.fx,LUT@LUT.fx,AspectRatioSuite@AspectRatioSuite.fx,DisplayLUT@LUTTools.fx,ApplyLUT@LUTTools.fx,PerfectPerspective@PerfectPerspective.fx,MagicBorder@MagicBorder.fx,PiecewiseFilmicTonemap@PiecewiseFilmicTonemap.fx,PiecewiseFilmicTonemap_Debug@PiecewiseFilmicTonemap.fx,AtmosphericDensity@AtmosphericDensity.fx,Before@BeforeAfter.fx,After@BeforeAfter.fx,MBMB@MBMB.fx,Border@Border.fx,MinimalColorGrading@MinimalColorGrading.fx,Cartoon@Cartoon.fx,Monochrome@Monochrome.fx,ContrastAdaptiveSharpen@CAS.fx,MultiFX@MultiFX.fx,Pong@Pong.fx,Checkerboard@Checkerboard.fx,ChromaticAberration@Prism.fx,Chromakey@Chromakey.fx,CA@ChromaticAberration.fx,NeoBloom@NeoBloom.fx,CinematicDOF@CinematicDOF.fx,NormalMap@NormalMap.fx,Nostalgia@Nostalgia.fx,qUINT_Insight_GenerateHistogram@qUINT_insight.fx,qUINT_Insight@qUINT_insight.fx,ColorLab@ColorLab.fx,Oilify@Oilify.fx,ColorMatrix@ColorMatrix.fx,Overlay@Overlay.fx,PandaFX@PandaFX.fx,AdvancedCRT@CRT.fx,prod80_01A_RT_Correct_Contrast@PD80_01A_RT_Correct_Contrast.fx,CRT_Lottes@CRT_Lottes.fx,CRT_Yee64@CRT_Yee64.fx,CRT_Yeetron@CRT_Yeetron.fx,prod80_01_Color_Gamut@PD80_01_Color_Gamut.fx,Cursor@Cursor.fx,Curves@Curves.fx,Daltonize@Daltonize.fx,GrainSpread@GrainSpread.fx,Deband@Deband.fx,RTGlobalIllumination@qUINT_rtgi.fx,prod80_04_Technicolor@PD80_04_Technicolor.fx,DepthAlpha@DepthAlpha.fx,AdaptiveFog@AdaptiveFog.fx,HexLensFlare@HexLensFlare.fx,DH_Anime@dh_anime.fx,qUINT_Solaris@qUINT_solaris.fx,ImageTest@Image.fx,DirectionalDepthBlur@DirectionalDepthBlur.fx,prod80_02_LUT_Creator@PD80_02_LUT_Creator.fx,DisplayDepth@DisplayDepth.fx,Interlaced@Interlaced.fx,Dither@Dither.fx,RetroFog@RetroFog.fx,prod80_03_Color_Space_Curves@PD80_03_Color_Space_Curves.fx,DPX@DPX.fx,Emphasize@Emphasize.fx,EyeAdaption@EyeAdaption.fx,prod80_03_CurvedLevels@PD80_03_Curved_Levels.fx,HDR@FakeHDR.fx,prod80_03_FilmicTonemap@PD80_03_Filmic_Adaptation.fx,FilmGrain@FilmGrain.fx,FilmicAnamorphSharpen@FilmicAnamorphSharpen.fx,FilmicSharpen@FilmicSharpen.fx,prod80_03_Levels@PD80_03_Levels.fx,Flashlight@Flashlight.fx,FlexibleCA@FlexibleCA.fx,prod80_05_LumaSharpen@PD80_05_Sharpening.fx,Layer@Layer.fx,Flipbook@Flipbook.fx,SCurve@SCurve.fx,prod80_03_Shadows_Midtones_Highlights@PD80_03_Shadows_Midtones_Highlights.fx,FocalDOF@FocalDOF.fx,FramerateLimiter@FramerateLimiter.fx,prod80_06_ChromaticAberration@PD80_06_Chromatic_Aberration.fx,SimpleGrain@SimpleGrain.fx,prod80_04_Black_and_White@PD80_04_BlacknWhite.fx,Sketch@Sketch.fx,prod80_04_ColorBalance@PD80_04_Color_Balance.fx,FXAA@FXAA.fx,GaussianBlurCS@GaussianBlurCS.fx,prod80_04_ColorGradient@PD80_04_Color_Gradients.fx,SMAA@SMAA.fx,Before@Splitscreen.fx,After@Splitscreen.fx,prod80_04_ColorIsolation@PD80_04_Color_Isolation.fx,SunsetFilter@SunsetFilter.fx,Technicolor@Technicolor.fx,Letterbox@Letterbox.fx,Technicolor2@Technicolor2.fx,TiltShift@TiltShift.fx,Tonemap@Tonemap.fx,prod80_04_ContrastBrightnessSaturation@PD80_04_Contrast_Brightness_Saturation.fx,TrackingRays@TrackingRays.fx,UIDetect_ShowPixel@UIDetect.fx,UIDetect@UIDetect.fx,UIDetect_Before@UIDetect.fx,UIDetect_After@UIDetect.fx,UIMask_Top@UIMask.fx,UIMask_Bottom@UIMask.fx,UIMaskCreator@UIMaskCreator.fx,prod80_04_Magical_Rectangle@PD80_04_Magical_Rectangle.fx,prod80_04_Saturation_Limiter@PD80_04_Saturation_Limit.fx,UnrealLens@UnrealLens.fx,prod80_04_SelectiveColor@PD80_04_Selective_Color.fx,Levels@Levels.fx,LiftGammaGain@LiftGammaGain.fx,VHSM@VHSM.fx,Vibrance@Vibrance.fx,Vignette@Vignette.fx,VirtualResolution@VirtualResolution.fx,VariableRateShading@VRS_Map.fx,WatchDogsTonemapping@WatchDogs.fx,WhitepointerFixer@WhitepointFixer.fx + +[AdaptiveFog.fx] +BloomPower=10.000000 +BloomThreshold=10.250000 +BloomWidth=0.200000 +FogColor=0.900000,0.900000,0.900000 +FogCurve=1.500000 +FogStart=0.050000 +MaxFogFactor=0.800000 + +[AdaptiveTonemapper.fx] +AdaptFocalPoint=0.500000,0.500000 +AdaptPrecision=0 +AdaptRange=0.000000,1.000000 +AdaptSensitivity=1.000000 +AdaptTime=1.000000 +Amount=0.849000 +Exposure=0.000000 +FixWhitePoint=1 +TonemapOperator=0 + +[ArcaneBloom.fx] +uAdapt_DoLimits=1 +uAdapt_Intensity=1.000000 +uAdapt_Limits=0.000000,1.000000 +uAdapt_Precision=0 +uAdapt_Sensitivity=1.000000 +uAdapt_Time=1.000000 +uBloomIntensity=1.000000 +uExposure=1.000000 +uMaxBrightness=100.000000 + +[ArtisticVignette.fx] +BlendMode=0 +VignetteColor=0.000000,0.000000,0.000000,1.000000 +VignetteRatio=0.000000 +VignetteShape=6 +VignetteStartEnd=0.540000,1.390000 +_Help=0 + +[BilateralFilter.fx] +BilateralFilter=1 +SIGMA=10 + +[BloomingHDR.fx] +Adapt_Adjust=0.500000 +Adapt_Seek=0.500000 +Auto_Bloom=0 +Auto_Exposure=0 +Bloom_Intensity=0.500000,0.250000 +Bloom_Spread=50.000000 +CBT_Adjust=0.500000 +Contrast=1.000000 +Debug_View=0 +Dither_Bloom=0.250000 +Exp=0.000000 +Eye_Adaptation=1 +Gamma=2.200000 +GreyValue=0.180000 +HDR_BP=0.500000 +Inv_Tonemappers=1 +Saturate=1.000000 +Saturation=0.250000,0.250000 +Tonemappers=0 +WP=1.000000 + +[Cartoon.fx] +EdgeSlope=1.500000 +Power=1.500000 + +[CAS.fx] +Contrast=0.000000 +Sharpening=1.000000 + +[Chromakey.fx] +AntiAliased=0 +Color=1 +CustomColor=1.000000,0.000000,0.000000 +Floor=0 +FloorAngle=1.000000 +FOV=90 +Pass=0 +Precision=4 +RadialX=0 +RadialY=0 +Threshold=0.500000 + +[ChromaticAberration.fx] +Shift=2.500000,-0.500000 +Strength=0.764000 + +[CinematicDOF.fx] +AutoFocusPoint=0.500000,0.500000 +AutoFocusTransitionSpeed=0.200000 +BlurQuality=5.000000 +BokehBusyFactor=1.000000 +FarPlaneMaxBlur=4.000000 +FNumber=6.200000 +FocalLength=50.000000 +FocusCrosshairColor=1.000000,0.000000,1.000000,1.000000 +FocusPlaneColor=0.000000,0.000000,1.000000 +HighlightAnamorphicAlignmentFactor=0.000000 +HighlightAnamorphicFactor=0.010000 +HighlightAnamorphicSpreadFactor=1.000000 +HighlightGainFarPlane=0.500000 +HighlightGainNearPlane=0.000000 +HighlightThresholdFarPlane=0.000000 +HighlightThresholdNearPlane=0.000000 +ManualFocusPlane=16.900000 +NearPlaneMaxBlur=1.000000 +OutOfFocusPlaneColor=0.800000,0.800000,0.800000 +OutOfFocusPlaneColorTransparency=0.700000 +PostBlurSmoothing=0.000000 +ShowCoCValues=0 +ShowOutOfFocusPlaneOnMouseDown=1 +UseAutoFocus=0 +UseMouseDrivenAutoFocus=0 + +[Clarity2.fx] +BlendIfRange=0.200000 +ClarityBlendIfDarkTwo=50 +ClarityBlendIfLightTwo=205 +ClarityBlendModeTwo=2 +ClarityDarkIntensityTwo=0.400000 +ClarityLightIntensityTwo=0.000000 +ClarityOffsetTwo=8.000000 +ClarityRadiusTwo=3 +ClarityStrengthTwo=0.400000 +DitherStrength=1.000000 +MaskContrast=0.000000 +PreprocessorDefinitions=0 + +[ColorLab.fx] +Multiplier=1.000000,1.000000,1.000000 + +[ColorMatrix.fx] +ColorMatrix_Blue=0.000000,0.125000,0.875000 +ColorMatrix_Green=0.333000,0.667000,0.000000 +ColorMatrix_Red=0.817000,0.183000,0.000000 +Strength=1.000000 + +[Cursor.fx] +Color=0.871000,0.871000,0.871000 +Scale=0.200000 + +[Daltonize.fx] +Type=0 + +[Deband.fx] +custom_avgdiff=1.800000 +custom_maxdiff=4.000000 +custom_middiff=2.000000 +debug_output=0 +iterations=1 +range=24.000000 +threshold_preset=0 + +[DepthAlpha.fx] +ClearPreviousAlpha=1 +ColorizeTransparency=0 +DepthMultiplier=1.000000,0.500000,0.000000 +DepthRange=0.000000,1.000000 +DepthSmoothness=1.000000 +TestColor=0.000000,0.000000,0.000000,1.000000 +_Help=0 + +[DepthHaze.fx] +EffectStrength=0.900000 +FogColor=0.800000,0.800000,0.800000 +FogFactor=1.000000 +FogStart=0.000000 + +[Depth_Cues.fx] +Blur_Cues=0.500000 +Debug_View=0 +DEPTH_DEBUG=0 +Depth_Map=0 +Depth_Map_Adjust=250.000000 +Depth_Map_Flip=0 +No_Depth_Map=1 +Shade_Power=0.500000 +Spread=10.000000 + +[Depth_Tool.fx] +Depth_Map=0 +Depth_Map_Adjust=5.000000 +Depth_Map_Flip=0 +Dither=0 +Dither_Bit=6.000000 +LP=0 +Offset=0.000000 +Plus_Depth=0 +SCD=0 + +[DisplayDepth.fx] +bUIShowOffset=0 +bUIUsePreprocessorDefs=0 +fUIDepthMultiplier=1.000000 +fUIFarPlane=1000.000000 +fUIScale=1.000000,1.000000 +iUILogarithmic=0 +iUIOffset=0,0 +iUIPresentType=2 +iUIReversed=0 +iUIUpsideDown=0 + +[DLAA_light.fx] +HFR_AA=0 +HFR_Adjust=0.500000 +Mask_Adjust=1.000000 +Short_Edge_Mask=0.250000 +View_Mode=0 + +[DLAA_Plus.fx] +De_Artifact=0.500000 +Long_Edge_Mask_H=0.000000 +Long_Edge_Mask_V=0.000000 +Short_Edge_Mask=0.697000 +Text_Preservation=0.500000 +View_Mode=0 + +[DPX.fx] +Colorfulness=2.500000 +Contrast=0.100000 +RGB_C=0.360000,0.360000,0.340000 +RGB_Curve=8.000000,8.000000,8.000000 +Saturation=3.000000 +Strength=0.050000 + +[eMotionBlur.fx] +Blur_Amount=16 +Debug=0 +Depth_Map=0 +Depth_Map_Adjust=7.500000 +Depth_Map_Flip=0 +Depth_Scaling=1 +Horizontal_and_Vertical=1.000000,1.000000 +Image_Position_Adjust=0,0 +mblurstrength=0.500000 +Offset=0.000000 +WeaponHandAdjust=0.000000,0.000000,0.000000 + +[Emphasize.fx] +BlendColor=0.000000,0.000000,0.000000 +BlendFactor=0.000000 +EffectFactor=0.900000 +FocusDepth=0.026000 +FocusEdgeDepth=0.050000 +FocusRangeDepth=0.001000 +Sphere_FieldOfView=75 +Sphere_FocusHorizontal=0.500000 +Sphere_FocusVertical=0.500000 +Spherical=0 + +[FakeHDR.fx] +HDRPower=1.191001 +radius1=0.793000 +radius2=0.850000 + +[FastFourierTransform.fx] +ApplyFilter=0 +FilterStrength=0.075000 +UseLUT=0 + +[FilmGrain.fx] +Intensity=0.500000 +Mean=0.500000 +SignalToNoiseRatio=6 +Variance=0.400000 + +[FilmicAnamorphSharpen.fx] +Clamp=0.650000 +Coefficient=0 +DepthMask=0 +DepthMaskContrast=128 +Offset=0.100000 +Preview=0 +Strength=19.309999 +UseMask=0 + +[FilmicBloom.fx] +BlurRadius=6.000000 +BlurSamples=6 + +[FilmicGrade.fx] +Coefficients=0 +LightControl=0.000000,0.000000 + +[Flipbook.fx] +Position=1.000000,0.000000,1.000000 +Size=10,9,30 + +[FocalDOF.fx] +DofScale=3.000000 +FocusPoint=0.500000,0.500000 +FocusTime=350.000000 + +[FogRemoval.fx] +CORRECTCOLOR=1 +DEBUG=0 +DEPTHCURVE=0.000000 +MAXPERCENTILE=0.950000 +MEDIANBOUNDS=0.200000,0.800000 +PRESERVEDETAIL=1 +REMOVALCAP=0.350000 +SENSITIVITYBOUNDS=0.200000,0.750000 +STRENGTH=0.950000 +USEDEPTH=0 + +[FXAA.fx] +EdgeThreshold=0.125000 +EdgeThresholdMin=0.000000 +Subpix=0.250000 + +[HexLensFlare.fx] +uColor0=0.576471,1.000000,0.000000 +uColor1=0.258824,0.592157,1.000000 +uColor2=1.000000,0.576471,0.000000 +uColor3=0.392157,0.925490,1.000000 +uIntensity=1.000000 +uScale=1.000000 +uThreshold=0.950000 + +[Histogram.fx] +BARMULTIPLIER=4 + +[Image.fx] +AspectCorrect=1 + +[Letterbox.fx] +Color=0.027000,0.027000,0.027000,1.000000 +DesiredAspect=1.988000 +Dimensions=0,0 + +[Levels.fx] +BlackPoint=16 +HighlightClipping=0 +WhitePoint=235 + +[LocalContrast.fx] +ContrastLimit=40 +CorrectGamma=1 + +[MagicHDR.fx] +BlendingAmount=0.559999 +BlendingBase=0.800000 +BloomAmount=0.140000 +BloomBrightness=3.000000 +BloomSaturation=0.545000 +BlurSize=0.500000 +Exposure=0.000000 +InputExposure=0.000000 +InvTonemap=0 +ShowBloom=0 +Tonemap=5 +_Credits=0 +_Help=0 +_WipWarn=0 + +[MBMB.fx] +f2MinMaxSpeed=0.100000,10.000000 +fBlur_Sigma=4.000000 +fDistortion=1.000000 +fSensitivity=0.100000 + +[MedianFilter.fx] +Power=1.000000 + +[MinimalColorGrading.fx] +ColorFilter=1.000000,1.000000,1.000000 +Contrast=1.000000 +Exposure=0.000000 +Saturation=1.000000 +SaturationMode=2 + +[Monochrome.fx] +Monochrome_color_saturation=0.000000 +Monochrome_conversion_values=0.210000,0.720000,0.070000 +Monochrome_preset=0 + +[MultiFX.fx] +f2Vignette_StartEnd=0.000000,1.000000 +f3CA_Intensity=0.000000,0.000000,0.000000 +fFilmGrain_Intensity=0.000000 +fFilmGrain_Mean=0.000000 +fFilmGrain_Speed=1.000000 +fFilmGrain_Variance=0.500000 +fSCurve_Intensity=0.000000 +fVignette_Intensity=0.000000 + +[MultiLUT.fx] +fLUT_AmountChroma=1.000000 +fLUT_AmountLuma=1.000000 +fLUT_LutSelector=0 + +[NeoBloom.fx] +BloomBlendMode=1 +ColorFilter=1.000000,1.000000,1.000000 +Intensity=1.000000 +MagicMode=0 +MaxBrightness=100.000000 +Mean=0.000000 +NormalizeBrightness=1 +Padding=0.100000 +Saturation=1.000000 +Sigma=4.000000 +Variance=5.000000 +_Help=0 + +[NLM_Sharp.fx] +CAM_IOB=0 +CA_Mask_Boost=0 +CA_Removal=0 +Debug_View=0 +Depth_Map=0 +Depth_Map_Adjust=250.000000 +Depth_Map_Flip=0 +NLM_Grounding=0 +No_Depth_Map=0 +Sharpness=0.625000 + +[NormalMap.fx] +AddressMode=0 +DistortionAmount=3.000000 +Rotation=0.000000 +TextureScale=6.000000 +Translation=0.000000,0.000000 +ZScale=1.000000 +_WipWarn=0 + +[Nostalgia.fx] +Nostalgia_color_0=0.000000,0.000000,0.000000 +Nostalgia_color_1=1.000000,1.000000,1.000000 +Nostalgia_color_10=1.000000,0.466667,0.466667 +Nostalgia_color_11=0.200000,0.200000,0.200000 +Nostalgia_color_12=0.466667,0.466667,0.466667 +Nostalgia_color_13=0.666667,1.000000,0.400000 +Nostalgia_color_14=0.000000,0.533333,1.000000 +Nostalgia_color_15=0.733333,0.733333,0.733333 +Nostalgia_color_2=0.533333,0.000000,0.000000 +Nostalgia_color_3=0.666667,1.000000,0.933333 +Nostalgia_color_4=0.800000,0.266667,0.800000 +Nostalgia_color_5=0.000000,0.800000,0.333333 +Nostalgia_color_6=0.000000,0.000000,0.666667 +Nostalgia_color_7=0.933333,0.933333,0.466667 +Nostalgia_color_8=0.866667,0.533333,0.333333 +Nostalgia_color_9=0.400000,0.266667,0.000000 +Nostalgia_color_reduction=1 +Nostalgia_dither=0 +Nostalgia_palette=0 +Nostalgia_scanlines=1 + +[PandaFX.fx] +Bleach_Bypass_Amount=0.500000 +Blend_Amount=0.500000 +Contrast_B=0.800000 +Contrast_G=0.800000 +Contrast_R=0.900000 +Diffusion_1_Amount=0.300000 +Diffusion_1_Gamma=0.700000 +Diffusion_1_Quality=2.000000 +Diffusion_1_Radius=8.000000 +Diffusion_2_Amount=0.200000 +Diffusion_2_Gamma=0.500000 +Diffusion_2_Quality=16.000000 +Diffusion_2_Radius=5.000000 +Diffusion_3_Amount=1.000000 +Diffusion_3_Gamma=5.000000 +Diffusion_3_Quality=3.000000 +Diffusion_3_Radius=7.400000 +Enable_Bleach_Bypass=1 +Enable_Diffusion=1 +Enable_Dither=0 +Enable_Static_Dither=1 +Gamma_B=0.990000 +Gamma_G=1.000000 +Gamma_R=1.000000 + +[PD80_01A_RT_Correct_Contrast.fx] +enable_fade=1 +freeze=0 +rt_bp_str=1.000000 +rt_enable_blackpoint_correction=1 +rt_enable_whitepoint_correction=0 +rt_wp_str=1.000000 +transition_speed=0.500000 + +[PD80_01B_RT_Correct_Color.fx] +debug_mode=0 +dither_strength=1.000000 +enable_dither=1 +enable_fade=1 +freeze=0 +midCC_scale=0.366000 +mid_use_alt_method=1 +rt_blackpoint_method=1 +rt_blackpoint_respect_luma=0 +rt_bp_rl_str=1.000000 +rt_bp_str=1.000000 +rt_enable_blackpoint_correction=1 +rt_enable_midpoint_correction=1 +rt_enable_whitepoint_correction=1 +rt_midpoint_respect_luma=1 +rt_whitepoint_method=0 +rt_whitepoint_respect_luma=1 +rt_wp_rl_str=1.000000 +rt_wp_str=1.000000 +transition_speed=0.500000 + +[PD80_01_Color_Gamut.fx] +colorgamut=0 + +[PD80_02_Bloom.fx] +bExposure=0.000000 +BKelvin=6500 +BloomLimit=0.333000 +BloomMix=0.500000 +BloomSaturation=0.000000 +BlurSigma=30.000000 +debugBloom=0 +dither_strength=2.000000 +enableBKelvin=0 +GreyValue=0.333000 + +[PD80_02_Bonus_LUT_pack.fx] +dither_strength=1.000000 +enable_dither=1 +ib=0.000000,0.000000,0.000000 +ig=1.000000 +iw=1.000000,1.000000,1.000000 +ob=0.000000,0.000000,0.000000 +ow=1.000000,1.000000,1.000000 +PD80_Intensity=0.465000 +PD80_LutSelector=20 +PD80_MixChroma=1.000000 +PD80_MixLuma=1.000000 + +[PD80_02_Cinetools_LUT.fx] +dither_strength=1.000000 +enable_dither=1 +ib=0.000000,0.000000,0.000000 +ig=1.000000 +iw=1.000000,1.000000,1.000000 +ob=0.000000,0.000000,0.000000 +ow=1.000000,1.000000,1.000000 +PD80_Intensity=0.760000 +PD80_LutSelector=6 +PD80_MixChroma=0.932000 +PD80_MixLuma=0.668000 + +[PD80_03_Color_Space_Curves.fx] +colorsat=0.073000 +color_space=1 +dither_strength=1.000000 +enable_dither=1 +pos0_shoulder_grey=0.800000 +pos0_toe_grey=0.200000 +pos1_shoulder_grey=0.785000 +pos1_toe_grey=0.200000 + +[PD80_03_Filmic_Adaptation.fx] +adj_linear=1.000000 +adj_shoulder=1.000000 +adj_toe=1.000000 + +[PD80_03_Shadows_Midtones_Highlights.fx] +blendcolor_h=1.000000,1.000000,1.000000 +blendcolor_m=0.980000,0.588000,0.000000 +blendcolor_s=0.000000,0.365000,1.000000 +blendmode_h=0 +blendmode_m=0 +blendmode_s=0 +brightness_h=0.000000 +brightness_m=0.000000 +brightness_s=0.000000 +contrast_h=0.000000 +contrast_m=0.000000 +contrast_s=0.000000 +dither_strength=2.000000 +enable_dither=1 +exposure_h=0.000000 +exposure_m=0.000000 +exposure_s=0.000000 +luma_mode=2 +opacity_h=0.000000 +opacity_m=0.000000 +opacity_s=0.030000 +saturation_h=0.000000 +saturation_m=0.000000 +saturation_s=0.000000 +separation_mode=1 +tint_h=0.000000 +tint_m=0.000000 +tint_s=0.000000 +vibrance_h=0.000000 +vibrance_m=0.000000 +vibrance_s=0.000000 + +[PD80_04_Color_Balance.fx] +h_BlueShift=0.000000 +h_GreenShift=0.000000 +h_RedShift=0.000000 +m_BlueShift=0.000000 +m_GreenShift=0.000000 +m_RedShift=0.000000 +preserve_luma=1 +separation_mode=0 +s_BlueShift=0.000000 +s_GreenShift=0.000000 +s_RedShift=0.000000 + +[PD80_04_Color_Gradients.fx] +blendcolor_ds_m=0.000000,0.365000,1.000000 +blendcolor_ds_s=0.000000,0.039000,0.588000 +blendcolor_ls_m=0.980000,0.588000,0.000000 +blendcolor_ls_s=0.000000,0.365000,1.000000 +blendmode_ds_m=10 +blendmode_ds_s=10 +blendmode_ls_m=10 +blendmode_ls_s=5 +CGdesat=0.000000 +dither_strength=1.000000 +enable_dither=1 +enable_ds=1 +finalmix=0.333000 +luma_mode=0 +maxlevel=0.300000 +minlevel=0.125000 +opacity_ds_m=1.000000 +opacity_ds_s=1.000000 +opacity_ls_m=1.000000 +opacity_ls_s=0.300000 +separation_mode=0 + +[PD80_04_Color_Temperature.fx] +Kelvin=7110 +kMix=1.000000 +LumPreservation=1.000000 + +[PD80_04_Contrast_Brightness_Saturation.fx] +brightness=0.000000 +brightnessD=0.000000 +contrast=0.000000 +contrastD=0.000000 +depthCurve=1.000000 +depthEnd=0.100000 +depthStart=0.000000 +display_depth=0 +dither_strength=1.000000 +enable_depth=0 +enable_dither=1 +exposureD=-0.448000 +exposureN=0.000000 +huemid=0.000000 +huerange=0.167000 +saturation=0.000000 +saturationD=0.000000 +sat_a=0.000000 +sat_b=0.000000 +sat_custom=0.000000 +sat_g=0.000000 +sat_m=0.000000 +sat_p=0.000000 +sat_r=0.000000 +sat_y=0.000000 +tint=0.060000 +vibrance=0.000000 +vibranceD=0.000000 + +[PD80_04_Magical_Rectangle.fx] +blendmode_1=0 +center=0.500000,0.500000 +depthpos=0.000000 +depth_smoothing=0.002000 +dither_strength=0.000000 +enable_gradient=0 +gradient_curve=0.250000 +gradient_type=0 +intensity_boost=1.000000 +invert_shape=0 +mr_brightness=0.000000 +mr_contrast=0.000000 +mr_exposure=0.000000 +mr_hue=0.000000 +mr_saturation=0.000000 +mr_vibrance=0.000000 +opacity=1.000000 +reccolor=0.500000,0.500000,0.500000 +ret_size_x=0.125000 +ret_size_y=0.125000 +rotation=45 +shape=0 +smoothing=0.010000 + +[PD80_04_Selective_Color.fx] +bk_adj_bla=0.010000 +bk_adj_cya=0.015000 +bk_adj_mag=0.000000 +bk_adj_sat=0.000000 +bk_adj_vib=0.000000 +bk_adj_yel=0.035000 +b_adj_bla=0.000000 +b_adj_cya=0.000000 +b_adj_mag=0.000000 +b_adj_sat=0.000000 +b_adj_vib=0.000000 +b_adj_yel=0.000000 +corr_method=1 +corr_method2=1 +c_adj_bla=0.000000 +c_adj_cya=0.000000 +c_adj_mag=0.000000 +c_adj_sat=0.000000 +c_adj_vib=0.000000 +c_adj_yel=0.000000 +g_adj_bla=0.000000 +g_adj_cya=0.000000 +g_adj_mag=0.000000 +g_adj_sat=0.000000 +g_adj_vib=0.000000 +g_adj_yel=0.000000 +m_adj_bla=0.000000 +m_adj_cya=0.000000 +m_adj_mag=0.000000 +m_adj_sat=0.000000 +m_adj_vib=0.000000 +m_adj_yel=0.000000 +n_adj_bla=0.000000 +n_adj_cya=0.000000 +n_adj_mag=0.000000 +n_adj_sat=0.000000 +n_adj_vib=0.000000 +n_adj_yel=0.000000 +r_adj_bla=0.090000 +r_adj_cya=0.000000 +r_adj_mag=0.000000 +r_adj_sat=0.000000 +r_adj_vib=0.025000 +r_adj_yel=0.000000 +w_adj_bla=0.000000 +w_adj_cya=0.000000 +w_adj_mag=0.000000 +w_adj_sat=0.000000 +w_adj_vib=0.000000 +w_adj_yel=0.000000 +y_adj_bla=0.060000 +y_adj_cya=0.000000 +y_adj_mag=0.000000 +y_adj_sat=0.000000 +y_adj_vib=0.035000 +y_adj_yel=0.000000 + +[PD80_04_Selective_Color_v2.fx] +bk_adj_bla=0.000000 +bk_adj_cya=0.000000 +bk_adj_mag=0.000000 +bk_adj_sat=0.000000 +bk_adj_yel=0.000000 +bm_adj_bla=0.000000 +bm_adj_cya=0.000000 +bm_adj_lig=0.000000 +bm_adj_lig_curve=0.000000 +bm_adj_mag=0.000000 +bm_adj_sat=0.000000 +bm_adj_yel=0.000000 +b_adj_bla=0.000000 +b_adj_cya=0.000000 +b_adj_lig=0.000000 +b_adj_lig_curve=0.000000 +b_adj_mag=0.000000 +b_adj_sat=0.000000 +b_adj_yel=0.000000 +cb_adj_bla=0.000000 +cb_adj_cya=0.000000 +cb_adj_lig=0.000000 +cb_adj_lig_curve=0.000000 +cb_adj_mag=0.000000 +cb_adj_sat=0.000000 +cb_adj_yel=0.000000 +corr_method=1 +c_adj_bla=0.000000 +c_adj_cya=0.000000 +c_adj_lig=0.000000 +c_adj_lig_curve=0.000000 +c_adj_mag=0.000000 +c_adj_sat=0.000000 +c_adj_yel=0.000000 +gc_adj_bla=0.000000 +gc_adj_cya=0.000000 +gc_adj_lig=0.000000 +gc_adj_lig_curve=0.000000 +gc_adj_mag=0.000000 +gc_adj_sat=0.000000 +gc_adj_yel=0.000000 +g_adj_bla=0.000000 +g_adj_cya=0.000000 +g_adj_lig=0.000000 +g_adj_lig_curve=0.000000 +g_adj_mag=0.000000 +g_adj_sat=0.000000 +g_adj_yel=0.000000 +mr_adj_bla=0.000000 +mr_adj_cya=0.000000 +mr_adj_lig=0.000000 +mr_adj_lig_curve=0.000000 +mr_adj_mag=0.000000 +mr_adj_sat=0.000000 +mr_adj_yel=0.000000 +m_adj_bla=0.000000 +m_adj_cya=0.000000 +m_adj_lig=0.000000 +m_adj_lig_curve=0.000000 +m_adj_mag=0.000000 +m_adj_sat=0.000000 +m_adj_yel=0.000000 +n_adj_bla=0.000000 +n_adj_cya=0.000000 +n_adj_mag=0.000000 +n_adj_sat=0.000000 +n_adj_yel=0.000000 +o_adj_bla=0.000000 +o_adj_cya=0.000000 +o_adj_lig=0.000000 +o_adj_lig_curve=0.000000 +o_adj_mag=0.000000 +o_adj_sat=0.000000 +o_adj_yel=0.000000 +r_adj_bla=0.000000 +r_adj_cya=0.000000 +r_adj_lig=0.000000 +r_adj_lig_curve=0.000000 +r_adj_mag=0.000000 +r_adj_sat=0.000000 +r_adj_yel=0.000000 +w_adj_bla=0.000000 +w_adj_cya=0.000000 +w_adj_mag=0.000000 +w_adj_sat=0.000000 +w_adj_yel=0.000000 +yg_adj_bla=0.000000 +yg_adj_cya=0.000000 +yg_adj_lig=0.000000 +yg_adj_lig_curve=0.000000 +yg_adj_mag=0.000000 +yg_adj_sat=0.000000 +yg_adj_yel=0.000000 +y_adj_bla=0.000000 +y_adj_cya=0.000000 +y_adj_lig=0.000000 +y_adj_lig_curve=0.000000 +y_adj_mag=0.000000 +y_adj_sat=0.000000 +y_adj_yel=0.000000 + +[PD80_04_Technicolor.fx] +Brightness=1.000000 +colorKey=1.000000,1.000000,1.000000 +ColorStrength=0.200000,0.200000,0.200000 +Cyan2strip=0.000000,0.988000,1.000000 +enable3strip=0 +Red2strip=1.000000,0.098000,0.000000 +Saturation=1.000000 +Saturation2=1.500000 +Strength=1.000000 + +[PD80_06_Depth_Slicer.fx] +blendmode_1=0 +depthpos=0.015000 +depth_far=0.000000 +depth_near=0.000000 +depth_smoothing=0.005000 +hue=0.083000 +intensity=0.000000 +opacity=1.000000 +saturation=0.000000 + +[PD80_06_Luma_Fade.fx] +maxlevel=0.300000 +minlevel=0.125000 +transition_speed=0.500000 + +[PD80_06_Posterize_Pixelate.fx] +border_str=0.000000 +dither_motion=1 +dither_strength=1.000000 +effect_strength=1.000000 +enable_dither=0 +number_of_levels=255 +pixel_size=1 + +[PerfectPerspective.fx] +BorderColor=0.027000,0.027000,0.027000,0.784000 +BorderCorner=0.062000 +BorderVignette=0 +DebugPreview=0 +FOV=90 +K=1.000000 +MirrorBorder=1 +Offset=0.000000,0.000000 +Projection=0 +ResScale=1920,1920 +Type=0 +Vertical=1.000000 +VerticalScale=0.980000 +Vignette=1 +Zooming=1.000000 + +[PiecewiseFilmicTonemap.fx] +FixWhitepoint=1 +Gamma=1.000000 +ShoulderAngle=0.000000 +ShoulderLength=0.500000 +ShoulderStrength=0.000000 +ToeLength=0.500000 +ToeStrength=0.000000 + +[Prism.fx] +Aberration=6 +Automatic=1 +Curve=1.000000 +SampleCount=8 + +[qUINT_bloom.fx] +BLOOM_ADAPT_EXPOSURE=0.000000 +BLOOM_ADAPT_SPEED=2.000000 +BLOOM_ADAPT_STRENGTH=0.500000 +BLOOM_CURVE=1.500000 +BLOOM_INTENSITY=0.718000 +BLOOM_LAYER_MULT_1=0.050000 +BLOOM_LAYER_MULT_2=0.050000 +BLOOM_LAYER_MULT_3=0.050000 +BLOOM_LAYER_MULT_4=0.100000 +BLOOM_LAYER_MULT_5=0.500000 +BLOOM_LAYER_MULT_6=0.010000 +BLOOM_LAYER_MULT_7=0.010000 +BLOOM_SAT=2.000000 +BLOOM_TONEMAP_COMPRESSION=4.000000 + +[qUINT_dof.fx] +bADOF_AutofocusEnable=1 +fADOF_AutofocusCenter=0.000000,0.194000 +fADOF_AutofocusRadius=0.000000 +fADOF_AutofocusSpeed=0.130000 +fADOF_BokehIntensity=0.573000 +fADOF_FarBlurCurve=1.640000 +fADOF_HyperFocus=0.100000 +fADOF_ManualfocusDepth=0.271000 +fADOF_NearBlurCurve=6.000000 +fADOF_RenderResolutionMult=0.500000 +fADOF_ShapeAnamorphRatio=1.000000 +fADOF_ShapeChromaAmount=-0.100000 +fADOF_ShapeCurvatureAmount=1.000000 +fADOF_ShapeRadius=20.500000 +fADOF_ShapeRotation=0.000000 +fADOF_SmootheningAmount=4.000000 +iADOF_BokehMode=2 +iADOF_ShapeChromaMode=2 +iADOF_ShapeQuality=25 +iADOF_ShapeVertices=6 + +[qUINT_lightroom.fx] +LIGHTROOM_AQUA_EXPOSURE=0.000000 +LIGHTROOM_AQUA_HUESHIFT=0.000000 +LIGHTROOM_AQUA_SATURATION=0.000000 +LIGHTROOM_BLUE_EXPOSURE=0.000000 +LIGHTROOM_BLUE_HUESHIFT=0.000000 +LIGHTROOM_BLUE_SATURATION=0.070000 +LIGHTROOM_ENABLE_CLIPPING_DISPLAY=0 +LIGHTROOM_ENABLE_CURVE_DISPLAY=0 +LIGHTROOM_ENABLE_LUT=0 +LIGHTROOM_ENABLE_VIGNETTE=0 +LIGHTROOM_GLOBAL_BLACKS_CURVE=0.000000 +LIGHTROOM_GLOBAL_BLACK_LEVEL=0.000000 +LIGHTROOM_GLOBAL_CONTRAST=0.080000 +LIGHTROOM_GLOBAL_EXPOSURE=0.000000 +LIGHTROOM_GLOBAL_GAMMA=0.000000 +LIGHTROOM_GLOBAL_HIGHLIGHTS_CURVE=0.050000 +LIGHTROOM_GLOBAL_MIDTONES_CURVE=-0.091000 +LIGHTROOM_GLOBAL_SATURATION=0.018000 +LIGHTROOM_GLOBAL_SHADOWS_CURVE=-0.109000 +LIGHTROOM_GLOBAL_TEMPERATURE=-0.040000 +LIGHTROOM_GLOBAL_TINT=0.006000 +LIGHTROOM_GLOBAL_VIBRANCE=0.239000 +LIGHTROOM_GLOBAL_WHITES_CURVE=0.000000 +LIGHTROOM_GLOBAL_WHITE_LEVEL=255.000000 +LIGHTROOM_GREEN_EXPOSURE=-0.061000 +LIGHTROOM_GREEN_HUESHIFT=-0.035000 +LIGHTROOM_GREEN_SATURATION=-0.125000 +LIGHTROOM_LUT_SCROLL=0 +LIGHTROOM_LUT_TILE_COUNT=16 +LIGHTROOM_LUT_TILE_SIZE=16 +LIGHTROOM_MAGENTA_EXPOSURE=0.000000 +LIGHTROOM_MAGENTA_HUESHIFT=0.000000 +LIGHTROOM_MAGENTA_SATURATION=0.000000 +LIGHTROOM_ORANGE_EXPOSURE=0.000000 +LIGHTROOM_ORANGE_HUESHIFT=0.000000 +LIGHTROOM_ORANGE_SATURATION=0.000000 +LIGHTROOM_RED_EXPOSURE=0.000000 +LIGHTROOM_RED_HUESHIFT=0.000000 +LIGHTROOM_RED_SATURATION=0.000000 +LIGHTROOM_VIGNETTE_AMOUNT=1.000000 +LIGHTROOM_VIGNETTE_BLEND_MODE=1 +LIGHTROOM_VIGNETTE_CURVE=1.000000 +LIGHTROOM_VIGNETTE_HEIGHT=0.000000 +LIGHTROOM_VIGNETTE_RADIUS_INNER=0.000000 +LIGHTROOM_VIGNETTE_RADIUS_OUTER=1.000000 +LIGHTROOM_VIGNETTE_SHOW_RADII=0 +LIGHTROOM_VIGNETTE_WIDTH=0.000000 +LIGHTROOM_YELLOW_EXPOSURE=0.000000 +LIGHTROOM_YELLOW_HUESHIFT=0.000000 +LIGHTROOM_YELLOW_SATURATION=0.000000 + +[qUINT_mxao.fx] +MXAO_BLEND_TYPE=3 +MXAO_DEBUG_VIEW_ENABLE=0 +MXAO_FADE_DEPTH_END=0.400000 +MXAO_FADE_DEPTH_START=0.050000 +MXAO_GLOBAL_RENDER_SCALE=1.000000 +MXAO_GLOBAL_SAMPLE_QUALITY_PRESET=4 +MXAO_SAMPLE_NORMAL_BIAS=0.381000 +MXAO_SAMPLE_RADIUS=5.000000 +MXAO_SSAO_AMOUNT=0.728000 +MXAO_SSIL_AMOUNT=0.615000 +MXAO_SSIL_SATURATION=1.612000 + +[qUINT_regrade.fx] +CB_HI=0.000000,0.000000 +CB_MID=0.000000,0.000000 +CB_SHAD=0.000000,0.000000 +COLOR_REMAP_AQUA=0.000000,0.000000,0.000000 +COLOR_REMAP_BLUE=0.000000,0.000000,0.000000 +COLOR_REMAP_GREEN=0.000000,0.000000,0.000000 +COLOR_REMAP_MAGENTA=0.000000,0.000000,0.000000 +COLOR_REMAP_ORANGE=0.000000,0.000000,0.000000 +COLOR_REMAP_RED=0.000000,0.000000,0.000000 +COLOR_REMAP_YELLOW=0.000000,0.000000,0.000000 +DITHER_BIT_DEPTH=2 +ENABLE_VIGNETTE=0 +GRADE_CONTRAST=0.100000 +GRADE_EXPOSURE=0.065000 +GRADE_GAMMA=0.000000 +GRADE_SATURATION=0.110000 +GRADE_VIBRANCE=0.300000 +INPUT_BLACK_LVL=0.000000 +INPUT_COLOR_TEMPERATURE=7020.000000 +INPUT_GAIN_COLOR=0.500000,0.500000,0.500000 +INPUT_GAMMA_COLOR=0.500000,0.500000,0.500000 +INPUT_LIFT_COLOR=0.500000,0.500000,0.500000 +INPUT_WHITE_LVL=255.000000 +NODE1=1 +NODE2=2 +NODE3=3 +NODE4=4 +NODE5=5 +NODE6=6 +NODE7=7 +NODE8=8 +NODE9=9 +OUTPUT_BLACK_LVL=0.000000 +OUTPUT_WHITE_LVL=255.000000 +SPECIAL_BLEACHBP=0.000000 +SPECIAL_GAMMA_LUM_CHROM=0.000000,0.000000 +SPLITTONE_BALANCE=0.500000 +SPLITTONE_HIGHLIGHTS=0.567783,0.540754,0.568627 +SPLITTONE_SHADOWS=0.607843,0.542291,0.542291 +TONECURVE_DARKS=0.055000 +TONECURVE_DARKWASH_INT=0.000000 +TONECURVE_DARKWASH_RANGE=0.200000 +TONECURVE_HIGHLIGHTS=0.079000 +TONECURVE_LIGHTS=-0.039000 +TONECURVE_SHADOWS=-0.076000 +UIHELP=0 +VIGNETTE_BLEND_MODE=1 +VIGNETTE_BLURRYNESS_MECH=0.800000 +VIGNETTE_RADIUS_MECH=0.525000 +VIGNETTE_RADIUS_SENSOR=1.000000 +VIGNETTE_RATIO=0.000000 + +[qUINT_rtgi.fx] +RT_ALTERNATE_INTERSECT_TEST=1 +RT_AO_AMOUNT=2.720000 +RT_BACKFACE_MIRROR=0 +RT_DEBUG_VIEW=0 +RT_DO_RENDER=0 +RT_FADE_DEPTH=0.000000,0.205000 +RT_HIGHP_LIGHT_SPREAD=1 +RT_IL_AMOUNT=1.580000 +RT_IL_BOUNCE_WEIGHT=0.000000 +RT_RAY_AMOUNT=11 +RT_RAY_STEPS=15 +RT_ROUGHNESS=0.860000 +RT_SAMPLE_RADIUS=13.649994 +RT_SPECULAR=0.010000 +RT_Z_THICKNESS=0.120000 +SIZE_SCALE_BOOLEAN=0 +SKY_COLOR_AMBIENT_MIX=0.000000 +SKY_COLOR_AMT=0.100000 +SKY_COLOR_SAT=1.000000 +UIHELP=0 + +[qUINT_sharp.fx] +DEPTH_MASK_ENABLE=1 +RMS_MASK_ENABLE=1 +SHARPEN_MODE=1 +SHARP_STRENGTH=0.678000 + +[qUINT_ssr.fx] +SSR_ACCEPT_RANGE=2.500000 +SSR_FADE_DIST=1.000000 +SSR_FIELD_OF_VIEW=50.000000 +SSR_FILTER_SIZE=0.500000 +SSR_FRESNEL_EXP=4.670000 +SSR_JITTER_AMOUNT=0.250000 +SSR_RAY_INC=3.000000 +SSR_REFLECTION_INTENSITY=0.873000 +SSR_RELIEF_AMOUNT=0.050000 +SSR_RELIEF_SCALE=0.350000 + +[Reflection.fx] +AlphaBlending=0 +BlendingAmount=1.000000 +BlendingMode=0 +FarPlane=1000.000000 +FOV=90 +Skip4Background=1 + +[RetroFog.fx] +bAutoColor=0 +bCurved=1 +bDithering=1 +f2Curve=0.000000,1.000000 +f3Color=0.000000,0.000000,0.000000 +fOpacity=1.000000 +fQuantize=255.000000 +fStart=0.000000 + +[ReVeil.fx] +DepthMultiplier=-0.075000 +IgnoreSky=1 +TransmissionMultiplier=-0.125000 + +[RimLight.fx] +Color=1.000000,1.000000,1.000000 +CustomFarPlane=1 +Debug=0 +FarPlane=1000.000000 + +[ScreenShake.fx] +FalloffTime=0.070000 +K0=-0.070000 + +[Sepia.fx] +Strength=0.113000 +Tint=0.550000,0.430000,0.420000 + +[SimpleBloom.fx] +Blend=0.000000,0.800000 +BlurMultiplier=1.350000 +Debug=0 + +[Sketch.fx] +OutlineThreshold=0.010000 +PatternColor=1.000000,1.000000,1.000000,0.062745 +PatternRange=0.000000,0.500000 +Posterization=5.000000 +SmoothingScale=1.000000 + +[SMAA.fx] +CornerRounding=25 +DebugOutput=0 +DepthEdgeDetectionThreshold=0.010000 +EdgeDetectionThreshold=0.100000 +EdgeDetectionType=1 +MaxSearchSteps=32 +MaxSearchStepsDiagonal=16 +PredicationEnabled=0 +PredicationScale=2.000000 +PredicationStrength=0.400000 +PredicationThreshold=0.010000 + +[Smart_Sharp.fx] +B_Grounding=0 +CAM_IOB=1 +CA_Mask_Boost=0 +CA_Removal=0 +Debug_View=0 +Depth_Map=0 +Depth_Map_Adjust=250.000000 +Depth_Map_Flip=0 +F_DeNoise=0 +No_Depth_Map=0 +Sharpness=0.625000 + +[SunsetFilter.fx] +Axis=101 +ColorA=1.000000,0.000000,0.000000 +ColorB=0.000000,0.000000,0.000000 +Flip=0 +Offset=0.500000 +Scale=0.699000 + +[SuperDepth3D.fx] +Auto_Balance_Ex=0 +Auto_Depth_Adjust=0.100000 +Cursor_Lock=0 +Cursor_SC=1,0 +Cursor_Type=0 +Custom_Sidebars=1 +Depth_Detection=0 +Depth_Edge_Mask=0.000000 +Depth_Map=0 +Depth_Map_Adjust=7.500000 +Depth_Map_Flip=0 +Depth_Map_View=0 +Divergence=25.000000 +Eye_Fade_Reduction_n_Power=0,0,0 +Eye_Swap=0 +FPSDFIO=0 +Interlace_Anaglyph_Calibrate=0.500000,1.000000,0.500000 +Offset=0.000000 +Performance_Mode=0 +Perspective=0 +Stereoscopic_Mode=0 +View_Mode=0 +Weapon_Adjust=0.000000,0.000000,0.000000 +Weapon_ZPD_Boundary=0.000000 +WP=0 +WZPD_and_WND=0.030000,0.000000 +ZPD_Boundary=0 +ZPD_Boundary_n_Fade=0.500000,0.250000 +ZPD_Separation=0.025000,0.000000 + +[SuperDepth3D_VR.fx] +Adjust_Vignette=0.000000 +Auto_Balance_Ex=0 +Auto_Depth_Adjust=0.100000 +Barrel_Distortion=0 +Blinders=0.000000 +Cursor_Lock=0 +Cursor_SC=1,0 +Cursor_Type=0 +Depth_Detection=0 +Depth_Edge_Mask=0.000000 +Depth_Map=0 +Depth_Map_Adjust=7.500000 +Depth_Map_Flip=0 +Depth_Map_View=0 +Divergence=25.000000 +Eye_Fade_Reduction_n_Power=0,0,0 +FoV=0.000000 +FPSDFIO=0 +IPD=0 +Offset=0.000000 +Performance_Mode=0 +Polynomial_Colors_K1=0.220000,0.220000,0.220000 +Polynomial_Colors_K2=0.240000,0.240000,0.240000 +Saturation=0.000000 +Sharpen_Power=0.000000 +Theater_Mode=0 +View_Mode=0 +Weapon_Adjust=0.000000,0.000000,0.000000 +Weapon_ZPD_Boundary=0.000000 +WP=0 +WZPD_and_WND=0.030000,0.000000 +ZPD_Boundary=0 +ZPD_Boundary_n_Fade=0.500000,0.250000 +ZPD_Separation=0.025000,0.000000 + +[Temporal_AA.fx] +Clamping=0 +Clamping_Adjust=1.000000 +ColorDelta=1 +Debug=0 +Delta_Power=0.155000 +Depth_Map=0 +Depth_Map_Adjust=250.000000 +Depth_Map_Flip=0 +Persistence=0.026000 +Use_Depth=1 + +[Tonemap.fx] +Bleach=0.000000 +Defog=0.000000 +Exposure=0.000000 +FogColor=0.000000,0.000000,1.000000 +Gamma=1.000000 +Saturation=0.000000 + +[TrackingRays.fx] +Curve=3.000000 +Delay=1.000000 +Intensity=1.000000 +MergeTolerance=0.100000 +Scale=10.000000 +_WipWarn=0 + +[Trails.fx] +Persistence=0.250000 +PS2=0 +TQ=0.000000 + +[UIMask.fx] +bDisplayMask=0 +fMask_Intensity=1.000000 +_Help=0 + +[UIMaskCreator.fx] +Radius=16 +ReadyForScreenshot=0 +SquareCursor=0 + +[Unsharp.fx] +Amount=0.220000 +BlurScale=1.000000 + +[VR.fx] +ChBlueK=0.000000,0.000000,0.000000,0.000000 +ChBlueOffsetL=0.000000,0.000000 +ChBlueOffsetR=0.000000,0.000000 +ChGreenK=0.000000,0.000000,0.000000,0.000000 +ChGreenOffsetL=0.000000,0.000000 +ChGreenOffsetR=0.000000,0.000000 +ChromaticAbrSwitch=1 +Clamp=0.650000 +FOV=96 +ImageScale=1.000000 +IPD=0.477000 +K=0.000000,0.000000,0.000000,0.000000 +LensType=0 +Offset=0.100000 +P=0.000000,0.000000,0.000000 +ParallaxCenter=1.000000 +ParallaxMaskScalar=10 +ParallaxOffset=0.355000 +ParallaxSteps=16 +ParallaxSwitch=1 +PerspectiveSwitch=1 +Preview=0 +Sharpen=1 +SoloBlue=0 +SoloGreen=0 +SoloLines=0 +StereoSwitch=1 +Strength=25.000000 +TestGrid=1 + diff --git a/data/reshade/shaders/Effects/CRT_Lottes.fx b/data/reshade/shaders/Effects/CRT_Lottes.fx deleted file mode 100644 index 047df0f5..00000000 --- a/data/reshade/shaders/Effects/CRT_Lottes.fx +++ /dev/null @@ -1,245 +0,0 @@ -/* - CRT by Timothy Lottes - - Ported by Lucas Melo (luluco250) - - Refer to the original license in CRT_Lottes.fxh -*/ - -#include "ReShade.fxh" - -//Macros/////////////////////////////////////////////////////////////////////////////// - -#ifndef CRT_LOTTES_TONE -#define CRT_LOTTES_TONE 1 -#endif - -#ifndef CRT_LOTTES_CONTRAST -#define CRT_LOTTES_CONTRAST 1 -#endif - -#ifndef CRT_LOTTES_SATURATION -#define CRT_LOTTES_SATURATION 1 -#endif - -#ifndef CRT_LOTTES_WARP -#define CRT_LOTTES_WARP 1 -#endif - -#define NONE 0 -#define GRILLE 1 -#define GRILLE_LITE 2 -#define SHADOW 3 - -#ifndef CRT_LOTTES_MASK -#define CRT_LOTTES_MASK GRILLE_LITE -#endif - -#ifndef CRT_LOTTES_2TAP -#define CRT_LOTTES_2TAP 0 -#endif - -#ifndef CRT_LOTTES_CUSTOM_RESOLUTION -#define CRT_LOTTES_CUSTOM_RESOLUTION 0 -#endif - -#ifndef CRT_LOTTES_DOWNSCALE -#define CRT_LOTTES_DOWNSCALE 1 -#endif - -#ifndef CRT_LOTTES_SMOOTH_DOWNSCALE -#define CRT_LOTTES_SMOOTH_DOWNSCALE 1 -#endif - -//Uniforms///////////////////////////////////////////////////////////////////////////// - -uniform float2 f2Warp < - ui_label = "Scanline Warp"; - ui_type = "drag"; - ui_min = 0.0; - ui_max = 64.0; - ui_step = 0.01; -> = float2(48.0, 24.0); - -uniform float fThin < - ui_label = "Scanline Thinness"; - ui_type = "drag"; - ui_min = 0.5; - ui_max = 1.0; - ui_step = 0.001; -> = 0.7; - -uniform float fBlur < - ui_label = "Horizontal Scan Blur"; - ui_type = "drag"; - ui_min = 1.0; - ui_max = 3.0; - ui_step = 0.001; -> = 2.5; - -uniform float fMask < - ui_label = "Shadow Mask"; - ui_type = "drag"; - ui_min = 0.25; - ui_max = 1.0; - ui_step = 0.001; -> = 0.5; - -#if CRT_LOTTES_CUSTOM_RESOLUTION -uniform float fWidth < - ui_label = "Width"; - ui_type = "drag"; - ui_min = 0.0; - ui_max = float(BUFFER_WIDTH); - ui_step = 1.0; -> = 640.0; - -uniform float fHeight < - ui_label = "Height"; - ui_type = "drag"; - ui_min = 0.0; - ui_max = float(BUFFER_HEIGHT); - ui_step = 1.0; -> = 480.0; - -#define f2Resolution float2(fWidth, fHeight) -#define f2Downscale (ReShade::ScreenSize / f2Resolution) -#else - -uniform float fDownscale < - ui_label = "Resolution Downscale"; - ui_type = "drag"; - ui_min = 1.0; - ui_max = 256.0; - ui_step = 0.25; -> = 2.0; - -#define fWidth (float(BUFFER_WIDTH) / fDownscale) -#define fHeight (float(BUFFER_HEIGHT) / fDownscale) -#define f2Resolution (ReShade::ScreenSize / fDownscale) -#define f2Downscale fDownscale -#endif - -//Setup Header///////////////////////////////////////////////////////////////////////// - -#define CRTS_DEBUG 0 -#define CRTS_GPU 1 -#define CRTS_HLSL 1 - -#define CRTS_TONE CRT_LOTTES_TONE -#define CRTS_CONTRAST CRT_LOTTES_CONTRAST -#define CRTS_SATURATION CRT_LOTTES_SATURATION -#define CRTS_WARP CRT_LOTTES_WARP - -#if CRT_LOTTES_MASK == NONE - #define CRTS_MASK_NONE 1 -#elif CRT_LOTTES_MASK == GRILLE - #define CRTS_MASK_GRILLE 1 -#elif CRT_LOTTES_MASK == GRILLE_LITE - #define CRTS_MASK_GRILLE_LITE 1 -#elif CRT_LOTTES_MASK == SHADOW - #define CRTS_MASK_SHADOW 1 -#endif - -#define CRTS_2_TAP CRT_LOTTES_2TAP - -#if CRT_LOTTES_DOWNSCALE -sampler2D sBackBuffer_Scale { - Texture = ReShade::BackBufferTex; - SRGBTexture = true; - #if CRT_LOTTES_SMOOTH_DOWNSCALE - MinFilter = LINEAR; - #else - MinFilter = POINT; - #endif - MagFilter = POINT; -}; -#endif - -sampler2D sBackBuffer_CRT { - Texture = ReShade::BackBufferTex; - SRGBTexture = true; - MinFilter = LINEAR; - MagFilter = LINEAR; -}; - -#define CrtsFetch(uv) tex2D(sBackBuffer_CRT, uv).rgb - -#include "CRT_Lottes.fxh" - -//Functions//////////////////////////////////////////////////////////////////////////// - -#if CRT_LOTTES_DOWNSCALE -float2 scale_uv(float2 uv, float2 scale, float2 center) { - return (uv - center) * scale + center; -} - -float2 scale_uv(float2 uv, float2 scale) { - return scale_uv(uv, scale, 0.5); -} -#endif - -//Shader/////////////////////////////////////////////////////////////////////////////// - -#if CRT_LOTTES_DOWNSCALE -void PS_Downscale( - float4 position : SV_POSITION, - float2 uv : TEXCOORD, - out float4 color : SV_TARGET -) { - color = tex2D(sBackBuffer_Scale, scale_uv(uv, f2Downscale)); -} - -void PS_Upscale( - float4 position : SV_POSITION, - float2 uv : TEXCOORD, - out float4 color : SV_TARGET -) { - color = tex2D(sBackBuffer_Scale, scale_uv(uv, 1.0 / f2Downscale)); -} -#endif - -void PS_CRT_Lottes( - float4 position : SV_POSITION, - float2 uv : TEXCOORD, - out float4 color : SV_TARGET -) { - float2 coord = uv * ReShade::ScreenSize; - color.a = 1.0; - color.rgb = CrtsFilter( - coord, - f2Resolution * ReShade::PixelSize, - f2Resolution * 0.5, - 1.0 / f2Resolution, - ReShade::PixelSize, - ReShade::PixelSize * 2.0, - fHeight, - 1.0 / f2Warp, - fThin, - -fBlur, - fMask, - CrtsTone(1.0, 0.0, fThin, fMask) - ); -} - -//Technique//////////////////////////////////////////////////////////////////////////// - -technique CRT_Lottes { - #if CRT_LOTTES_DOWNSCALE - pass Downscale { - VertexShader = PostProcessVS; - PixelShader = PS_Downscale; - SRGBWriteEnable = true; - } - pass Upscale { - VertexShader = PostProcessVS; - PixelShader = PS_Upscale; - SRGBWriteEnable = true; - } - #endif - pass CRT_Lottes { - VertexShader = PostProcessVS; - PixelShader = PS_CRT_Lottes; - SRGBWriteEnable = true; - } -} diff --git a/data/reshade/shaders/Effects/CRT_Lottes.fxh b/data/reshade/shaders/Effects/CRT_Lottes.fxh deleted file mode 100644 index bcf97d4d..00000000 --- a/data/reshade/shaders/Effects/CRT_Lottes.fxh +++ /dev/null @@ -1,548 +0,0 @@ -/* - Modified by Lucas Melo (luluco250): - - Replaced #ifdef's with #if's for compability with ReShade -*/ - -//_____________________________/\_______________________________ -//============================================================== -// -// -// [CRTS] PUBLIC DOMAIN CRT-STYLED SCALAR - 20180120b -// -// by Timothy Lottes -// -// -//============================================================== -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//_____________________________/\_______________________________ -//============================================================== -// -// WHAT'S NEW -// -//-------------------------------------------------------------- -// Evolution of prior shadertoy example -//-------------------------------------------------------------- -// This one is semi-optimized -// - Less texture fetches -// - Didn't get to instruction level optimization -// - Could likely use texture fetch to generate phosphor mask -//-------------------------------------------------------------- -// Added options to disable unused features -//-------------------------------------------------------------- -// Added in exposure matching -// - Given scan-line effect and mask always darkens image -// - Uses generalized tonemapper to boost mid-level -// - Note this can compress highlights -// - And won't get back peak brightness -// - But best option if one doesn't want as much darkening -//-------------------------------------------------------------- -// Includes option saturation and contrast controls -//-------------------------------------------------------------- -// Added in subtractive aperture grille -// - This is a bit brighter than prior -//-------------------------------------------------------------- -// Make sure input to this filter is already low-resolution -// - This is not designed to work on titles doing the following -// - Rendering to hi-res with nearest sampling -//-------------------------------------------------------------- -// Added a fast and more pixely option for 2 tap/pixel -//-------------------------------------------------------------- -// Improved the vignette when WARP is enabled -//-------------------------------------------------------------- -// Didn't test HLSL or CPU options -// - Will incorportate patches if they are broken -// - But out of time to try them myself -//============================================================== -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//_____________________________/\_______________________________ -//============================================================== -// -// LICENSE = UNLICENSE (aka PUBLIC DOMAIN) -// -//-------------------------------------------------------------- -// This is free and unencumbered software released into the -// public domain. -//-------------------------------------------------------------- -// Anyone is free to copy, modify, publish, use, compile, sell, -// or distribute this software, either in source code form or as -// a compiled binary, for any purpose, commercial or -// non-commercial, and by any means. -//-------------------------------------------------------------- -// In jurisdictions that recognize copyright laws, the author or -// authors of this software dedicate any and all copyright -// interest in the software to the public domain. We make this -// dedication for the benefit of the public at large and to the -// detriment of our heirs and successors. We intend this -// dedication to be an overt act of relinquishment in perpetuity -// of all present and future rights to this software under -// copyright law. -//-------------------------------------------------------------- -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -// KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT -// OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -//-------------------------------------------------------------- -// For more information, please refer to -// -//============================================================== -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//_____________________________/\_______________________________ -//============================================================== -// -// DEFINES -// -//-------------------------------------------------------------- -// CRTS_CPU - CPU code -// CRTS_GPU - GPU code -//-------------------------------------------------------------- -// CRTS_GLSL - GLSL -// CRTS_HLSL - HLSL (not tested yet) -//-------------------------------------------------------------- -// CRTS_DEBUG - Define to see on/off split screen -//-------------------------------------------------------------- -// CRTS_WARP - Apply screen warp -//-------------------------------------------------------------- -// CRTS_2_TAP - Faster very pixely 2-tap filter (off is 8) -//-------------------------------------------------------------- -// CRTS_MASK_GRILLE - Aperture grille (aka Trinitron) -// CRTS_MASK_GRILLE_LITE - Brighter (subtractive channels) -// CRTS_MASK_NONE - No mask -// CRTS_MASK_SHADOW - Horizontally stretched shadow mask -//-------------------------------------------------------------- -// CRTS_TONE - Normalize mid-level and process color -// CRTS_CONTRAST - Process color - enable contrast control -// CRTS_SATURATION - Process color - enable saturation control -//============================================================== -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//_____________________________/\_______________________________ -//============================================================== -// -// CPU CODE -// -//-------------------------------------------------------------- -// TODO: Actually test the CPU code ... -//============================================================== -#if CRTS_CPU -//_____________________________/\_______________________________ -//============================================================== -// PORTABILITY -//============================================================== - #ifndef CrtsPow - #define CrtsPow powf - #endif -//-------------------------------------------------------------- - #ifndef CRTS_RESTRICT - #define CRTS_RESTRICT _restrict - #endif -//-------------------------------------------------------------- - #ifndef CRTS_STATIC - #define CRTS_STATIC static - #endif -//_____________________________/\_______________________________ -//============================================================== -// TONAL CONTROL CONSTANT GENERATION -//-------------------------------------------------------------- -// Make sure to use same CRTS_MASK_* defines on CPU and GPU!!!!! -//============================================================== - CRTS_STATIC void CrtsTone( - // Output 4 float array. - float *CRTS_RESTRICT dst, - // Increase contrast, ranges from, - // 1.0 = no change - // 2.0 = very strong contrast (over 2.0 for even more) - float contrast, - // Increase saturation, ranges from, - // 0.0 = no change - // 1.0 = increased contrast (over 1.0 for even more) - float saturation, - // Inputs shared between CrtsTone() and CrtsFilter() - float thin, - float mask){ -//-------------------------------------------------------------- - #if CRTS_MASK_NONE - mask=1.0f; - #endif -//-------------------------------------------------------------- - #if CRTS_MASK_GRILLE_LITE - // Normal R mask is {1.0,mask,mask} - // LITE R mask is {mask,1.0,1.0} - mask=0.5f+mask*0.5f; - #endif -//-------------------------------------------------------------- - float midOut=0.18f/((1.5f-thin)*(0.5f*mask+0.5f)); - float pMidIn=CrtsPow(0.18f,contrast); - dst[0]= contrast; - dst[1]=((-pMidIn)+midOut)/((1.0f-pMidIn)*midOut); - dst[2]=((-pMidIn)*midOut+pMidIn)/(midOut*(-pMidIn)+midOut); - dst[3]=contrast+saturation;} -#endif -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -//_____________________________/\_______________________________ -//============================================================== -// -// GPU CODE -// -//============================================================== -#if CRTS_GPU -//_____________________________/\_______________________________ -//============================================================== -// PORTABILITY -//============================================================== - #if CRTS_GLSL - #define CrtsF1 float - #define CrtsF2 vec2 - #define CrtsF3 vec3 - #define CrtsF4 vec4 - #define CrtsFractF1 fract - #define CrtsRcpF1(x) (1.0/(x)) - #define CrtsSatF1(x) clamp((x),0.0,1.0) -//-------------------------------------------------------------- - CrtsF1 CrtsMax3F1(CrtsF1 a,CrtsF1 b,CrtsF1 c){ - return max(a,max(b,c));} - #endif -//============================================================== - #if CRTS_HLSL - #define CrtsF1 float - #define CrtsF2 float2 - #define CrtsF3 float3 - #define CrtsF4 float4 - #define CrtsFractF1 frac - #define CrtsRcpF1(x) (1.0/(x)) - #define CrtsSatF1(x) saturate(x) -//-------------------------------------------------------------- - CrtsF1 CrtsMax3F1(CrtsF1 a,CrtsF1 b,CrtsF1 c){ - return max(a,max(b,c));} - #endif -//_____________________________/\_______________________________ -//============================================================== -// TONAL CONTROL CONSTANT GENERATION -//-------------------------------------------------------------- -// This is in here for rapid prototyping -// Please use the CPU code and pass in as constants -//============================================================== - CrtsF4 CrtsTone( - CrtsF1 contrast, - CrtsF1 saturation, - CrtsF1 thin, - CrtsF1 mask){ -//-------------------------------------------------------------- - #if CRTS_MASK_NONE - mask=1.0; - #endif -//-------------------------------------------------------------- - #if CRTS_MASK_GRILLE_LITE - // Normal R mask is {1.0,mask,mask} - // LITE R mask is {mask,1.0,1.0} - mask=0.5+mask*0.5; - #endif -//-------------------------------------------------------------- - CrtsF4 ret; - CrtsF1 midOut=0.18/((1.5-thin)*(0.5*mask+0.5)); - CrtsF1 pMidIn=pow(0.18,contrast); - ret.x=contrast; - ret.y=((-pMidIn)+midOut)/((1.0-pMidIn)*midOut); - ret.z=((-pMidIn)*midOut+pMidIn)/(midOut*(-pMidIn)+midOut); - ret.w=contrast+saturation; - return ret;} -//_____________________________/\_______________________________ -//============================================================== -// MASK -//-------------------------------------------------------------- -// Letting LCD/OLED pixel elements function like CRT phosphors -// So "phosphor" resolution scales with display resolution -//-------------------------------------------------------------- -// Not applying any warp to the mask (want high frequency) -// Real aperture grille has a mask which gets wider on ends -// Not attempting to be "real" but instead look the best -//-------------------------------------------------------------- -// Shadow mask is stretched horizontally -// RRGGBB -// GBBRRG -// RRGGBB -// This tends to look better on LCDs than vertical -// Also 2 pixel width is required to get triad centered -//-------------------------------------------------------------- -// The LITE version of the Aperture Grille is brighter -// Uses {dark,1.0,1.0} for R channel -// Non LITE version uses {1.0,dark,dark} -//-------------------------------------------------------------- -// 'pos' - This is 'fragCoord.xy' -// Pixel {0,0} should be {0.5,0.5} -// Pixel {1,1} should be {1.5,1.5} -//-------------------------------------------------------------- -// 'dark' - Exposure of of masked channel -// 0.0=fully off, 1.0=no effect -//============================================================== - CrtsF3 CrtsMask(CrtsF2 pos,CrtsF1 dark){ - #if CRTS_MASK_GRILLE - CrtsF3 m=CrtsF3(dark,dark,dark); - CrtsF1 x=CrtsFractF1(pos.x*(1.0/3.0)); - if(x<(1.0/3.0))m.r=1.0; - else if(x<(2.0/3.0))m.g=1.0; - else m.b=1.0; - return m; - #endif -//-------------------------------------------------------------- - #if CRTS_MASK_GRILLE_LITE - CrtsF3 m=CrtsF3(1.0,1.0,1.0); - CrtsF1 x=CrtsFractF1(pos.x*(1.0/3.0)); - if(x<(1.0/3.0))m.r=dark; - else if(x<(2.0/3.0))m.g=dark; - else m.b=dark; - return m; - #endif -//-------------------------------------------------------------- - #if CRTS_MASK_NONE - return CrtsF3(1.0,1.0,1.0); - #endif -//-------------------------------------------------------------- - #if CRTS_MASK_SHADOW - pos.x+=pos.y*3.0; - CrtsF3 m=CrtsF3(dark,dark,dark); - CrtsF1 x=CrtsFractF1(pos.x*(1.0/6.0)); - if(x<(1.0/3.0))m.r=1.0; - else if(x<(2.0/3.0))m.g=1.0; - else m.b=1.0; - return m; - #endif - } -//_____________________________/\_______________________________ -//============================================================== -// FILTER ENTRY -//-------------------------------------------------------------- -// Input must be linear -// Output color is linear -//-------------------------------------------------------------- -// Must have fetch function setup: CrtsF3 CrtsFetch(CrtsF2 uv) -// - The 'uv' range is {0.0 to 1.0} for input texture -// - Output of this must be linear color -//-------------------------------------------------------------- -// SCANLINE MATH & AUTO-EXPOSURE NOTES -// =================================== -// Each output line has contribution from at most 2 scanlines -// Scanlines are shaped by a windowed cosine function -// This shape blends together well with only 2 lines of overlap -//-------------------------------------------------------------- -// Base scanline intensity is as follows -// which leaves output intensity range from {0 to 1.0} -// -------- -// thin := range {thick 0.5 to thin 1.0} -// off := range {0.0 to <1.0}, -// sub-pixel offset between two scanlines -// -------- -// a0=cos(min(0.5, off *thin)*2pi)*0.5+0.5; -// a1=cos(min(0.5,(1.0-off)*thin)*2pi)*0.5+0.5; -//-------------------------------------------------------------- -// This leads to a image darkening factor of roughly: -// {(1.5-thin)/1.0} -// This is further reduced by the mask: -// {1.0/2.0+mask*1.0/2.0} -// Reciprocal of combined effect is used for auto-exposure -// to scale up the mid-level in the tonemapper -//============================================================== - CrtsF3 CrtsFilter( -//-------------------------------------------------------------- - // SV_POSITION, fragCoord.xy - CrtsF2 ipos, -//-------------------------------------------------------------- - // inputSize / outputSize (in pixels) - CrtsF2 inputSizeDivOutputSize, -//-------------------------------------------------------------- - // 0.5 * inputSize (in pixels) - CrtsF2 halfInputSize, -//-------------------------------------------------------------- - // 1.0 / inputSize (in pixels) - CrtsF2 rcpInputSize, -//-------------------------------------------------------------- - // 1.0 / outputSize (in pixels) - CrtsF2 rcpOutputSize, -//-------------------------------------------------------------- - // 2.0 / outputSize (in pixels) - CrtsF2 twoDivOutputSize, -//-------------------------------------------------------------- - // inputSize.y - CrtsF1 inputHeight, -//-------------------------------------------------------------- - // Warp scanlines but not phosphor mask - // 0.0 = no warp - // 1.0/64.0 = light warping - // 1.0/32.0 = more warping - // Want x and y warping to be different (based on aspect) - CrtsF2 warp, -//-------------------------------------------------------------- - // Scanline thinness - // 0.50 = fused scanlines - // 0.70 = recommended default - // 1.00 = thinner scanlines (too thin) - // Shared with CrtsTone() function - CrtsF1 thin, -//-------------------------------------------------------------- - // Horizonal scan blur - // -3.0 = pixely - // -2.5 = default - // -2.0 = smooth - // -1.0 = too blurry - CrtsF1 blur, -//-------------------------------------------------------------- - // Shadow mask effect, ranges from, - // 0.25 = large amount of mask (not recommended, too dark) - // 0.50 = recommended default - // 1.00 = no shadow mask - // Shared with CrtsTone() function - CrtsF1 mask, -//-------------------------------------------------------------- - // Tonal curve parameters generated by CrtsTone() - CrtsF4 tone -//-------------------------------------------------------------- - ){ -//-------------------------------------------------------------- - #if CRTS_DEBUG - CrtsF2 uv=ipos*rcpOutputSize; - // Show second half processed, and first half un-processed - if(uv.x<0.5){ - // Force nearest to get squares - uv*=1.0/rcpInputSize; - uv=floor(uv)+CrtsF2(0.5,0.5); - uv*=rcpInputSize; - CrtsF3 color=CrtsFetch(uv); - return color;} - #endif -//-------------------------------------------------------------- - // Optional apply warp - CrtsF2 pos; - #if CRTS_WARP - // Convert to {-1 to 1} range - pos=ipos*twoDivOutputSize-CrtsF2(1.0,1.0); - // Distort pushes image outside {-1 to 1} range - pos*=CrtsF2( - 1.0+(pos.y*pos.y)*warp.x, - 1.0+(pos.x*pos.x)*warp.y); - // TODO: Vignette needs optimization - CrtsF1 vin=1.0-( - (1.0-CrtsSatF1(pos.x*pos.x))*(1.0-CrtsSatF1(pos.y*pos.y))); - vin=CrtsSatF1((-vin)*inputHeight+inputHeight); - // Leave in {0 to inputSize} - pos=pos*halfInputSize+halfInputSize; - #else - pos=ipos*inputSizeDivOutputSize; - #endif -//-------------------------------------------------------------- - // Snap to center of first scanline - CrtsF1 y0=floor(pos.y-0.5)+0.5; - #if CRTS_2_TAP - // Using Inigo's "Improved Texture Interpolation" - // http://iquilezles.org/www/articles/texture/texture.htm - pos.x+=0.5; - CrtsF1 xi=floor(pos.x); - CrtsF1 xf=pos.x-xi; - xf=xf*xf*xf*(xf*(xf*6.0-15.0)+10.0); - CrtsF1 x0=xi+xf-0.5; - CrtsF2 p=CrtsF2(x0*rcpInputSize.x,y0*rcpInputSize.y); - // Coordinate adjusted bilinear fetch from 2 nearest scanlines - CrtsF3 colA=CrtsFetch(p); - p.y+=rcpInputSize.y; - CrtsF3 colB=CrtsFetch(p); - #else - // Snap to center of one of four pixels - CrtsF1 x0=floor(pos.x-1.5)+0.5; - // Inital UV position - CrtsF2 p=CrtsF2(x0*rcpInputSize.x,y0*rcpInputSize.y); - // Fetch 4 nearest texels from 2 nearest scanlines - CrtsF3 colA0=CrtsFetch(p); - p.x+=rcpInputSize.x; - CrtsF3 colA1=CrtsFetch(p); - p.x+=rcpInputSize.x; - CrtsF3 colA2=CrtsFetch(p); - p.x+=rcpInputSize.x; - CrtsF3 colA3=CrtsFetch(p); - p.y+=rcpInputSize.y; - CrtsF3 colB3=CrtsFetch(p); - p.x-=rcpInputSize.x; - CrtsF3 colB2=CrtsFetch(p); - p.x-=rcpInputSize.x; - CrtsF3 colB1=CrtsFetch(p); - p.x-=rcpInputSize.x; - CrtsF3 colB0=CrtsFetch(p); - #endif -//-------------------------------------------------------------- - // Vertical filter - // Scanline intensity is using sine wave - // Easy filter window and integral used later in exposure - CrtsF1 off=pos.y-y0; - CrtsF1 pi2=6.28318530717958; - CrtsF1 hlf=0.5; - CrtsF1 scanA=cos(min(0.5, off *thin )*pi2)*hlf+hlf; - CrtsF1 scanB=cos(min(0.5,(-off)*thin+thin)*pi2)*hlf+hlf; -//-------------------------------------------------------------- - #if CRTS_2_TAP - #if CRTS_WARP - // Get rid of wrong pixels on edge - scanA*=vin; - scanB*=vin; - #endif - // Apply vertical filter - CrtsF3 color=(colA*scanA)+(colB*scanB); - #else - // Horizontal kernel is simple gaussian filter - CrtsF1 off0=pos.x-x0; - CrtsF1 off1=off0-1.0; - CrtsF1 off2=off0-2.0; - CrtsF1 off3=off0-3.0; - CrtsF1 pix0=exp2(blur*off0*off0); - CrtsF1 pix1=exp2(blur*off1*off1); - CrtsF1 pix2=exp2(blur*off2*off2); - CrtsF1 pix3=exp2(blur*off3*off3); - CrtsF1 pixT=CrtsRcpF1(pix0+pix1+pix2+pix3); - #if CRTS_WARP - // Get rid of wrong pixels on edge - pixT*=vin; - #endif - scanA*=pixT; - scanB*=pixT; - // Apply horizontal and vertical filters - CrtsF3 color= - (colA0*pix0+colA1*pix1+colA2*pix2+colA3*pix3)*scanA + - (colB0*pix0+colB1*pix1+colB2*pix2+colB3*pix3)*scanB; - #endif -//-------------------------------------------------------------- - // Apply phosphor mask - color*=CrtsMask(ipos,mask); -//-------------------------------------------------------------- - // Optional color processing - #if CRTS_TONE - // Tonal control, start by protecting from /0 - CrtsF1 peak=max(1.0/(256.0*65536.0), - CrtsMax3F1(color.r,color.g,color.b)); - // Compute the ratios of {R,G,B} - CrtsF3 ratio=color*CrtsRcpF1(peak); - // Apply tonal curve to peak value - #if CRTS_CONTRAST - peak=pow(peak,tone.x); - #endif - peak=peak*CrtsRcpF1(peak*tone.y+tone.z); - // Apply saturation - #if CRTS_SATURATION - ratio=pow(ratio,CrtsF3(tone.w,tone.w,tone.w)); - #endif - // Reconstruct color - return ratio*peak; - #else - return color; - #endif -//-------------------------------------------------------------- - } -#endif \ No newline at end of file diff --git a/data/reshade/shaders/Effects/CRT_Yee64.fx b/data/reshade/shaders/Effects/CRT_Yee64.fx deleted file mode 100644 index 3d2e9c55..00000000 --- a/data/reshade/shaders/Effects/CRT_Yee64.fx +++ /dev/null @@ -1,196 +0,0 @@ -/* - Ripped from Sonic Mania -*/ - -#include "ReShade.fxh" - -#ifndef YEE64_USEPOINT -#define YEE64_USEPOINT 1 -#endif - -uniform int iWidth < - ui_label = "Width"; - ui_type = "drag"; - ui_min = 1; - ui_max = BUFFER_WIDTH; - ui_step = 1; -> = BUFFER_WIDTH; - -uniform int iHeight < - ui_label = "Height"; - ui_type = "drag"; - ui_min = 1; - ui_max = BUFFER_HEIGHT; - ui_step = 1; -> = BUFFER_HEIGHT; - -uniform float fDownScale < - ui_label = "DownScale"; - ui_type = "drag"; - ui_min = 1.0; - ui_max = 10.0; - ui_step = 0.001; -> = 1.2; - -#define i2Resolution int2(iWidth, iHeight) - -sampler sBackBuffer_Point { - Texture = ReShade::BackBufferTex; - MinFilter = POINT; - MagFilter = POINT; -}; - -void PS_CRT_Yee64( - float4 pos : SV_POSITION, - float2 uv : TEXCOORD, - out float4 oC0 : SV_TARGET -) { - //Declare parameters - //pixelSize - static const float4 c0 = ReShade::ScreenSize.xyyy / float4(ReShade::AspectRatio, 1, 1, 1); - //textureSize - static const float4 c1 = i2Resolution.xyyy / fDownScale; - //viewSize - static const float4 c2 = ReShade::ScreenSize.xyyy; - //texDiffuse - #if YEE64_USEPOINT - #define s0 sBackBuffer_Point - #else - #define s0 ReShade::BackBuffer - #endif - - //Declare constants - static const float4 c3 = float4(-1, 0.5, 1.25, 0); - static const float4 c4 = float4(0.5, -0.5, 1.5, -3); - static const float4 c5 = float4(-1, 1, -2, 2); - static const float4 c6 = float4(-3, -8, 720, 0.166666672); - static const float4 c7 = float4(-0.333000004, -0.666000009, 0.899999976, 1.20000005); - static const float4 c8 = float4(1.5, 0.5, 2.5, 0.899999976); - - //Declare registers - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9; - - //Code starts here - float4 v0 = uv.xyyy; - //dcl_2d s0 - r0.z = c3.w; - r1.x = 1.0 / c0.x; - r1.y = 1.0 / c0.y; - r1.xy = (r1 * c1).xy; - r1.xy = (r1 * v0).xy; - r2.x = 1.0 / c1.x; - r2.y = 1.0 / c1.y; - r1.zw = (r2.xyxy * c0.xyxy).zw; - r1.zw = (r1 * r1.xyxy).zw; - r1.xy = (r1 * c2).xy; - r2.zw = (r1 * c1.xyxy).zw; - r2.zw = frac(r2).zw; - r0.xy = (-r2.zwzw).xy; - r3.xy = (r1.zwzw * c1 + r0.xzzw).xy; - r4.yz = (r1.xzww * c1.xxyw + r0.xzyw).yz; - r3.z = r0.y + r3.y; - r5 = r3.xzxz + -c4.zyxy; - r3 = r3.xzxz + c8.xyzy; - r3 = r2.xyxy * r3; - r5 = r2.xyxy * r5; - r6 = tex2D(s0, r5.zw); - r5 = tex2D(s0, r5.xy); - r5.xyz = (r5 * c3.zzzz).xyz; - r7 = r1.zwzw * c1.xyxy + r0.xyxy; - r0.zw = (r1 * c1.xyxy + - r7).zw; - r8.x = c3.x; - r1.zw = (r1 * c1.xyxy + r8.xxxx).zw; - r1.zw = (r0.xyxy + r1).zw; - r4.x = r0.x + r4.y; - r4 = r4.xzxz + c4.xyxz; - r4 = r2.xyxy * r4; - r0.xy = (r1.zwzw + c3.yyyy).xy; - r0.xy = (r2 * r0).xy; - r8 = tex2D(s0, r0.xy); - r8.xyz = (r8 * c3.zzzz).xyz; - r0.xy = (r0.zwzw + -c3.yyyy).xy; - r9 = -r0.xxxx + c5; - r9 = r9 * r9; - r9 = r9 * c4.wwww; - r0.z = pow(2, r9.x); - r6.xyz = (r6 * r0.zzzz).xyz; - r6.xyz = (r6 * c3.zzzz).xyz; - r0.w = pow(2, r9.z); - r5.xyz = (r5 * r0.wwww + r6).xyz; - r0.w = r0.z + r0.w; - r6 = r7.zwzw + c4.zyxx; - r7 = r7 + c4.yzzz; - r7 = r2.xyxy * r7; - r2 = r2.xyxy * r6; - r6 = tex2D(s0, r2.zw); - r2 = tex2D(s0, r2.xy); - r2.xyz = (r2 * c3.zzzz).xyz; - r1.zw = (r0.xyxy * r0.xyxy).zw; - r0.xy = (-r0.yyyy + c5).xy; - r0.xy = (r0 * r0).xy; - r0.xy = (r0 * c6.yyyy).xy; - r1.zw = (r1 * c6.xyxy).zw; - r1.z = pow(2, r1.z); - r1.w = pow(2, r1.w); - r6.xyz = (r6 * r1.zzzz).xyz; - r5.xyz = (r6 * c3.zzzz + r5).xyz; - r6 = tex2D(s0, r3.xy); - r3 = tex2D(s0, r3.zw); - r3.xyz = (r3 * c3.zzzz).xyz; - r2.w = pow(2, r9.y); - r3.w = pow(2, r9.w); - r6.xyz = (r6 * r2.wwww).xyz; - r5.xyz = (r6 * c3.zzzz + r5).xyz; - r3.xyz = (r3 * r3.wwww + r5).xyz; - r0.w = r0.w + r1.z; - r0.w = r2.w + r0.w; - r0.w = r3.w + r0.w; - r0.w = 1.0 / r0.w; - r3.xyz = (r0.wwww * r3).xyz; - r3.xyz = (r1.wwww * r3).xyz; - r5 = tex2D(s0, r4.xy); - r4 = tex2D(s0, r4.zw); - r4.xyz = (r1.zzzz * r4).xyz; - r4.xyz = (r4 * c3.zzzz).xyz; - r5.xyz = (r5 * c3.zzzz).xyz; - r5.xyz = (r1.zzzz * r5).xyz; - r0.w = r0.z + r1.z; - r0.w = r2.w + r0.w; - r0.w = 1.0 / r0.w; - r5.xyz = (r8 * r0.zzzz + r5).xyz; - r2.xyz = (r2 * r2.wwww + r5).xyz; - r2.xyz = (r0.wwww * r2).xyz; - r0.x = pow(2, r0.x); - r0.y = pow(2, r0.y); - r2.xyz = (r2 * r0.xxxx + r3).xyz; - r3 = tex2D(s0, r7.xy); - r5 = tex2D(s0, r7.zw); - r5.xyz = (r2.wwww * r5).xyz; - r3.xyz = (r0.zzzz * r3).xyz; - r3.xyz = (r3 * c3.zzzz + r4).xyz; - r3.xyz = (r5 * c3.zzzz + r3).xyz; - r0.xzw = (r0.wwww * r3.xyyz).xzw; - r0.xyz = (r0.xzww * r0.yyyy + r2).xyz; - r1.zw = frac(r1.xyxy).zw; - r1.xy = (-r1.zwzw + r1).xy; - r1.xy = (r1 + c3.yyyy).xy; - r0.w = (r1.y * -c4.w + r1.x); - r0.w = r0.w * c6.w; - r0.w = frac(r0.w); - r1.xy = (r0.wwww + c7).xy; - r2.yz = (r1.y >= 0 ? c7.xzww : c7.xwzw).yz; - r2.x = c8.w; - r1.xyz = (r1.x >= 0 ? r2 : c7.wzzw).xyz; - r1.xyz = (r0 * r1).xyz; - r2.z = c6.z; - r0.w = r2.z + -c2.y; - oC0.xyz = (r0.w >= 0 ? r0 : r1).xyz; - oC0.w = -c3.x; -} - -technique CRT_Yee64 { - pass { - VertexShader = PostProcessVS; - PixelShader = PS_CRT_Yee64; - } -} diff --git a/data/reshade/shaders/Effects/CRT_Yeetron.fx b/data/reshade/shaders/Effects/CRT_Yeetron.fx deleted file mode 100644 index de204bb7..00000000 --- a/data/reshade/shaders/Effects/CRT_Yeetron.fx +++ /dev/null @@ -1,149 +0,0 @@ -/* - Ripped from Sonic Mania -*/ - -#include "ReShade.fxh" - -#ifndef YEETRON_USEPOINT -#define YEETRON_USEPOINT 1 -#endif - -uniform int iWidth < - ui_label = "Width"; - ui_type = "drag"; - ui_min = 1; - ui_max = BUFFER_WIDTH; - ui_step = 1; -> = BUFFER_WIDTH; - -uniform int iHeight < - ui_label = "Height"; - ui_type = "drag"; - ui_min = 1; - ui_max = BUFFER_HEIGHT; - ui_step = 1; -> = BUFFER_HEIGHT; - -uniform float fDownScale < - ui_label = "DownScale"; - ui_type = "drag"; - ui_min = 1.0; - ui_max = 10.0; - ui_step = 0.001; -> = 1.2; - -#define i2Resolution int2(iWidth, iHeight) - -sampler sBackBuffer_Point { - Texture = ReShade::BackBufferTex; - MinFilter = POINT; - MagFilter = POINT; -}; - -float4 cmp(float4 src0, float4 src1, float4 src2) { - return float4( - src0.x >= 0 ? src1.x : src2.x, - src0.y >= 0 ? src1.y : src2.y, - src0.z >= 0 ? src1.z : src2.z, - src0.w >= 0 ? src1.w : src2.w - ); -} - -void PS_CRT_Yeetron( - float4 pos : SV_POSITION, - float2 uv : TEXCOORD, - out float4 oC0 : SV_TARGET -) { - //Declare parameters - //pixelSize - static const float4 c0 = ReShade::ScreenSize.xyyy; - //textureSize - static const float4 c1 = i2Resolution.xyyy / fDownScale; - //viewSize - static const float4 c2 = ReShade::ScreenSize.xyyy; - //texDiffuse - #if YEETRON_USEPOINT - #define s0 sBackBuffer_Point - #else - #define s0 ReShade::BackBuffer - #endif - - //Declare constants - static const float4 c3 = float4(1.5, 0.800000012, 1.25, 0.75); - static const float4 c4 = float4(6.28318548, -3.14159274, 0.25, -0.25); - static const float4 c5 = float4(1, 0.5, 720, 3); - static const float4 c6 = float4(0.166666672, -0.333000004, -0.666000009, 0.899999976); - static const float4 c7 = float4(0.899999976, 1.10000002, 0, 0); - static const float4 c8 = float4(-0.5, -0.25, 2, 0.5); - - //Declare registers - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9; - - //Code starts here - float4 v0 = uv.xyyy; - //dcl_2d s0 - r0.x = 1.0 / c0.x; - r0.y = 1.0 / c0.y; - r0.xy = (r0 * c1).xy; - r0.xy = (r0 * v0).xy; - r0.xy = (r0 * c2).xy; - r0.zw = frac(r0.xyxy).zw; - r0.xy = (-r0.zwzw + r0).xy; - r0.xy = (r0 + c8.wwww).xy; - r0.x = r0.y * c5.w + r0.x; - r0.x = r0.x * c6.x; - r0.x = frac(r0.x); - r0.xy = (r0.xxxx + c6.yzzw).xy; - r1.yz = (r0.y >= 0 ? c7.xxyw : c7.xyxw).yz; - r1.x = c6.w; - r0.xyz = (r0.x >= 0 ? r1 : c7.yxxw).xyz; - r1.xy = (c1 * v0).xy; - r0.w = r1.y * c8.w + c8.w; - r0.w = frac(r0.w); - r0.w = r0.w * c4.x + c4.y; - r2.y = sin(r0.w); - r1.zw = (abs(r2).yyyy + c4).zw; - r1.z = saturate(r1.z); - r0.w = r1.w >= 0 ? r1.z : c8.w; - r2 = frac(r1.xyxy); - r1.xy = (r1 + -r2.zwzw).xy; - r2 = r2 + c8.xxyy; - r1.zw = (r1.xyxy + c8.wwww).zw; - r1.zw = (v0.xyxy * -c1.xyxy + r1).zw; - r1.w = r1.w + r1.w; - r1.z = r1.z * c8.w; - r1.z = -abs(r1).z + c3.x; - r3.x = max(c3.y, r1.z); - r4.x = min(r3.x, c3.z); - r1.zw = (-abs(r1).wwww + c3).zw; - r1.z = saturate(r1.z); - r1.z = r1.w >= 0 ? r1.z : c8.w; - r4.y = r0.w + r1.z; - r0.w = r0.w * r4.x; - r1.z = r1.z * r4.x; - r3.xy = (r4 * c5).xy; - r1.w = r3.y * r3.x; - r2.z = cmp(r2, r2.xyxy, c8.yyyy).z; - r3.xy = max(c8.yyyy, -r2.zwzw).xy; - r2.xy = (r2 + r3).xy; - r1.xy = (r2 * c8.zzzz + r1).xy; - r1.xy = (r1 + c8.wwww).xy; - r2.x = 1.0 / c1.x; - r2.y = 1.0 / c1.y; - r1.xy = (r1 * r2).xy; - r2 = tex2D(s0, r1.xy); - r3.x = r0.w * r2.x; - r3.yz = (r1.xzww * r2).yz; - oC0.w = r2.w; - r0.xyz = (r0 * r3).xyz; - r1.z = c5.z; - r0.w = r1.z + -c2.y; - oC0.xyz = (r0.w >= 0 ? r3 : r0).xyz; -} - -technique CRT_Yeetron { - pass { - VertexShader = PostProcessVS; - PixelShader = PS_CRT_Yeetron; - } -} diff --git a/data/reshade/shaders/Effects/PD80_02_Bonus_LUT_pack.fx b/data/reshade/shaders/Effects/PD80_02_Bonus_LUT_pack.fx deleted file mode 100644 index 90fe8906..00000000 --- a/data/reshade/shaders/Effects/PD80_02_Bonus_LUT_pack.fx +++ /dev/null @@ -1,15 +0,0 @@ -// Easy LUT config -// Name which will display in the UI. Should be without spaces -#define PD80_Technique_Name prod80_02_Bonus_LUT_pack - -// Texture name which contains the LUT(s) and the Tile Sizes, Amounts, etc. -#define PD80_LUT_File_Name "pd80_example-lut.png" -#define PD80_Tile_SizeXY 64 -#define PD80_Tile_Amount 64 -#define PD80_LUT_Amount 50 - -// Drop down menu which gives the names of the LUTs, each menu option should be followed by \0 -#define PD80_Drop_Down_Menu "PD80 Cinematic 01\0PD80 Cinematic 02\0PD80 Cinematic 03\0PD80 Cinematic 04\0PD80 Cinematic 05\0PD80 Cinematic 06\0PD80 Cinematic 07\0PD80 Cinematic 08\0PD80 Cinematic 09\0PD80 Cinematic 10\0PD80 Cinematic 11\0PD80 Cinematic 12\0PD80 Cinematic 13\0PD80 Cinematic 14\0PD80 Cinematic 15\0PD80 Cinematic 16\0PD80 Cinematic 17\0PD80 Cinematic 18\0PD80 Cinematic 19\0PD80 Cinematic 20\0PD80 Cinematic 21\0PD80 Cinematic 22\0PD80 Cinematic 23\0PD80 Cinematic 24\0PD80 Cinematic 25\0PD80 Cinematic 26\0PD80 Cinematic 27\0PD80 Cinematic 28\0PD80 Cinematic 29\0PD80 Cinematic 30\0PD80 Cinematic 31\0PD80 Cinematic 32\0PD80 Cinematic 33\0PD80 Cinematic 34\0PD80 Cinematic 35\0PD80 Cinematic 36\0PD80 Cinematic 37\0PD80 Cinematic 38\0PD80 Cinematic 39\0PD80 Cinematic 40\0PD80 Cinematic 41\0PD80 Cinematic 42\0PD80 Cinematic 43\0PD80 Cinematic 44\0PD80 Cinematic 45\0PD80 Cinematic 46\0PD80 Cinematic 47\0PD80 Cinematic 48\0PD80 Cinematic 49\0PD80 Cinematic 50\0" - -// Final pass to the shader -#include "PD80_LUT_v2.fxh" \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_02_LUT_Creator.fx b/data/reshade/shaders/Effects/PD80_02_LUT_Creator.fx deleted file mode 100644 index 30605e26..00000000 --- a/data/reshade/shaders/Effects/PD80_02_LUT_Creator.fx +++ /dev/null @@ -1,118 +0,0 @@ -/* - Description : PD80 02 LUT Creator for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -/* - This shader overlays the screen with a 512x512 high quality LUT. - One can run effects on this LUT using Reshade and export the results in a PNG - screenshot. You can take this screenshot into your favorite image editor and - make it into a 4096x64 LUT texture that can be read by Reshade's LUT shaders. - This way you can safe performance by using a texture to apply your favorite - effects instead of Reshade's color manipulation shaders. - - To use: - 1. Start game with Reshade - 2. Make sure PD80_03_LUT_Creator.fx is the first shader in your effect chain and any effects that shouldn't be enabled are disabled; Bloom, DoF, Noise/Grain, Dither, MXAO, SMAA, SSR, ... - 3. Adjust the game coloring, contrasts, brightness, gamma, etc. to taste using whatever Reshade effects you please. Once happy make a screenshot in .png format - 4. Exit game and load screenshot in Photoshop or your preferred image editing program - 5. Carefully cut and paste the individual rows into a 4096x64 size image - 6. Save the new image as a .png - 7. Back in the game open whatever LUT shader you have available (f.e. PD80_02_MultiLUT_2.0.fx) and load your new LUT file name with the correct parameters (Tile size 64, Number of tiles 64, Number of LUTs 1) - 8. Disable the effects used to make the LUT (or effects are applied twice) - - Profit. -*/ - -// "HALD_64.png" -// "pd80_neutral-lut.png" - -#include "ReShade.fxh" - -#ifndef PD80_LC_TEXTURE_NAME - #define PD80_LC_TEXTURE_NAME "pd80_neutral-lut.png" -#endif - -#ifndef PD80_LC_TEXTURE_WIDTH - #define PD80_LC_TEXTURE_WIDTH 512.0 -#endif - -#ifndef PD80_LC_TEXTURE_HEIGHT - #define PD80_LC_TEXTURE_HEIGHT 512.0 -#endif - -namespace pd80_lutoverlay -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texPicture < source = PD80_LC_TEXTURE_NAME; > { Width = PD80_LC_TEXTURE_WIDTH; Height = PD80_LC_TEXTURE_HEIGHT; Format = RGBA8; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerPicture { - Texture = texPicture; - AddressU = CLAMP; - AddressV = CLAMP; - AddressW = CLAMP; - }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_OverlayLUT(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float2 coords = float2( BUFFER_WIDTH, BUFFER_HEIGHT ) / float2( PD80_LC_TEXTURE_WIDTH, PD80_LC_TEXTURE_HEIGHT ); - coords.xy *= texcoord.xy; - float3 lut = tex2D( samplerPicture, coords ).xyz; - float3 color = tex2D( ReShade::BackBuffer, texcoord ).xyz; - float2 cutoff = float2( BUFFER_RCP_WIDTH, BUFFER_RCP_HEIGHT ) * float2( PD80_LC_TEXTURE_WIDTH, PD80_LC_TEXTURE_HEIGHT ); - color = ( texcoord.y > cutoff.y || texcoord.x > cutoff.x ) ? color : lut; - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_02_LUT_Creator - < ui_tooltip = "This shader overlays the screen with a 512x512 high quality LUT.\n" - "One can run effects on this LUT using Reshade and export the results in a PNG\n" - "screenshot. You can take this screenshot into your favorite image editor and\n" - "make it into a 4096x64 LUT texture that can be read by Reshade's LUT shaders.\n" - "This way you can safe performance by using a texture to apply your favorite\n" - "effects instead of Reshade's color manipulation shaders.";> - { - pass prod80_pass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_OverlayLUT; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_03_Color_Space_Curves.fx b/data/reshade/shaders/Effects/PD80_03_Color_Space_Curves.fx deleted file mode 100644 index b81d2670..00000000 --- a/data/reshade/shaders/Effects/PD80_03_Color_Space_Curves.fx +++ /dev/null @@ -1,230 +0,0 @@ -/* - Description : PD80 03 Color Space Curves for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional Credits - http://technorgb.blogspot.com/2018/02/hyperbola-tone-mapping.html - - LAB Conversion adopted from - http://www.brucelindbloom.com/ - - For the curves code: - Copyright (c) 2018 ishiyama, MIT License - Please see https://www.shadertoy.com/view/4tjcD1 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_cscurves -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - uniform int color_space < - ui_type = "combo"; - ui_category = "Global"; - ui_label = "Color Space"; - ui_tooltip = "Color Space"; - ui_items = "RGB-W\0L* a* b*\0HSL\0HSV\0"; - > = 1; - // Greys - uniform float pos0_shoulder_grey < - ui_type = "slider"; - ui_label = "Shoulder Position X"; - ui_tooltip = "Shoulder Position X"; - ui_category = "Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.8; - uniform float pos1_shoulder_grey < - ui_type = "slider"; - ui_label = "Shoulder Position Y"; - ui_tooltip = "Shoulder Position Y"; - ui_category = "Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.8; - uniform float pos0_toe_grey < - ui_type = "slider"; - ui_label = "Toe Position X"; - ui_tooltip = "Toe Position X"; - ui_category = "Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.2; - uniform float pos1_toe_grey < - ui_type = "slider"; - ui_label = "Toe Position Y"; - ui_tooltip = "Toe Position Y"; - ui_category = "Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.2; - // Saturation - uniform float colorsat < - ui_type = "slider"; - ui_category = "Color Control"; - ui_label = "Saturation"; - ui_tooltip = "Saturation"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// STRUCTURES ///////////////////////////////////////////////////////////////// - struct TonemapParams - { - float3 mToe; - float2 mMid; - float3 mShoulder; - float2 mBx; - }; - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float3 Tonemap(const TonemapParams tc, float3 x) - { - float3 toe = - tc.mToe.x / (x + tc.mToe.y) + tc.mToe.z; - float3 mid = tc.mMid.x * x + tc.mMid.y; - float3 shoulder = - tc.mShoulder.x / (x + tc.mShoulder.y) + tc.mShoulder.z; - float3 result = ( x >= tc.mBx.x ) ? mid : toe; - result = ( x >= tc.mBx.y ) ? shoulder : result; - return result; - } - - - float4 setBoundaries( float tx, float ty, float sx, float sy ) - { - if( tx > sx ) - tx = sx; - if( ty > sy ) - ty = sy; - return float4( tx, ty, sx, sy ); - } - - void PrepareTonemapParams(float2 p1, float2 p2, float2 p3, out TonemapParams tc) - { - float denom = p2.x - p1.x; - denom = abs(denom) > 1e-5 ? denom : 1e-5; - float slope = (p2.y - p1.y) / denom; - { - tc.mMid.x = slope; - tc.mMid.y = p1.y - slope * p1.x; - } - { - float denom = p1.y - slope * p1.x; - denom = abs(denom) > 1e-5 ? denom : 1e-5; - tc.mToe.x = slope * p1.x * p1.x * p1.y * p1.y / (denom * denom); - tc.mToe.y = slope * p1.x * p1.x / denom; - tc.mToe.z = p1.y * p1.y / denom; - } - { - float denom = slope * (p2.x - p3.x) - p2.y + p3.y; - denom = abs(denom) > 1e-5 ? denom : 1e-5; - tc.mShoulder.x = slope * pow(p2.x - p3.x, 2.0) * pow(p2.y - p3.y, 2.0) / (denom * denom); - tc.mShoulder.y = (slope * p2.x * (p3.x - p2.x) + p3.x * (p2.y - p3.y) ) / denom; - tc.mShoulder.z = (-p2.y * p2.y + p3.y * (slope * (p2.x - p3.x) + p2.y) ) / denom; - } - tc.mBx = float2(p1.x, p2.x); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_CSCurves(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 1, enable_dither, dither_strength, 1, 0.5f ); - color.xyz = saturate( color.xyz + dnoise.xyz ); - - // Prepare curves - float4 grey = setBoundaries( pos0_toe_grey, pos1_toe_grey, pos0_shoulder_grey, pos1_shoulder_grey ); - TonemapParams tc; - PrepareTonemapParams( grey.xy, grey.zw, float2( 1.0f, 1.0f ), tc ); - - // RGBW - float rgb_luma = min( min( color.x, color.y ), color.z ); - float temp_luma = rgb_luma; - float3 rgb_chroma = color.xyz - rgb_luma; - rgb_luma = Tonemap( tc, rgb_luma.xxx ).x; - rgb_chroma *= ( colorsat + 1.0f ); - - // LAB - float3 lab_color = pd80_srgb_to_lab( color.xyz ); - lab_color.x = Tonemap( tc, lab_color.xxx ).x; - lab_color.yz *= ( colorsat + 1.0f ); - - // HSL - float3 hsl_color = RGBToHSL( color.xyz ); - hsl_color.z = Tonemap( tc, hsl_color.zzz ).z; - hsl_color.y *= ( colorsat + 1.0f ); - - // HSV - float3 hsv_color = RGBToHSV( color.xyz ); - hsv_color.z = Tonemap( tc, hsv_color.zzz ).z; - hsv_color.y *= ( colorsat + 1.0f ); - - switch( color_space ) - { - case 0: { color.xyz = saturate( rgb_chroma.xyz + rgb_luma ); } break; - case 1: { color.xyz = pd80_lab_to_srgb( lab_color.xyz ); } break; - case 2: { color.xyz = HSLToRGB( saturate( hsl_color.xyz )); } break; - case 3: { color.xyz = HSVToRGB( saturate( hsv_color.xyz )); } break; - } - - color.xyz = saturate( color.xyz + dnoise.wxy ); - return float4(color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_03_Color_Space_Curves - { - pass prod80_CCpass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_CSCurves; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_03_Curved_Levels.fx b/data/reshade/shaders/Effects/PD80_03_Curved_Levels.fx deleted file mode 100644 index dd46a0a0..00000000 --- a/data/reshade/shaders/Effects/PD80_03_Curved_Levels.fx +++ /dev/null @@ -1,570 +0,0 @@ -/* - Description : PD80 03 Contrast Curve for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional Credits - http://technorgb.blogspot.com/2018/02/hyperbola-tone-mapping.html - - For the curves code: - Copyright (c) 2018 ishiyama, MIT License - Please see https://www.shadertoy.com/view/4tjcD1 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" - -namespace pd80_curvedlevels -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - #ifndef CURVEDCONTRASTS_ENABLE_RGB - #define CURVEDCONTRASTS_ENABLE_RGB 0 - #endif - - #ifndef CURVEDCONTRASTS_VISUALIZE - #define CURVEDCONTRASTS_VISUALIZE 0 // 0 = disabled, 1 = enabled - #endif - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - // Greys - uniform float black_in_grey < - ui_type = "slider"; - ui_label = "Grey: Black Point"; - ui_tooltip = "Grey: Black Point"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_in_grey < - ui_type = "slider"; - ui_label = "Grey: White Point"; - ui_tooltip = "Grey: White Point"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; - uniform float pos0_shoulder_grey < - ui_type = "slider"; - ui_label = "Grey: Shoulder Position X"; - ui_tooltip = "Grey: Shoulder Position X"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos1_shoulder_grey < - ui_type = "slider"; - ui_label = "Grey: Shoulder Position Y"; - ui_tooltip = "Grey: Shoulder Position Y"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos0_toe_grey < - ui_type = "slider"; - ui_label = "Grey: Toe Position X"; - ui_tooltip = "Grey: Toe Position X"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float pos1_toe_grey < - ui_type = "slider"; - ui_label = "Grey: Toe Position Y"; - ui_tooltip = "Grey: Toe Position Y"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float black_out_grey < - ui_type = "slider"; - ui_label = "Grey: Black Point Offset"; - ui_tooltip = "Grey: Black Point Offset"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_out_grey < - ui_type = "slider"; - ui_label = "Grey: White Point Offset"; - ui_tooltip = "Grey: White Point Offset"; - ui_category = "Grey: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; -#if( CURVEDCONTRASTS_ENABLE_RGB ) - // Reds - uniform float black_in_red < - ui_type = "slider"; - ui_label = "Red: Black Point"; - ui_tooltip = "Red: Black Point"; - ui_category = "Red: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_in_red < - ui_type = "slider"; - ui_label = "Red: White Point"; - ui_tooltip = "Red: White Point"; - ui_category = "Red: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; - uniform float pos0_shoulder_red < - ui_type = "slider"; - ui_label = "Red: Shoulder Position X"; - ui_tooltip = "Red: Shoulder Position X"; - ui_category = "Red: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos1_shoulder_red < - ui_type = "slider"; - ui_label = "Red: Shoulder Position Y"; - ui_tooltip = "Red: Shoulder Position Y"; - ui_category = "Red: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos0_toe_red < - ui_type = "slider"; - ui_label = "Red: Toe Position X"; - ui_tooltip = "Red: Toe Position X"; - ui_category = "Red: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float pos1_toe_red < - ui_type = "slider"; - ui_label = "Red: Toe Position Y"; - ui_tooltip = "Red: Toe Position Y"; - ui_category = "Red: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float black_out_red < - ui_type = "slider"; - ui_label = "Red: Black Point Offset"; - ui_tooltip = "Red: Black Point Offset"; - ui_category = "Red: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_out_red < - ui_type = "slider"; - ui_label = "Red: White Point Offset"; - ui_tooltip = "Red: White Point Offset"; - ui_category = "Red: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; - - // Greens - uniform float black_in_green < - ui_type = "slider"; - ui_label = "Green: Black Point"; - ui_tooltip = "Green: Black Point"; - ui_category = "Green: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_in_green < - ui_type = "slider"; - ui_label = "Green: White Point"; - ui_tooltip = "Green: White Point"; - ui_category = "Green: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; - uniform float pos0_shoulder_green < - ui_type = "slider"; - ui_label = "Green: Shoulder Position X"; - ui_tooltip = "Green: Shoulder Position X"; - ui_category = "Green: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos1_shoulder_green < - ui_type = "slider"; - ui_label = "Green: Shoulder Position Y"; - ui_tooltip = "Green: Shoulder Position Y"; - ui_category = "Green: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos0_toe_green < - ui_type = "slider"; - ui_label = "Green: Toe Position X"; - ui_tooltip = "Green: Toe Position X"; - ui_category = "Green: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float pos1_toe_green < - ui_type = "slider"; - ui_label = "Green: Toe Position Y"; - ui_tooltip = "Green: Toe Position Y"; - ui_category = "Green: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float black_out_green < - ui_type = "slider"; - ui_label = "Green: Black Point Offset"; - ui_tooltip = "Green: Black Point Offset"; - ui_category = "Green: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_out_green < - ui_type = "slider"; - ui_label = "Green: White Point Offset"; - ui_tooltip = "Green: White Point Offset"; - ui_category = "Green: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; - - // Blues - uniform float black_in_blue < - ui_type = "slider"; - ui_label = "Blue: Black Point"; - ui_tooltip = "Blue: Black Point"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_in_blue < - ui_type = "slider"; - ui_label = "Blue: White Point"; - ui_tooltip = "Blue: White Point"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; - uniform float pos0_shoulder_blue < - ui_type = "slider"; - ui_label = "Blue: Shoulder Position X"; - ui_tooltip = "Blue: Shoulder Position X"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos1_shoulder_blue < - ui_type = "slider"; - ui_label = "Blue: Shoulder Position Y"; - ui_tooltip = "Blue: Shoulder Position Y"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.75; - uniform float pos0_toe_blue < - ui_type = "slider"; - ui_label = "Blue: Toe Position X"; - ui_tooltip = "Blue: Toe Position X"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float pos1_toe_blue < - ui_type = "slider"; - ui_label = "Blue: Toe Position Y"; - ui_tooltip = "Blue: Toe Position Y"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.25; - uniform float black_out_blue < - ui_type = "slider"; - ui_label = "Blue: Black Point Offset"; - ui_tooltip = "Blue: Black Point Offset"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 0.0; - uniform float white_out_blue < - ui_type = "slider"; - ui_label = "Blue: White Point Offset"; - ui_tooltip = "Blue: White Point Offset"; - ui_category = "Blue: Contrast Curves"; - ui_min = 0; - ui_max = 255; - ui_step = 1; - > = 255.0; -#endif - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// STRUCTURES ///////////////////////////////////////////////////////////////// - struct TonemapParams - { - float3 mToe; - float2 mMid; - float3 mShoulder; - float2 mBx; - }; - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float3 Tonemap(const TonemapParams tc, float3 x) - { - float3 toe = - tc.mToe.x / (x + tc.mToe.y) + tc.mToe.z; - float3 mid = tc.mMid.x * x + tc.mMid.y; - float3 shoulder = - tc.mShoulder.x / (x + tc.mShoulder.y) + tc.mShoulder.z; - float3 result = ( x >= tc.mBx.x ) ? mid : toe; - result = ( x >= tc.mBx.y ) ? shoulder : result; - return result; - } - - float blackwhiteIN( float c, float b, float w ) - { - return saturate( c - b )/max( w - b, 0.000001f ); - } - - float blackwhiteOUT( float c, float b, float w ) - { - return c * saturate( w - b ) + b; - } - - float3 blackwhiteIN( float3 c, float b, float w ) - { - return saturate( c.xyz - b )/max( w - b, 0.000001f ); - } - - float3 blackwhiteOUT( float3 c, float b, float w ) - { - return c.xyz * saturate( w - b ) + b; - } - - float4 setBoundaries( float tx, float ty, float sx, float sy ) - { - if( tx > sx ) - tx = sx; - if( ty > sy ) - ty = sy; - return float4( tx, ty, sx, sy ); - } - - void PrepareTonemapParams(float2 p1, float2 p2, float2 p3, out TonemapParams tc) - { - float denom = p2.x - p1.x; - denom = abs(denom) > 1e-5 ? denom : 1e-5; - float slope = (p2.y - p1.y) / denom; - { - tc.mMid.x = slope; - tc.mMid.y = p1.y - slope * p1.x; - } - { - float denom = p1.y - slope * p1.x; - denom = abs(denom) > 1e-5 ? denom : 1e-5; - tc.mToe.x = slope * p1.x * p1.x * p1.y * p1.y / (denom * denom); - tc.mToe.y = slope * p1.x * p1.x / denom; - tc.mToe.z = p1.y * p1.y / denom; - } - { - float denom = slope * (p2.x - p3.x) - p2.y + p3.y; - denom = abs(denom) > 1e-5 ? denom : 1e-5; - tc.mShoulder.x = slope * pow(p2.x - p3.x, 2.0) * pow(p2.y - p3.y, 2.0) / (denom * denom); - tc.mShoulder.y = (slope * p2.x * (p3.x - p2.x) + p3.x * (p2.y - p3.y) ) / denom; - tc.mShoulder.z = (-p2.y * p2.y + p3.y * (slope * (p2.x - p3.x) + p2.y) ) / denom; - } - tc.mBx = float2(p1.x, p2.x); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_CurvedLevels(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float2 coords = float2(( texcoord.x - 0.75f ) * 4.0f, ( 1.0f - texcoord.y ) * 4.0f ); // For vizualization - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 1, enable_dither, dither_strength, 1, 0.5f ); - color.xyz = saturate( color.xyz + dnoise.yzx ); - - #if( CURVEDCONTRASTS_VISUALIZE == 1 ) - int def_bi = 0; - int def_wi = 255; - float def_toe0 = 0.25f; - float def_toe1 = 0.25f; - float def_sho0 = 0.75f; - float def_sho1 = 0.75f; - int def_bo = 0; - int def_wo = 255; - float3 showcurve = 0.0f; - #endif - - TonemapParams tc; - - // Grey apply black/white points and curves - float bigr = saturate( black_in_grey/255.0f + dnoise.w ); - float wigr = saturate( white_in_grey/255.0f + dnoise.w ); - float bogr = saturate( black_out_grey/255.0f + dnoise.w ); - float wogr = saturate( white_out_grey/255.0f + dnoise.w ); - - float4 grey = setBoundaries( pos0_toe_grey, pos1_toe_grey, pos0_shoulder_grey, pos1_shoulder_grey ); - PrepareTonemapParams( grey.xy, grey.zw, float2( 1.0f, 1.0f ), tc ); - color.xyz = blackwhiteIN( color.xyz, bigr, wigr ); - color.xyz = Tonemap( tc, color.xyz ); - color.xyz = blackwhiteOUT( color.xyz, bogr, wogr ); - // Visual -#if( CURVEDCONTRASTS_VISUALIZE ) - // Draw a bunch of lines - float4 bandwidth = float4( 0.002f, 0.002f, 0.0002f, 0.0002f ); - bandwidth.y *= ( BUFFER_WIDTH * BUFFER_RCP_HEIGHT ); - bandwidth.w *= ( BUFFER_WIDTH * BUFFER_RCP_HEIGHT ); - if( texcoord.x > 0.75 - bandwidth.x && texcoord.x < 0.75 && 1.0f - texcoord.y < 0.25 ) - color.xyz = float3( 0.7f, 0.7f, 0.7f ); - if( 1.0f - texcoord.y > 0.25 && 1.0f - texcoord.y < 0.25 + bandwidth.y && texcoord.x > 0.75 - bandwidth.x ) - color.xyz = float3( 0.7f, 0.7f, 0.7f ); - if( texcoord.x > 0.875 - bandwidth.z && texcoord.x < 0.875 + bandwidth.z && 1.0f - texcoord.y < 0.25 ) - color.xyz = float3( 1.4f, 1.4f, 1.4f ); - if( 1.0f - texcoord.y > 0.125f - bandwidth.w && 1.0f - texcoord.y < 0.125 + bandwidth.w && texcoord.x > 0.75 ) - color.xyz = float3( 1.4f, 1.4f, 1.4f ); - if( texcoord.x > 0.75 && texcoord.y > 0.75 ) - { - color.xyz *= 0.5f; - color.xyz = lerp( float3( 0.7f, 0.7f, 0.7f ), color.xyz, smoothstep( 0.0f, 10.0f * BUFFER_RCP_HEIGHT, abs( coords.y - coords.x ))); - showcurve.xyz = blackwhiteIN( coords.xxx, black_in_grey/255.0f, white_in_grey/255.0f ); - showcurve.xyz = Tonemap( tc, showcurve.xyz ); - showcurve.xyz = blackwhiteOUT( showcurve.xyz, black_out_grey/255.0f, white_out_grey/255.0f ); - color.xyz = lerp( float3( 1.0f, 1.0f, 1.0f ), color.xyz, smoothstep( 0.0f, 20.0f * BUFFER_RCP_HEIGHT, abs( coords.y - showcurve.x ))); - } -#endif -#if( CURVEDCONTRASTS_ENABLE_RGB ) - // Red - float bir = saturate( black_in_red/255.0f + dnoise.x ); - float wir = saturate( white_in_red/255.0f + dnoise.x ); - float bor = saturate( black_out_red/255.0f + dnoise.x ); - float wor = saturate( white_out_red/255.0f + dnoise.x ); - - float4 red = setBoundaries( pos0_toe_red, pos1_toe_red, pos0_shoulder_red, pos1_shoulder_red ); - PrepareTonemapParams( red.xy, red.zw, float2( 1.0f, 1.0f ), tc ); - color.x = blackwhiteIN( color.x, bir, wir ); - color.x = Tonemap( tc, color.xxx ).x; - color.x = blackwhiteOUT( color.x, bor, wor ); -#if( CURVEDCONTRASTS_VISUALIZE ) - if( any( float4( def_toe0 - pos0_toe_red, def_toe1 - pos1_toe_red, def_sho0 - pos0_shoulder_red, def_sho1 - pos1_shoulder_red )) || - any( int4( def_bi - black_in_red, def_wi - white_in_red, def_bo - black_out_red, def_wo - white_out_red ))) - { - if( texcoord.x > 0.75 && texcoord.y > 0.75 ) - { - showcurve.x = blackwhiteIN( showcurve.xxx, black_in_red/255.0f, white_in_red/255.0f ).x; - showcurve.x = Tonemap( tc, showcurve.xxx ).x; - showcurve.x = blackwhiteOUT( showcurve.xxx, black_out_red/255.0f, white_out_red/255.0f ).x; - color.xyz = lerp( float3( 1.0f, 0.0f, 0.0f ), color.xyz, smoothstep( 0.0f, 20.0f * BUFFER_RCP_HEIGHT, abs( coords.y - showcurve.x ))); - } - } -#endif - // Green - float big = saturate( black_in_green/255.0f + dnoise.y ); - float wig = saturate( white_in_green/255.0f + dnoise.y ); - float bog = saturate( black_out_green/255.0f + dnoise.y ); - float wog = saturate( white_out_green/255.0f + dnoise.y ); - - float4 green = setBoundaries( pos0_toe_green, pos1_toe_green, pos0_shoulder_green, pos1_shoulder_green ); - PrepareTonemapParams( green.xy, green.zw, float2( 1.0f, 1.0f ), tc ); - color.y = blackwhiteIN( color.y, big, wig ); - color.y = Tonemap( tc, color.yyy ).y; - color.y = blackwhiteOUT( color.y, bog, wog ); -#if( CURVEDCONTRASTS_VISUALIZE ) - if( any( float4( def_toe0 - pos0_toe_green, def_toe1 - pos1_toe_green, def_sho0 - pos0_shoulder_green, def_sho1 - pos1_shoulder_green )) || - any( int4( def_bi - black_in_green, def_wi - white_in_green, def_bo - black_out_green, def_wo - white_out_green ))) - { - if( texcoord.x > 0.75 && texcoord.y > 0.75 ) - { - showcurve.y = blackwhiteIN( showcurve.yyy, black_in_green/255.0f, white_in_green/255.0f ).y; - showcurve.y = Tonemap( tc, showcurve.yyy ).y; - showcurve.y = blackwhiteOUT( showcurve.yyy, black_out_green/255.0f, white_out_green/255.0f ).y; - color.xyz = lerp( float3( 0.0f, 1.0f, 0.0f ), color.xyz, smoothstep( 0.0f, 20.0f * BUFFER_RCP_HEIGHT, abs( coords.y - showcurve.y ))); - } - } -#endif - // Blue - float bib = saturate( black_in_blue/255.0f + dnoise.z ); - float wib = saturate( white_in_blue/255.0f + dnoise.z ); - float bob = saturate( black_out_blue/255.0f + dnoise.z ); - float wob = saturate( white_out_blue/255.0f + dnoise.z ); - - float4 blue = setBoundaries( pos0_toe_blue, pos1_toe_blue, pos0_shoulder_blue, pos1_shoulder_blue ); - PrepareTonemapParams( blue.xy, blue.zw, float2( 1.0f, 1.0f ), tc ); - color.z = blackwhiteIN( color.z, bib, wib ); - color.z = Tonemap( tc, color.zzz ).z; - color.z = blackwhiteOUT( color.z, bob, wob ); -#if( CURVEDCONTRASTS_VISUALIZE ) - if( any( float4( def_toe0 - pos0_toe_blue, def_toe1 - pos1_toe_blue, def_sho0 - pos0_shoulder_blue, def_sho1 - pos1_shoulder_blue )) || - any( int4( def_bi - black_in_blue, def_wi - white_in_blue, def_bo - black_out_blue, def_wo - white_out_blue ))) - { - if( texcoord.x > 0.75 && texcoord.y > 0.75 ) - { - showcurve.z = blackwhiteIN( showcurve.zzz, black_in_blue/255.0f, white_in_blue/255.0f ).z; - showcurve.z = Tonemap( tc, showcurve.zzz ).z; - showcurve.z = blackwhiteOUT( showcurve.zzz, black_out_blue/255.0f, white_out_blue/255.0f ).z; - color.xyz = lerp( float3( 0.0f, 0.0f, 1.0f ), color.xyz, smoothstep( 0.0f, 20.0f * BUFFER_RCP_HEIGHT, abs( coords.y - showcurve.z ))); - } - } -#endif -#endif - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_03_CurvedLevels - { - pass prod80_CCpass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_CurvedLevels; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_03_Filmic_Adaptation.fx b/data/reshade/shaders/Effects/PD80_03_Filmic_Adaptation.fx deleted file mode 100644 index a1ba4d09..00000000 --- a/data/reshade/shaders/Effects/PD80_03_Filmic_Adaptation.fx +++ /dev/null @@ -1,170 +0,0 @@ -/* - Description : PD80 03 Filmic Adaptation for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional credits (exposure) - - Padraic Hennessy for the logic - https://placeholderart.wordpress.com/2014/11/21/implementing-a-physically-based-camera-manual-exposure/ - - Padraic Hennessy for the logic - https://placeholderart.wordpress.com/2014/12/15/implementing-a-physically-based-camera-automatic-exposure/ - - MJP and David Neubelt for the method - https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/Exposure.hlsl - License: MIT, Copyright (c) 2016 MJP - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" - -namespace pd80_filmicadaptation -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform float adj_shoulder < - ui_label = "Adjust Highlights"; - ui_tooltip = "Adjust Highlights"; - ui_category = "Tonemapping"; - ui_type = "slider"; - ui_min = 1.0; - ui_max = 5.0; - > = 1.0; - uniform float adj_linear < - ui_label = "Adjust Linearity"; - ui_tooltip = "Adjust Linearity"; - ui_category = "Tonemapping"; - ui_type = "slider"; - ui_min = 1.0; - ui_max = 10.0; - > = 1.0; - uniform float adj_toe < - ui_label = "Adjust Shadows"; - ui_tooltip = "Adjust Shadows"; - ui_category = "Tonemapping"; - ui_type = "slider"; - ui_min = 1.0; - ui_max = 5.0; - > = 1.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texLuma { Width = 256; Height = 256; Format = R16F; MipLevels = 9; }; - texture texAvgLuma { Format = R16F; }; - texture texPrevAvgLuma { Format = R16F; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerLinColor { Texture = ReShade::BackBufferTex; SRGBTexture = true; }; - sampler samplerLuma { Texture = texLuma; }; - sampler samplerAvgLuma { Texture = texAvgLuma; }; - sampler samplerPrevAvgLuma { Texture = texPrevAvgLuma; }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define LumCoeff float3(0.212656, 0.715158, 0.072186) - uniform float Frametime < source = "frametime"; >; - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float getLuminance( in float3 x ) - { - return dot( x, LumCoeff ); - } - - float3 Filmic( in float3 Fc, in float FA, in float FB, in float FC, in float FD, in float FE, in float FF, in float FWhite ) - { - float3 num = (( Fc * ( FA * Fc + FC * FB ) + FD * FE ) / ( Fc * ( FA * Fc + FB ) + FD * FF )) - FE / FF; - float3 denom = (( FWhite * ( FA * FWhite + FC * FB ) + FD * FE ) / ( FWhite * ( FA * FWhite + FB ) + FD * FF )) - FE / FF; - return num / denom; - //return num / denom; - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float PS_WriteLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( samplerLinColor, texcoord ); - float luma = getLuminance( color.xyz ); - luma = max( luma, 0.06f ); // give it a min value so that too dark scenes don't count too much against average - return log2( luma ); //writes to 256x256 texture - } - - float PS_AvgLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float luma = tex2Dlod( samplerLuma, float4(0.5f, 0.5f, 0, 8 )).x; - luma = exp2( luma ); - float prevluma = tex2D( samplerPrevAvgLuma, float2( 0.5f, 0.5f )).x; - float fps = 1000.0f / Frametime; - float delay = fps; //* 0.5f - float avgLuma = lerp( prevluma, luma, 1.0f / delay ); - return avgLuma; - } - - float4 PS_Tonemap(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - // Filmic operators, most fixed with no GUI - float A = 0.65f * adj_shoulder; - float B = 0.085f * adj_linear; - float C = 1.83f; - float D = 0.55f * adj_toe; - float E = 0.05f; - float F = 0.57f; - float W = 1.0f; // working in LDR space, white should be 1.0 - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float luma = tex2D( samplerAvgLuma, float2( 0.5f, 0.5f )).x; - float exp = lerp( 1.0f, 8.0f, luma ); // Increase Toe when brightness goes up (increase contrast) - float toe = max( D * exp, D ); // Increase toe, effect is mild even though there's a potential 8x increase here - color.xyz = Filmic( color.xyz, A, B, C, toe, E, F, W ); - - return float4( color.xyz, 1.0f ); - } - - float PS_PrevAvgLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float avgLuma = tex2D( samplerAvgLuma, float2( 0.5f, 0.5f )).x; - return avgLuma; - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_03_FilmicTonemap - { - pass Luma - { - VertexShader = PostProcessVS; - PixelShader = PS_WriteLuma; - RenderTarget = texLuma; - } - pass AvgLuma - { - VertexShader = PostProcessVS; - PixelShader = PS_AvgLuma; - RenderTarget = texAvgLuma; - } - pass Tonemapping - { - VertexShader = PostProcessVS; - PixelShader = PS_Tonemap; - } - pass PreviousLuma - { - VertexShader = PostProcessVS; - PixelShader = PS_PrevAvgLuma; - RenderTarget = texPrevAvgLuma; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_03_Levels.fx b/data/reshade/shaders/Effects/PD80_03_Levels.fx deleted file mode 100644 index c8039e13..00000000 --- a/data/reshade/shaders/Effects/PD80_03_Levels.fx +++ /dev/null @@ -1,220 +0,0 @@ -/* - Description : PD80 03 Levels for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" - -namespace pd80_levels -{ - - /* - Using depth texture to manipulate levels: - This feature is very dodgy, so hidden by default - It's added for people specilized in screenshots and able to understand - that using depth buffer can be odd on something like Levels - Uncomment ( remove "//" ) the line below to enable this feature - */ - #ifndef LEVELS_USE_DEPTH - #define LEVELS_USE_DEPTH 0 //0 = disable, 1 = enable - #endif - - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - uniform float3 ib < - ui_type = "color"; - ui_label = "Black IN Level"; - ui_tooltip = "Black IN Level"; - ui_category = "Levels"; - > = float3(0.0, 0.0, 0.0); - uniform float3 iw < - ui_type = "color"; - ui_label = "White IN Level"; - ui_tooltip = "White IN Level"; - ui_category = "Levels"; - > = float3(1.0, 1.0, 1.0); - uniform float3 ob < - ui_type = "color"; - ui_label = "Black OUT Level"; - ui_tooltip = "Black OUT Level"; - ui_category = "Levels"; - > = float3(0.0, 0.0, 0.0); - uniform float3 ow < - ui_type = "color"; - ui_label = "White OUT Level"; - ui_tooltip = "White OUT Level"; - ui_category = "Levels"; - > = float3(1.0, 1.0, 1.0); - uniform float ig < - ui_label = "Gamma Adjustment"; - ui_tooltip = "Gamma Adjustment"; - ui_category = "Levels"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 10.0; - > = 1.0; - #if( LEVELS_USE_DEPTH == 1 ) - uniform bool display_depth < - ui_label = "Show depth texture.\nThe below adjustments only apply to white areas.\0Make sure you have your depth texture setup correctly."; - ui_tooltip = "Show depth texture"; - ui_category = "Levels: Depth"; - > = false; - uniform float depthStart < - ui_type = "slider"; - ui_label = "Change Depth Start Plane"; - ui_tooltip = "Change Depth Start Plane"; - ui_category = "Levels: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.0; - uniform float depthEnd < - ui_type = "slider"; - ui_label = "Change Depth End Plane"; - ui_tooltip = "Change Depth End Plane"; - ui_category = "Levels: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.1; - uniform float depthCurve < - ui_label = "Depth Curve Adjustment"; - ui_tooltip = "Depth Curve Adjustment"; - ui_category = "Levels: Depth"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 8.0; - > = 1.0; - uniform float3 ibd < - ui_type = "color"; - ui_label = "Black IN Level Far"; - ui_tooltip = "Black IN Level Far"; - ui_category = "Levels: Far"; - > = float3(0.0, 0.0, 0.0); - uniform float3 iwd < - ui_type = "color"; - ui_label = "White IN Level Far"; - ui_tooltip = "White IN Level Far"; - ui_category = "Levels: Far"; - > = float3(1.0, 1.0, 1.0); - uniform float3 obd < - ui_type = "color"; - ui_label = "Black OUT Level Far"; - ui_tooltip = "Black OUT Level Far"; - ui_category = "Levels: Far"; - > = float3(0.0, 0.0, 0.0); - uniform float3 owd < - ui_type = "color"; - ui_label = "White OUT Level Far"; - ui_tooltip = "White OUT Level Far"; - ui_category = "Levels: Far"; - > = float3(1.0, 1.0, 1.0); - uniform float igd < - ui_label = "Gamma Adjustment Far"; - ui_tooltip = "Gamma Adjustment Far"; - ui_category = "Levels: Far"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 10.0; - > = 1.0; - #endif - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - uniform float2 pingpong < source = "pingpong"; min = 0; max = 128; step = 1; >; - - float3 levels( float3 color, float3 blackin, float3 whitein, float gamma, float3 outblack, float3 outwhite ) - { - float3 ret = saturate( color.xyz - blackin.xyz ) / max( whitein.xyz - blackin.xyz, 0.000001f ); - ret.xyz = pow( ret.xyz, gamma ); - ret.xyz = ret.xyz * saturate( outwhite.xyz - outblack.xyz ) + outblack.xyz; - return ret; - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_Levels(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 2, enable_dither, dither_strength, 1, 0.5f ); - - #if( LEVELS_USE_DEPTH == 1 ) - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - depth = smoothstep( depthStart, depthEnd, depth ); - depth = pow( depth, depthCurve ); - depth = saturate( depth + dnoise.w ); - #endif - - color.xyz = saturate( color.xyz + dnoise.w ); - float3 dcolor = color.xyz; - color.xyz = levels( color.xyz, saturate( ib.xyz + dnoise.xyz ), - saturate( iw.xyz + dnoise.yzx ), - ig, - saturate( ob.xyz + dnoise.zxy ), - saturate( ow.xyz + dnoise.wxz )); - - #if( LEVELS_USE_DEPTH == 1 ) - dcolor.xyz = levels( dcolor.xyz, saturate( ibd.xyz + dnoise.xyz ), - saturate( iwd.xyz + dnoise.yzx ), - igd, - saturate( obd.xyz + dnoise.zxy ), - saturate( owd.xyz + dnoise.wxz )); - - color.xyz = lerp( color.xyz, dcolor.xyz, depth ); - color.xyz = lerp( color.xyz, depth.xxx, display_depth ); - #endif - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_03_Levels - { - pass DoLevels - { - VertexShader = PostProcessVS; - PixelShader = PS_Levels; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_03_Shadows_Midtones_Highlights.fx b/data/reshade/shaders/Effects/PD80_03_Shadows_Midtones_Highlights.fx deleted file mode 100644 index 7af6ec6f..00000000 --- a/data/reshade/shaders/Effects/PD80_03_Shadows_Midtones_Highlights.fx +++ /dev/null @@ -1,412 +0,0 @@ -/* - Description : PD80 03 Shadows Midtones Highlights for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" -#include "PD80_00_Blend_Modes.fxh" -#include "PD80_00_Base_Effects.fxh" - -namespace pd80_SMH -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int luma_mode < __UNIFORM_COMBO_INT1 - ui_label = "Luma Mode"; - ui_tooltip = "Luma Mode"; - ui_category = "Global"; - ui_items = "Use Average\0Use Perceived Luma\0Use Max Value\0"; - > = 2; - uniform int separation_mode < __UNIFORM_COMBO_INT1 - ui_label = "Luma Separation Mode"; - ui_tooltip = "Luma Separation Mode"; - ui_category = "Global"; - ui_items = "Harsh Separation\0Smooth Separation\0"; - > = 0; - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 2.0; - uniform float exposure_s < - ui_label = "Exposure"; - ui_tooltip = "Shadow Exposure"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = -4.0; - ui_max = 4.0; - > = 0.0; - uniform float contrast_s < - ui_label = "Contrast"; - ui_tooltip = "Shadow Contrast"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float brightness_s < - ui_label = "Brightness"; - ui_tooltip = "Shadow Brightness"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float3 blendcolor_s < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Shadow Color"; - ui_category = "Shadow Adjustments"; - > = float3( 0.0, 0.365, 1.0 ); - uniform int blendmode_s < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Shadow Blendmode"; - ui_category = "Shadow Adjustments"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 0; - uniform float opacity_s < - ui_label = "Opacity"; - ui_tooltip = "Shadow Opacity"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float tint_s < - ui_label = "Tint"; - ui_tooltip = "Shadow Tint"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float saturation_s < - ui_label = "Saturation"; - ui_tooltip = "Shadow Saturation"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float vibrance_s < - ui_label = "Vibrance"; - ui_tooltip = "Shadow Vibrance"; - ui_category = "Shadow Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float exposure_m < - ui_label = "Exposure"; - ui_tooltip = "Midtone Exposure"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = -4.0; - ui_max = 4.0; - > = 0.0; - uniform float contrast_m < - ui_label = "Contrast"; - ui_tooltip = "Midtone Contrast"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float brightness_m < - ui_label = "Brightness"; - ui_tooltip = "Midtone Brightness"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float3 blendcolor_m < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Midtone Color"; - ui_category = "Midtone Adjustments"; - > = float3( 0.98, 0.588, 0.0 ); - uniform int blendmode_m < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Midtone Blendmode"; - ui_category = "Midtone Adjustments"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 0; - uniform float opacity_m < - ui_label = "Opacity"; - ui_tooltip = "Midtone Opacity"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float tint_m < - ui_label = "Tint"; - ui_tooltip = "Midtone Tint"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float saturation_m < - ui_label = "Saturation"; - ui_tooltip = "Midtone Saturation"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float vibrance_m < - ui_label = "Vibrance"; - ui_tooltip = "Midtone Vibrance"; - ui_category = "Midtone Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float exposure_h < - ui_label = "Exposure"; - ui_tooltip = "Highlight Exposure"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = -4.0; - ui_max = 4.0; - > = 0.0; - uniform float contrast_h < - ui_label = "Contrast"; - ui_tooltip = "Highlight Contrast"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float brightness_h < - ui_label = "Brightness"; - ui_tooltip = "Highlight Brightness"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float3 blendcolor_h < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Highlight Color"; - ui_category = "Highlight Adjustments"; - > = float3( 1.0, 1.0, 1.0 ); - uniform int blendmode_h < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Highlight Blendmode"; - ui_category = "Highlight Adjustments"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 0; - uniform float opacity_h < - ui_label = "Opacity"; - ui_tooltip = "Highlight Opacity"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float tint_h < - ui_label = "Tint"; - ui_tooltip = "Highlight Tint"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float saturation_h < - ui_label = "Saturation"; - ui_tooltip = "Highlight Saturation"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float vibrance_h < - ui_label = "Vibrance"; - ui_tooltip = "Highlight Vibrance"; - ui_category = "Highlight Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - uniform float2 pingpong < source = "pingpong"; min = 0; max = 128; step = 1; >; - - float getLuminance( in float3 x ) - { - return dot( x, float3( 0.212656, 0.715158, 0.072186 )); - } - - float curve( float x ) - { - return x * x * x * ( x * ( x * 6.0f - 15.0f ) + 10.0f ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_SMH(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - color.xyz = saturate( color.xyz ); - - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 3, enable_dither, dither_strength, 1, 0.5f ); - color.xyz = saturate( color.xyz + dnoise.xyz ); - - float pLuma = 0.0f; - switch( luma_mode ) - { - case 0: // Use average - { - pLuma = dot( color.xyz, float3( 0.333333f, 0.333334f, 0.333333f )); - } - break; - case 1: // Use perceived luma - { - pLuma = getLuminance( color.xyz ); - } - break; - case 2: // Use max - { - pLuma = max( max( color.x, color.y ), color.z ); - } - break; - } - - float weight_s; float weight_h; float weight_m; - - switch( separation_mode ) - { - /* - Clear cutoff between shadows and highlights - Maximizes precision at the loss of harsher transitions between contrasts - Curves look like: - - Shadows Highlights Midtones - ‾‾‾—_ _—‾‾‾ _——‾‾‾——_ - ‾‾——__________ __________——‾‾ ___—‾ ‾—___ - 0.0.....0.5.....1.0 0.0.....0.5.....1.0 0.0.....0.5.....1.0 - - */ - case 0: - { - weight_s = curve( max( 1.0f - pLuma * 2.0f, 0.0f )); - weight_h = curve( max(( pLuma - 0.5f ) * 2.0f, 0.0f )); - weight_m = saturate( 1.0f - weight_s - weight_h ); - } break; - - /* - Higher degree of blending between individual curves - F.e. shadows will still have a minimal weight all the way into highlight territory - Ensures smoother transition areas between contrasts - Curves look like: - - Shadows Highlights Midtones - ‾‾‾—_ _—‾‾‾ __---__ - ‾‾———————_____ _____———————‾‾ ___-‾‾ ‾‾-___ - 0.0.....0.5.....1.0 0.0.....0.5.....1.0 0.0.....0.5.....1.0 - - */ - case 1: - { - weight_s = pow( 1.0f - pLuma, 4.0f ); - weight_h = pow( pLuma, 4.0f ); - weight_m = saturate( 1.0f - weight_s - weight_h ); - } break; - } - - float3 cold = float3( 0.0f, 0.365f, 1.0f ); //LBB - float3 warm = float3( 0.98f, 0.588f, 0.0f ); //LBA - - // Shadows - color.xyz = exposure( color.xyz, exposure_s * weight_s ); - color.xyz = con( color.xyz, contrast_s * weight_s ); - color.xyz = bri( color.xyz, brightness_s * weight_s ); - color.xyz = blendmode( color.xyz, blendcolor_s.xyz, blendmode_s, opacity_s * weight_s ); - if( tint_s < 0.0f ) - color.xyz = lerp( color.xyz, softlight( color.xyz, cold.xyz ), abs( tint_s * weight_s )); - else - color.xyz = lerp( color.xyz, softlight( color.xyz, warm.xyz ), tint_s * weight_s ); - color.xyz = sat( color.xyz, saturation_s * weight_s ); - color.xyz = vib( color.xyz, vibrance_s * weight_s ); - - // Midtones - color.xyz = exposure( color.xyz, exposure_m * weight_m ); - color.xyz = con( color.xyz, contrast_m * weight_m ); - color.xyz = bri( color.xyz, brightness_m * weight_m ); - color.xyz = blendmode( color.xyz, blendcolor_m.xyz, blendmode_m, opacity_m * weight_m ); - if( tint_m < 0.0f ) - color.xyz = lerp( color.xyz, softlight( color.xyz, cold.xyz ), abs( tint_m * weight_m )); - else - color.xyz = lerp( color.xyz, softlight( color.xyz, warm.xyz ), tint_m * weight_m ); - color.xyz = sat( color.xyz, saturation_m * weight_m ); - color.xyz = vib( color.xyz, vibrance_m * weight_m ); - - // Highlights - color.xyz = exposure( color.xyz, exposure_h * weight_h ); - color.xyz = con( color.xyz, contrast_h * weight_h ); - color.xyz = bri( color.xyz, brightness_h * weight_h ); - color.xyz = blendmode( color.xyz, blendcolor_h.xyz, blendmode_h, opacity_h * weight_h ); - if( tint_h < 0.0f ) - color.xyz = lerp( color.xyz, softlight( color.xyz, cold.xyz ), abs( tint_h * weight_h )); - else - color.xyz = lerp( color.xyz, softlight( color.xyz, warm.xyz ), tint_h * weight_h ); - color.xyz = sat( color.xyz, saturation_h * weight_h ); - color.xyz = vib( color.xyz, vibrance_h * weight_h ); - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_03_Shadows_Midtones_Highlights - { - pass prod80_pass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_SMH; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_04_BlacknWhite.fx b/data/reshade/shaders/Effects/PD80_04_BlacknWhite.fx deleted file mode 100644 index 58e04ff2..00000000 --- a/data/reshade/shaders/Effects/PD80_04_BlacknWhite.fx +++ /dev/null @@ -1,378 +0,0 @@ -/* - Description : PD80 04 Black & White for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_blackandwhite -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - uniform float curve_str < - ui_type = "slider"; - ui_label = "Contrast Smoothness"; - ui_tooltip = "Contrast Smoothness"; - ui_category = "Global"; - ui_min = 1.0f; - ui_max = 4.0f; - > = 1.5f; - uniform bool show_clip < - ui_label = "Show Clipping Mask"; - ui_tooltip = "Show Clipping Mask"; - ui_category = "Global"; - > = false; - uniform int bw_mode < __UNIFORM_COMBO_INT1 - ui_label = "Black & White Conversion"; - ui_tooltip = "Black & White Conversion"; - ui_category = "Black & White Techniques"; - ui_items = "Red Filter\0Green Filter\0Blue Filter\0High Contrast Red Filter\0High Contrast Green Filter\0High Contrast Blue Filter\0Infrared\0Maximum Black\0Maximum White\0Preserve Luminosity\0Neutral Green Filter\0Maintain Contrasts\0High Contrast\0Custom\0"; - > = 13; - uniform float redchannel < - ui_type = "slider"; - ui_label = "Custom: Red Weight"; - ui_tooltip = "Custom: Red Weight"; - ui_category = "Black & White Techniques"; - ui_min = -2.0f; - ui_max = 3.0f; - > = 0.2f; - uniform float yellowchannel < - ui_type = "slider"; - ui_label = "Custom: Yellow Weight"; - ui_tooltip = "Custom: Yellow Weight"; - ui_category = "Black & White Techniques"; - ui_min = -2.0f; - ui_max = 3.0f; - > = 0.4f; - uniform float greenchannel < - ui_type = "slider"; - ui_label = "Custom: Green Weight"; - ui_tooltip = "Custom: Green Weight"; - ui_category = "Black & White Techniques"; - ui_min = -2.0f; - ui_max = 3.0f; - > = 0.6f; - uniform float cyanchannel < - ui_type = "slider"; - ui_label = "Custom: Cyan Weight"; - ui_tooltip = "Custom: Cyan Weight"; - ui_category = "Black & White Techniques"; - ui_min = -2.0f; - ui_max = 3.0f; - > = 0.0f; - uniform float bluechannel < - ui_type = "slider"; - ui_label = "Custom: Blue Weight"; - ui_tooltip = "Custom: Blue Weight"; - ui_category = "Black & White Techniques"; - ui_min = -2.0f; - ui_max = 3.0f; - > = -0.6f; - uniform float magentachannel < - ui_type = "slider"; - ui_label = "Custom: Magenta Weight"; - ui_tooltip = "Custom: Magenta Weight"; - ui_category = "Black & White Techniques"; - ui_min = -2.0f; - ui_max = 3.0f; - > = -0.2f; - uniform bool use_tint < - ui_label = "Enable Tinting"; - ui_tooltip = "Enable Tinting"; - ui_category = "Tint"; - > = false; - uniform float tinthue < - ui_type = "slider"; - ui_label = "Tint Hue"; - ui_tooltip = "Tint Hue"; - ui_category = "Tint"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.083f; - uniform float tintsat < - ui_type = "slider"; - ui_label = "Tint Saturation"; - ui_tooltip = "Tint Saturation"; - ui_category = "Tint"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.12f; - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - uniform float2 pingpong < source = "pingpong"; min = 0; max = 128; step = 1; >; - - // Credit to user 'iq' from shadertoy - // See https://www.shadertoy.com/view/MdBfR1 - float curve( float x, float k ) - { - float s = sign( x - 0.5f ); - float o = ( 1.0f + s ) / 2.0f; - return o - 0.5f * s * pow( max( 2.0f * ( o - s * x ), 0.0f ), k ); - } - - float3 ProcessBW( float3 col, float r, float y, float g, float c, float b, float m ) - { - float3 hsl = RGBToHSL( col.xyz ); - // Inverse of luma channel to no apply boosts to intensity on already intense brightness (and blow out easily) - float lum = 1.0f - hsl.z; - - // Calculate the individual weights per color component in RGB and CMY - // Sum of all the weights for a given hue is 1.0 - float weight_r = curve( max( 1.0f - abs( hsl.x * 6.0f ), 0.0f ), curve_str ) + - curve( max( 1.0f - abs(( hsl.x - 1.0f ) * 6.0f ), 0.0f ), curve_str ); - float weight_y = curve( max( 1.0f - abs(( hsl.x - 0.166667f ) * 6.0f ), 0.0f ), curve_str ); - float weight_g = curve( max( 1.0f - abs(( hsl.x - 0.333333f ) * 6.0f ), 0.0f ), curve_str ); - float weight_c = curve( max( 1.0f - abs(( hsl.x - 0.5f ) * 6.0f ), 0.0f ), curve_str ); - float weight_b = curve( max( 1.0f - abs(( hsl.x - 0.666667f ) * 6.0f ), 0.0f ), curve_str ); - float weight_m = curve( max( 1.0f - abs(( hsl.x - 0.833333f ) * 6.0f ), 0.0f ), curve_str ); - - // No saturation (greyscale) should not influence B&W image - float sat = hsl.y * ( 1.0f - hsl.y ) + hsl.y; - float ret = hsl.z; - ret += ( hsl.z * ( weight_r * r ) * sat * lum ); - ret += ( hsl.z * ( weight_y * y ) * sat * lum ); - ret += ( hsl.z * ( weight_g * g ) * sat * lum ); - ret += ( hsl.z * ( weight_c * c ) * sat * lum ); - ret += ( hsl.z * ( weight_b * b ) * sat * lum ); - ret += ( hsl.z * ( weight_m * m ) * sat * lum ); - - return saturate( ret ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_BlackandWhite(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - color.xyz = saturate( color.xyz ); - - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 4, enable_dither, dither_strength, 1, 0.5f ); - color.xyz = saturate( color.xyz + dnoise.zyx ); - - float red; float yellow; float green; - float cyan; float blue; float magenta; - - switch( bw_mode ) - { - case 0: // Red Filter - { - red = 0.2f; - yellow = 0.5f; - green = -0.2f; - cyan = -0.6f; - blue = -1.0f; - magenta = -0.2f; - } - break; - case 1: // Green Filter - { - red = -0.5f; - yellow = 0.5f; - green = 1.2f; - cyan = -0.2f; - blue = -1.0f; - magenta = -0.5f; - } - break; - case 2: // Blue Filter - { - red = -0.2f; - yellow = 0.4f; - green = -0.6f; - cyan = 0.5f; - blue = 1.0f; - magenta = -0.2f; - } - break; - case 3: // High Contrast Red Filter - { - red = 0.5f; - yellow = 1.2f; - green = -0.5f; - cyan = -1.0f; - blue = -1.5f; - magenta = -1.0f; - } - break; - case 4: // High Contrast Green Filter - { - red = -1.0f; - yellow = 1.0f; - green = 1.2f; - cyan = -0.2f; - blue = -1.5f; - magenta = -1.0f; - } - break; - case 5: // High Contrast Blue Filter - { - red = -0.7f; - yellow = 0.4f; - green = -1.2f; - cyan = 0.7f; - blue = 1.2f; - magenta = -0.2f; - } - break; - case 6: // Infrared - { - red = -1.35f; - yellow = 2.35f; - green = 1.35f; - cyan = -1.35f; - blue = -1.6f; - magenta = -1.07f; - } - break; - case 7: // Maximum Black - { - red = -1.0f; - yellow = -1.0f; - green = -1.0f; - cyan = -1.0f; - blue = -1.0f; - magenta = -1.0f; - } - break; - case 8: // Maximum White - { - red = 1.0f; - yellow = 1.0f; - green = 1.0f; - cyan = 1.0f; - blue = 1.0f; - magenta = 1.0f; - } - break; - case 9: // Preserve Luminosity - { - red = -0.7f; - yellow = 0.9f; - green = 0.6f; - cyan = 0.1f; - blue = -0.4f; - magenta = -0.4f; - } - break; - case 10: // Neutral Green Filter - { - red = 0.2f; - yellow = 0.4f; - green = 0.6f; - cyan = 0.0f; - blue = -0.6f; - magenta = -0.2f; - } - break; - case 11: // Maintain Contrasts - { - red = -0.3f; - yellow = 1.0f; - green = -0.3f; - cyan = -0.6f; - blue = -1.0f; - magenta = -0.6f; - } - break; - case 12: // High Contrast - { - red = -0.3f; - yellow = 2.6f; - green = -0.3f; - cyan = -1.2f; - blue = -0.6f; - magenta = -0.4f; - } - break; - case 13: // Custom Filter - { - red = redchannel; - yellow = yellowchannel; - green = greenchannel; - cyan = cyanchannel; - blue = bluechannel; - magenta = magentachannel; - } - break; - default: - { - red = redchannel; - yellow = yellowchannel; - green = greenchannel; - cyan = cyanchannel; - blue = bluechannel; - magenta = magentachannel; - } - break; - } - // Do the Black & White - color.xyz = ProcessBW( color.xyz, red, yellow, green, cyan, blue, magenta ); - // Do the tinting - color.xyz = lerp( color.xyz, HSLToRGB( float3( tinthue, tintsat, color.x )), use_tint ); - if( show_clip ) - { - float h = 0.98f; - float l = 0.01f; - color.xyz = min( min( color.x, color.y ), color.z ) >= h ? lerp( color.xyz, float3( 1.0f, 0.0f, 0.0f ), smoothstep( h, 1.0f, min( min( color.x, color.y ), color.z ))) : color.xyz; - color.xyz = max( max( color.x, color.y ), color.z ) <= l ? lerp( float3( 0.0f, 0.0f, 1.0f ), color.xyz, smoothstep( 0.0f, l, max( max( color.x, color.y ), color.z ))) : color.xyz; - } - color.xyz = saturate( color.xyz + dnoise.xyz ); - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_Black_and_White - { - pass prod80_BlackandWhite - { - VertexShader = PostProcessVS; - PixelShader = PS_BlackandWhite; - } - } -} diff --git a/data/reshade/shaders/Effects/PD80_04_Color_Balance.fx b/data/reshade/shaders/Effects/PD80_04_Color_Balance.fx deleted file mode 100644 index f9e47b21..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Color_Balance.fx +++ /dev/null @@ -1,221 +0,0 @@ -/* - Description : PD80 04 Color Balance for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" - -namespace pd80_colorbalance -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENS ///////////////////////////////////////////////////////////////// - uniform bool preserve_luma < - ui_label = "Preserve Luminosity"; - ui_tooltip = "Preserve Luminosity"; - ui_category = "Color Balance"; - > = true; - uniform int separation_mode < __UNIFORM_COMBO_INT1 - ui_label = "Luma Separation Mode"; - ui_tooltip = "Luma Separation Mode"; - ui_category = "Color Balance"; - ui_items = "Harsh Separation\0Smooth Separation\0"; - > = 0; - uniform float s_RedShift < - ui_label = "Cyan <--> Red"; - ui_tooltip = "Shadows: Cyan <--> Red"; - ui_category = "Shadows"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float s_GreenShift < - ui_label = "Magenta <--> Green"; - ui_tooltip = "Shadows: Magenta <--> Green"; - ui_category = "Shadows"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float s_BlueShift < - ui_label = "Yellow <--> Blue"; - ui_tooltip = "Shadows: Yellow <--> Blue"; - ui_category = "Shadows"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float m_RedShift < - ui_label = "Cyan <--> Red"; - ui_tooltip = "Midtones: Cyan <--> Red"; - ui_category = "Midtones"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float m_GreenShift < - ui_label = "Magenta <--> Green"; - ui_tooltip = "Midtones: Magenta <--> Green"; - ui_category = "Midtones"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float m_BlueShift < - ui_label = "Yellow <--> Blue"; - ui_tooltip = "Midtones: Yellow <--> Blue"; - ui_category = "Midtones"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float h_RedShift < - ui_label = "Cyan <--> Red"; - ui_tooltip = "Highlights: Cyan <--> Red"; - ui_category = "Highlights"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float h_GreenShift < - ui_label = "Magenta <--> Green"; - ui_tooltip = "Highlights: Magenta <--> Green"; - ui_category = "Highlights"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float h_BlueShift < - ui_label = "Yellow <--> Blue"; - ui_tooltip = "Highlights: Yellow <--> Blue"; - ui_category = "Highlights"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define ES_RGB float3( 1.0 - float3( 0.299, 0.587, 0.114 )) - #define ES_CMY float3( dot( ES_RGB.yz, 0.5 ), dot( ES_RGB.xz, 0.5 ), dot( ES_RGB.xy, 0.5 )) - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float3 curve( float3 x ) - { - return x * x * ( 3.0f - 2.0f * x ); - } - - float3 ColorBalance( float3 c, float3 shadows, float3 midtones, float3 highlights ) - { - // For highlights - float luma = dot( c.xyz, float3( 0.333333f, 0.333334f, 0.333333f )); - - // Determine the distribution curves between shadows, midtones, and highlights - float3 dist_s; float3 dist_h; - - switch( separation_mode ) - { - /* - Clear cutoff between shadows and highlights - Maximizes precision at the loss of harsher transitions between contrasts - Curves look like: - - Shadows Highlights Midtones - ‾‾‾—_ _—‾‾‾ _——‾‾‾——_ - ‾‾——__________ __________——‾‾ ___—‾ ‾—___ - 0.0.....0.5.....1.0 0.0.....0.5.....1.0 0.0.....0.5.....1.0 - - */ - case 0: - { - dist_s.xyz = curve( max( 1.0f - c.xyz * 2.0f, 0.0f )); - dist_h.xyz = curve( max(( c.xyz - 0.5f ) * 2.0f, 0.0f )); - } break; - - /* - Higher degree of blending between individual curves - F.e. shadows will still have a minimal weight all the way into highlight territory - Ensures smoother transition areas between contrasts - Curves look like: - - Shadows Highlights Midtones - ‾‾‾—_ _—‾‾‾ __---__ - ‾‾———————_____ _____———————‾‾ ___-‾‾ ‾‾-___ - 0.0.....0.5.....1.0 0.0.....0.5.....1.0 0.0.....0.5.....1.0 - - */ - case 1: - { - dist_s.xyz = pow( 1.0f - c.xyz, 4.0f ); - dist_h.xyz = pow( c.xyz, 4.0f ); - } break; - } - - // Get luminosity offsets - // One could omit this whole code part in case no luma should be preserved - float3 s_rgb = 1.0f; - float3 m_rgb = 1.0f; - float3 h_rgb = 1.0f; - - if( preserve_luma ) - { - s_rgb = shadows > 0.0f ? ES_RGB * shadows : ES_CMY * abs( shadows ); - m_rgb = midtones > 0.0f ? ES_RGB * midtones : ES_CMY * abs( midtones ); - h_rgb = highlights > 0.0f ? ES_RGB * highlights : ES_CMY * abs( highlights ); - } - float3 mids = saturate( 1.0f - dist_s.xyz - dist_h.xyz ); - float3 highs = dist_h.xyz * ( highlights.xyz * h_rgb.xyz * ( 1.0f - luma )); - float3 newc = c.xyz * ( dist_s.xyz * shadows.xyz * s_rgb.xyz + mids.xyz * midtones.xyz * m_rgb.xyz ) * ( 1.0f - c.xyz ) + highs.xyz; - return saturate( c.xyz + newc.xyz ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_ColorBalance(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - color.xyz = saturate( color.xyz ); - color.xyz = ColorBalance( color.xyz, float3( s_RedShift, s_GreenShift, s_BlueShift ), - float3( m_RedShift, m_GreenShift, m_BlueShift ), - float3( h_RedShift, h_GreenShift, h_BlueShift )); - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_ColorBalance - { - pass prod80_pass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_ColorBalance; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_04_Color_Gradients.fx b/data/reshade/shaders/Effects/PD80_04_Color_Gradients.fx deleted file mode 100644 index 8c7aa476..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Color_Gradients.fx +++ /dev/null @@ -1,362 +0,0 @@ -/* - Description : PD80 04 Color Gradients for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" -#include "PD80_00_Blend_Modes.fxh" - -namespace pd80_ColorGradients -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int luma_mode < __UNIFORM_COMBO_INT1 - ui_label = "Luma Mode"; - ui_tooltip = "Luma Mode"; - ui_category = "Global"; - ui_items = "Use Average\0Use Perceived Luma\0Use Max Value\0"; - > = 0; - uniform int separation_mode < __UNIFORM_COMBO_INT1 - ui_label = "Luma Separation Mode"; - ui_tooltip = "Luma Separation Mode"; - ui_category = "Global"; - ui_items = "Harsh Separation\0Smooth Separation\0"; - > = 0; - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - uniform float CGdesat < - ui_label = "Desaturate Base Image"; - ui_tooltip = "Desaturate Base Image"; - ui_category = "Mixing Values"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float finalmix < - ui_label = "Mix with Original"; - ui_tooltip = "Mix with Original"; - ui_category = "Mixing Values"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.333; - // Light Scene - uniform float3 blendcolor_ls_m < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Light Scene: Midtone Color"; - ui_category = "Light Scene: Midtone Color"; - > = float3( 0.98, 0.588, 0.0 ); - uniform int blendmode_ls_m < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Light Scene: Midtone Color Blendmode"; - ui_category = "Light Scene: Midtone Color"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 10; - uniform float opacity_ls_m < - ui_label = "Opacity"; - ui_tooltip = "Light Scene: Midtone Color Opacity"; - ui_category = "Light Scene: Midtone Color"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - uniform float3 blendcolor_ls_s < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Light Scene: Shadow Color"; - ui_category = "Light Scene: Shadow Color"; - > = float3( 0.0, 0.365, 1.0 ); - uniform int blendmode_ls_s < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Light Scene: Shadow Color Blendmode"; - ui_category = "Light Scene: Shadow Color"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 5; - uniform float opacity_ls_s < - ui_label = "Opacity"; - ui_tooltip = "Light Scene: Shadow Color Opacity"; - ui_category = "Light Scene: Shadow Color"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.3; - // Dark Scene - uniform bool enable_ds < - ui_text = "-------------------------------------\n" - "Enables transitions of gradients\n" - "depending on average scene luminance.\n" - "To simulate Day-Night color grading.\n" - "-------------------------------------"; - ui_label = "Enable Color Transitions"; - ui_tooltip = "Enable Color Transitions"; - ui_category = "Enable Color Transitions"; - > = true; - uniform float3 blendcolor_ds_m < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Dark Scene: Midtone Color"; - ui_category = "Dark Scene: Midtone Color"; - > = float3( 0.0, 0.365, 1.0 ); - uniform int blendmode_ds_m < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Dark Scene: Midtone Color Blendmode"; - ui_category = "Dark Scene: Midtone Color"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 10; - uniform float opacity_ds_m < - ui_label = "Opacity"; - ui_tooltip = "Dark Scene: Midtone Color Opacity"; - ui_category = "Dark Scene: Midtone Color"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - uniform float3 blendcolor_ds_s < - ui_type = "color"; - ui_label = "Color"; - ui_tooltip = "Dark Scene: Shadow Color"; - ui_category = "Dark Scene: Shadow Color"; - > = float3( 0.0, 0.039, 0.588 ); - uniform int blendmode_ds_s < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Dark Scene: Shadow Color Blendmode"; - ui_category = "Dark Scene: Shadow Color"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 10; - uniform float opacity_ds_s < - ui_label = "Opacity"; - ui_tooltip = "Dark Scene: Shadow Color Opacity"; - ui_category = "Dark Scene: Shadow Color"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - uniform float minlevel < - ui_label = "Pure Dark Scene Level"; - ui_tooltip = "Pure Dark Scene Level"; - ui_category = "Scene Luminance Adaptation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.125; - uniform float maxlevel < - ui_label = "Pure Light Scene Level"; - ui_tooltip = "Pure Light Scene Level"; - ui_category = "Scene Luminance Adaptation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.3; - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texLuma { Width = 256; Height = 256; Format = R16F; MipLevels = 8; }; - texture texAvgLuma { Format = R16F; }; - texture texPrevAvgLuma { Format = R16F; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerLuma { Texture = texLuma; }; - sampler samplerAvgLuma { Texture = texAvgLuma; }; - sampler samplerPrevAvgLuma { Texture = texPrevAvgLuma; }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define LumCoeff float3(0.212656, 0.715158, 0.072186) - uniform float Frametime < source = "frametime"; >; - uniform float2 pingpong < source = "pingpong"; min = 0; max = 128; step = 1; >; - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float getLuminance( in float3 x ) - { - return dot( x, LumCoeff ); - } - - float curve( float x ) - { - return x * x * ( 3.0f - 2.0f * x ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float PS_WriteLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float luma = max( max( color.x, color.y ), color.z ); - return luma; //writes to texLuma - } - - float PS_AvgLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float luma = tex2Dlod( samplerLuma, float4( 0.5f, 0.5f, 0, 8 )).x; - float prevluma = tex2D( samplerPrevAvgLuma, float2( 0.5f, 0.5f )).x; - float avgLuma = lerp( prevluma, luma, saturate( Frametime * 0.003f )); - return avgLuma; //writes to texAvgLuma - } - - float4 PS_ColorGradients(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float sceneluma = tex2D( samplerAvgLuma, float2( 0.5f, 0.5f )).x; - float ml = ( minlevel >= maxlevel ) ? maxlevel - 0.01f : minlevel; - sceneluma = smoothstep( ml, maxlevel, sceneluma ); - color.xyz = saturate( color.xyz ); - - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 5, enable_dither, dither_strength, 1, 0.5f ); - color.xyz = saturate( color.xyz + dnoise.xyz ); - - // Weights - float cWeight; - switch( luma_mode ) - { - case 0: // Use average - { - cWeight = dot( color.xyz, float3( 0.333333f, 0.333334f, 0.333333f )); - } - break; - case 1: // Use perceived luma - { - cWeight = dot( color.xyz, float3( 0.212656f, 0.715158f, 0.072186f )); - } - break; - case 2: // Use max - { - cWeight = max( max( color.x, color.y ), color.z ); - } - break; - } - - float w_s; float w_h; float w_m; - switch( separation_mode ) - { - /* - Clear cutoff between shadows and highlights - Maximizes precision at the loss of harsher transitions between contrasts - Curves look like: - - Shadows Highlights Midtones - ‾‾‾—_ _—‾‾‾ _——‾‾‾——_ - ‾‾——__________ __________——‾‾ ___—‾ ‾—___ - 0.0.....0.5.....1.0 0.0.....0.5.....1.0 0.0.....0.5.....1.0 - - */ - case 0: - { - w_s = curve( max( 1.0f - cWeight * 2.0f, 0.0f )); - w_h = curve( max(( cWeight - 0.5f ) * 2.0f, 0.0f )); - w_m = saturate( 1.0f - w_s - w_h ); - } break; - - /* - Higher degree of blending between individual curves - F.e. shadows will still have a minimal weight all the way into highlight territory - Ensures smoother transition areas between contrasts - Curves look like: - - Shadows Highlights Midtones - ‾‾‾—_ _—‾‾‾ __---__ - ‾‾———————_____ _____———————‾‾ ___-‾‾ ‾‾-___ - 0.0.....0.5.....1.0 0.0.....0.5.....1.0 0.0.....0.5.....1.0 - - */ - case 1: - { - w_s = pow( 1.0f - cWeight, 4.0f ); - w_h = pow( cWeight, 4.0f ); - w_m = saturate( 1.0f - w_s - w_h ); - } break; - } - - // Desat original - // float pLuma = getLuminance( color.xyz ); - color.xyz = lerp( color.xyz, cWeight, CGdesat ); - - // Coloring - float3 LS_col; - float3 DS_col; - - // Light scene - float3 LS_b_s = blendmode( color.xyz, blendcolor_ls_s.xyz, blendmode_ls_s, opacity_ls_s ); - float3 LS_b_m = blendmode( color.xyz, blendcolor_ls_m.xyz, blendmode_ls_m, opacity_ls_m ); - LS_col.xyz = LS_b_s.xyz * w_s + LS_b_m.xyz * w_m + w_h; - - // Dark Scene - float3 DS_b_s = blendmode( color.xyz, blendcolor_ds_s.xyz, blendmode_ds_s, opacity_ds_s ); - float3 DS_b_m = blendmode( color.xyz, blendcolor_ds_m.xyz, blendmode_ds_m, opacity_ds_m ); - DS_col.xyz = DS_b_s.xyz * w_s + DS_b_m.xyz * w_m + w_h; - - // Mix - float3 new_c = lerp( DS_col.xyz, LS_col.xyz, sceneluma ); - new_c.xyz = ( enable_ds ) ? new_c.xyz : LS_col.xyz; - color.xyz = lerp( color.xyz, new_c.xyz, finalmix ); - - return float4( color.xyz, 1.0f ); - } - - float PS_PrevAvgLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float avgLuma = tex2D( samplerAvgLuma, float2( 0.5f, 0.5f )).x; - return avgLuma; //writes to texPrevAvgLuma - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_ColorGradient - { - pass Luma - { - VertexShader = PostProcessVS; - PixelShader = PS_WriteLuma; - RenderTarget = texLuma; - } - pass AvgLuma - { - VertexShader = PostProcessVS; - PixelShader = PS_AvgLuma; - RenderTarget = texAvgLuma; - } - pass ColorGradients - { - VertexShader = PostProcessVS; - PixelShader = PS_ColorGradients; - } - pass PreviousLuma - { - VertexShader = PostProcessVS; - PixelShader = PS_PrevAvgLuma; - RenderTarget = texPrevAvgLuma; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Color_Isolation.fx b/data/reshade/shaders/Effects/PD80_04_Color_Isolation.fx deleted file mode 100644 index 3b396272..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Color_Isolation.fx +++ /dev/null @@ -1,117 +0,0 @@ -/* - Description : PD80 04 Color Isolation for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_ColorIsolation -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform float hueMid < - ui_label = "Hue Selection (Middle)"; - ui_category = "Color Isolation"; - ui_tooltip = "0 = Red, 0.167 = Yellow, 0.333 = Green, 0.5 = Cyan, 0.666 = Blue, 0.833 = Magenta"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float hueRange < - ui_label = "Hue Range Selection"; - ui_tooltip = "Hue Range Selection"; - ui_category = "Color Isolation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.167; - uniform float satLimit < - ui_label = "Saturation Output"; - ui_tooltip = "Saturation Output"; - ui_category = "Color Isolation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - uniform float fxcolorMix < - ui_label = "Mix with Original"; - ui_tooltip = "Mix with Original"; - ui_category = "Color Isolation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define LumCoeff float3(0.212656, 0.715158, 0.072186) - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float getLuminance( in float3 x ) - { - return dot( x, LumCoeff ); - } - - float smootherstep( float x ) - { - return x * x * x * ( x * ( x * 6.0f - 15.0f ) + 10.0f ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_ColorIso(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - color.xyz = saturate( color.xyz ); //Can't work with HDR - - float grey = getLuminance( color.xyz ); - float hue = RGBToHSV( color.xyz ).x; - - float r = rcp( hueRange ); - float3 w = max( 1.0f - abs(( hue - hueMid ) * r ), 0.0f ); - w.y = max( 1.0f - abs(( hue + 1.0f - hueMid ) * r ), 0.0f ); - w.z = max( 1.0f - abs(( hue - 1.0f - hueMid ) * r ), 0.0f ); - float weight = dot( w.xyz, 1.0f ); - - float3 newc = lerp( grey, color.xyz, smootherstep( weight ) * satLimit ); - color.xyz = lerp( color.xyz, newc.xyz, fxcolorMix ); - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_ColorIsolation - { - pass ColorIso - { - VertexShader = PostProcessVS; - PixelShader = PS_ColorIso; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Color_Temperature.fx b/data/reshade/shaders/Effects/PD80_04_Color_Temperature.fx deleted file mode 100644 index 96cd61d5..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Color_Temperature.fx +++ /dev/null @@ -1,95 +0,0 @@ -/* - Description : PD80 04 Color Temperature for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional credits - - Taller Helland - http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ - - Renaud Bédard https://www.shadertoy.com/view/lsSXW1 - License: https://creativecommons.org/licenses/by/3.0/ - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_colortemp -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform uint Kelvin < - ui_label = "Color Temp (K)"; - ui_tooltip = "Color Temp (K)"; - ui_category = "Kelvin"; - ui_type = "slider"; - ui_min = 1000; - ui_max = 40000; - > = 6500; - uniform float LumPreservation < - ui_label = "Luminance Preservation"; - ui_tooltip = "Luminance Preservation"; - ui_category = "Kelvin"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - uniform float kMix < - ui_label = "Mix with Original"; - ui_tooltip = "Mix with Original"; - ui_category = "Kelvin"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_ColorTemp(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float3 kColor = KelvinToRGB( Kelvin ); - float3 oLum = RGBToHSL( color.xyz ); - float3 blended = lerp( color.xyz, color.xyz * kColor.xyz, kMix ); - float3 resHSV = RGBToHSL( blended.xyz ); - float3 resRGB = HSLToRGB( float3( resHSV.xy, oLum.z )); - color.xyz = lerp( blended.xyz, resRGB.xyz, LumPreservation ); - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_ColorTemperature - { - pass ColorTemp - { - VertexShader = PostProcessVS; - PixelShader = PS_ColorTemp; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Contrast_Brightness_Saturation.fx b/data/reshade/shaders/Effects/PD80_04_Contrast_Brightness_Saturation.fx deleted file mode 100644 index af9d6fa7..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Contrast_Brightness_Saturation.fx +++ /dev/null @@ -1,371 +0,0 @@ -/* - Description : PD80 04 Contrast Brightness Saturation for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" -#include "PD80_00_Color_Spaces.fxh" -#include "PD80_00_Blend_Modes.fxh" -#include "PD80_00_Base_Effects.fxh" - -namespace pd80_conbrisat -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Global"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Global"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - uniform float tint < - ui_label = "Tint"; - ui_tooltip = "Tint"; - ui_category = "Final Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float exposureN < - ui_label = "Exposure"; - ui_tooltip = "Exposure"; - ui_category = "Final Adjustments"; - ui_type = "slider"; - ui_min = -4.0; - ui_max = 4.0; - > = 0.0; - uniform float contrast < - ui_label = "Contrast"; - ui_tooltip = "Contrast"; - ui_category = "Final Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float brightness < - ui_label = "Brightness"; - ui_tooltip = "Brightness"; - ui_category = "Final Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float saturation < - ui_label = "Saturation"; - ui_tooltip = "Saturation"; - ui_category = "Final Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float vibrance < - ui_label = "Vibrance"; - ui_tooltip = "Vibrance"; - ui_category = "Final Adjustments"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float huemid < - ui_label = "Color Hue"; - ui_tooltip = "Custom Color Hue"; - ui_category = "Custom Saturation Adjustments"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float huerange < - ui_label = "Hue Range Selection"; - ui_tooltip = "Custom Hue Range Selection"; - ui_category = "Custom Saturation Adjustments"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.167; - uniform float sat_custom < - ui_label = "Custom Saturation Level"; - ui_tooltip = "Custom Saturation Level"; - ui_category = "Custom Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_r < - ui_label = "Red Saturation"; - ui_tooltip = "Red Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_y < - ui_label = "Yellow Saturation"; - ui_tooltip = "Yellow Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_g < - ui_label = "Green Saturation"; - ui_tooltip = "Green Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_a < - ui_label = "Aqua Saturation"; - ui_tooltip = "Aqua Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_b < - ui_label = "Blue Saturation"; - ui_tooltip = "Blue Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_p < - ui_label = "Purple Saturation"; - ui_tooltip = "Purple Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform float sat_m < - ui_label = "Magenta Saturation"; - ui_tooltip = "Magenta Saturation"; - ui_category = "Color Saturation Adjustments"; - ui_type = "slider"; - ui_min = -2.0; - ui_max = 2.0; - > = 0.0; - uniform bool enable_depth < - ui_label = "Enable depth based adjustments.\nMake sure you have setup your depth buffer correctly."; - ui_tooltip = "Enable depth based adjustments"; - ui_category = "Final Adjustments: Depth"; - > = false; - uniform bool display_depth < - ui_label = "Show depth texture"; - ui_tooltip = "Show depth texture"; - ui_category = "Final Adjustments: Depth"; - > = false; - uniform float depthStart < - ui_type = "slider"; - ui_label = "Change Depth Start Plane"; - ui_tooltip = "Change Depth Start Plane"; - ui_category = "Final Adjustments: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.0; - uniform float depthEnd < - ui_type = "slider"; - ui_label = "Change Depth End Plane"; - ui_tooltip = "Change Depth End Plane"; - ui_category = "Final Adjustments: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.1; - uniform float depthCurve < - ui_label = "Depth Curve Adjustment"; - ui_tooltip = "Depth Curve Adjustment"; - ui_category = "Final Adjustments: Depth"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 8.0; - > = 1.0; - uniform float exposureD < - ui_label = "Exposure Far"; - ui_tooltip = "Exposure Far"; - ui_category = "Final Adjustments: Far"; - ui_type = "slider"; - ui_min = -4.0; - ui_max = 4.0; - > = 0.0; - uniform float contrastD < - ui_label = "Contrast Far"; - ui_tooltip = "Contrast Far"; - ui_category = "Final Adjustments: Far"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float brightnessD < - ui_label = "Brightness Far"; - ui_tooltip = "Brightness Far"; - ui_category = "Final Adjustments: Far"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.5; - > = 0.0; - uniform float saturationD < - ui_label = "Saturation Far"; - ui_tooltip = "Saturation Far"; - ui_category = "Final Adjustments: Far"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float vibranceD < - ui_label = "Vibrance Far"; - ui_tooltip = "Vibrance Far"; - ui_category = "Final Adjustments: Far"; - ui_type = "slider"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float getLuminance( in float3 x ) - { - return dot( x, float3( 0.212656, 0.715158, 0.072186 )); - } - - float curve( float x ) - { - return x * x * ( 3.0 - 2.0 * x ); - } - - float3 channelsat( float3 col, float r, float y, float g, float a, float b, float p, float m, float hue ) - { - float desat = getLuminance( col.xyz ); - - // Red : 0.0 - // Orange : 0.083 - // Yellow : 0.167 - // Green : 0.333 - // Cyan/Aqua : 0.5 - // Blue : 0.667 - // Purple : 0.75 - // Magenta : 0.833 - - float weight_r = curve( max( 1.0f - abs( hue * 6.0f ), 0.0f )) + - curve( max( 1.0f - abs(( hue - 1.0f ) * 6.0f ), 0.0f )); - float weight_y = curve( max( 1.0f - abs(( hue - 0.166667f ) * 6.0f ), 0.0f )); - float weight_g = curve( max( 1.0f - abs(( hue - 0.333333f ) * 6.0f ), 0.0f )); - float weight_a = curve( max( 1.0f - abs(( hue - 0.5f ) * 6.0f ), 0.0f )); - float weight_b = curve( max( 1.0f - abs(( hue - 0.666667f ) * 6.0f ), 0.0f )); - float weight_p = curve( max( 1.0f - abs(( hue - 0.75f ) * 6.0f ), 0.0f )); - float weight_m = curve( max( 1.0f - abs(( hue - 0.833333f ) * 6.0f ), 0.0f )); - - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + r * weight_r, 0.0f, 2.0f )); - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + y * weight_y, 0.0f, 2.0f )); - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + g * weight_g, 0.0f, 2.0f )); - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + a * weight_a, 0.0f, 2.0f )); - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + b * weight_b, 0.0f, 2.0f )); - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + p * weight_p, 0.0f, 2.0f )); - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + m * weight_m, 0.0f, 2.0f )); - - return saturate( col.xyz ); - } - - float3 customsat( float3 col, float h, float range, float sat, float hue ) - { - float desat = getLuminance( col.xyz ); - float r = rcp( range ); - float3 w = max( 1.0f - abs(( hue - h ) * r ), 0.0f ); - w.y = max( 1.0f - abs(( hue + 1.0f - h ) * r ), 0.0f ); - w.z = max( 1.0f - abs(( hue - 1.0f - h ) * r ), 0.0f ); - float weight = curve( dot( w.xyz, 1.0f )) * sat; - col.xyz = lerp( desat, col.xyz, clamp( 1.0f + weight, 0.0f, 2.0f )); - return saturate( col.xyz ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_CBS(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 6, enable_dither, dither_strength, 1, 0.5f ); - color.xyz = saturate( color.xyz + dnoise.xyz ); - - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - depth = smoothstep( depthStart, depthEnd, depth ); - depth = pow( depth, depthCurve ); - float4 dnoise2 = dither( samplerGaussNoise, texcoord.xy, 0, 1, 1.0f, 0, 1.0f ); - depth = saturate( depth + dnoise2.x ); - - float3 cold = float3( 0.0f, 0.365f, 1.0f ); //LBB - float3 warm = float3( 0.98f, 0.588f, 0.0f ); //LBA - - color.xyz = ( tint < 0.0f ) ? lerp( color.xyz, blendLuma( cold.xyz, color.xyz ), abs( tint )) : - lerp( color.xyz, blendLuma( warm.xyz, color.xyz ), tint ); - - float3 dcolor = color.xyz; - color.xyz = exposure( color.xyz, exposureN ); - color.xyz = con( color.xyz, contrast ); - color.xyz = bri( color.xyz, brightness ); - color.xyz = sat( color.xyz, saturation ); - color.xyz = vib( color.xyz, vibrance ); - - dcolor.xyz = exposure( dcolor.xyz, exposureD ); - dcolor.xyz = con( dcolor.xyz, contrastD ); - dcolor.xyz = bri( dcolor.xyz, brightnessD ); - dcolor.xyz = sat( dcolor.xyz, saturationD ); - dcolor.xyz = vib( dcolor.xyz, vibranceD ); - - color.xyz = lerp( color.xyz, dcolor.xyz, enable_depth * depth ); // apply based on depth - - float chue = RGBToHSL( color.xyz ).x; - color.xyz = channelsat( color.xyz, sat_r, sat_y, sat_g, sat_a, sat_b, sat_p, sat_m, chue ); - color.xyz = customsat( color.xyz, huemid, huerange, sat_custom, chue ); - - color.xyz = display_depth ? depth.xxx : color.xyz; // show depth - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_ContrastBrightnessSaturation - { - pass ConBriSat - { - VertexShader = PostProcessVS; - PixelShader = PS_CBS; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Magical_Rectangle.fx b/data/reshade/shaders/Effects/PD80_04_Magical_Rectangle.fx deleted file mode 100644 index a2bb9135..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Magical_Rectangle.fx +++ /dev/null @@ -1,364 +0,0 @@ -/* - Description : PD80 04 Magical Rectangle for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" -#include "PD80_00_Blend_Modes.fxh" -#include "PD80_00_Color_Spaces.fxh" -#include "PD80_00_Base_Effects.fxh" - -namespace pd80_magicalrectangle -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int shape < __UNIFORM_COMBO_INT1 - ui_label = "Shape"; - ui_tooltip = "Shape"; - ui_category = "Shape Manipulation"; - ui_items = "Square\0Circle\0"; - > = 0; - uniform bool invert_shape < - ui_label = "Invert Shape"; - ui_tooltip = "Invert Shape"; - ui_category = "Shape Manipulation"; - > = false; - uniform uint rotation < - ui_type = "slider"; - ui_label = "Rotation Factor"; - ui_tooltip = "Rotation Factor"; - ui_category = "Shape Manipulation"; - ui_min = 0; - ui_max = 360; - > = 45; - uniform float2 center < - ui_type = "slider"; - ui_label = "Center"; - ui_tooltip = "Center"; - ui_category = "Shape Manipulation"; - ui_min = 0.0; - ui_max = 1.0; - > = float2( 0.5, 0.5 ); - uniform float ret_size_x < - ui_type = "slider"; - ui_label = "Horizontal Size"; - ui_tooltip = "Horizontal Size"; - ui_category = "Shape Manipulation"; - ui_min = 0.0; - ui_max = 0.5; - > = 0.125; - uniform float ret_size_y < - ui_type = "slider"; - ui_label = "Vertical Size"; - ui_tooltip = "Vertical Size"; - ui_category = "Shape Manipulation"; - ui_min = 0.0; - ui_max = 0.5; - > = 0.125; - uniform float depthpos < - ui_type = "slider"; - ui_label = "Depth Position"; - ui_tooltip = "Depth Position"; - ui_category = "Shape Manipulation"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float smoothing < - ui_type = "slider"; - ui_label = "Edge Smoothing"; - ui_tooltip = "Edge Smoothing"; - ui_category = "Shape Manipulation"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.01; - uniform float depth_smoothing < - ui_type = "slider"; - ui_label = "Depth Smoothing"; - ui_tooltip = "Depth Smoothing"; - ui_category = "Shape Manipulation"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.002; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Shape Manipulation"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 0.0; - uniform float3 reccolor < - ui_text = "-------------------------------------\n" - "Use Opacity and Blend Mode to adjust\n" - "Shape controls the Shape coloring\n" - "Image controls the underlying picture\n" - "-------------------------------------"; - ui_type = "color"; - ui_label = "Shape: Color"; - ui_tooltip = "Shape: Color"; - ui_category = "Shape Coloration"; - > = float3( 0.5, 0.5, 0.5 ); - uniform float mr_exposure < - ui_type = "slider"; - ui_label = "Image: Exposure"; - ui_tooltip = "Image: Exposure"; - ui_category = "Shape Coloration"; - ui_min = -4.0; - ui_max = 4.0; - > = 0.0; - uniform float mr_contrast < - ui_type = "slider"; - ui_label = "Image: Contrast"; - ui_tooltip = "Image: Contrast"; - ui_category = "Shape Coloration"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float mr_brightness < - ui_type = "slider"; - ui_label = "Image: Brightness"; - ui_tooltip = "Image: Brightness"; - ui_category = "Shape Coloration"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float mr_hue < - ui_type = "slider"; - ui_label = "Image: Hue"; - ui_tooltip = "Image: Hue"; - ui_category = "Shape Coloration"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float mr_saturation < - ui_type = "slider"; - ui_label = "Image: Saturation"; - ui_tooltip = "Image: Saturation"; - ui_category = "Shape Coloration"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform float mr_vibrance < - ui_type = "slider"; - ui_label = "Image: Vibrance"; - ui_tooltip = "Image: Vibrance"; - ui_category = "Shape Coloration"; - ui_min = -1.0; - ui_max = 1.0; - > = 0.0; - uniform bool enable_gradient < - ui_label = "Enable Gradient"; - ui_tooltip = "Enable Gradient"; - ui_category = "Shape Gradient"; - > = false; - uniform bool gradient_type < - ui_label = "Gradient Type"; - ui_tooltip = "Gradient Type"; - ui_category = "Shape Gradient"; - > = false; - uniform float gradient_curve < - ui_type = "slider"; - ui_label = "Gradient Curve"; - ui_tooltip = "Gradient Curve"; - ui_category = "Shape Gradient"; - ui_min = 0.001; - ui_max = 2.0; - > = 0.25; - uniform float intensity_boost < - ui_type = "slider"; - ui_label = "Intensity Boost"; - ui_tooltip = "Intensity Boost"; - ui_category = "Intensity Boost"; - ui_min = 1.0; - ui_max = 4.0; - > = 1.0; - uniform int blendmode_1 < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Blendmode"; - ui_category = "Shape Blending"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 0; - uniform float opacity < - ui_type = "slider"; - ui_label = "Opacity"; - ui_tooltip = "Opacity"; - ui_category = "Shape Blending"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texMagicRectangle { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = RGBA16F; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerMagicRectangle { Texture = texMagicRectangle; }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define ASPECT_RATIO float( BUFFER_WIDTH * BUFFER_RCP_HEIGHT ) - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - uniform bool hasdepth < source = "bufready_depth"; >; - - float3 hue( float3 res, float shift, float x ) - { - float3 hsl = RGBToHSL( res.xyz ); - hsl.x = frac( hsl.x + ( shift + 1.0f ) / 2.0f - 0.5f ); - hsl.xyz = HSLToRGB( hsl.xyz ); - return lerp( res.xyz, hsl.xyz, x ); - } - - float curve( float x ) - { - return x * x * x * ( x * ( x * 6.0f - 15.0f ) + 10.0f ); - } - - //// VERTEX SHADER ////////////////////////////////////////////////////////////// - /* - Adding texcoord2 in vextex shader which is a rotated texcoord - */ - void PPVS(in uint id : SV_VertexID, out float4 position : SV_Position, out float2 texcoord : TEXCOORD, out float2 texcoord2 : TEXCOORD2) - { - PostProcessVS(id, position, texcoord); - float2 uv; - uv.x = ( id == 2 ) ? 2.0 : 0.0; - uv.y = ( id == 1 ) ? 2.0 : 0.0; - uv.xy -= center.xy; - uv.y /= ASPECT_RATIO; - float dim = ceil( sqrt( BUFFER_WIDTH * BUFFER_WIDTH + BUFFER_HEIGHT * BUFFER_HEIGHT )); // Diagonal size - float maxlen = min( BUFFER_WIDTH, BUFFER_HEIGHT ); - dim = dim / maxlen; // Scalar - uv.xy /= dim; - float sin = sin( radians( rotation )); - float cos = cos( radians( rotation )); - texcoord2.x = ( uv.x * cos ) + ( uv.y * (-sin)); - texcoord2.y = ( uv.x * sin ) + ( uv.y * cos ); - texcoord2.xy += float2( 0.5f, 0.5f ); // Transform back - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_Layer_1( float4 pos : SV_Position, float2 texcoord : TEXCOORD, float2 texcoord2 : TEXCOORD2 ) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - // Depth stuff - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - // Sizing - float dim = ceil( sqrt( BUFFER_WIDTH * BUFFER_WIDTH + BUFFER_HEIGHT * BUFFER_HEIGHT )); // Diagonal size - float maxlen = max( BUFFER_WIDTH, BUFFER_HEIGHT ); - dim = dim / maxlen; // Scalar with screen diagonal - float2 uv = texcoord2.xy; - uv.xy = uv.xy * 2.0f - 1.0f; // rescale to -1..0..1 range - uv.xy /= ( float2( ret_size_x + ret_size_x * smoothing, ret_size_y + ret_size_y * smoothing ) * dim ); // scale rectangle - switch( shape ) - { - case 0: // square - { uv.xy = uv.xy; } break; - case 1: // circle - { uv.xy = lerp( dot( uv.xy, uv.xy ), dot( uv.xy, -uv.xy ), gradient_type ); } break; - } - uv.xy = ( uv.xy + 1.0f ) / 2.0f; // scale back to 0..1 range - - // Using smoothstep to create values from 0 to 1, 1 being the drawn shape around center - // First makes bottom and left side, then flips coord to make top and right side: x | 1 - x - // Do some funky stuff with gradients - // Finally make a depth fade - float2 bl = smoothstep( 0.0f, 0.0f + smoothing, uv.xy ); - float2 tr = smoothstep( 0.0f, 0.0f + smoothing, 1.0f - uv.xy ); - if( enable_gradient ) - { - if( gradient_type ) - { - bl = smoothstep( 0.0f, 0.0f + smoothing, uv.xy ) * pow( abs( uv.y ), gradient_curve ); - } - tr = smoothstep( 0.0f, 0.0f + smoothing, 1.0f - uv.xy ) * pow( abs( uv.x ), gradient_curve ); - } - float depthfade = smoothstep( depthpos - depth_smoothing, depthpos + depth_smoothing, depth ); - depthfade = lerp( 1.0f, depthfade, hasdepth ); - // Combine them all - float R = bl.x * bl.y * tr.x * tr.y * depthfade; - R = ( invert_shape ) ? 1.0f - R : R; - // Blend the borders - float intensity = RGBToHSV( reccolor.xyz ).z; - color.xyz = lerp( color.xyz, saturate( color.xyz * saturate( 1.0f - R ) + R * intensity ), R ); - // Add to color, use R for Alpha - return float4( color.xyz, R ); - } - - float4 PS_Blend(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 orig = tex2D( ReShade::BackBuffer, texcoord ); - float3 color; - float4 layer_1 = saturate( tex2D( samplerMagicRectangle, texcoord )); - // Dither - // Input: sampler, texcoord, variance(int), enable_dither(bool), dither_strength(float), motion(bool), swing(float) - float4 dnoise = dither( samplerRGBNoise, texcoord.xy, 7, 1, dither_strength, 1, 0.5f ); - layer_1.xyz = saturate( layer_1.xyz + dnoise.xyz ); - - orig.xyz = exposure( orig.xyz, mr_exposure * layer_1.w ); - orig.xyz = con( orig.xyz, mr_contrast * layer_1.w ); - orig.xyz = bri( orig.xyz, mr_brightness * layer_1.w ); - orig.xyz = hue( orig.xyz, mr_hue, layer_1.w ); - orig.xyz = sat( orig.xyz, mr_saturation * layer_1.w ); - orig.xyz = vib( orig.xyz, mr_vibrance * layer_1.w ); - orig.xyz = saturate( orig.xyz ); - // Doing some HSL color space conversions to colorize - layer_1.xyz = saturate( layer_1.xyz * intensity_boost ); - layer_1.xyz = RGBToHSV( layer_1.xyz ); - float2 huesat = RGBToHSV( reccolor.xyz ).xy; - layer_1.xyz = HSVToRGB( float3( huesat.xy, layer_1.z )); - layer_1.xyz = saturate( layer_1.xyz ); - // Blend mode with background - color.xyz = blendmode( orig.xyz, layer_1.xyz, blendmode_1, saturate( layer_1.w ) * opacity ); - // Output to screen - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_Magical_Rectangle - < ui_tooltip = "The Magical Rectangle\n\n" - "This shader gives you a rectangular shape on your screen that you can manipulate in 3D space.\n" - "It can blend on depth, blur edges, change color, change blending, change shape, and so on.\n" - "It will allow you to manipulate parts of the scene in various ways. Not withstanding; add mist,\n" - "remove mist, change clouds, create backgrounds, draw flares, add contrasts, change hues, etc. in ways\n" - "another shader will not be able to do.\n\n" - "This shader requires access to depth buffer for full functionality!";> - { - pass prod80_pass0 - { - VertexShader = PPVS; - PixelShader = PS_Layer_1; - RenderTarget = texMagicRectangle; - } - pass prod80_pass1 - { - VertexShader = PPVS; - PixelShader = PS_Blend; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_04_Saturation_Limit.fx b/data/reshade/shaders/Effects/PD80_04_Saturation_Limit.fx deleted file mode 100644 index 26ee43e4..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Saturation_Limit.fx +++ /dev/null @@ -1,71 +0,0 @@ -/* - Description : PD80 04 Saturation Limit for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_satlimit -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform float saturation_limit < - ui_type = "slider"; - ui_label = "Saturation Limit"; - ui_tooltip = "Saturation Limit"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_Satlimit(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float3 color = tex2D( ReShade::BackBuffer, texcoord ).xyz; - color.xyz = RGBToHSL( color.xyz ); - color.y = min( color.y, saturation_limit ); - color.xyz = HSLToRGB( color.xyz ); - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_Saturation_Limiter - { - pass prod80_pass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_Satlimit; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Selective_Color.fx b/data/reshade/shaders/Effects/PD80_04_Selective_Color.fx deleted file mode 100644 index e2094713..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Selective_Color.fx +++ /dev/null @@ -1,683 +0,0 @@ -/* - Description : PD80 04 Selective Color for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional credits - - Based on the mathematical analysis provided here - http://blog.pkh.me/p/22-understanding-selective-coloring-in-adobe-photoshop.html - - MIT License - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Base_Effects.fxh" - -namespace pd80_selectivecolor -{ - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int corr_method < __UNIFORM_COMBO_INT1 - ui_label = "Correction Method"; - ui_tooltip = "Correction Method"; - ui_category = "Selective Color"; - ui_items = "Absolute\0Relative\0"; //Do not change order; 0=Absolute, 1=Relative - > = 1; - uniform int corr_method2 < __UNIFORM_COMBO_INT1 - ui_label = "Correction Method Saturation"; - ui_tooltip = "Correction Method Saturation"; - ui_category = "Selective Color"; - ui_items = "Absolute\0Relative\0"; //Do not change order; 0=Absolute, 1=Relative - > = 1; - // Reds - uniform float r_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Reds: Cyan"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Reds: Magenta"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Reds: Yellow"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Reds: Black"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Reds: Saturation"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Reds: Vibrance"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Yellows - uniform float y_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Yellows: Cyan"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Yellows: Magenta"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Yellows: Yellow"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Yellows: Black"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Yellows: Saturation"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Yellows: Vibrance"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Greens - uniform float g_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Greens: Cyan"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Greens: Magenta"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Greens: Yellow"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Greens: Black"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Greens: Saturation"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Greens: Vibrance"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Cyans - uniform float c_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Cyans: Cyan"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Cyans: Magenta"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Cyans: Yellow"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Cyans: Black"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Cyans: Saturation"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Cyans: Vibrance"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Blues - uniform float b_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Blues: Cyan"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Blues: Magenta"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Blues: Yellow"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Blues: Black"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Blues: Saturation"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Blues: Vibrance"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Magentas - uniform float m_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Magentas: Cyan"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Magentas: Magenta"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Magentas: Yellow"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Magentas: Black"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Magentas: Saturation"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Magentas: Vibrance"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Whites - uniform float w_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Whites: Cyan"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Whites: Magenta"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Whites: Yellow"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Whites: Black"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Whites: Saturation"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Whites: Vibrance"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Neutrals - uniform float n_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Neutrals: Cyan"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Neutrals: Magenta"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Neutrals: Yellow"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Neutrals: Black"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Neutrals: Saturation"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Neutrals: Vibrance"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Blacks - uniform float bk_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Blacks: Cyan"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Blacks: Magenta"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Blacks: Yellow"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Blacks: Black"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Blacks: Saturation"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_vib < - ui_type = "slider"; - ui_label = "Vibrance"; - ui_tooltip = "Selective Color Blacks: Vibrance"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - - float mid( float3 c ) - { - float sum = c.x + c.y + c.z; - float mn = min( min( c.x, c.y ), c.z ); - float mx = max( max( c.x, c.y ), c.z ); - return sum - mn - mx; - } - - float adjustcolor( float scale, float colorvalue, float adjust, float bk, int method ) - { - /* - y(value, adjustment) = clamp((( -1 - adjustment ) * bk - adjustment ) * method, -value, 1 - value ) * scale - absolute: method = 1.0f - colorvalue * 0 - relative: method = 1.0f - colorvalue * 1 - */ - return clamp((( -1.0f - adjust ) * bk - adjust ) * ( 1.0f - colorvalue * method ), -colorvalue, 1.0f - colorvalue) * scale; - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_SelectiveColor(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - - // Clamp 0..1 - color.xyz = saturate( color.xyz ); - - // Need these a lot - float min_value = min( min( color.x, color.y ), color.z ); - float max_value = max( max( color.x, color.y ), color.z ); - float mid_value = mid( color.xyz ); - - // Used for determining which pixels to adjust regardless of prior changes to color - float3 orig = color.xyz; - - // Scales - float sRGB = max_value - mid_value; - float sCMY = mid_value - min_value; - float sNeutrals = 1.0f - ( abs( max_value - 0.5f ) + abs( min_value - 0.5f )); - float sWhites = ( min_value - 0.5f ) * 2.0f; - float sBlacks = ( 0.5f - max_value ) * 2.0f; - - /* - Create relative saturation levels. - For example when saturating red channel you will manipulate yellow and magenta channels. - So, to ensure there are no bugs and transitions are smooth, need to scale saturation with - relative saturation of nearest colors. If difference between red and green is low ( color nearly yellow ) - you use this info to scale back red saturation on those pixels. - This solution is not fool proof, but gives acceptable results almost always. - */ - - // Red is when maxvalue = x - float r_d_m = orig.x - orig.z; - float r_d_y = orig.x - orig.y; - // Yellow is when minvalue = z - float y_d = mid_value - orig.z; - // Green is when maxvalue = y - float g_d_y = orig.y - orig.x; - float g_d_c = orig.y - orig.z; - // Cyan is when minvalue = x - float c_d = mid_value - orig.x; - // Blue is when maxvalue = z - float b_d_c = orig.z - orig.y; - float b_d_m = orig.z - orig.x; - // Magenta is when minvalue = y - float m_d = mid_value - orig.y; - - float r_delta = 1.0f; - float y_delta = 1.0f; - float g_delta = 1.0f; - float c_delta = 1.0f; - float b_delta = 1.0f; - float m_delta = 1.0f; - - if( corr_method2 ) // Relative saturation - { - r_delta = min( r_d_m, r_d_y ); - y_delta = y_d; - g_delta = min( g_d_y, g_d_c ); - c_delta = c_d; - b_delta = min( b_d_c, b_d_m ); - m_delta = m_d; - } - - // Selective Color - if( max_value == orig.x ) - { - color.x = color.x + adjustcolor( sRGB, color.x, r_adj_cya, r_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sRGB, color.y, r_adj_mag, r_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sRGB, color.z, r_adj_yel, r_adj_bla, corr_method ); - color.xyz = sat( color.xyz, r_adj_sat * r_delta ); - color.xyz = vib( color.xyz, r_adj_vib * r_delta ); - } - - if( min_value == orig.z ) - { - color.x = color.x + adjustcolor( sCMY, color.x, y_adj_cya, y_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sCMY, color.y, y_adj_mag, y_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sCMY, color.z, y_adj_yel, y_adj_bla, corr_method ); - color.xyz = sat( color.xyz, y_adj_sat * y_delta ); - color.xyz = vib( color.xyz, y_adj_vib * y_delta ); - } - - if( max_value == orig.y ) - { - color.x = color.x + adjustcolor( sRGB, color.x, g_adj_cya, g_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sRGB, color.y, g_adj_mag, g_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sRGB, color.z, g_adj_yel, g_adj_bla, corr_method ); - color.xyz = sat( color.xyz, g_adj_sat * g_delta ); - color.xyz = vib( color.xyz, g_adj_vib * g_delta ); - } - - if( min_value == orig.x ) - { - color.x = color.x + adjustcolor( sCMY, color.x, c_adj_cya, c_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sCMY, color.y, c_adj_mag, c_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sCMY, color.z, c_adj_yel, c_adj_bla, corr_method ); - color.xyz = sat( color.xyz, c_adj_sat * c_delta ); - color.xyz = vib( color.xyz, c_adj_vib * c_delta ); - } - - if( max_value == orig.z ) - { - color.x = color.x + adjustcolor( sRGB, color.x, b_adj_cya, b_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sRGB, color.y, b_adj_mag, b_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sRGB, color.z, b_adj_yel, b_adj_bla, corr_method ); - color.xyz = sat( color.xyz, b_adj_sat * b_delta ); - color.xyz = vib( color.xyz, b_adj_vib * b_delta ); - } - - if( min_value == orig.y ) - { - color.x = color.x + adjustcolor( sCMY, color.x, m_adj_cya, m_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sCMY, color.y, m_adj_mag, m_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sCMY, color.z, m_adj_yel, m_adj_bla, corr_method ); - color.xyz = sat( color.xyz, m_adj_sat * m_delta ); - color.xyz = vib( color.xyz, m_adj_vib * m_delta ); - } - - if( min_value >= 0.5f ) - { - color.x = color.x + adjustcolor( sWhites, color.x, w_adj_cya, w_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sWhites, color.y, w_adj_mag, w_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sWhites, color.z, w_adj_yel, w_adj_bla, corr_method ); - color.xyz = sat( color.xyz, w_adj_sat * smoothstep( 0.5f, 1.0f, min_value )); - color.xyz = vib( color.xyz, w_adj_vib * smoothstep( 0.5f, 1.0f, min_value )); - } - - if( max_value > 0.0f && min_value < 1.0f ) - { - color.x = color.x + adjustcolor( sNeutrals, color.x, n_adj_cya, n_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sNeutrals, color.y, n_adj_mag, n_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sNeutrals, color.z, n_adj_yel, n_adj_bla, corr_method ); - color.xyz = sat( color.xyz, n_adj_sat ); - color.xyz = vib( color.xyz, n_adj_vib ); - } - - if( max_value < 0.5f ) - { - color.x = color.x + adjustcolor( sBlacks, color.x, bk_adj_cya, bk_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sBlacks, color.y, bk_adj_mag, bk_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sBlacks, color.z, bk_adj_yel, bk_adj_bla, corr_method ); - color.xyz = sat( color.xyz, bk_adj_sat * smoothstep( 0.5f, 0.0f, max_value )); - color.xyz = vib( color.xyz, bk_adj_vib * smoothstep( 0.5f, 0.0f, max_value )); - } - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_SelectiveColor - { - pass prod80_sc - { - VertexShader = PostProcessVS; - PixelShader = PS_SelectiveColor; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Selective_Color_v2.fx b/data/reshade/shaders/Effects/PD80_04_Selective_Color_v2.fx deleted file mode 100644 index 132b9778..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Selective_Color_v2.fx +++ /dev/null @@ -1,1182 +0,0 @@ -/* - Description : PD80 04 Selective Color 2 for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional credits - - Based on the mathematical analysis provided here - http://blog.pkh.me/p/22-understanding-selective-coloring-in-adobe-photoshop.html - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_selectivecolorv2 -{ - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int corr_method < __UNIFORM_COMBO_INT1 - ui_label = "Correction Method"; - ui_tooltip = "Correction Method"; - ui_category = "Selective Color"; - ui_items = "Absolute\0Relative\0"; //Do not change order; 0=Absolute, 1=Relative - > = 1; - // Reds - uniform float r_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Reds: Cyan"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Reds: Magenta"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Reds: Yellow"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Reds: Black"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Reds: Saturation"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Reds: Lightness Curve"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float r_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Reds: Lightness"; - ui_category = "Selective Color: Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Oranges - uniform float o_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Oranges: Cyan"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float o_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Oranges: Magenta"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float o_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Oranges: Yellow"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float o_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Oranges: Black"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float o_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Oranges: Saturation"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float o_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Oranges: Lightness Curve"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float o_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Oranges: Lightness"; - ui_category = "Selective Color: Oranges"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Yellows - uniform float y_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Yellows: Cyan"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Yellows: Magenta"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Yellows: Yellow"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Yellows: Black"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Yellows: Saturation"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Yellows: Lightness Curve"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float y_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Yellows: Lightness"; - ui_category = "Selective Color: Yellows"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Yellow-Greens - uniform float yg_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Yellow-Greens: Cyan"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float yg_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Yellow-Greens: Magenta"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float yg_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Yellow-Greens: Yellow"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float yg_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Yellow-Greens: Black"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float yg_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Yellow-Greens: Saturation"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float yg_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Yellow-Greens: Lightness Curve"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float yg_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Yellow-Greens: Lightness"; - ui_category = "Selective Color: Yellow-Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Greens - uniform float g_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Greens: Cyan"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Greens: Magenta"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Greens: Yellow"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Greens: Black"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Greens: Saturation"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Greens: Lightness Curve"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float g_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Greens: Lightness"; - ui_category = "Selective Color: Greens"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Green-Cyans - uniform float gc_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Green-Cyans: Cyan"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float gc_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Green-Cyans: Magenta"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float gc_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Green-Cyans: Yellow"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float gc_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Green-Cyans: Black"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float gc_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Green-Cyans: Saturation"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float gc_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Green-Cyans: Lightness Curve"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float gc_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Green-Cyans: Lightness"; - ui_category = "Selective Color: Green-Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Cyans - uniform float c_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Cyans: Cyan"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Cyans: Magenta"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Cyans: Yellow"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Cyans: Black"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Cyans: Saturation"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Cyans: Lightness Curve"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float c_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Cyans: Lightness"; - ui_category = "Selective Color: Cyans"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Cyan-Blues - uniform float cb_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Cyan-Blues: Cyan"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float cb_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Cyan-Blues: Magenta"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float cb_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Cyan-Blues: Yellow"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float cb_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Cyan-Blues: Black"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float cb_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Cyan-Blues: Saturation"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float cb_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Cyan-Blues: Lightness Curve"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float cb_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Cyan-Blues: Lightness"; - ui_category = "Selective Color: Cyan-Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Blues - uniform float b_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Blues: Cyan"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Blues: Magenta"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Blues: Yellow"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Blues: Black"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Blues: Saturation"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Blues: Lightness Curve"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float b_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Blues: Lightness"; - ui_category = "Selective Color: Blues"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Blue-Magentas - uniform float bm_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Blue-Magentas: Cyan"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bm_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Blue-Magentas: Magenta"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bm_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Blue-Magentas: Yellow"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bm_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Blue-Magentas: Black"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bm_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Blue-Magentas: Saturation"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bm_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Blue-Magentas: Lightness Curve"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bm_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Blue-Magentas: Lightness"; - ui_category = "Selective Color: Blue-Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Magentas - uniform float m_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Magentas: Cyan"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Magentas: Magenta"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Magentas: Yellow"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Magentas: Black"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Magentas: Saturation"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Magentas: Lightness Curve"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float m_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Magentas: Lightness"; - ui_category = "Selective Color: Magentas"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Magenta-Reds - uniform float mr_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Magenta-Reds: Cyan"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float mr_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Magenta-Reds: Magenta"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float mr_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Magenta-Reds: Yellow"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float mr_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Magenta-Reds: Black"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float mr_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Magenta-Reds: Saturation"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float mr_adj_lig_curve < - ui_type = "slider"; - ui_label = "Lightness Curve"; - ui_tooltip = "Selective Color Magenta-Reds: Lightness Curve"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float mr_adj_lig < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Selective Color Magenta-Reds: Lightness"; - ui_category = "Selective Color: Magenta-Reds"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Whites - uniform float w_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Whites: Cyan"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Whites: Magenta"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Whites: Yellow"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Whites: Black"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float w_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Whites: Saturation"; - ui_category = "Selective Color: Whites"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Neutrals - uniform float n_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Neutrals: Cyan"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Neutrals: Magenta"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Neutrals: Yellow"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Neutrals: Black"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float n_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Neutrals: Saturation"; - ui_category = "Selective Color: Neutrals"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - // Blacks - uniform float bk_adj_cya < - ui_type = "slider"; - ui_label = "Cyan"; - ui_tooltip = "Selective Color Blacks: Cyan"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_mag < - ui_type = "slider"; - ui_label = "Magenta"; - ui_tooltip = "Selective Color Blacks: Magenta"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_yel < - ui_type = "slider"; - ui_label = "Yellow"; - ui_tooltip = "Selective Color Blacks: Yellow"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_bla < - ui_type = "slider"; - ui_label = "Black"; - ui_tooltip = "Selective Color Blacks: Black"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float bk_adj_sat < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Selective Color Blacks: Saturation"; - ui_category = "Selective Color: Blacks"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float mid( float3 c ) - { - float sum = c.x + c.y + c.z; - float mn = min( min( c.x, c.y ), c.z ); - float mx = max( max( c.x, c.y ), c.z ); - return sum - mn - mx; - } - - // Credit to user 'iq' from shadertoy - // See https://www.shadertoy.com/view/MdBfR1 - float brightness_curve( float x, float k ) - { - float s = sign( x - 0.5f ); - float o = ( 1.0f + s ) / 2.0f; - return o - 0.5f * s * pow( max( 2.0f * ( o - s * x ), 0.0f ), k ); - } - - float curve( float x ) - { - return x * x * ( 3.0 - 2.0 * x ); - } - - float smooth( float x ) - { - return x * x * x * ( x * ( x * 6.0f - 15.0f ) + 10.0f ); - } - - float adjustcolor( float scale, float colorvalue, float adjust, float bk, int method ) - { - /* - y(value, adjustment) = clamp((( -1 - adjustment ) * bk - adjustment ) * method, -value, 1 - value ) * scale - absolute: method = 1.0f - colorvalue * 0 - relative: method = 1.0f - colorvalue * 1 - */ - return clamp((( -1.0f - adjust ) * bk - adjust ) * ( 1.0f - colorvalue * method ), -colorvalue, 1.0f - colorvalue) * scale; - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_SelectiveColor(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - - // Clamp 0..1 - color.xyz = saturate( color.xyz ); - - // Min Max Mid - float min_value = min( min( color.x, color.y ), color.z ); - float max_value = max( max( color.x, color.y ), color.z ); - float mid_value = mid( color.xyz ); - float scalar = max_value - min_value; - float alt_scalar = ( mid_value - min_value ) / 2.0f; - float cmy_scalar = scalar / 2.0f; - - // HSL - float3 hsl = RGBToHSL( color.xyz ).x; - - // Weights for Whites, Neutrals, Blacks - float sWhites = smooth( min_value ); - float sBlacks = 1.0f - smooth( max_value ); - float sNeutrals = 1.0f - smooth( max_value - min_value ); - - // Weights - float sw_r = curve( max( 1.0f - abs( hsl.x * 6.0f ), 0.0f )) + - curve( max( 1.0f - abs(( hsl.x - 1.0f ) * 6.0f ), 0.0f )); - float sw_o = curve( max( 1.0f - abs(( hsl.x - 1.0f / 12.0f ) * 6.0f ), 0.0f )) + - curve( max( 1.0f - abs(( hsl.x - 13.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_y = curve( max( 1.0f - abs(( hsl.x - 2.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_yg = curve( max( 1.0f - abs(( hsl.x - 3.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_g = curve( max( 1.0f - abs(( hsl.x - 4.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_gc = curve( max( 1.0f - abs(( hsl.x - 5.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_c = curve( max( 1.0f - abs(( hsl.x - 6.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_cb = curve( max( 1.0f - abs(( hsl.x - 7.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_b = curve( max( 1.0f - abs(( hsl.x - 8.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_bm = curve( max( 1.0f - abs(( hsl.x - 9.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_m = curve( max( 1.0f - abs(( hsl.x - 10.0f / 12.0f ) * 6.0f ), 0.0f )); - float sw_mr = curve( max( 1.0f - abs(( hsl.x - 11.0f / 12.0f ) * 6.0f ), 0.0f )) + - curve( max( 1.0f - abs(( hsl.x + 1.0f / 12.0f ) * 6.0f ), 0.0f )); - - float w_r = sw_r * scalar; - float w_o = sw_o * alt_scalar; - float w_y = sw_y * cmy_scalar; - float w_yg = sw_yg * alt_scalar; - float w_g = sw_g * scalar; - float w_gc = sw_gc * alt_scalar; - float w_c = sw_c * cmy_scalar; - float w_cb = sw_cb * alt_scalar; - float w_b = sw_b * scalar; - float w_bm = sw_bm * alt_scalar; - float w_m = sw_m * cmy_scalar; - float w_mr = sw_mr * alt_scalar; - - // Selective Color - // Reds - color.x = color.x + adjustcolor( w_r, color.x, r_adj_cya, r_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_r, color.y, r_adj_mag, r_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_r, color.z, r_adj_yel, r_adj_bla, corr_method ); - // Oranges - color.x = color.x + adjustcolor( w_o, color.x, o_adj_cya, o_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_o, color.y, o_adj_mag, o_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_o, color.z, o_adj_yel, o_adj_bla, corr_method ); - // Yellows - color.x = color.x + adjustcolor( w_y, color.x, y_adj_cya, y_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_y, color.y, y_adj_mag, y_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_y, color.z, y_adj_yel, y_adj_bla, corr_method ); - // Yellow-Greens - color.x = color.x + adjustcolor( w_yg, color.x, yg_adj_cya, yg_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_yg, color.y, yg_adj_mag, yg_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_yg, color.z, yg_adj_yel, yg_adj_bla, corr_method ); - // Greens - color.x = color.x + adjustcolor( w_g, color.x, g_adj_cya, g_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_g, color.y, g_adj_mag, g_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_g, color.z, g_adj_yel, g_adj_bla, corr_method ); - // Green-Cyans - color.x = color.x + adjustcolor( w_gc, color.x, gc_adj_cya, gc_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_gc, color.y, gc_adj_mag, gc_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_gc, color.z, gc_adj_yel, gc_adj_bla, corr_method ); - // Cyans - color.x = color.x + adjustcolor( w_c, color.x, c_adj_cya, c_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_c, color.y, c_adj_mag, c_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_c, color.z, c_adj_yel, c_adj_bla, corr_method ); - // Cyan-Blues - color.x = color.x + adjustcolor( w_cb, color.x, cb_adj_cya, cb_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_cb, color.y, cb_adj_mag, cb_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_cb, color.z, cb_adj_yel, cb_adj_bla, corr_method ); - // Blues - color.x = color.x + adjustcolor( w_b, color.x, b_adj_cya, b_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_b, color.y, b_adj_mag, b_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_b, color.z, b_adj_yel, b_adj_bla, corr_method ); - // Blue-Magentas - color.x = color.x + adjustcolor( w_bm, color.x, bm_adj_cya, bm_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_bm, color.y, bm_adj_mag, bm_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_bm, color.z, bm_adj_yel, bm_adj_bla, corr_method ); - // Magentas - color.x = color.x + adjustcolor( w_m, color.x, m_adj_cya, m_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_m, color.y, m_adj_mag, m_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_m, color.z, m_adj_yel, m_adj_bla, corr_method ); - // Magenta-Reds - color.x = color.x + adjustcolor( w_mr, color.x, mr_adj_cya, mr_adj_bla, corr_method ); - color.y = color.y + adjustcolor( w_mr, color.y, mr_adj_mag, mr_adj_bla, corr_method ); - color.z = color.z + adjustcolor( w_mr, color.z, mr_adj_yel, mr_adj_bla, corr_method ); - // Whites - color.x = color.x + adjustcolor( sWhites, color.x, w_adj_cya, w_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sWhites, color.y, w_adj_mag, w_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sWhites, color.z, w_adj_yel, w_adj_bla, corr_method ); - // Blacks - color.x = color.x + adjustcolor( sBlacks, color.x, bk_adj_cya, bk_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sBlacks, color.y, bk_adj_mag, bk_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sBlacks, color.z, bk_adj_yel, bk_adj_bla, corr_method ); - // Neutrals - color.x = color.x + adjustcolor( sNeutrals, color.x, n_adj_cya, n_adj_bla, corr_method ); - color.y = color.y + adjustcolor( sNeutrals, color.y, n_adj_mag, n_adj_bla, corr_method ); - color.z = color.z + adjustcolor( sNeutrals, color.z, n_adj_yel, n_adj_bla, corr_method ); - - // Saturation - // Have to get current saturation in between each adjustment as there are overlaps - float curr_sat = 0.0f; - - // Reds - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( r_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_r * r_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_r * r_adj_sat )); - // Oranges - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( o_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_o * o_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_o * o_adj_sat )); - // Yellows - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( y_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_y * y_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_y * y_adj_sat )); - // Yellow-Greens - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( yg_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_yg * yg_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_yg * yg_adj_sat )); - // Greens - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( g_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_g * g_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_g * g_adj_sat )); - // Green-Cyans - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( gc_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_gc * gc_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_gc * gc_adj_sat )); - // Cyans - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( c_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_c * c_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_c * c_adj_sat )); - // Cyan-Blues - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( cb_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_cb * cb_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_cb * cb_adj_sat )); - // Blues - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( b_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_b * b_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_b * b_adj_sat )); - // Blue-Magentas - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( bm_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_bm * bm_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_bm * bm_adj_sat )); - // Magentas - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( m_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_m * m_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_m * m_adj_sat )); - // Magenta-Reds - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( mr_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_mr * mr_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sw_mr * mr_adj_sat )); - // Whites - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( w_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sWhites * w_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sWhites * w_adj_sat )); - // Blacks - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( bk_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sBlacks * bk_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sBlacks * bk_adj_sat )); - // Neutrals - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - color.xyz = ( n_adj_sat > 0.0f ) ? saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sNeutrals * n_adj_sat * ( 1.0f - curr_sat ))) : - saturate( lerp( dot( color.xyz, 0.333333f ), color.xyz, 1.0f + sNeutrals * n_adj_sat )); - - // Lightness - float3 temp = 0.0f; - - // Reds - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + r_adj_lig )); - temp.z = brightness_curve( temp.z, max( r_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_r * smooth( curr_sat )); - // Oranges - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + o_adj_lig )); - temp.z = brightness_curve( temp.z, max( o_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_o * smooth( curr_sat )); - // Yellows - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + y_adj_lig )); - temp.z = brightness_curve( temp.z, max( y_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_y * smooth( curr_sat )); - // Yellow-Greens - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + yg_adj_lig )); - temp.z = brightness_curve( temp.z, max( yg_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_yg * smooth( curr_sat )); - // Greens - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + g_adj_lig )); - temp.z = brightness_curve( temp.z, max( g_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_g * smooth( curr_sat )); - // Green-Cyans - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + gc_adj_lig )); - temp.z = brightness_curve( temp.z, max( gc_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_gc * smooth( curr_sat )); - // Cyans - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + c_adj_lig )); - temp.z = brightness_curve( temp.z, max( c_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_c * smooth( curr_sat )); - // Cyan-Blues - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + cb_adj_lig )); - temp.z = brightness_curve( temp.z, max( cb_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_cb * smooth( curr_sat )); - // Blues - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + b_adj_lig )); - temp.z = brightness_curve( temp.z, max( b_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_b * smooth( curr_sat )); - // Blue-Magentas - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + bm_adj_lig )); - temp.z = brightness_curve( temp.z, max( bm_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_bm * smooth( curr_sat )); - // Magentas - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + m_adj_lig )); - temp.z = brightness_curve( temp.z, max( m_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_m * smooth( curr_sat )); - // Magenta-Reds - curr_sat = max( max( color.x, color.y ), color.z ) - min( min( color.x, color.y ), color.z ); - temp.xyz = RGBToHSL( color.xyz ); - temp.z = saturate( temp.z * ( 1.0f + mr_adj_lig )); - temp.z = brightness_curve( temp.z, max( mr_adj_lig_curve, 0.001f ) + 1.0f ); - color.xyz = lerp( color.xyz, HSLToRGB( temp.xyz ), sw_mr * smooth( curr_sat )); - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_SelectiveColor_v2 - { - pass prod80_sc - { - VertexShader = PostProcessVS; - PixelShader = PS_SelectiveColor; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_04_Technicolor.fx b/data/reshade/shaders/Effects/PD80_04_Technicolor.fx deleted file mode 100644 index a525512f..00000000 --- a/data/reshade/shaders/Effects/PD80_04_Technicolor.fx +++ /dev/null @@ -1,192 +0,0 @@ -/* - Description : PD80 04 Technicolor for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional credits - - Using Hue Shift algorythm from Vibhore Tanwer (stockexchange) - No particular reason, just found it interesting - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ -#include "ReShade.fxh" -#include "ReShadeUI.fxh" - -namespace pd80_technicolor -{ - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform float3 Red2strip < - ui_type = "color"; - ui_label = "Red Dye Color"; - ui_tooltip = "Red Color used to create Cyan (contemporary)"; - ui_category = "Technicolor 2 strip"; - > = float3(1.0, 0.098, 0.0); - uniform float3 Cyan2strip < - ui_type = "color"; - ui_label = "Cyan Dye Color"; - ui_tooltip = "Cyan Color used to create Red (contemporary)"; - ui_category = "Technicolor 2 strip"; - > = float3(0.0, 0.988, 1.0); - uniform float3 colorKey < - ui_type = "color"; - ui_label = "Funky Color Adjustment"; - ui_tooltip = "3rd Layer for Fun, lower values increase contrast"; - ui_category = "Technicolor 2 strip"; - > = float3(1.0, 1.0, 1.0); - uniform float Saturation2 < - ui_min = 1.0; - ui_max = 2.0; - ui_type = "slider"; - ui_label = "Saturation Adjustment"; - ui_tooltip = "Additional saturation control as 2 Strip Process is not very saturated by itself"; - ui_category = "Technicolor 2 strip"; - > = 1.5; - uniform bool enable3strip < - ui_label = "Enable Technicolor 3 strip"; - ui_tooltip = "Enable Technicolor 3 strip"; - ui_category = "Technicolor 3 strip"; - > = false; - uniform float3 ColorStrength < - ui_type = "color"; - ui_tooltip = "Higher means darker and more intense colors."; - ui_category = "Technicolor 3 strip"; - > = float3(0.2, 0.2, 0.2); - uniform float Brightness < - ui_type = "slider"; - ui_label = "Brightness Adjustment"; - ui_min = 0.5; - ui_max = 1.5; - ui_tooltip = "Higher means brighter image."; - ui_category = "Technicolor 3 strip"; - > = 1.0; - uniform float Saturation < - ui_type = "slider"; - ui_label = "Saturation Adjustment"; - ui_min = 0.0; - ui_max = 1.5; - ui_tooltip = "Additional saturation control since this effect tends to oversaturate the image."; - ui_category = "Technicolor 3 strip"; - > = 1.0; - uniform float Strength < - ui_type = "slider"; - ui_label = "Effect Strength"; - ui_min = 0.0; - ui_max = 1.0; - ui_tooltip = "Adjust the strength of the effect."; - ui_category = "Technicolor 3 strip"; - > = 1.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float getLuminance( in float3 x ) - { - return dot( x, float3( 0.212656f, 0.715158f, 0.072186f )); - } - - // Code from Vibhore Tanwer - float3x3 QuaternionToMatrix( float4 quat ) - { - float3 cross = quat.yzx * quat.zxy; - float3 square= quat.xyz * quat.xyz; - float3 wimag = quat.w * quat.xyz; - - square = square.xyz + square.yzx; - - float3 diag = 0.5f - square; - float3 a = (cross + wimag); - float3 b = (cross - wimag); - - return float3x3( - 2.0f * float3(diag.x, b.z, a.y), - 2.0f * float3(a.z, diag.y, b.x), - 2.0f * float3(b.y, a.x, diag.z)); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_Technicolor(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - color.xyz = saturate( color.xyz ); - float3 root3 = 0.57735f; - float3 keyC = 0.0f; - float half_angle = 0.0f; - float4 rot_quat = 0.0f; - float3x3 rot_Mat; - float HueAdj = 0.52f; //0.5 is too strong in reds and doesn't work well with skin color - float3 orig = color.xyz; - float negR = 1.0f - color.x; - float negG = 1.0f - color.y; - float3 newR = 1.0f - negR * Cyan2strip; - float3 newC = 1.0f - negG * Red2strip; - half_angle = 0.5f * radians( 180.0f ); // Hue is radians of 0 to 360 degrees - rot_quat = float4(( root3 * sin( half_angle )), cos( half_angle )); - rot_Mat = QuaternionToMatrix( rot_quat ); - float3 key = colorKey.xyz; - key.xyz = mul( rot_Mat, key.xyz ); - key.xyz = max( color.yyy, key.xyz ); - color.xyz = newR.xyz * newC.xyz * key.xyz; // 2 strip image - // Fix hue - half_angle = 0.5f * radians( HueAdj * 360.0f ); // Hue is radians of 0 to 360 degrees - rot_quat = float4(( root3 * sin( half_angle )), cos( half_angle )); - rot_Mat = QuaternionToMatrix( rot_quat ); - color.xyz = mul( rot_Mat, color.xyz ); - // Add saturation to taste - color.xyz = lerp( getLuminance( color.xyz ), color.xyz, Saturation2 ); - - if( enable3strip ) { - float3 temp = 1.0 - orig.xyz; - float3 target = temp.grg; - float3 target2 = temp.bbr; - float3 temp2 = orig.xyz * target.xyz; - temp2.xyz *= target2.xyz; - temp.xyz = temp2.xyz * ColorStrength; - temp2.xyz *= Brightness; - target.xyz = temp.yxy; - target2.xyz = temp.zzx; - temp.xyz = orig.xyz - target.xyz; - temp.xyz += temp2.xyz; - temp2.xyz = temp.xyz - target2.xyz; - color.xyz = lerp( orig.xyz, temp2.xyz, Strength ); - color.xyz = lerp( getLuminance( color.xyz ), color.xyz, Saturation); - } - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_04_Technicolor - { - pass prod80_TC - { - VertexShader = PostProcessVS; - PixelShader = PS_Technicolor; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_05_Sharpening.fx b/data/reshade/shaders/Effects/PD80_05_Sharpening.fx deleted file mode 100644 index 388c3932..00000000 --- a/data/reshade/shaders/Effects/PD80_05_Sharpening.fx +++ /dev/null @@ -1,276 +0,0 @@ -/* - Description : PD80 05 Sharpening for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" - -namespace pd80_lumasharpen -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enableShowEdges < - ui_label = "Show only Sharpening Texture"; - ui_tooltip = "Show only Sharpening Texture"; - ui_category = "Sharpening"; - > = false; - uniform float BlurSigma < - ui_label = "Sharpening Width"; - ui_tooltip = "Sharpening Width"; - ui_category = "Sharpening"; - ui_type = "slider"; - ui_min = 0.3; - ui_max = 1.2; - > = 0.45; - uniform float Sharpening < - ui_label = "Sharpening Strength"; - ui_tooltip = "Sharpening Strength"; - ui_category = "Sharpening"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 5.0; - > = 1.7; - uniform float Threshold < - ui_label = "Sharpening Threshold"; - ui_tooltip = "Sharpening Threshold"; - ui_category = "Sharpening"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float limiter < - ui_label = "Sharpening Highlight Limiter"; - ui_tooltip = "Sharpening Highlight Limiter"; - ui_category = "Sharpening"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.03; - uniform bool enable_depth < - ui_label = "Enable depth based adjustments.\nMake sure you have setup your depth buffer correctly."; - ui_tooltip = "Enable depth based adjustments"; - ui_category = "Sharpening: Depth"; - > = false; - uniform bool enable_reverse < - ui_label = "Reverses the effect (sharpen close, or sharpen far)"; - ui_tooltip = "Reverses the effect"; - ui_category = "Sharpening: Depth"; - > = false; - uniform bool display_depth < - ui_label = "Show depth texture"; - ui_tooltip = "Show depth texture"; - ui_category = "Sharpening: Depth"; - > = false; - uniform float depthStart < - ui_type = "slider"; - ui_label = "Change Depth Start Plane"; - ui_tooltip = "Change Depth Start Plane"; - ui_category = "Sharpening: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.0; - uniform float depthEnd < - ui_type = "slider"; - ui_label = "Change Depth End Plane"; - ui_tooltip = "Change Depth End Plane"; - ui_category = "Sharpening: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.1; - uniform float depthCurve < - ui_label = "Depth Curve Adjustment"; - ui_tooltip = "Depth Curve Adjustment"; - ui_category = "Sharpening: Depth"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 8.0; - > = 1.0; - - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texGaussianH { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; }; - texture texGaussian { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerGaussianH { Texture = texGaussianH; }; - sampler samplerGaussian { Texture = texGaussian; }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define PI 3.141592f - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - - float getLuminance( in float3 x ) - { - return dot( x, float3( 0.212656, 0.715158, 0.072186 )); - } - - float getAvgColor( float3 col ) - { - return dot( col.xyz, float3( 0.333333f, 0.333334f, 0.333333f )); - } - - // nVidia blend modes - // Source: https://www.khronos.org/registry/OpenGL/extensions/NV/NV_blend_equation_advanced.txt - float3 ClipColor( float3 color ) - { - float lum = getAvgColor( color.xyz ); - float mincol = min( min( color.x, color.y ), color.z ); - float maxcol = max( max( color.x, color.y ), color.z ); - color.xyz = ( mincol < 0.0f ) ? lum + (( color.xyz - lum ) * lum ) / ( lum - mincol ) : color.xyz; - color.xyz = ( maxcol > 1.0f ) ? lum + (( color.xyz - lum ) * ( 1.0f - lum )) / ( maxcol - lum ) : color.xyz; - return color; - } - - // Luminosity: base, blend - // Color: blend, base - float3 blendLuma( float3 base, float3 blend ) - { - float lumbase = getAvgColor( base.xyz ); - float lumblend = getAvgColor( blend.xyz ); - float ldiff = lumblend - lumbase; - float3 col = base.xyz + ldiff; - return ClipColor( col.xyz ); - } - - float3 screen(float3 c, float3 b) { return 1.0f-(1.0f-c)*(1.0f-b);} - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_GaussianH(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float px = BUFFER_RCP_WIDTH; - float SigmaSum = 0.0f; - float pxlOffset = 1.0f; - float loops = max( BUFFER_WIDTH, BUFFER_HEIGHT ) / 1920.0f * 4.0f; - - //Gaussian Math - float3 Sigma; - float bSigma = BlurSigma * ( max( BUFFER_WIDTH, BUFFER_HEIGHT ) / 1920.0f ); // Scalar - Sigma.x = 1.0f / ( sqrt( 2.0f * PI ) * bSigma ); - Sigma.y = exp( -0.5f / ( bSigma * bSigma )); - Sigma.z = Sigma.y * Sigma.y; - - //Center Weight - color.xyz *= Sigma.x; - //Adding to total sum of distributed weights - SigmaSum += Sigma.x; - //Setup next weight - Sigma.xy *= Sigma.yz; - - [loop] - for( int i = 0; i < loops; ++i ) - { - color += tex2Dlod( ReShade::BackBuffer, float4( texcoord.xy + float2( pxlOffset*px, 0.0f ), 0.0, 0.0 )) * Sigma.x; - color += tex2Dlod( ReShade::BackBuffer, float4( texcoord.xy - float2( pxlOffset*px, 0.0f ), 0.0, 0.0 )) * Sigma.x; - SigmaSum += ( 2.0f * Sigma.x ); - pxlOffset += 1.0f; - Sigma.xy *= Sigma.yz; - } - - color.xyz /= SigmaSum; - return float4( color.xyz, 1.0f ); - } - - float4 PS_GaussianV(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( samplerGaussianH, texcoord ); - float py = BUFFER_RCP_HEIGHT; - float SigmaSum = 0.0f; - float pxlOffset = 1.0f; - float loops = max( BUFFER_WIDTH, BUFFER_HEIGHT ) / 1920.0f * 4.0f; - - //Gaussian Math - float3 Sigma; - float bSigma = BlurSigma * ( max( BUFFER_WIDTH, BUFFER_HEIGHT ) / 1920.0f ); // Scalar - Sigma.x = 1.0f / ( sqrt( 2.0f * PI ) * bSigma ); - Sigma.y = exp( -0.5f / ( bSigma * bSigma )); - Sigma.z = Sigma.y * Sigma.y; - - //Center Weight - color.xyz *= Sigma.x; - //Adding to total sum of distributed weights - SigmaSum += Sigma.x; - //Setup next weight - Sigma.xy *= Sigma.yz; - - [loop] - for( int i = 0; i < loops; ++i ) - { - color += tex2Dlod( samplerGaussianH, float4( texcoord.xy + float2( 0.0f, pxlOffset*py ), 0.0, 0.0 )) * Sigma.x; - color += tex2Dlod( samplerGaussianH, float4( texcoord.xy - float2( 0.0f, pxlOffset*py ), 0.0, 0.0 )) * Sigma.x; - SigmaSum += ( 2.0f * Sigma.x ); - pxlOffset += 1.0f; - Sigma.xy *= Sigma.yz; - } - - color.xyz /= SigmaSum; - return float4( color.xyz, 1.0f ); - } - - float4 PS_LumaSharpen(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 orig = tex2D( ReShade::BackBuffer, texcoord ); - float4 gaussian = tex2D( samplerGaussian, texcoord ); - - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - depth = smoothstep( depthStart, depthEnd, depth ); - depth = pow( depth, depthCurve ); - depth = enable_reverse ? 1.0f - depth : depth; - - float3 edges = max( saturate( orig.xyz - gaussian.xyz ) - Threshold, 0.0f ); - float3 invGauss = saturate( 1.0f - gaussian.xyz ); - float3 oInvGauss = saturate( orig.xyz + invGauss.xyz ); - float3 invOGauss = max( saturate( 1.0f - oInvGauss.xyz ) - Threshold, 0.0f ); - edges = max(( saturate( Sharpening * edges.xyz )) - ( saturate( Sharpening * invOGauss.xyz )), 0.0f ); - float3 blend = screen( orig.xyz, lerp( min( edges.xyz, limiter ), 0.0f, enable_depth * depth )); - float3 color = blendLuma( orig.xyz, blend.xyz ); - color.xyz = enableShowEdges ? lerp( min( edges.xyz, limiter ), min( edges.xyz, limiter ) * depth, enable_depth ) : color.xyz; - color.xyz = display_depth ? depth.xxx : color.xyz; - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_05_LumaSharpen - { - pass GaussianH - { - VertexShader = PostProcessVS; - PixelShader = PS_GaussianH; - RenderTarget = texGaussianH; - } - pass GaussianV - { - VertexShader = PostProcessVS; - PixelShader = PS_GaussianV; - RenderTarget = texGaussian; - } - pass LumaSharpen - { - VertexShader = PostProcessVS; - PixelShader = PS_LumaSharpen; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_06_Chromatic_Aberration.fx b/data/reshade/shaders/Effects/PD80_06_Chromatic_Aberration.fx deleted file mode 100644 index 145d2b77..00000000 --- a/data/reshade/shaders/Effects/PD80_06_Chromatic_Aberration.fx +++ /dev/null @@ -1,306 +0,0 @@ -/* - Description : PD80 06 Chromatic Aberration for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" - -#if __RENDERER__ == 0x9000 - #ifndef CA_sampleSTEPS - #define CA_sampleSTEPS 24 // [0 to 96] - #endif - #define CA_DX9_MODE 1 -#else - #define CA_DX9_MODE 0 -#endif - -namespace pd80_ca -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int CA_type < __UNIFORM_COMBO_INT1 - ui_label = "Chromatic Aberration Type"; - ui_tooltip = "Chromatic Aberration Type"; - ui_category = "Chromatic Aberration"; - ui_items = "Center Weighted Radial\0Center Weighted Longitudinal\0Full screen Radial\0Full screen Longitudinal\0"; - > = 0; - uniform int degrees < - ui_type = "slider"; - ui_label = "CA Rotation Offset"; - ui_tooltip = "CA Rotation Offset"; - ui_category = "Chromatic Aberration"; - ui_min = 0; - ui_max = 360; - ui_step = 1; - > = 135; - uniform float CA < - ui_type = "slider"; - ui_label = "CA Global Width"; - ui_tooltip = "CA Global Width"; - ui_category = "Chromatic Aberration"; - ui_min = -150.0f; - ui_max = 150.0f; - > = -12.0; -#if CA_DX9_MODE == 0 - uniform int sampleSTEPS < - ui_type = "slider"; - ui_label = "Number of Hues"; - ui_tooltip = "Number of Hues"; - ui_category = "Chromatic Aberration"; - ui_min = 8; - ui_max = 96; - ui_step = 1; - > = 24; -#endif - uniform float CA_strength < - ui_type = "slider"; - ui_label = "CA Effect Strength"; - ui_tooltip = "CA Effect Strength"; - ui_category = "Chromatic Aberration"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 1.0; - uniform bool show_CA < - ui_label = "CA Show Center / Vignette"; - ui_tooltip = "CA Show Center / Vignette"; - ui_category = "CA: Center Weighted"; - > = false; - uniform float3 vignetteColor < - ui_type = "color"; - ui_label = "Vignette Color"; - ui_tooltip = "Vignette Color"; - ui_category = "CA: Center Weighted"; - > = float3(0.0, 0.0, 0.0); - uniform float CA_width < - ui_type = "slider"; - ui_label = "CA Width"; - ui_tooltip = "CA Width"; - ui_category = "CA: Center Weighted"; - ui_min = 0.0f; - ui_max = 5.0f; - > = 1.0; - uniform float CA_curve < - ui_type = "slider"; - ui_label = "CA Curve"; - ui_tooltip = "CA Curve"; - ui_category = "CA: Center Weighted"; - ui_min = 0.1f; - ui_max = 12.0f; - > = 1.0; - uniform float oX < - ui_type = "slider"; - ui_label = "CA Center (X)"; - ui_tooltip = "CA Center (X)"; - ui_category = "CA: Center Weighted"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float oY < - ui_type = "slider"; - ui_label = "CA Center (Y)"; - ui_tooltip = "CA Center (Y)"; - ui_category = "CA: Center Weighted"; - ui_min = -1.0f; - ui_max = 1.0f; - > = 0.0; - uniform float CA_shapeX < - ui_type = "slider"; - ui_label = "CA Shape (X)"; - ui_tooltip = "CA Shape (X)"; - ui_category = "CA: Center Weighted"; - ui_min = 0.2f; - ui_max = 6.0f; - > = 1.0; - uniform float CA_shapeY < - ui_type = "slider"; - ui_label = "CA Shape (Y)"; - ui_tooltip = "CA Shape (Y)"; - ui_category = "CA: Center Weighted"; - ui_min = 0.2f; - ui_max = 6.0f; - > = 1.0; - uniform bool enable_depth_int < - ui_label = "Intensity: Enable depth based adjustments.\nMake sure you have setup your depth buffer correctly."; - ui_tooltip = "Intensity: Enable depth based adjustments"; - ui_category = "Final Adjustments: Depth"; - > = false; - uniform bool enable_depth_width < - ui_label = "Width: Enable depth based adjustments.\nMake sure you have setup your depth buffer correctly."; - ui_tooltip = "Width: Enable depth based adjustments"; - ui_category = "Final Adjustments: Depth"; - > = false; - uniform bool display_depth < - ui_label = "Show depth texture"; - ui_tooltip = "Show depth texture"; - ui_category = "Final Adjustments: Depth"; - > = false; - uniform float depthStart < - ui_type = "slider"; - ui_label = "Change Depth Start Plane"; - ui_tooltip = "Change Depth Start Plane"; - ui_category = "Final Adjustments: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.0; - uniform float depthEnd < - ui_type = "slider"; - ui_label = "Change Depth End Plane"; - ui_tooltip = "Change Depth End Plane"; - ui_category = "Final Adjustments: Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.1; - uniform float depthCurve < - ui_label = "Depth Curve Adjustment"; - ui_tooltip = "Depth Curve Adjustment"; - ui_category = "Final Adjustments: Depth"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 8.0; - > = 1.0; - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float3 HUEToRGB( float H ) - { - return saturate( float3( abs( H * 6.0f - 3.0f ) - 1.0f, - 2.0f - abs( H * 6.0f - 2.0f ), - 2.0f - abs( H * 6.0f - 4.0f ))); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_CA(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = 0.0f; - float px = BUFFER_RCP_WIDTH; - float py = BUFFER_RCP_HEIGHT; - float aspect = float( BUFFER_WIDTH * BUFFER_RCP_HEIGHT ); - float3 orig = tex2D( ReShade::BackBuffer, texcoord ).xyz; - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - depth = smoothstep( depthStart, depthEnd, depth ); - depth = pow( depth, depthCurve ); - float CA_width_n = CA_width; - if( enable_depth_width ) - CA_width_n *= depth; - - //float2 coords = clamp( texcoord.xy * 2.0f - float2( oX + 1.0f, oY + 1.0f ), -1.0f, 1.0f ); - float2 coords = texcoord.xy * 2.0f - float2( oX + 1.0f, oY + 1.0f ); // Let it ripp, and not clamp! - float2 uv = coords.xy; - coords.xy /= float2( CA_shapeX / aspect, CA_shapeY ); - float2 caintensity= length( coords.xy ) * CA_width_n; - caintensity.y = caintensity.x * caintensity.x + 1.0f; - caintensity.x = 1.0f - ( 1.0f / ( caintensity.y * caintensity.y )); - caintensity.x = pow( caintensity.x, CA_curve ); - - int degreesY = degrees; - float c = 0.0f; - float s = 0.0f; - switch( CA_type ) - { - // Radial: Y + 90 w/ multiplying with uv.xy - case 0: - { - degreesY = degrees + 90 > 360 ? degreesY = degrees + 90 - 360 : degrees + 90; - c = cos( radians( degrees )) * uv.x; - s = sin( radians( degreesY )) * uv.y; - } - break; - // Longitudinal: X = Y w/o multiplying with uv.xy - case 1: - { - c = cos( radians( degrees )); - s = sin( radians( degreesY )); - } - break; - // Full screen Radial - case 2: - { - degreesY = degrees + 90 > 360 ? degreesY = degrees + 90 - 360 : degrees + 90; - caintensity.x = 1.0f; - c = cos( radians( degrees )) * uv.x; - s = sin( radians( degreesY )) * uv.y; - } - break; - // Full screen Longitudinal - case 3: - { - caintensity.x = 1.0f; - c = cos( radians( degrees )); - s = sin( radians( degreesY )); - } - break; - } - - //Apply based on scene depth - if( enable_depth_int ) - caintensity.x *= depth; - - float3 huecolor = 0.0f; - float3 temp = 0.0f; -#if CA_DX9_MODE == 1 - float o1 = CA_sampleSTEPS - 1.0f; -#else - float o1 = sampleSTEPS - 1.0f; -#endif - float o2 = 0.0f; - float3 d = 0.0f; - - // Scale CA (hackjob!) - float caWidth = CA * ( max( BUFFER_WIDTH, BUFFER_HEIGHT ) / 1920.0f ); // Scaled for 1920, raising resolution in X or Y should raise scale - - float offsetX = px * c * caintensity.x; - float offsetY = py * s * caintensity.x; -#if CA_DX9_MODE == 1 - float sampst = CA_sampleSTEPS; - for( float i = 0; i < CA_sampleSTEPS; i++ ) -#else - float sampst = sampleSTEPS; - for( float i = 0; i < sampleSTEPS; i++ ) -#endif - { - huecolor.xyz = HUEToRGB( i / sampst ); - o2 = lerp( -caWidth, caWidth, i / o1 ); - temp.xyz = tex2D( ReShade::BackBuffer, texcoord.xy + float2( o2 * offsetX, o2 * offsetY )).xyz; - color.xyz += temp.xyz * huecolor.xyz; - d.xyz += huecolor.xyz; - } - //color.xyz /= ( sampleSTEPS / 3.0f * 2.0f ); // Too crude and doesn't work with low sampleSTEPS ( too dim ) - color.xyz /= dot( d.xyz, 0.333333f ); // seems so-so OK - color.xyz = lerp( orig.xyz, color.xyz, CA_strength ); - color.xyz = lerp( color.xyz, vignetteColor.xyz * caintensity.x + ( 1.0f - caintensity.x ) * color.xyz, show_CA ); - color.xyz = display_depth ? depth.xxx : color.xyz; - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_06_ChromaticAberration - { - pass prod80_CA - { - VertexShader = PostProcessVS; - PixelShader = PS_CA; - } - } -} diff --git a/data/reshade/shaders/Effects/PD80_06_Depth_Slicer.fx b/data/reshade/shaders/Effects/PD80_06_Depth_Slicer.fx deleted file mode 100644 index 02e97b7a..00000000 --- a/data/reshade/shaders/Effects/PD80_06_Depth_Slicer.fx +++ /dev/null @@ -1,149 +0,0 @@ -/* - Description : PD80 04 Magical Rectangle for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Blend_Modes.fxh" -#include "PD80_00_Color_Spaces.fxh" - -namespace pd80_depthslicer -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform float depth_near < - ui_type = "slider"; - ui_label = "Depth Near Plane"; - ui_tooltip = "Depth Near Plane"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float depthpos < - ui_type = "slider"; - ui_label = "Depth Position"; - ui_tooltip = "Depth Position"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.015; - uniform float depth_far < - ui_type = "slider"; - ui_label = "Depth Far Plane"; - ui_tooltip = "Depth Far Plane"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float depth_smoothing < - ui_type = "slider"; - ui_label = "Depth Smoothing"; - ui_tooltip = "Depth Smoothing"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.005; - uniform float intensity < - ui_type = "slider"; - ui_label = "Lightness"; - ui_tooltip = "Lightness"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform float hue < - ui_type = "slider"; - ui_label = "Hue"; - ui_tooltip = "Hue"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.083; - uniform float saturation < - ui_type = "slider"; - ui_label = "Saturation"; - ui_tooltip = "Saturation"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.0; - uniform int blendmode_1 < __UNIFORM_COMBO_INT1 - ui_label = "Blendmode"; - ui_tooltip = "Blendmode"; - ui_category = "Depth Slicer"; - ui_items = "Default\0Darken\0Multiply\0Linearburn\0Colorburn\0Lighten\0Screen\0Colordodge\0Lineardodge\0Overlay\0Softlight\0Vividlight\0Linearlight\0Pinlight\0Hardmix\0Reflect\0Glow\0Hue\0Saturation\0Color\0Luminosity\0"; - > = 0; - uniform float opacity < - ui_type = "slider"; - ui_label = "Opacity"; - ui_tooltip = "Opacity"; - ui_category = "Depth Slicer"; - ui_min = 0.0; - ui_max = 1.0; - > = 1.0; - //// TEXTURES /////////////////////////////////////////////////////////////////// - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - - //// DEFINES //////////////////////////////////////////////////////////////////// - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_DepthSlice(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - - float depth_np = depthpos - depth_near; - float depth_fp = depthpos + depth_far; - - float dn = smoothstep( depth_np - depth_smoothing, depth_np, depth ); - float df = 1.0f - smoothstep( depth_fp, depth_fp + depth_smoothing, depth ); - - float colorize = 1.0f - ( dn * df ); - float a = colorize; - colorize *= intensity; - float3 b = HSVToRGB( float3( hue, saturation, colorize )); - color.xyz = blendmode( color.xyz, b.xyz, blendmode_1, opacity * a ); - - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_06_Depth_Slicer - { - pass prod80_pass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_DepthSlice; - } - } -} - - diff --git a/data/reshade/shaders/Effects/PD80_06_Film_Grain.fx b/data/reshade/shaders/Effects/PD80_06_Film_Grain.fx deleted file mode 100644 index 110ce8c8..00000000 --- a/data/reshade/shaders/Effects/PD80_06_Film_Grain.fx +++ /dev/null @@ -1,474 +0,0 @@ -/* - Description : PD80 06 Film Grain for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - Additional credits - - Noise/Grain code adopted, modified, and adjusted from Stefan Gustavson. - License: MIT, Copyright (c) 2011 stegu - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Color_Spaces.fxh" - -#ifndef FG_GRAIN_SMOOTHING - #define FG_GRAIN_SMOOTHING 0 -#endif - -namespace pd80_filmgrain -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform bool enable_test < - ui_label = "Enable Setup Mode"; - ui_tooltip = "Enable Setup Mode"; - ui_category = "Film Grain (simplex)"; - > = false; - uniform int grainMotion < __UNIFORM_COMBO_INT1 - ui_label = "Grain Motion"; - ui_tooltip = "Grain Motion"; - ui_category = "Film Grain (simplex)"; - ui_items = "Disabled\0Enabled\0"; - > = 1; - uniform float grainAdjust < - ui_type = "slider"; - ui_label = "Grain Pattern Adjust (for still noise)"; - ui_tooltip = "Grain Pattern Adjust (for still noise)"; - ui_category = "Film Grain (simplex)"; - ui_min = 1.0f; - ui_max = 2.0f; - > = 1.0; - uniform int grainSize < - ui_type = "slider"; - ui_label = "Grain Size"; - ui_tooltip = "Grain Size"; - ui_category = "Film Grain (simplex)"; - ui_min = 1; - ui_max = 4; - > = 1; -#if( FG_GRAIN_SMOOTHING ) - uniform float grainBlur < - ui_type = "slider"; - ui_label = "Grain Smoothness"; - ui_tooltip = "Grain Smoothness"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.005f; - ui_max = 0.7f; - > = 0.5; -#endif - uniform int grainOrigColor < __UNIFORM_COMBO_INT1 - ui_label = "Use Original Color"; - ui_tooltip = "Use Original Color"; - ui_category = "Film Grain (simplex)"; - ui_items = "Use Random Color\0Use Original Color\0"; - > = 1; - uniform bool use_negnoise < - ui_label = "Use Negative Noise (highlights)"; - ui_tooltip = "Use Negative Noise (highlights)"; - ui_category = "Film Grain (simplex)"; - > = false; - uniform float grainColor < - ui_type = "slider"; - ui_label = "Grain Color Amount"; - ui_tooltip = "Grain Color Amount"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 1.0; - uniform float grainAmount < - ui_type = "slider"; - ui_label = "Grain Amount"; - ui_tooltip = "Grain Amount"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.333; - uniform float grainIntensity < - ui_type = "slider"; - ui_label = "Grain Intensity"; - ui_tooltip = "Grain Intensity"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.65; - uniform float grainDensity < - ui_type = "slider"; - ui_label = "Grain Density"; - ui_tooltip = "Grain Density"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 10.0; - uniform float grainIntHigh < - ui_type = "slider"; - ui_label = "Grain Intensity Highlights"; - ui_tooltip = "Grain Intensity Highlights"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 1.0; - uniform float grainIntLow < - ui_type = "slider"; - ui_label = "Grain Intensity Shadows"; - ui_tooltip = "Grain Intensity Shadows"; - ui_category = "Film Grain (simplex)"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 1.0; - uniform bool enable_depth < - ui_label = "Enable depth based adjustments.\nMake sure you have setup your depth buffer correctly."; - ui_tooltip = "Enable depth based adjustments"; - ui_category = "Film Grain (simplex): Depth"; - > = false; - uniform bool display_depth < - ui_label = "Show depth texture"; - ui_tooltip = "Show depth texture"; - ui_category = "Film Grain (simplex): Depth"; - > = false; - uniform float depthStart < - ui_type = "slider"; - ui_label = "Change Depth Start Plane"; - ui_tooltip = "Change Depth Start Plane"; - ui_category = "Film Grain (simplex): Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.0; - uniform float depthEnd < - ui_type = "slider"; - ui_label = "Change Depth End Plane"; - ui_tooltip = "Change Depth End Plane"; - ui_category = "Film Grain (simplex): Depth"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.1; - uniform float depthCurve < - ui_label = "Depth Curve Adjustment"; - ui_tooltip = "Depth Curve Adjustment"; - ui_category = "Film Grain (simplex): Depth"; - ui_type = "slider"; - ui_min = 0.05; - ui_max = 8.0; - > = 1.0; - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texPerm < source = "pd80_permtexture.png"; > { Width = 256; Height = 256; Format = RGBA8; }; - texture texNoise { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = RGBA16F; }; -#if( FG_GRAIN_SMOOTHING ) - texture texNoiseH { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = RGBA16F; }; - texture texNoiseV { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = RGBA16F; }; -#endif - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerPermTex { Texture = texPerm; }; - sampler samplerNoise { Texture = texNoise; }; -#if( FG_GRAIN_SMOOTHING ) - sampler samplerNoiseH { Texture = texNoiseH; }; - sampler samplerNoiseV { Texture = texNoiseV; }; -#endif - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define permTexSize 256 - #define permONE 1.0f / 256.0f - #define permHALF 0.5f * permONE - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - uniform float Timer < source = "timer"; >; - - float4 rnm( float2 tc, float t ) - { - float noise = sin( dot( tc, float2( 12.9898, 78.233 ))) * ( 43758.5453 + t ); - float noiseR = frac( noise * grainAdjust ) * 2.0 - 1.0; - float noiseG = frac( noise * 1.2154 * grainAdjust ) * 2.0 - 1.0; - float noiseB = frac( noise * 1.3453 * grainAdjust ) * 2.0 - 1.0; - float noiseA = frac( noise * 1.3647 * grainAdjust ) * 2.0 - 1.0; - return float4( noiseR, noiseG, noiseB, noiseA ); - } - - float fade( float t ) - { - return t * t * t * ( t * ( t * 6.0 - 15.0 ) + 10.0 ); - } - - float curve( float x ) - { - return x * x * ( 3.0 - 2.0 * x ); - } - - float pnoise3D( float3 p, float t ) - { - float3 pi = permONE * floor( p ) + permHALF; - pi.xy *= permTexSize; - pi.xy = round(( pi.xy - permHALF ) / grainSize ) * grainSize; - pi.xy /= permTexSize; - float3 pf = frac( p ); - // Noise contributions from (x=0, y=0), z=0 and z=1 - float perm00 = rnm( pi.xy, t ).x; - float3 grad000 = tex2D( samplerPermTex, float2( perm00, pi.z )).xyz * 4.0 - 1.0; - float n000 = dot( grad000, pf ); - float3 grad001 = tex2D( samplerPermTex, float2( perm00, pi.z + permONE )).xyz * 4.0 - 1.0; - float n001 = dot( grad001, pf - float3( 0.0, 0.0, 1.0 )); - // Noise contributions from (x=0, y=1), z=0 and z=1 - float perm01 = rnm( pi.xy + float2( 0.0, permONE ), t ).y ; - float3 grad010 = tex2D( samplerPermTex, float2( perm01, pi.z )).xyz * 4.0 - 1.0; - float n010 = dot( grad010, pf - float3( 0.0, 1.0, 0.0 )); - float3 grad011 = tex2D( samplerPermTex, float2( perm01, pi.z + permONE )).xyz * 4.0 - 1.0; - float n011 = dot( grad011, pf - float3( 0.0, 1.0, 1.0 )); - // Noise contributions from (x=1, y=0), z=0 and z=1 - float perm10 = rnm( pi.xy + float2( permONE, 0.0 ), t ).z ; - float3 grad100 = tex2D( samplerPermTex, float2( perm10, pi.z )).xyz * 4.0 - 1.0; - float n100 = dot( grad100, pf - float3( 1.0, 0.0, 0.0 )); - float3 grad101 = tex2D( samplerPermTex, float2( perm10, pi.z + permONE )).xyz * 4.0 - 1.0; - float n101 = dot( grad101, pf - float3( 1.0, 0.0, 1.0 )); - // Noise contributions from (x=1, y=1), z=0 and z=1 - float perm11 = rnm( pi.xy + float2( permONE, permONE ), t ).w ; - float3 grad110 = tex2D( samplerPermTex, float2( perm11, pi.z )).xyz * 4.0 - 1.0; - float n110 = dot( grad110, pf - float3( 1.0, 1.0, 0.0 )); - float3 grad111 = tex2D( samplerPermTex, float2( perm11, pi.z + permONE )).xyz * 4.0 - 1.0; - float n111 = dot( grad111, pf - float3( 1.0, 1.0, 1.0 )); - // Blend contributions along x - float4 n_x = lerp( float4( n000, n001, n010, n011 ), float4( n100, n101, n110, n111 ), fade( pf.x )); - // Blend contributions along y - float2 n_xy = lerp( n_x.xy, n_x.zw, fade( pf.y )); - // Blend contributions along z - float n_xyz = lerp( n_xy.x, n_xy.y, fade( pf.z )); - // We're done, return the final noise value - return n_xyz; - } - - float getAvgColor( float3 col ) - { - return dot( col.xyz, float3( 0.333333f, 0.333334f, 0.333333f )); - } - - // nVidia blend modes - // Source: https://www.khronos.org/registry/OpenGL/extensions/NV/NV_blend_equation_advanced.txt - float3 ClipColor( float3 color ) - { - float lum = getAvgColor( color.xyz ); - float mincol = min( min( color.x, color.y ), color.z ); - float maxcol = max( max( color.x, color.y ), color.z ); - color.xyz = ( mincol < 0.0f ) ? lum + (( color.xyz - lum ) * lum ) / ( lum - mincol ) : color.xyz; - color.xyz = ( maxcol > 1.0f ) ? lum + (( color.xyz - lum ) * ( 1.0f - lum )) / ( maxcol - lum ) : color.xyz; - return color; - } - - // Luminosity: base, blend - // Color: blend, base - float3 blendLuma( float3 base, float3 blend ) - { - float lumbase = getAvgColor( base.xyz ); - float lumblend = getAvgColor( blend.xyz ); - float ldiff = lumblend - lumbase; - float3 col = base.xyz + ldiff; - return ClipColor( col.xyz ); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_FilmGrain(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - // Noise - float timer = 1.0f; - if( grainMotion ) - timer = Timer % 1000.0f; - float2 uv = texcoord.xy * float2( BUFFER_WIDTH, BUFFER_HEIGHT ); - float3 noise = pnoise3D( float3( uv.xy, 1 ), timer ); - noise.y = pnoise3D( float3( uv.xy, 2 ), timer ); - noise.z = pnoise3D( float3( uv.xy, 3 ), timer ); - - // Intensity - noise.xyz *= grainIntensity; - - // Noise color - noise.xyz = lerp( noise.xxx, noise.xyz, grainColor ); - - // Control noise density - noise.xyz = pow( abs( noise.xyz ), max( 11.0f - grainDensity, 0.1f )) * sign( noise.xyz ); - - // Pack noise that has range -1..0..1 into 0..1 range for blurring passes - // After blurring passes unpack again noise * 2 - 1 - noise.xyz = saturate(( noise.xyz + 1.0f ) * 0.5f ); - - return float4( noise.xyz, 1.0f ); - } -#if( FG_GRAIN_SMOOTHING ) - float4 PS_BlurH(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 noise = tex2D( samplerNoise, texcoord ); - // Blur - float SigmaSum = 0.0f; - float pxlOffset = 1.0f; - float Blur = grainBlur * grainSize; - float3 Sigma; - Sigma.x = 1.0f / ( sqrt( 6.283184f ) * Blur ); - Sigma.y = exp( -0.5f / ( Blur * Blur )); - Sigma.z = Sigma.y * Sigma.y; - noise.xyz *= Sigma.x; - SigmaSum += Sigma.x; - Sigma.xy *= Sigma.yz; - float px = BUFFER_RCP_WIDTH; - - [loop] - for( int i = 0; i < 5 && Sigma.x > 0.001f; ++i ) - { - noise += tex2Dlod( samplerNoise, float4( texcoord.xy + float2( pxlOffset * px, 0.0f ), 0.0, 0.0 )) * Sigma.x; - noise += tex2Dlod( samplerNoise, float4( texcoord.xy - float2( pxlOffset * px, 0.0f ), 0.0, 0.0 )) * Sigma.x; - SigmaSum += ( 2.0f * Sigma.x ); - pxlOffset += 1.0f; - Sigma.xy *= Sigma.yz; - } - - noise.xyz /= SigmaSum; - return float4( noise.xyz, 1.0f ); - } - - float4 PS_BlurV(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 noise = tex2D( samplerNoiseH, texcoord ); - // Blur - float SigmaSum = 0.0f; - float pxlOffset = 1.0f; - float Blur = grainBlur * grainSize; - float3 Sigma; - Sigma.x = 1.0f / ( sqrt( 6.283184f ) * Blur ); - Sigma.y = exp( -0.5f / ( Blur * Blur )); - Sigma.z = Sigma.y * Sigma.y; - noise.xyz *= Sigma.x; - SigmaSum += Sigma.x; - Sigma.xy *= Sigma.yz; - float py = BUFFER_RCP_HEIGHT; - - [loop] - for( int i = 0; i < 5 && Sigma.x > 0.001f; ++i ) - { - noise += tex2Dlod( samplerNoiseH, float4( texcoord.xy + float2( 0.0f, pxlOffset * py ), 0.0, 0.0 )) * Sigma.x; - noise += tex2Dlod( samplerNoiseH, float4( texcoord.xy - float2( 0.0f, pxlOffset * py ), 0.0, 0.0 )) * Sigma.x; - SigmaSum += ( 2.0f * Sigma.x ); - pxlOffset += 1.0f; - Sigma.xy *= Sigma.yz; - } - - noise.xyz /= SigmaSum; - return float4( noise.xyz, 1.0f ); - } -#endif - float4 PS_MergeNoise(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { -#if( FG_GRAIN_SMOOTHING ) - float4 noise = tex2D( samplerNoiseV, texcoord ); -#else - float4 noise = tex2D( samplerNoise, texcoord ); -#endif - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - - // Unpack noise - noise.xyz = noise.xyz * 2.0f - 1.0f; - - // Depth - float depth = ReShade::GetLinearizedDepth( texcoord ).x; - depth = smoothstep( depthStart, depthEnd, depth ); - depth = pow( depth, depthCurve ); - float d = enable_depth ? depth : 1.0f; - - // Test setup - float3 testenv = ( texcoord.y < 0.25f ) ? texcoord.xxx : ( texcoord.y < 0.5f ) ? float3( texcoord.x, 0.0f, 0.0f ) : - ( texcoord.y < 0.75f ) ? float3( 0.0f, texcoord.x, 0.0f ) : float3( 0.0f, 0.0f, texcoord.x ); - color.xyz = enable_test ? testenv.xyz : color.xyz; - - // Store some values - float3 origHSV = RGBToHSV( color.xyz ); - float3 orig = color.xyz; - float maxc = max( max( color.x, color.y ), color.z ); - float minc = min( min( color.x, color.y ), color.z ); - - // Mixing options - float lum = maxc; - noise.xyz = lerp( noise.xyz * grainIntLow, noise.xyz * grainIntHigh, fade( lum )); // Noise adjustments based on average intensity - float3 negnoise = -abs( noise.xyz ); - lum *= lum; - // Apply only negative noise in highlights/whites as positive will be clipped out - // Swizzle the components of negnoise to avoid middle intensity regions of no noise ( x - x = 0 ) - negnoise.xyz = lerp( noise.xyz, negnoise.zxy * 0.5f, lum ); - noise.xyz = use_negnoise ? negnoise.xyz : noise.xyz; - - // Noise coloring - // Issue, when changing hue to original Red, Bblue channels work fine, but humans more sensitive to Yellow/Green - // In perceived luminosity R and B channel are very close, will assume they are equal as they are close enough - // "weight" is my poor attemp to match human vision, bit heavier on the yellow-green than green - float factor = 1.2f; - float weight = max( 1.0f - abs(( origHSV.x - 0.166667f ) * 6.0f ), 0.0f ) * factor; - weight += max( 1.0f - abs(( origHSV.x - 0.333333f ) * 6.0f ), 0.0f ) / factor; - weight = saturate( curve( weight / factor )); - - // Account for saturation - weight *= saturate(( maxc + 1.0e-10 - minc ) / maxc + 1.0e-10 ); - // Account for intensity. Highest reduction at 0.2 intensity - // No change in blacks and brights - float adj = saturate(( maxc - 0.2f ) * 1.25f ) + saturate( 1.0f - maxc * 5.0f ); - adj = 1.0f - curve( adj ); - weight *= adj; - - // Create a factor to adjust noise intensity based on weight - float adjNoise = lerp( 1.0f, 0.5f, grainOrigColor * weight ); - - color.xyz = lerp( color.xyz, color.xyz + ( noise.xyz * d ), grainAmount * adjNoise ); - color.xyz = saturate( color.xyz ); - - // Use original hue and saturation mixed with lightness channel of noise - float3 col = blendLuma( orig.xyz, color.xyz ); - color.xyz = grainOrigColor ? col.xyz : color.xyz; - - color.xyz = display_depth ? depth.xxx : color.xyz; - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_06_FilmGrain - { - pass prod80_WriteNoise - { - VertexShader = PostProcessVS; - PixelShader = PS_FilmGrain; - RenderTarget = texNoise; - } -#if( FG_GRAIN_SMOOTHING ) - pass prod80_BlurH - { - VertexShader = PostProcessVS; - PixelShader = PS_BlurH; - RenderTarget = texNoiseH; - } - pass prod80_BlurV - { - VertexShader = PostProcessVS; - PixelShader = PS_BlurV; - RenderTarget = texNoiseV; - } -#endif - pass prod80_MixNoise - { - VertexShader = PostProcessVS; - PixelShader = PS_MergeNoise; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_06_Luma_Fade.fx b/data/reshade/shaders/Effects/PD80_06_Luma_Fade.fx deleted file mode 100644 index 7a43249b..00000000 --- a/data/reshade/shaders/Effects/PD80_06_Luma_Fade.fx +++ /dev/null @@ -1,153 +0,0 @@ -/* - Description : PD80 06 Luma Fade for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" - -namespace pd80_lumafade -{ - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform float transition_speed < - ui_type = "slider"; - ui_label = "Time Based Fade Speed"; - ui_tooltip = "Time Based Fade Speed"; - ui_category = "Scene Luminance Adaptation"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.5; - uniform float minlevel < - ui_label = "Pure Dark Scene Level"; - ui_tooltip = "Pure Dark Scene Level"; - ui_category = "Scene Luminance Adaptation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.125; - uniform float maxlevel < - ui_label = "Pure Light Scene Level"; - ui_tooltip = "Pure Light Scene Level"; - ui_category = "Scene Luminance Adaptation"; - ui_type = "slider"; - ui_min = 0.0; - ui_max = 1.0; - > = 0.3; - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texLuma { Width = 256; Height = 256; Format = R16F; MipLevels = 8; }; - texture texAvgLuma { Format = R16F; }; - texture texPrevAvgLuma { Format = R16F; }; - texture texPrevColor { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = RGBA8; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerLuma { Texture = texLuma; }; - sampler samplerAvgLuma { Texture = texAvgLuma; }; - sampler samplerPrevAvgLuma { Texture = texPrevAvgLuma; }; - sampler samplerPrevColor { Texture = texPrevColor; }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - uniform float Frametime < source = "frametime"; >; - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - float interpolate( float o, float n, float factor, float ft ) - { - return lerp( o, n, 1.0f - exp( -factor * ft )); - } - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float PS_WriteLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 color = tex2D( ReShade::BackBuffer, texcoord ); - return dot( color.xyz, 0.333333f ); - } - - float PS_AvgLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float luma = tex2Dlod( samplerLuma, float4( 0.5f, 0.5f, 0, 8 )).x; - float prevluma = tex2D( samplerPrevAvgLuma, float2( 0.5f, 0.5f )).x; - float factor = transition_speed * 4.0f + 1.0f; - return interpolate( prevluma, luma, factor, Frametime * 0.001f ); - } - - float4 PS_StorePrev(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - return tex2D( ReShade::BackBuffer, texcoord ); - } - - float PS_PrevAvgLuma(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - return tex2D( samplerAvgLuma, float2( 0.5f, 0.5f )).x; - } - - float4 PS_LumaInterpolation(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float4 newcol = tex2D( ReShade::BackBuffer, texcoord ); - float4 oldcol = tex2D( samplerPrevColor, texcoord ); - float luma = tex2D( samplerAvgLuma, float2( 0.5f, 0.5f )).x; - return lerp( oldcol, newcol, smoothstep( minlevel, maxlevel, luma )); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_06_LumaFade_Start - < ui_tooltip = "Luma Fading Effects\n\n" - "This shader allows you to fade in and out ReShade effects based on scene luminance.\n" - "To use: put the Start technque before the shaders you want to enable in a BRIGHT scene and\n" - "put the End technique after those shaders. Then use the UI settings to manipulate the fading.";> - { - pass Luma - { - VertexShader = PostProcessVS; - PixelShader = PS_WriteLuma; - RenderTarget = texLuma; - } - pass AvgLuma - { - VertexShader = PostProcessVS; - PixelShader = PS_AvgLuma; - RenderTarget = texAvgLuma; - } - pass StoreColor - { - VertexShader = PostProcessVS; - PixelShader = PS_StorePrev; - RenderTarget = texPrevColor; - } - pass PreviousLuma - { - VertexShader = PostProcessVS; - PixelShader = PS_PrevAvgLuma; - RenderTarget = texPrevAvgLuma; - } - } - technique prod80_06_LumaFade_End - { - pass Combine - { - VertexShader = PostProcessVS; - PixelShader = PS_LumaInterpolation; - } - } -} \ No newline at end of file diff --git a/data/reshade/shaders/Effects/PD80_06_Posterize_Pixelate.fx b/data/reshade/shaders/Effects/PD80_06_Posterize_Pixelate.fx deleted file mode 100644 index bf667165..00000000 --- a/data/reshade/shaders/Effects/PD80_06_Posterize_Pixelate.fx +++ /dev/null @@ -1,152 +0,0 @@ -/* - Description : PD80 06 Posterize Pixelate for Reshade https://reshade.me/ - Author : prod80 (Bas Veth) - License : MIT, Copyright (c) 2020 prod80 - - - MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/ - -#include "ReShade.fxh" -#include "ReShadeUI.fxh" -#include "PD80_00_Noise_Samplers.fxh" - -namespace pd80_posterizepixelate -{ - //// PREPROCESSOR DEFINITIONS /////////////////////////////////////////////////// - - //// UI ELEMENTS //////////////////////////////////////////////////////////////// - uniform int number_of_levels < - ui_label = "Number of Levels"; - ui_tooltip = "Number of Levels"; - ui_category = "Posterize"; - ui_type = "slider"; - ui_min = 2; - ui_max = 255; - > = 255; - uniform int pixel_size < - ui_label = "Pixel Size"; - ui_tooltip = "Pixel Size"; - ui_category = "Pixelate"; - ui_type = "slider"; - ui_min = 1; - ui_max = 9; - > = 1; - uniform float effect_strength < - ui_type = "slider"; - ui_label = "Effect Strength"; - ui_tooltip = "Effect Strength"; - ui_category = "Posterize Pixelate"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 1.0; - uniform float border_str < - ui_type = "slider"; - ui_label = "Border Strength"; - ui_tooltip = "Border Strength"; - ui_category = "Posterize Pixelate"; - ui_min = 0.0f; - ui_max = 1.0f; - > = 0.0; - uniform bool enable_dither < - ui_label = "Enable Dithering"; - ui_tooltip = "Enable Dithering"; - ui_category = "Posterize Pixelate"; - > = false; - uniform bool dither_motion < - ui_label = "Dither Motion"; - ui_tooltip = "Dither Motion"; - ui_category = "Posterize Pixelate"; - > = true; - uniform float dither_strength < - ui_type = "slider"; - ui_label = "Dither Strength"; - ui_tooltip = "Dither Strength"; - ui_category = "Posterize Pixelate"; - ui_min = 0.0f; - ui_max = 10.0f; - > = 1.0; - //// TEXTURES /////////////////////////////////////////////////////////////////// - texture texMipMe { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; MipLevels = 9; }; - - //// SAMPLERS /////////////////////////////////////////////////////////////////// - sampler samplerMipMe - { - Texture = texMipMe; - MipFilter = POINT; - MinFilter = POINT; - MagFilter = POINT; - }; - - //// DEFINES //////////////////////////////////////////////////////////////////// - #define aspect float( BUFFER_WIDTH * BUFFER_RCP_HEIGHT ) - - //// FUNCTIONS ////////////////////////////////////////////////////////////////// - uniform float2 pingpong < source = "pingpong"; min = 0; max = 128; step = 1; >; - - //// PIXEL SHADERS ////////////////////////////////////////////////////////////// - float4 PS_MipMe(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - return tex2D( ReShade::BackBuffer, texcoord ); - } - - float4 PS_Posterize(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target - { - float3 color = tex2Dlod( samplerMipMe, float4( texcoord.xy, 0.0f, pixel_size - 1 )).xyz; - float exp = exp2( pixel_size - 1 ); - float rcp_exp = max( rcp( exp ) - 0.00001f, 0.0f ); // - 0.00001f because fp precision comes into play - float2 bwbh = float2( floor( BUFFER_WIDTH / exp ), floor( BUFFER_HEIGHT / exp )); - // Dither - float2 tx = bwbh.xy / 512.0f; - tx.xy *= texcoord.xy; - float3 dnoise = tex2D( samplerRGBNoise, tx ).xyz; - float mot = dither_motion ? pingpong.x + 9 : 1.0f; - dnoise.xyz = frac( dnoise + 0.61803398875f * mot ); - dnoise.xyz = dnoise * 2.0f - 1.0f; - color.xyz = enable_dither ? saturate( color.xyz + dnoise.xyz * ( dither_strength / number_of_levels )) : color.xyz; - // Dither end - float3 orig = color.xyz; - color.xyz = floor( color.xyz * number_of_levels ) / ( number_of_levels - 1 ); - float2 uv = frac( texcoord.xy * bwbh.xy ); - float grade = ( uv.x <= rcp_exp ) ? 1.0 : 0.0; - grade += ( uv.y <= rcp_exp ) ? 1.0 : 0.0; - color.xyz = lerp( color.xyz, lerp( color.xyz, 0.0f, border_str * saturate( pixel_size - 1 )), saturate( grade )); - color.xyz = lerp( orig.xyz, color.xyz, effect_strength ); - return float4( color.xyz, 1.0f ); - } - - //// TECHNIQUES ///////////////////////////////////////////////////////////////// - technique prod80_06_Posterize_Pixelate - { - pass prod80_pass0 - { - VertexShader = PostProcessVS; - PixelShader = PS_MipMe; - RenderTarget = texMipMe; - } - pass prod80_pass1 - { - VertexShader = PostProcessVS; - PixelShader = PS_Posterize; - } - } -} \ No newline at end of file