diff --git a/enbseries.ini b/enbseries.ini index 92b6ee5..ac95e43 100644 --- a/enbseries.ini +++ b/enbseries.ini @@ -13,7 +13,7 @@ EnableAdaptation=true EnableBloom=true EnableDepthOfField=true EnableLens=false -EnableSSAO=false +EnableSSAO=true [COLORCORRECTION] UseProceduralCorrection=true @@ -22,7 +22,7 @@ GammaCurve=1.0 [TIMEOFDAY] DawnDuration=2.0 -SunriseTime=6.0 +SunriseTime=7.0 DayTime=12.0 SunsetTime=18.0 DuskDuration=2.0 @@ -33,7 +33,7 @@ AdaptationSensitivity=0.2 AdaptationTime=0.65 ForceMinMaxValues=false AdaptationMin=0.0 -AdaptationMax=0.25 +AdaptationMax=0.35 [DEPTHOFFIELD] FocusingTime=0.4 @@ -41,11 +41,11 @@ ApertureTime=1.0 [BLOOM] IgnoreWeatherSystem=true -AmountDawn=1.1 -AmountSunrise=1.2 +AmountDawn=1.0 +AmountSunrise=1.0 AmountDay=1.0 -AmountSunset=1.2 -AmountDusk=1.1 +AmountSunset=1.0 +AmountDusk=1.0 AmountNight=1.0 AmountInteriorDay=1.0 AmountInteriorNight=1.0 @@ -64,31 +64,31 @@ AmountInteriorNight=1.0 [SKY] IgnoreWeatherSystem=true Enable=true -GradientIntensityDawn=1.17 -GradientIntensitySunrise=1.11 -GradientIntensityDay=1.15 -GradientIntensitySunset=1.110001 -GradientIntensityDusk=1.160001 -GradientIntensityNight=1.140001 -GradientIntensityInteriorDay=1.12 -GradientIntensityInteriorNight=1.14 -GradientDesaturationDawn=0.65 -GradientDesaturationSunrise=0.5 -GradientDesaturationDay=0.38 -GradientDesaturationSunset=0.51 -GradientDesaturationDusk=0.63 -GradientDesaturationNight=0.49 -GradientDesaturationInteriorDay=0.22 -GradientDesaturationInteriorNight=0.42 +GradientIntensityDawn=0.83 +GradientIntensitySunrise=1.07 +GradientIntensityDay=1.18 +GradientIntensitySunset=1.000001 +GradientIntensityDusk=0.840001 +GradientIntensityNight=0.620001 +GradientIntensityInteriorDay=1.18 +GradientIntensityInteriorNight=0.35 +GradientDesaturationDawn=0.04 +GradientDesaturationSunrise=0.06 +GradientDesaturationDay=0.1 +GradientDesaturationSunset=0.07 +GradientDesaturationDusk=0.04 +GradientDesaturationNight=0.02 +GradientDesaturationInteriorDay=0.15 +GradientDesaturationInteriorNight=0.03 -GradientTopIntensityDawn=0.59 -GradientTopIntensitySunrise=0.74 -GradientTopIntensityDay=0.920001 -GradientTopIntensitySunset=0.72 -GradientTopIntensityDusk=0.52 -GradientTopIntensityNight=0.43 +GradientTopIntensityDawn=0.62 +GradientTopIntensitySunrise=0.79 +GradientTopIntensityDay=0.990001 +GradientTopIntensitySunset=0.82 +GradientTopIntensityDusk=0.6 +GradientTopIntensityNight=0.42 GradientTopIntensityInteriorDay=0.97 -GradientTopIntensityInteriorNight=0.48 +GradientTopIntensityInteriorNight=0.38 GradientTopCurveDawn=0.87 GradientTopCurveSunrise=0.82 GradientTopCurveDay=0.97 @@ -97,242 +97,242 @@ GradientTopCurveDusk=0.86 GradientTopCurveNight=0.89 GradientTopCurveInteriorDay=0.98 GradientTopCurveInteriorNight=0.82 -GradientTopColorFilterDawn=0.886, 0.773, 0.969 -GradientTopColorFilterSunrise=0.812, 0.859, 0.953 +GradientTopColorFilterDawn=0.965, 0.69, 0.69 +GradientTopColorFilterSunrise=0.965, 0.918, 0.855 GradientTopColorFilterDay=0.941, 0.992, 0.996 -GradientTopColorFilterSunset=0.839, 0.875, 0.949 -GradientTopColorFilterDusk=0.902, 0.824, 0.965 -GradientTopColorFilterNight=0.867, 0.753, 0.886 +GradientTopColorFilterSunset=0.933, 0.843, 0.769 +GradientTopColorFilterDusk=0.945, 0.663, 0.663 +GradientTopColorFilterNight=0.596, 0.561, 0.867 GradientTopColorFilterInteriorDay=0.949, 0.996, 0.992 -GradientTopColorFilterInteriorNight=0.898, 0.835, 0.906 +GradientTopColorFilterInteriorNight=0.667, 0.569, 0.757 -GradientMiddleIntensityDawn=1.1 -GradientMiddleIntensitySunrise=1.13 -GradientMiddleIntensityDay=1.18 -GradientMiddleIntensitySunset=1.13 -GradientMiddleIntensityDusk=1.11 -GradientMiddleIntensityNight=1.09 -GradientMiddleIntensityInteriorDay=1.1 -GradientMiddleIntensityInteriorNight=1.09 -GradientMiddleCurveDawn=0.86 -GradientMiddleCurveSunrise=0.85 -GradientMiddleCurveDay=0.72 -GradientMiddleCurveSunset=0.85 -GradientMiddleCurveDusk=0.8 -GradientMiddleCurveNight=0.91 -GradientMiddleCurveInteriorDay=0.74 -GradientMiddleCurveInteriorNight=0.92 -GradientMiddleColorFilterDawn=0.78, 0.753, 0.988 -GradientMiddleColorFilterSunrise=0.729, 0.843, 0.988 -GradientMiddleColorFilterDay=0.847, 0.914, 0.957 -GradientMiddleColorFilterSunset=0.792, 0.835, 0.973 -GradientMiddleColorFilterDusk=0.733, 0.741, 0.984 -GradientMiddleColorFilterNight=0.871, 0.929, 0.996 -GradientMiddleColorFilterInteriorDay=0.82, 0.878, 0.969 -GradientMiddleColorFilterInteriorNight=0.906, 0.882, 0.945 +GradientMiddleIntensityDawn=0.76 +GradientMiddleIntensitySunrise=0.88 +GradientMiddleIntensityDay=1.02 +GradientMiddleIntensitySunset=0.88 +GradientMiddleIntensityDusk=0.78 +GradientMiddleIntensityNight=0.52 +GradientMiddleIntensityInteriorDay=1.0 +GradientMiddleIntensityInteriorNight=0.55 +GradientMiddleCurveDawn=0.93 +GradientMiddleCurveSunrise=0.96 +GradientMiddleCurveDay=1.02 +GradientMiddleCurveSunset=0.95 +GradientMiddleCurveDusk=0.92 +GradientMiddleCurveNight=0.88 +GradientMiddleCurveInteriorDay=1.05 +GradientMiddleCurveInteriorNight=0.87 +GradientMiddleColorFilterDawn=0.91, 0.424, 0.424 +GradientMiddleColorFilterSunrise=0.984, 0.722, 0.569 +GradientMiddleColorFilterDay=0.914, 0.973, 0.984 +GradientMiddleColorFilterSunset=0.953, 0.639, 0.459 +GradientMiddleColorFilterDusk=0.969, 0.435, 0.435 +GradientMiddleColorFilterNight=0.518, 0.667, 0.988 +GradientMiddleColorFilterInteriorDay=0.898, 0.933, 0.984 +GradientMiddleColorFilterInteriorNight=0.561, 0.561, 0.976 -GradientHorizonIntensityDawn=1.11 -GradientHorizonIntensitySunrise=1.07 -GradientHorizonIntensityDay=1.050001 -GradientHorizonIntensitySunset=1.08 -GradientHorizonIntensityDusk=1.1 -GradientHorizonIntensityNight=1.03 -GradientHorizonIntensityInteriorDay=1.03 -GradientHorizonIntensityInteriorNight=1.1 -GradientHorizonCurveDawn=0.93 -GradientHorizonCurveSunrise=0.95 +GradientHorizonIntensityDawn=0.75 +GradientHorizonIntensitySunrise=0.81 +GradientHorizonIntensityDay=0.930001 +GradientHorizonIntensitySunset=0.83 +GradientHorizonIntensityDusk=0.78 +GradientHorizonIntensityNight=0.630001 +GradientHorizonIntensityInteriorDay=1.0 +GradientHorizonIntensityInteriorNight=0.66 +GradientHorizonCurveDawn=0.82 +GradientHorizonCurveSunrise=0.86 GradientHorizonCurveDay=0.92 -GradientHorizonCurveSunset=0.94 -GradientHorizonCurveDusk=0.92 -GradientHorizonCurveNight=0.97 +GradientHorizonCurveSunset=0.87 +GradientHorizonCurveDusk=0.83 +GradientHorizonCurveNight=0.78 GradientHorizonCurveInteriorDay=0.9 GradientHorizonCurveInteriorNight=0.98 -GradientHorizonColorFilterDawn=0.757, 0.792, 0.882 -GradientHorizonColorFilterSunrise=0.875, 0.929, 0.992 -GradientHorizonColorFilterDay=0.89, 0.984, 0.961 -GradientHorizonColorFilterSunset=0.784, 0.851, 0.949 -GradientHorizonColorFilterDusk=0.882, 0.89, 0.953 -GradientHorizonColorFilterNight=0.773, 0.827, 0.929 +GradientHorizonColorFilterDawn=0.788, 0.451, 0.451 +GradientHorizonColorFilterSunrise=0.973, 0.714, 0.596 +GradientHorizonColorFilterDay=0.925, 0.988, 0.984 +GradientHorizonColorFilterSunset=0.957, 0.698, 0.612 +GradientHorizonColorFilterDusk=0.808, 0.518, 0.518 +GradientHorizonColorFilterNight=0.655, 0.816, 0.976 GradientHorizonColorFilterInteriorDay=0.788, 0.91, 0.953 GradientHorizonColorFilterInteriorNight=0.851, 0.863, 0.89 -CloudsIntensityDawn=0.51 -CloudsIntensitySunrise=0.680001 -CloudsIntensityDay=0.880001 -CloudsIntensitySunset=0.670001 -CloudsIntensityDusk=0.490001 -CloudsIntensityNight=0.330001 -CloudsIntensityInteriorDay=0.94 -CloudsIntensityInteriorNight=0.28 -CloudsCurveDawn=1.06 -CloudsCurveSunrise=1.04 -CloudsCurveDay=1.01 -CloudsCurveSunset=1.05 -CloudsCurveDusk=1.06 -CloudsCurveNight=1.07 -CloudsCurveInteriorDay=1.01 -CloudsCurveInteriorNight=1.08 -CloudsDesaturationDawn=0.34 -CloudsDesaturationSunrise=0.15 -CloudsDesaturationDay=0.09 +CloudsIntensityDawn=0.76 +CloudsIntensitySunrise=0.950001 +CloudsIntensityDay=1.030001 +CloudsIntensitySunset=0.880001 +CloudsIntensityDusk=0.730001 +CloudsIntensityNight=0.610001 +CloudsIntensityInteriorDay=1.0 +CloudsIntensityInteriorNight=0.61 +CloudsCurveDawn=1.13 +CloudsCurveSunrise=1.09 +CloudsCurveDay=1.0 +CloudsCurveSunset=1.1 +CloudsCurveDusk=1.2 +CloudsCurveNight=1.25 +CloudsCurveInteriorDay=1.02 +CloudsCurveInteriorNight=1.2 +CloudsDesaturationDawn=0.16 +CloudsDesaturationSunrise=0.22 +CloudsDesaturationDay=0.33 CloudsDesaturationSunset=0.21 -CloudsDesaturationDusk=0.39 -CloudsDesaturationNight=0.16 -CloudsDesaturationInteriorDay=0.14 -CloudsDesaturationInteriorNight=0.16 -CloudsOpacityDawn=1.13 -CloudsOpacitySunrise=1.11 -CloudsOpacityDay=1.04 -CloudsOpacitySunset=1.11 -CloudsOpacityDusk=1.19 -CloudsOpacityNight=1.11 -CloudsOpacityInteriorDay=1.05 -CloudsOpacityInteriorNight=1.15 -CloudsColorFilterDawn=0.89, 0.816, 0.996 -CloudsColorFilterSunrise=0.733, 0.761, 0.969 -CloudsColorFilterDay=0.855, 0.929, 0.996 -CloudsColorFilterSunset=0.804, 0.89, 0.992 -CloudsColorFilterDusk=0.796, 0.773, 0.929 -CloudsColorFilterNight=0.953, 0.925, 0.98 -CloudsColorFilterInteriorDay=0.757, 0.875, 0.914 -CloudsColorFilterInteriorNight=0.953, 0.933, 0.98 +CloudsDesaturationDusk=0.19 +CloudsDesaturationNight=0.11 +CloudsDesaturationInteriorDay=0.31 +CloudsDesaturationInteriorNight=0.12 +CloudsOpacityDawn=1.0 +CloudsOpacitySunrise=1.0 +CloudsOpacityDay=1.0 +CloudsOpacitySunset=1.0 +CloudsOpacityDusk=1.0 +CloudsOpacityNight=1.0 +CloudsOpacityInteriorDay=1.0 +CloudsOpacityInteriorNight=1.0 +CloudsColorFilterDawn=0.953, 0.576, 0.576 +CloudsColorFilterSunrise=0.965, 0.745, 0.69 +CloudsColorFilterDay=1, 1, 1 +CloudsColorFilterSunset=0.973, 0.804, 0.745 +CloudsColorFilterDusk=0.937, 0.624, 0.624 +CloudsColorFilterNight=0.839, 0.886, 0.98 +CloudsColorFilterInteriorDay=1, 1, 1 +CloudsColorFilterInteriorNight=0.792, 0.808, 0.957 -SunIntensityDawn=8.0 -SunIntensitySunrise=12.0 -SunIntensityDay=10.0 -SunIntensitySunset=12.0 -SunIntensityDusk=8.0 -SunIntensityNight=6.0 -SunIntensityInteriorDay=10.0 -SunIntensityInteriorNight=6.0 -SunDesaturationDawn=0.0 -SunDesaturationSunrise=0.0 -SunDesaturationDay=0.0 -SunDesaturationSunset=0.0 -SunDesaturationDusk=0.0 -SunDesaturationNight=0.0 -SunDesaturationInteriorDay=0.0 -SunDesaturationInteriorNight=0.0 -SunColorFilterDawn=0.988, 0.333, 0.149 -SunColorFilterSunrise=0.992, 0.58, 0.388 -SunColorFilterDay=1, 0.831, 0.71 -SunColorFilterSunset=0.988, 0.58, 0.29 -SunColorFilterDusk=0.949, 0.349, 0.18 -SunColorFilterNight=0.714, 0, 0 +SunIntensityDawn=1.91 +SunIntensitySunrise=2.45 +SunIntensityDay=2.02 +SunIntensitySunset=2.43 +SunIntensityDusk=1.97 +SunIntensityNight=1.15 +SunIntensityInteriorDay=2.02 +SunIntensityInteriorNight=1.19 +SunDesaturationDawn=0.11 +SunDesaturationSunrise=0.2 +SunDesaturationDay=0.35 +SunDesaturationSunset=0.28 +SunDesaturationDusk=0.14 +SunDesaturationNight=0.08 +SunDesaturationInteriorDay=0.35 +SunDesaturationInteriorNight=0.22 +SunColorFilterDawn=0.992, 0.537, 0.412 +SunColorFilterSunrise=0.996, 0.831, 0.729 +SunColorFilterDay=1, 0.898, 0.718 +SunColorFilterSunset=0.992, 0.765, 0.631 +SunColorFilterDusk=0.965, 0.447, 0.4 +SunColorFilterNight=0.914, 0.145, 0.145 SunColorFilterInteriorDay=0.996, 0.827, 0.706 -SunColorFilterInteriorNight=0.694, 0.0392, 0.00392 +SunColorFilterInteriorNight=0.816, 0.114, 0.0784 -MoonIntensityDawn=1.77 -MoonIntensitySunrise=1.39 -MoonIntensityDay=1.0 -MoonIntensitySunset=1.48 -MoonIntensityDusk=1.9 -MoonIntensityNight=2.4 -MoonIntensityInteriorDay=1.0 -MoonIntensityInteriorNight=2.47 -MoonDesaturationDawn=0.0 -MoonDesaturationSunrise=0.0 -MoonDesaturationDay=0.0 -MoonDesaturationSunset=0.0 -MoonDesaturationDusk=0.0 -MoonDesaturationNight=0.0 -MoonDesaturationInteriorDay=0.0 -MoonDesaturationInteriorNight=0.0 -MoonColorFilterDawn=0.443, 0.322, 0.98 -MoonColorFilterSunrise=0.776, 0.835, 0.918 +MoonIntensityDawn=0.7 +MoonIntensitySunrise=0.57 +MoonIntensityDay=0.49 +MoonIntensitySunset=0.58 +MoonIntensityDusk=0.69 +MoonIntensityNight=0.83 +MoonIntensityInteriorDay=0.57 +MoonIntensityInteriorNight=0.89 +MoonDesaturationDawn=0.47 +MoonDesaturationSunrise=0.41 +MoonDesaturationDay=0.36 +MoonDesaturationSunset=0.42 +MoonDesaturationDusk=0.48 +MoonDesaturationNight=0.56 +MoonDesaturationInteriorDay=0.43 +MoonDesaturationInteriorNight=0.59 +MoonColorFilterDawn=0.553, 0.498, 0.804 +MoonColorFilterSunrise=0.82, 0.847, 0.882 MoonColorFilterDay=1, 1, 1 -MoonColorFilterSunset=0.722, 0.8, 0.918 -MoonColorFilterDusk=0.337, 0.239, 0.969 -MoonColorFilterNight=0.314, 0.541, 0.965 +MoonColorFilterSunset=0.757, 0.812, 0.89 +MoonColorFilterDusk=0.537, 0.51, 0.706 +MoonColorFilterNight=0.486, 0.596, 0.8 MoonColorFilterInteriorDay=1, 1, 1 -MoonColorFilterInteriorNight=0.314, 0.431, 0.957 +MoonColorFilterInteriorNight=0.455, 0.522, 0.816 [ENVIRONMENT] IgnoreWeatherSystem=true -DirectLightingIntensityDawn=2.45 -DirectLightingIntensitySunrise=2.85 -DirectLightingIntensityDay=3.64 -DirectLightingIntensitySunset=2.75 -DirectLightingIntensityDusk=2.31 -DirectLightingIntensityNight=1.98 -DirectLightingIntensityInteriorDay=3.85 -DirectLightingIntensityInteriorNight=2.12 -DirectLightingDesaturationDawn=0.16 -DirectLightingDesaturationSunrise=0.25 -DirectLightingDesaturationDay=0.33 -DirectLightingDesaturationSunset=0.18 -DirectLightingDesaturationDusk=0.14 -DirectLightingDesaturationNight=0.08 -DirectLightingDesaturationInteriorDay=0.31 -DirectLightingDesaturationInteriorNight=0.07 -DirectLightingColorFilterDawn=0.988, 0.788, 0.761 -DirectLightingColorFilterSunrise=0.992, 0.741, 0.843 -DirectLightingColorFilterDay=0.902, 0.91, 0.98 -DirectLightingColorFilterSunset=0.984, 0.804, 0.871 -DirectLightingColorFilterDusk=0.98, 0.78, 0.745 -DirectLightingColorFilterNight=0.722, 0.71, 0.976 -DirectLightingColorFilterInteriorDay=0.941, 0.957, 0.98 +DirectLightingIntensityDawn=1.27 +DirectLightingIntensitySunrise=1.47 +DirectLightingIntensityDay=1.72 +DirectLightingIntensitySunset=1.47 +DirectLightingIntensityDusk=1.22 +DirectLightingIntensityNight=1.08 +DirectLightingIntensityInteriorDay=1.64 +DirectLightingIntensityInteriorNight=1.19 +DirectLightingDesaturationDawn=0.06 +DirectLightingDesaturationSunrise=0.1 +DirectLightingDesaturationDay=0.14 +DirectLightingDesaturationSunset=0.11 +DirectLightingDesaturationDusk=0.1 +DirectLightingDesaturationNight=0.04 +DirectLightingDesaturationInteriorDay=0.14 +DirectLightingDesaturationInteriorNight=0.04 +DirectLightingColorFilterDawn=0.941, 0.62, 0.62 +DirectLightingColorFilterSunrise=0.992, 0.788, 0.749 +DirectLightingColorFilterDay=0.992, 0.91, 0.851 +DirectLightingColorFilterSunset=0.98, 0.753, 0.729 +DirectLightingColorFilterDusk=0.922, 0.639, 0.639 +DirectLightingColorFilterNight=0.647, 0.635, 0.98 +DirectLightingColorFilterInteriorDay=0.98, 0.953, 0.941 DirectLightingColorFilterInteriorNight=0.886, 0.863, 0.996 -AmbientLightingIntensityDawn=0.52 -AmbientLightingIntensitySunrise=0.61 -AmbientLightingIntensityDay=0.85 -AmbientLightingIntensitySunset=0.62 -AmbientLightingIntensityDusk=0.55 -AmbientLightingIntensityNight=0.45 -AmbientLightingIntensityInteriorDay=0.51 -AmbientLightingIntensityInteriorNight=0.35 +AmbientLightingIntensityDawn=0.42 +AmbientLightingIntensitySunrise=0.73 +AmbientLightingIntensityDay=0.88 +AmbientLightingIntensitySunset=0.74 +AmbientLightingIntensityDusk=0.48 +AmbientLightingIntensityNight=0.24 +AmbientLightingIntensityInteriorDay=0.18 +AmbientLightingIntensityInteriorNight=0.12 [SSAO_SSIL] UseIndirectLighting=true -ResolutionScale=1.0 +ResolutionScale=0.5 SourceTexturesScale=0.5 SamplingQuality=0 -SamplingRange=0.15 -AOIntensity=1.0 -AOIntensityInterior=1.0 -AOAmount=0.5 -AOAmountInterior=0.5 -ILAmount=4.0 -ILAmountInterior=4.0 -AOMixingType=0 -AOMixingTypeInterior=0 +SamplingRange=0.25 +AOIntensity=0.95 +AOIntensityInterior=0.82 +AOAmount=1.14 +AOAmountInterior=1.15 +ILAmount=1.34 +ILAmountInterior=1.2 +AOMixingType=2 +AOMixingTypeInterior=3 [FOG] IgnoreWeatherSystem=true -DistanceFadeDawn=1.0 -DistanceFadeSunrise=1.0 -DistanceFadeDay=1.0 -DistanceFadeSunset=1.0 -DistanceFadeDusk=1.0 -DistanceFadeNight=1.0 -DistanceFadeInteriorDay=1.0 -DistanceFadeInteriorNight=1.0 -VerticalFadeDawn=1.0 -VerticalFadeSunrise=1.0 -VerticalFadeDay=1.0 -VerticalFadeSunset=1.0 -VerticalFadeDusk=1.0 -VerticalFadeNight=1.0 -VerticalFadeInteriorDay=1.0 -VerticalFadeInteriorNight=1.0 -SunIntensityDawn=1.0 -SunIntensitySunrise=1.0 -SunIntensityDay=1.0 -SunIntensitySunset=1.0 -SunIntensityDusk=1.0 -SunIntensityNight=1.0 -SunIntensityInteriorDay=1.0 -SunIntensityInteriorNight=1.0 -SunDesaturationDawn=0.0 -SunDesaturationSunrise=0.0 -SunDesaturationDay=0.0 -SunDesaturationSunset=0.0 -SunDesaturationDusk=0.0 -SunDesaturationNight=0.0 -SunDesaturationInteriorDay=0.0 -SunDesaturationInteriorNight=0.0 -SunColorFilterDawn=1, 1, 1 -SunColorFilterSunrise=1, 1, 1 -SunColorFilterDay=1, 1, 1 -SunColorFilterSunset=1, 1, 1 -SunColorFilterDusk=1, 1, 1 -SunColorFilterNight=1, 1, 1 +DistanceFadeDawn=0.32 +DistanceFadeSunrise=0.44 +DistanceFadeDay=0.52 +DistanceFadeSunset=0.41 +DistanceFadeDusk=0.31 +DistanceFadeNight=0.24 +DistanceFadeInteriorDay=0.43 +DistanceFadeInteriorNight=0.33 +VerticalFadeDawn=0.25 +VerticalFadeSunrise=0.34 +VerticalFadeDay=0.45 +VerticalFadeSunset=0.37 +VerticalFadeDusk=0.24 +VerticalFadeNight=0.16 +VerticalFadeInteriorDay=0.82 +VerticalFadeInteriorNight=0.64 +SunIntensityDawn=0.35 +SunIntensitySunrise=0.47 +SunIntensityDay=0.62 +SunIntensitySunset=0.46 +SunIntensityDusk=0.33 +SunIntensityNight=0.24 +SunIntensityInteriorDay=0.75 +SunIntensityInteriorNight=0.1 +SunDesaturationDawn=0.56 +SunDesaturationSunrise=0.47 +SunDesaturationDay=0.35 +SunDesaturationSunset=0.48 +SunDesaturationDusk=0.57 +SunDesaturationNight=0.64 +SunDesaturationInteriorDay=0.33 +SunDesaturationInteriorNight=0.56 +SunColorFilterDawn=0.996, 0.776, 0.776 +SunColorFilterSunrise=0.996, 0.855, 0.831 +SunColorFilterDay=0.996, 0.925, 0.886 +SunColorFilterSunset=0.992, 0.89, 0.859 +SunColorFilterDusk=0.992, 0.812, 0.812 +SunColorFilterNight=0.675, 0.667, 0.957 SunColorFilterInteriorDay=1, 1, 1 SunColorFilterInteriorNight=1, 1, 1 diff --git a/enbseries/VERSION b/enbseries/VERSION index 13086d1..f2c702b 100644 --- a/enbseries/VERSION +++ b/enbseries/VERSION @@ -1 +1 @@ -3.1.0 BETA "Stay FROSTy" +3.2.87 BETA "Vanilla and Sprinkles" diff --git a/enbseries/enbbloom.fx b/enbseries/enbbloom.fx index 805a739..485076e 100644 --- a/enbseries/enbbloom.fx +++ b/enbseries/enbbloom.fx @@ -107,13 +107,6 @@ float bloomradiusy string UIWidget = "Spinner"; float UIMin = 0.0; > = {1.0}; -float bloomtheta -< - string UIName = "Bloom Angle"; - string UIWidget = "Spinner"; - float UIMin = 0.0; - float UIMax = 1.0; -> = {0.0}; /* bloom tint/blueshift parameters */ float3 blu_n < @@ -279,83 +272,21 @@ float bloommixs string UIName = "Bloom Single Pass Blend"; string UIWidget = "Spinner"; > = {1.0}; -string str_bloomdirt = "Lens Dirt"; -bool dirtenable -< - string UIName = "Enable Lens Dirt"; - string UIWidget = "Checkbox"; -> = {false}; -float dirtmix1 -< - string UIName = "Dirt Pass 1 Blend"; - string UIWidget = "Spinner"; -> = {0.0}; -float dirtmix2 -< - string UIName = "Dirt Pass 2 Blend"; - string UIWidget = "Spinner"; -> = {0.1}; -float dirtmix3 -< - string UIName = "Dirt Pass 3 Blend"; - string UIWidget = "Spinner"; -> = {1.2}; -float dirtmix4 -< - string UIName = "Dirt Pass 4 Blend"; - string UIWidget = "Spinner"; -> = {0.5}; -float dirtmix5 -< - string UIName = "Dirt Pass 5 Blend"; - string UIWidget = "Spinner"; -> = {0.25}; -float dirtmix6 -< - string UIName = "Dirt Pass 6 Blend"; - string UIWidget = "Spinner"; -> = {0.1}; -float dirtmixs -< - string UIName = "Dirt Single Pass Blend"; - string UIWidget = "Spinner"; -> = {1.0}; -float dirtsaturation -< - string UIName = "Dirt Saturation"; - string UIWidget = "Spinner"; -> = {1.0}; -float ldirtpow -< - string UIName = "Dirt Texture Contrast"; - string UIWidget = "Spinner"; -> = {1.25}; -float dirtpow -< - string UIName = "Dirt Contrast"; - string UIWidget = "Spinner"; -> = {1.25}; -float ldirtfactor -< - string UIName = "Dirt Factor"; - string UIWidget = "Spinner"; -> = {1.5}; - /* gaussian blur matrices */ /* radius: 4, std dev: 1.5 */ -/*static const float gauss4[4] = +static const float gauss4[4] = { 0.270682, 0.216745, 0.111281, 0.036633 -};*/ +}; /* radius: 8, std dev: 3 */ -static const float gauss8[8] = +/*static const float gauss8[8] = { 0.134598, 0.127325, 0.107778, 0.081638, 0.055335, 0.033562, 0.018216, 0.008847 -}; +};*/ /* radius: 40, std dev: 15 */ -/*static const float gauss40[40] = +static const float gauss40[40] = { 0.026823, 0.026763, 0.026585, 0.026291, 0.025886, 0.025373, 0.024760, 0.024055, @@ -367,9 +298,9 @@ static const float gauss8[8] = 0.004697, 0.004139, 0.003630, 0.003170, 0.002756, 0.002385, 0.002055, 0.001763, 0.001506, 0.001280, 0.001084, 0.000913 -};*/ +}; /* radius: 80, std dev: 30 */ -static const float gauss80[80] = +/*static const float gauss80[80] = { 0.013406, 0.013398, 0.013376, 0.013339, 0.013287, 0.013221, 0.013140, 0.013046, 0.012938, 0.012816, 0.012681, 0.012534, @@ -385,7 +316,7 @@ static const float gauss80[80] = 0.001192, 0.001107, 0.001027, 0.000952, 0.000881, 0.000815, 0.000753, 0.000694, 0.000640, 0.000589, 0.000542, 0.000497, 0.000456, 0.000418 -}; +};*/ /* mathematical constants */ static const float pi = 3.1415926535898; @@ -406,15 +337,6 @@ Texture2D RenderTarget64; Texture2D RenderTarget32; Texture2D RenderTargetRGBA64F; -Texture2D TextureLens -< -#ifdef LENSDIRT_DDS - string ResourceName = "menblens.dds"; -#else - string ResourceName = "menblens.png"; -#endif ->; - SamplerState Sampler { Filter = MIN_MAG_MIP_LINEAR; @@ -428,13 +350,6 @@ SamplerState Sampler2 AddressV = Clamp; }; -SamplerState SamplerLens -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = Mirror; - AddressV = Mirror; -}; - struct VS_INPUT_POST { float3 pos : POSITION; @@ -533,14 +448,13 @@ float4 Anamorphic( float2 coord, Texture2D intex, float insz ) base = RenderTargetRGBA64F.Sample(Sampler,coord); int i; float sum = 0.0; + float inc = flen/insz; float2 pp; - float2 dir = float2(cos(bloomtheta*2*pi),sin(bloomtheta*2*pi)) - *flen/insz; - [unroll] for ( i=-79; i<=79; i++ ) + [unroll] for ( i=-39; i<=39; i++ ) { - pp = coord+dir*i; - res += gauss80[abs(i)]*intex.Sample(Sampler,pp); - sum += ((pp.x>=0.0)&&(pp.x<1.0))?gauss80[abs(i)]:0.0; + pp = coord+float2(i,0)*inc; + res += gauss40[abs(i)]*intex.Sample(Sampler,pp); + sum += ((pp.x>=0.0)&&(pp.x<1.0))?gauss40[abs(i)]:0.0; } res *= 1.0/sum; float3 flu = tod_ind(flu); @@ -562,14 +476,13 @@ float4 PS_HorizontalBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0, float4 res = float4(0.0,0.0,0.0,0.0); int i; float sum = 0.0; + float inc = bloomradiusx/insz; float2 pp; - float2 dir = float2(cos(bloomtheta*2*pi),sin(bloomtheta*2*pi)) - *bloomradiusx/insz; - [unroll] for ( i=-7; i<=7; i++ ) + [unroll] for ( i=-3; i<=3; i++ ) { - pp = coord+dir*i; - res += gauss8[abs(i)]*intex.Sample(Sampler,pp); - sum += ((pp.x>=0.0)&&(pp.x<1.0))?gauss8[abs(i)]:0.0; + pp = coord+float2(i,0)*inc; + res += gauss4[abs(i)]*intex.Sample(Sampler,pp); + sum += ((pp.x>=0.0)&&(pp.x<1.0))?gauss4[abs(i)]:0.0; } res *= 1.0/sum; if ( alfenable ) res += Anamorphic(coord,intex,insz); @@ -588,14 +501,13 @@ float4 PS_VerticalBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0, base = RenderTargetRGBA64F.Sample(Sampler,coord); int i; float sum = 0.0; + float inc = bloomradiusy/insz; float2 pp; - float2 dir = float2(sin(bloomtheta*2*pi),-cos(bloomtheta*2*pi)) - *bloomradiusy/insz; - [unroll] for ( i=-7; i<=7; i++ ) + [unroll] for ( i=-3; i<=3; i++ ) { - pp = coord+dir*i; - res += gauss8[abs(i)]*intex.Sample(Sampler,pp); - sum += ((pp.y>=0.0)&&(pp.y<1.0))?gauss8[abs(i)]:0.0; + pp = coord+float2(0,i)*inc; + res += gauss4[abs(i)]*intex.Sample(Sampler,pp); + sum += ((pp.y>=0.0)&&(pp.y<1.0))?gauss4[abs(i)]:0.0; } res *= 1.0/sum; float3 blu = tod_ind(blu); @@ -622,30 +534,6 @@ float4 PS_PostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target res.rgb /= 6.0; res.rgb = clamp(res.rgb,0.0,32768.0); res.a = 1.0; - if ( !dirtenable ) return res; - /* crappy lens filter, useful when playing characters with glasses */ - float2 ccoord = coord; -#ifdef ASPECT_LENSDIRT - ccoord.y = (coord.y-0.5)*ScreenSize.w+0.5; -#endif - float4 crap = TextureLens.Sample(SamplerLens,ccoord); - float4 mud = dirtmix1*RenderTarget1024.Sample(Sampler2,coord); - mud += dirtmix2*RenderTarget512.Sample(Sampler2,coord); - mud += dirtmix3*RenderTarget256.Sample(Sampler2,coord); - mud += dirtmix4*RenderTarget128.Sample(Sampler2,coord); - mud += dirtmix5*RenderTarget64.Sample(Sampler2,coord); - mud += dirtmix6*RenderTarget32.Sample(Sampler2,coord); - mud.rgb /= 6.0; - float3 hsv = rgb2hsv(mud.rgb); - hsv.y = clamp(hsv.y*dirtsaturation,0.0,1.0); - mud.rgb = clamp(hsv2rgb(hsv),0.0,32768.0); - mud.rgb = pow(mud.rgb,dirtpow); - float mudmax = luminance(mud.rgb); - float mudn = max(mudmax/(1.0+mudmax),0.0); - mudn = pow(mudn,max(ldirtpow-crap.a,0.0)); - mud.rgb *= mudn*ldirtfactor*crap.rgb; - res += max(mud,0.0); - res.a = 1.0; return res; } @@ -655,24 +543,6 @@ float4 PS_SPostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target float4 res = bloommixs*RenderTarget128.Sample(Sampler2,coord); res.rgb = clamp(res.rgb,0.0,32768.0); res.a = 1.0; - if ( !dirtenable ) return res; - /* crappy lens filter, useful when playing characters with glasses */ - float2 ccoord = coord; -#ifdef ASPECT_LENSDIRT - ccoord.y = (coord.y-0.5)*ScreenSize.w+0.5; -#endif - float4 crap = TextureLens.Sample(SamplerLens,ccoord); - float4 mud = dirtmixs*RenderTarget32.Sample(Sampler2,coord); - mud.rgb = pow(mud.rgb,dirtpow); - float3 hsv = rgb2hsv(mud.rgb); - hsv.y = clamp(hsv.y*dirtsaturation,0.0,1.0); - mud.rgb = clamp(hsv2rgb(hsv),0.0,32768.0); - float mudmax = luminance(mud.rgb); - float mudn = max(mudmax/(1.0+mudmax),0.0); - mudn = pow(mudn,max(ldirtpow-crap.a,0.0)); - mud.rgb *= mudn*ldirtfactor*crap.rgb; - res += max(mud,0.0); - res.a = 1.0; return res; } @@ -684,7 +554,6 @@ technique11 BloomSimplePass { pass p0 @@ -717,24 +586,7 @@ technique11 BloomSimplePass4 SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget256,256.0))); } } -technique11 BloomSimplePass5 -{ - pass p0 - { - SetVertexShader(CompileShader(vs_5_0,VS_Quad())); - SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget128,128.0))); - } -} -technique11 BloomSimplePass6 -{ - pass p0 - { - SetVertexShader(CompileShader(vs_5_0,VS_Quad())); - SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget64,64.0))); - } -} - -technique11 BloomSimplePass7 +technique11 BloomSimplePass5 { pass p0 { @@ -742,7 +594,7 @@ technique11 BloomSimplePass7 SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget128,128.0))); } } -technique11 BloomSimplePass8 +technique11 BloomSimplePass6 { pass p0 { @@ -750,25 +602,7 @@ technique11 BloomSimplePass8 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,3.0))); } } - -technique11 BloomSimplePass9 -{ - pass p0 - { - SetVertexShader(CompileShader(vs_5_0,VS_Quad())); - SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget32,32.0))); - } -} -technique11 BloomSimplePass10 -{ - pass p0 - { - SetVertexShader(CompileShader(vs_5_0,VS_Quad())); - SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,32.0,5.0))); - } -} - -technique11 BloomSimplePass11 +technique11 BloomSimplePass7 { pass p0 { @@ -785,7 +619,6 @@ technique11 BloomPass { pass p0 @@ -834,7 +667,6 @@ technique11 BloomPass6 SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget64,64.0))); } } - technique11 BloomPass7 { pass p0 @@ -851,7 +683,6 @@ technique11 BloomPass8 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,1024.0,0.0))); } } - technique11 BloomPass9 { pass p0 @@ -868,7 +699,6 @@ technique11 BloomPass10 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,512.0,1.0))); } } - technique11 BloomPass11 { pass p0 @@ -885,7 +715,6 @@ technique11 BloomPass12 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,256.0,2.0))); } } - technique11 BloomPass13 { pass p0 @@ -902,7 +731,6 @@ technique11 BloomPass14 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,3.0))); } } - technique11 BloomPass15 { pass p0 @@ -919,7 +747,6 @@ technique11 BloomPass16 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,64.0,4.0))); } } - technique11 BloomPass17 { pass p0 @@ -936,7 +763,6 @@ technique11 BloomPass18 SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,32.0,5.0))); } } - technique11 BloomPass19 { pass p0 diff --git a/enbseries/enbbloom.fx.ini b/enbseries/enbbloom.fx.ini index 110c042..a1341a3 100644 --- a/enbseries/enbbloom.fx.ini +++ b/enbseries/enbbloom.fx.ini @@ -1,42 +1,42 @@ [ENBBLOOM.FX] -TECHNIQUE=1 -Bloom Intensity Night=0.69 -Bloom Intensity Day=0.57 -Bloom Intensity Interior=0.61 -Bloom Contrast Night=1.0 -Bloom Contrast Day=1.02 +TECHNIQUE=2 +Bloom Intensity Night=0.37 +Bloom Intensity Day=0.28 +Bloom Intensity Interior=0.32 +Bloom Contrast Night=1.03 +Bloom Contrast Day=1.06 Bloom Contrast Interior=1.02 -Bloom Saturation Night=1.05 -Bloom Saturation Day=1.03 -Bloom Saturation Interior=1.04 -Bloom Offset Night=-0.05 -Bloom Offset Day=-0.09 -Bloom Offset Interior=-0.07 -Bloom Intensity Cap Night=1.0 -Bloom Intensity Cap Day=1.0 -Bloom Intensity Cap Interior=1.0 +Bloom Saturation Night=1.39 +Bloom Saturation Day=1.35 +Bloom Saturation Interior=1.47 +Bloom Offset Night=0.0 +Bloom Offset Day=0.0 +Bloom Offset Interior=0.0 +Bloom Intensity Cap Night=25.0 +Bloom Intensity Cap Day=25.0 +Bloom Intensity Cap Interior=25.0 Bloom Blur Radius=1.0 Blue Shift Night=0.294, 0.424, 0.859 Blue Shift Day=0.22, 0.537, 0.855 Blue Shift Interior=0.337, 0.525, 0.878 -Blue Shift Intensity Night=0.96 -Blue Shift Intensity Day=0.71 -Blue Shift Intensity Interior=0.97 -Blue Shift Luminance Factor Per-pass=0.31 +Blue Shift Intensity Night=0.32 +Blue Shift Intensity Day=0.2 +Blue Shift Intensity Interior=0.29 +Blue Shift Luminance Factor Per-pass=0.61 Blue Shift Color Factor Per-pass=0.79 Enable Anamorphic Bloom=true -Anamorphic Bloom Blend Night=0.57 -Anamorphic Bloom Blend Day=0.44 -Anamorphic Bloom Blend Interior=0.47 +Anamorphic Bloom Blend Night=0.62 +Anamorphic Bloom Blend Day=0.5 +Anamorphic Bloom Blend Interior=0.56 Anamorphic Bloom Blue Shift Night=0.553, 0.404, 0.851 Anamorphic Bloom Blue Shift Day=0.424, 0.384, 0.831 Anamorphic Bloom Blue Shift Interior=0.537, 0.475, 0.89 -Anamorphic Bloom Blue Shift Intensity Night=2.31 -Anamorphic Bloom Blue Shift Intensity Day=1.59 -Anamorphic Bloom Blue Shift Intensity Interior=1.86 -Anamorphic Bloom Contrast Night=0.95 -Anamorphic Bloom Contrast Day=1.0 -Anamorphic Bloom Contrast Interior=0.82 +Anamorphic Bloom Blue Shift Intensity Night=0.87 +Anamorphic Bloom Blue Shift Intensity Day=0.73 +Anamorphic Bloom Blue Shift Intensity Interior=0.93 +Anamorphic Bloom Contrast Night=1.2 +Anamorphic Bloom Contrast Day=1.17 +Anamorphic Bloom Contrast Interior=1.24 Anamorphic Bloom Radius Multiplier=1.0 Bloom Intensity Interior Night=1.33 Bloom Intensity Interior Day=1.26 @@ -80,25 +80,25 @@ Anamorphic Bloom Blue Shift Interior Night=1.86 Anamorphic Bloom Blue Shift Interior Day=1.86 Anamorphic Bloom Contrast Interior Night=1.12 Anamorphic Bloom Contrast Interior Day=1.22 -Bloom Pass 1 Blend=0.34 -Bloom Pass 2 Blend=0.59 -Bloom Pass 3 Blend=0.71 -Bloom Pass 4 Blend=0.79 -Bloom Pass 5 Blend=0.88 -Bloom Pass 6 Blend=0.94 -Enable Lens Dirt=true +Bloom Pass 1 Blend=0.27 +Bloom Pass 2 Blend=0.28 +Bloom Pass 3 Blend=0.52 +Bloom Pass 4 Blend=0.69 +Bloom Pass 5 Blend=0.97 +Bloom Pass 6 Blend=1.16 +Enable Lens Dirt=false Dirt Pass 1 Blend=0.08 Dirt Pass 2 Blend=0.25 Dirt Pass 3 Blend=0.54 Dirt Pass 4 Blend=1.09 Dirt Pass 5 Blend=2.71 Dirt Pass 6 Blend=5.68 -Dirt Contrast=1.519999 -Dirt Factor=0.73 +Dirt Contrast=2.069999 +Dirt Factor=0.53 Bloom Blur Radius X=1.0 Bloom Blur Radius Y=1.0 -Bloom Single Pass Blend=0.66 -Dirt Single Pass Blend=1.64 -Dirt Saturation=0.73 +Bloom Single Pass Blend=0.52 +Dirt Single Pass Blend=1.43 +Dirt Saturation=0.38 Bloom Angle=0.0 -Dirt Texture Contrast=0.72 +Dirt Texture Contrast=0.86 diff --git a/enbseries/enbdepthoffield.fx b/enbseries/enbdepthoffield.fx index 8c00595..08b16a4 100644 --- a/enbseries/enbdepthoffield.fx +++ b/enbseries/enbdepthoffield.fx @@ -266,12 +266,24 @@ bool frostalways string UIWidget = "Checkbox"; > = {false}; string str_focus = "Focusing Parameters"; -/* circle (triangle, actually) average focus */ -bool focuscircle +/* + focus modes: + -2 : mouse + -1 : manual + 0 : center spot + 1 : center + triangle + 2 : 8x8 grid average + TODO + 3 : 8x8 grid average of 8 closest points + 4 : 8x8 grid average of 8 farthest points +*/ +int focuscircle < - string UIName = "Enable Focus Triangle"; + string UIName = "Focus Mode"; string UIWidget = "Checkbox"; -> = {true}; + int UIMin = -2; + int UIMax = 2; +> = {1}; bool focusdisplay < string UIName = "Display Focus Points"; @@ -470,18 +482,35 @@ float doffixedfocusblend_n string UIName = "DOF Fixed Focus Blend Night"; string UIWidget = "Spinner"; float UIMin = 0.0; + float UIMax = 1.0; > = {0.0}; float doffixedfocusblend_d < string UIName = "DOF Fixed Focus Blend Day"; string UIWidget = "Spinner"; float UIMin = 0.0; + float UIMax = 1.0; > = {0.0}; float doffixedfocusblend_i < string UIName = "DOF Fixed Focus Blend Interior"; string UIWidget = "Spinner"; float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float doffixedfocusdepth +< + string UIName = "DOF Fixed Focus Depth"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float doffixedfocuscap +< + string UIName = "DOF Fixed Focus Cap"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; > = {0.0}; /* fixed unfocused depth factors */ float doffixedunfocusmult_n @@ -540,18 +569,28 @@ float doffixedunfocusblend_n string UIName = "DOF Fixed Unfocus Blend Night"; string UIWidget = "Spinner"; float UIMin = 0.0; + float UIMax = 1.0; > = {0.0}; float doffixedunfocusblend_d < string UIName = "DOF Fixed Unfocus Blend Day"; string UIWidget = "Spinner"; float UIMin = 0.0; + float UIMax = 1.0; > = {0.0}; float doffixedunfocusblend_i < string UIName = "DOF Fixed Unfocus Blend Interior"; string UIWidget = "Spinner"; float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float doffixedunfocusdepth +< + string UIName = "DOF Fixed Unfocus Depth"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; > = {0.0}; /* prevents fixed dof from blurring the skybox */ bool doffixedcut @@ -853,6 +892,7 @@ float EInteriorFactor; float4 TimeOfDay1; float4 TimeOfDay2; float4 DofParameters; +float4 tempInfo2; Texture2D TextureCurrent; Texture2D TexturePrevious; @@ -1082,18 +1122,19 @@ float4 PS_DoFPrepass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target /* cheap tilt */ foc = foc+0.01*doftiltx*(doftiltxcenter-coord.x) +0.01*doftilty*(doftiltycenter-coord.y); - float dfc = abs(dep-foc); - float dff = abs(dep); - float dfu = dff; - if ( doffixedcut && (dep >= cutoff*0.000001) ) dfu *= 0; - dfc = clamp(pow(dfc,dofpow)*dofmult+dofbump,0.0,1.0); + float dff = abs(dep-doffixedfocusdepth); dff = clamp(pow(dff,doffixedfocuspow)*doffixedfocusmult +doffixedfocusbump,0.0,1.0); + if ( dep > doffixedfocuscap ) dff = 1.0; + float dfu = abs(dep-doffixedunfocusdepth); dfu = clamp(pow(dfu,doffixedunfocuspow)*doffixedunfocusmult +doffixedunfocusbump,0.0,1.0); - dfc *= lerp(1.0,dff,doffixedfocusblend); + if ( doffixedcut && (dep >= cutoff*0.000001) ) dfu *= 0; + float dfc = abs(dep-foc); + dfc = clamp(pow(dfc,dofpow)*dofmult+dofbump,0.0,1.0); dfc += lerp(0.0,dfu,doffixedunfocusblend); - return max(0.0,dfc); + dfc *= lerp(1.0,dff,doffixedfocusblend); + return clamp(dfc,0.0,1.0); } /* apply SSAO to screen */ @@ -1239,11 +1280,26 @@ float4 PS_Aperture( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target float4 PS_ReadFocus( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target { if ( dofdisable ) return 0.0; - if ( focusmanual ) return focusmanualvalue; + if ( focuscircle == -2 ) + return TextureDepth.Sample(Sampler1,tempInfo2.zw).x; + if ( focuscircle < 0 ) return focusmanualvalue; float focusmax = tod_ind(focusmax); float cfocus = min(TextureDepth.Sample(Sampler1,focuscenter).x, focusmax*0.001); - if ( !focuscircle ) return cfocus; + if ( focuscircle == 0 ) return cfocus; + if ( focuscircle == 2 ) + { + int i, j; + float mfocus = 0.0; + float2 px; + [unroll] for( j=0; j<8; j++ ) [unroll] for( i=0; i<8; i++ ) + { + px = float2((i+0.5)/8.0,(j+0.5)/8.0); + mfocus += min(TextureDepth.Sample(Sampler1,px).x, + focusmax*0.001); + } + return mfocus/64.0; + } /* using polygons inscribed into a circle, in this case a triangle */ float focusradius = tod_ind(focusradius); float focusmix = tod_ind(focusmix); @@ -1385,7 +1441,7 @@ float4 PS_DoFBorkeh( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target res /= tw; return res; } -float4 PS_DoFBorkehB( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target +float4 PS_DoFPostBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target { float2 coord = IN.txcoord.xy; if ( dofdisable ) return TextureColor.Sample(Sampler1,coord); @@ -1474,8 +1530,27 @@ float4 PS_FrostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target res.rgb *= 1.0+bmp*dist; } else res = TextureColor.Sample(Sampler1,coord); - if ( !focusdisplay ) return res; + if ( !focusdisplay || (focuscircle == -1) ) return res; + if ( focuscircle == -2 ) + { + if ( distance(coord,tempInfo2.zw) < 0.01 ) + res.rgb = float3(1,0,0); + return res; + } + if ( focuscircle == 2 ) + { + int i, j; + float2 px; + [unroll] for( j=0; j<8; j++ ) [unroll] for( i=0; i<8; i++ ) + { + px = float2((i+0.5)/8.0,(j+0.5)/8.0); + if ( distance(coord,px) < 0.005 ) + res.rgb = float3(1,0,0); + } + return res; + } if ( distance(coord,focuscenter) < 0.01 ) res.rgb = float3(1,0,0); + if ( focuscircle == 0 ) return res; float cstep = (1.0/3.0); float2 tcoord; float focusradius = tod_ind(focusradius); @@ -1585,6 +1660,14 @@ technique11 Prepass7 } } technique11 Prepass8 +{ + pass p0 + { + SetVertexShader(CompileShader(vs_5_0,VS_Quad())); + SetPixelShader(CompileShader(ps_5_0,PS_DoFPostBlur())); + } +} +technique11 Prepass9 { pass p0 { @@ -1662,7 +1745,7 @@ technique11 PrepassB8 pass p0 { SetVertexShader(CompileShader(vs_5_0,VS_Quad())); - SetPixelShader(CompileShader(ps_5_0,PS_DoFBorkehB())); + SetPixelShader(CompileShader(ps_5_0,PS_DoFPostBlur())); } } technique11 PrepassB9 diff --git a/enbseries/enbdepthoffield.fx.ini b/enbseries/enbdepthoffield.fx.ini index dabc8b9..1273d26 100644 --- a/enbseries/enbdepthoffield.fx.ini +++ b/enbseries/enbdepthoffield.fx.ini @@ -12,77 +12,77 @@ Underwater Speed=24.3, 21.9, 26.5 Underwater Amplitude=0.1, 0.11, 0.07 Underwater Zoom=0.15 Always Underwater=false -Enable Hot Air Refraction=false -Heat Texture Size=6.4 +Enable Hot Air Refraction=true +Heat Texture Size=9.52 Heat Speed=0.45 Heat Fade Contrast=235.0 Heat Fade Intensity=1.1 -Heat Fade Offset=-0.59 -Heat Intensity=0.6 -Heat Contrast=0.95 +Heat Fade Offset=-0.79 +Heat Intensity=0.65 +Heat Contrast=1.12 Heat Time-of-day Contrast=0.5 Heat Always Enable=true -Enable Screen Frost=true -Frost Contrast=1.26 -Frost Strength=0.03 -Frost Radial Contrast=1.69 +Enable Screen Frost=false +Frost Contrast=1.67 +Frost Strength=0.02 +Frost Radial Contrast=1.67 Frost Radial Intensity=0.83 -Frost Radial Offset=-0.67 -Frost Texture Blend=0.97 -Frost Texture Blend Contrast=2.42 -Frost Texture Size=0.8 +Frost Radial Offset=-0.66 +Frost Texture Blend=0.94 +Frost Texture Blend Contrast=2.44 +Frost Texture Size=0.85 Frost Indoor Factor=0.0 Frost Night Factor=0.0 Frost Always Enable=true Enable Focus Triangle=true Display Focus Points=false Enable Manual Focus=false -Manual Focus Depth=0.8 +Manual Focus Depth=1.0 Focus Point Center=0.5, 0.48, 0 Focus Triangle Angle=0.5 Focus Triangle Radius Night=9.0 Focus Triangle Radius Day=12.0 Focus Triangle Radius Interior=10.5 -Focus Triangle Blending Night=0.6 -Focus Triangle Blending Day=0.7 -Focus Triangle Blending Interior=0.6 +Focus Triangle Blending Night=0.75 +Focus Triangle Blending Day=0.9 +Focus Triangle Blending Interior=0.8 Focus Maximum Depth Night=990.0 Focus Maximum Depth Day=994.0 Focus Maximum Depth Interior=988.0 -DOF Intensity Night=280.0 -DOF Intensity Day=250.0 -DOF Intensity Interior=280.0 -DOF Contrast Night=3.0 -DOF Contrast Day=3.7 -DOF Contrast Interior=3.6 +DOF Intensity Night=471.689972 +DOF Intensity Day=421.940002 +DOF Intensity Interior=438.609985 +DOF Contrast Night=3.45 +DOF Contrast Day=3.76 +DOF Contrast Interior=3.52 DOF Shift Night=0.0 DOF Shift Day=0.0 DOF Shift Interior=0.0 -DOF Fixed Focus Intensity Night=1.0 -DOF Fixed Focus Intensity Day=1.0 -DOF Fixed Focus Intensity Interior=1.0 -DOF Fixed Focus Contrast Night=1.0 -DOF Fixed Focus Contrast Day=1.0 -DOF Fixed Focus Contrast Interior=1.0 -DOF Fixed Focus Shift Night=-0.01 -DOF Fixed Focus Shift Day=-0.01 -DOF Fixed Focus Shift Interior=-0.01 +DOF Fixed Focus Intensity Night=388.769989 +DOF Fixed Focus Intensity Day=411.829987 +DOF Fixed Focus Intensity Interior=377.649994 +DOF Fixed Focus Contrast Night=0.93 +DOF Fixed Focus Contrast Day=0.98 +DOF Fixed Focus Contrast Interior=0.87 +DOF Fixed Focus Shift Night=0.0 +DOF Fixed Focus Shift Day=0.0 +DOF Fixed Focus Shift Interior=0.0 DOF Fixed Focus Blend Night=1.0 DOF Fixed Focus Blend Day=1.0 DOF Fixed Focus Blend Interior=1.0 -DOF Fixed Unfocus Intensity Night=1.2 -DOF Fixed Unfocus Intensity Day=1.4 -DOF Fixed Unfocus Intensity Interior=1.3 -DOF Fixed Unfocus Contrast Night=125.0 -DOF Fixed Unfocus Contrast Day=220.0 -DOF Fixed Unfocus Contrast Interior=165.0 -DOF Fixed Unfocus Shift Night=-0.6 -DOF Fixed Unfocus Shift Day=-0.9 -DOF Fixed Unfocus Shift Interior=-0.75 +DOF Fixed Unfocus Intensity Night=1.13 +DOF Fixed Unfocus Intensity Day=1.06 +DOF Fixed Unfocus Intensity Interior=1.24 +DOF Fixed Unfocus Contrast Night=96.980003 +DOF Fixed Unfocus Contrast Day=134.399994 +DOF Fixed Unfocus Contrast Interior=65.19001 +DOF Fixed Unfocus Shift Night=-0.95 +DOF Fixed Unfocus Shift Day=-1.16 +DOF Fixed Unfocus Shift Interior=-0.78 DOF Fixed Unfocus Blend Night=1.0 DOF Fixed Unfocus Blend Day=1.0 DOF Fixed Unfocus Blend Interior=1.0 -DOF Fixed Use Cutoff=false +DOF Fixed Use Cutoff=true Disable DOF=false DOF Gather Blur Radius=8.0 Debug Depth=false @@ -100,14 +100,14 @@ Edgevision Radius=1.0 Enable SSAO=false SSAO Radius=0.05 SSAO Noise=0 -SSAO Fade Contrast Night=0.9 -SSAO Fade Contrast Day=0.8 -SSAO Fade Contrast Interior=0.85 +SSAO Fade Contrast Night=0.6 +SSAO Fade Contrast Day=0.7 +SSAO Fade Contrast Interior=0.65 SSAO Fade Intensity Night=10.5 SSAO Fade Intensity Day=12.5 SSAO Fade Intensity Interior=11.5 -SSAO Intensity=3.0 -SSAO Contrast=1.5 +SSAO Intensity=1.25 +SSAO Contrast=0.65 SSAO Blending=0.8 SSAO Blur=true SSAO Bilateral Factor=1500.0 @@ -175,18 +175,25 @@ Heat Factor Sunset=0.85 Heat Factor Dusk=0.38 Heat Factor Night=0.0 Heat Factor Interior=0.0 -Frost Factor Dawn=0.93 -Frost Factor Sunrise=0.74 -Frost Factor Day=0.62 -Frost Factor Sunset=0.77 -Frost Factor Dusk=0.94 -Frost Factor Night=1.16 -Frost Factor Interior=0.27 +Frost Factor Dawn=1.02 +Frost Factor Sunrise=0.79 +Frost Factor Day=0.61 +Frost Factor Sunset=0.78 +Frost Factor Dusk=1.02 +Frost Factor Night=1.32 +Frost Factor Interior=0.37 DOF Bilateral Factor=20.0 DOF Bilateral Radius=1.0 -DOF Blur Radius=6.0 +DOF Blur Radius=8.0 DOF Blur Chromatic Aberration=1.5 Focus Plane Horizontal Tilt Center=0.5 Focus Plane Vertical Tilt Center=0.5 Focus Plane Horizontal Tilt=0.0 Focus Plane Vertical Tilt=0.0 +Focus Mode=1 +DOF Fixed Focus Depth Night=0.01 +DOF Fixed Focus Depth Day=0.01 +DOF Fixed Focus Depth Interior=0.01 +DOF Fixed Focus Depth=0.01 +DOF Fixed Focus Cap=0.01 +DOF Fixed Unfocus Depth=0.0 diff --git a/enbseries/enbeffect.fx b/enbseries/enbeffect.fx index b275d81..f0d72fc 100644 --- a/enbseries/enbeffect.fx +++ b/enbseries/enbeffect.fx @@ -86,118 +86,303 @@ float nj string UIWidget = "Spinner"; float UIMin = 0.0; > = {2.0}; -/* tone mapping */ -string str_tonemap = "Filmic Tone Mapping"; -bool tmapenable +bool nbt < - string UIName = "Enable Tonemapping"; + string UIName = "Apply Grain Before Tone Mapping"; + string UIWidget = "Checkbox"; +> = {true}; +/* eye adaptation */ +string str_adaptation = "Eye Adaptation"; +bool aenable +< + string UIName = "Enable Adaptation"; string UIWidget = "Checkbox"; > = {false}; +/* tone mapping */ +string str_tonemap = "Tone Mapping"; +/* + algorithms: + -1 : Disabled + 0 : Vanilla + 1 : Linear + 2 : Reinhard + 3 : Uncharted 2 + 4 : Hejl Dawson + 5 : Haarm-Peter Duiker + 6 : SweetFX +*/ +int tmapenable +< + string UIName = "Tonemapping Method"; + string UIWidget = "Spinner"; + int UIMin = -1; + int UIMax = 6; +> = {3}; +float tmapexposure_n +< + string UIName = "Tonemap Exposure Night"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float tmapexposure_d +< + string UIName = "Tonemap Exposure Day"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float tmapexposure_i +< + string UIName = "Tonemap Exposure Interior"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float tmapblend_n +< + string UIName = "Tonemap Blend Night"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {1.0}; +float tmapblend_d +< + string UIName = "Tonemap Blend Day"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {1.0}; +float tmapblend_i +< + string UIName = "Tonemap Blend Interior"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {1.0}; float unA_n < - string UIName = "Tonemap Shoulder Strength Night"; + string UIName = "Uncharted2 Shoulder Strength Night"; string UIWidget = "Spinner"; > = {0.5}; float unA_d < - string UIName = "Tonemap Shoulder Strength Day"; + string UIName = "Uncharted2 Shoulder Strength Day"; string UIWidget = "Spinner"; > = {0.5}; float unA_i < - string UIName = "Tonemap Shoulder Strength Interior"; + string UIName = "Uncharted2 Shoulder Strength Interior"; string UIWidget = "Spinner"; > = {0.5}; float unB_n < - string UIName = "Tonemap Linear Strength Night"; + string UIName = "Uncharted2 Linear Strength Night"; string UIWidget = "Spinner"; > = {1.0}; float unB_d < - string UIName = "Tonemap Linear Strength Day"; + string UIName = "Uncharted2 Linear Strength Day"; string UIWidget = "Spinner"; > = {1.0}; float unB_i < - string UIName = "Tonemap Linear Strength Interior"; + string UIName = "Uncharted2 Linear Strength Interior"; string UIWidget = "Spinner"; > = {1.0}; float unC_n < - string UIName = "Tonemap Linear Angle Night"; + string UIName = "Uncharted2 Linear Angle Night"; string UIWidget = "Spinner"; > = {0.2}; float unC_d < - string UIName = "Tonemap Linear Angle Day"; + string UIName = "Uncharted2 Linear Angle Day"; string UIWidget = "Spinner"; > = {0.2}; float unC_i < - string UIName = "Tonemap Linear Angle Interior"; + string UIName = "Uncharted2 Linear Angle Interior"; string UIWidget = "Spinner"; > = {0.2}; float unD_n < - string UIName = "Tonemap Toe Strength Night"; + string UIName = "Uncharted2 Toe Strength Night"; string UIWidget = "Spinner"; > = {0.75}; float unD_d < - string UIName = "Tonemap Toe Strength Day"; + string UIName = "Uncharted2 Toe Strength Day"; string UIWidget = "Spinner"; > = {0.75}; float unD_i < - string UIName = "Tonemap Toe Strength Interior"; + string UIName = "Uncharted2 Toe Strength Interior"; string UIWidget = "Spinner"; > = {0.75}; float unE_n < - string UIName = "Tonemap Toe Numerator Night"; + string UIName = "Uncharted2 Toe Numerator Night"; string UIWidget = "Spinner"; > = {0.02}; float unE_d < - string UIName = "Tonemap Toe Numerator Day"; + string UIName = "Uncharted2 Toe Numerator Day"; string UIWidget = "Spinner"; > = {0.02}; float unE_i < - string UIName = "Tonemap Toe Numerator Interior"; + string UIName = "Uncharted2 Toe Numerator Interior"; string UIWidget = "Spinner"; > = {0.02}; float unF_n < - string UIName = "Tonemap Toe Denominator Night"; + string UIName = "Uncharted2 Toe Denominator Night"; string UIWidget = "Spinner"; > = {0.30}; float unF_d < - string UIName = "Tonemap Toe Denominator Day"; + string UIName = "Uncharted2 Toe Denominator Day"; string UIWidget = "Spinner"; > = {0.30}; float unF_i < - string UIName = "Tonemap Toe Denominator Interior"; + string UIName = "Uncharted2 Toe Denominator Interior"; string UIWidget = "Spinner"; > = {0.30}; float unW_n < - string UIName = "Tonemap Linear White Night"; + string UIName = "Uncharted2 Linear White Night"; string UIWidget = "Spinner"; > = {10.0}; float unW_d < - string UIName = "Tonemap Linear White Day"; + string UIName = "Uncharted2 Linear White Day"; string UIWidget = "Spinner"; > = {10.0}; float unW_i < - string UIName = "Tonemap Linear White Interior"; + string UIName = "Uncharted2 Linear White Interior"; string UIWidget = "Spinner"; > = {10.0}; +float sfxgamma_n +< + string UIName = "SweetFX Gamma Night"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 2.0; +> = {1.0}; +float sfxgamma_d +< + string UIName = "SweetFX Gamma Day"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 2.0; +> = {1.0}; +float sfxgamma_i +< + string UIName = "SweetFX Gamma Interior"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 2.0; +> = {1.0}; +float sfxexposure_n +< + string UIName = "SweetFX Exposure Night"; + string UIWidget = "Spinner"; + float UIMin = -1.0; + float UIMax = 1.0; +> = {0.0}; +float sfxexposure_d +< + string UIName = "SweetFX Exposure Day"; + string UIWidget = "Spinner"; + float UIMin = -1.0; + float UIMax = 1.0; +> = {0.0}; +float sfxexposure_i +< + string UIName = "SweetFX Exposure Interior"; + string UIWidget = "Spinner"; + float UIMin = -1.0; + float UIMax = 1.0; +> = {0.0}; +float sfxsaturation_n +< + string UIName = "SweetFX Saturation Night"; + string UIWidget = "Spinner"; + float UIMin = -1.0; + float UIMax = 1.0; +> = {0.0}; +float sfxsaturation_d +< + string UIName = "SweetFX Saturation Day"; + string UIWidget = "Spinner"; + float UIMin = -1.0; + float UIMax = 1.0; +> = {0.0}; +float sfxsaturation_i +< + string UIName = "SweetFX Saturation Interior"; + string UIWidget = "Spinner"; + float UIMin = -1.0; + float UIMax = 1.0; +> = {0.0}; +float sfxbleach_n +< + string UIName = "SweetFX Bleach Night"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float sfxbleach_d +< + string UIName = "SweetFX Bleach Day"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float sfxbleach_i +< + string UIName = "SweetFX Bleach Interior"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float sfxdefog_n +< + string UIName = "SweetFX Defog Night"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float sfxdefog_d +< + string UIName = "SweetFX Defog Day"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float sfxdefog_i +< + string UIName = "SweetFX Defog Interior"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {0.0}; +float3 sfxfogcolor_n +< + string UIName = "SweetFX Defog Color Night"; + string UIWidget = "Color"; +> = {0.0,0.0,1.0}; +float3 sfxfogcolor_d +< + string UIName = "SweetFX Defog Color Day"; + string UIWidget = "Color"; +> = {0.0,0.0,1.0}; +float3 sfxfogcolor_i +< + string UIName = "SweetFX Defog Color Interior"; + string UIWidget = "Color"; +> = {0.0,0.0,1.0}; + /* Color grading */ string str_grade = "Color Grading Suite"; bool gradeenable1 @@ -372,9 +557,23 @@ float lutblend_i string UIWidget = "Spinner"; > = {1.0}; #ifdef LUTMODE_LEGACY -int clut +int clut_n < - string UIName = "LUT Preset"; + string UIName = "LUT Preset Night"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 63; +> = {1}; +int clut_d +< + string UIName = "LUT Preset Day"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 63; +> = {1}; +int clut_i +< + string UIName = "LUT Preset Interior"; string UIWidget = "Spinner"; int UIMin = 0; int UIMax = 63; @@ -394,19 +593,58 @@ float techblend float UIMin = 0.0; float UIMax = 1.0; > = {1.0}; -string str_dither = "Dithering"; -bool dodither +/* vanilla */ +string str_vanilla = "Vanilla Processing"; +bool vgradeenable < - string UIName = "Enable Post Dither"; + string UIName = "Enable Vanilla Imagespace"; string UIWidget = "Checkbox"; > = {true}; -int dither +float vtintpow < - string UIName = "Dither Pattern"; + string UIName = "Vanilla Tint Contrast"; string UIWidget = "Spinner"; - int UIMin = 0; - int UIMax = 4; -> = {4}; + float UIMin = 0.0; +> = {1.0}; +float vtintmul +< + string UIName = "Vanilla Tint Strength"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float vtintblend +< + string UIName = "Vanilla Tint Blend"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {1.0}; +float vsatpow +< + string UIName = "Vanilla Vibrance Contrast"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float vsatmul +< + string UIName = "Vanilla Vibrance Strength"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float vsatblend +< + string UIName = "Vanilla Vibrance Blend"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {1.0}; +float vconblend +< + string UIName = "Vanilla Contrast Blend"; + string UIWidget = "Spinner"; + float UIMin = 0.0; + float UIMax = 1.0; +> = {1.0}; string str_debug = "Debugging"; bool bloomdebug < @@ -419,53 +657,6 @@ bool adaptdebug string UIWidget = "Checkbox"; > = {false}; -/* - dithering threshold maps - don't touch unless you know what you're doing -*/ -static const float checkers[4] = -{ - 1.0,0.0, - 0.0,1.0 -}; -#define d(x) x/4.0 -static const float ordered2[4] = -{ - d(0),d(2), - d(4),d(2) -}; -#undef d -#define d(x) x/9.0 -static const float ordered3[9] = -{ - d(2),d(6),d(3), - d(5),d(0),d(8), - d(1),d(7),d(4) -}; -#undef d -#define d(x) x/16.0 -static const float ordered4[16] = -{ - d( 0),d( 8),d( 2),d(10), - d(12),d( 4),d(14),d( 6), - d( 3),d(11),d( 1),d( 9), - d(15),d( 7),d(13),d( 5) -}; -#undef d -#define d(x) x/64.0 -static const float ordered8[64] = -{ - d( 0),d(48),d(12),d(60),d( 3),d(51),d(15),d(63), - d(32),d(16),d(44),d(28),d(35),d(19),d(47),d(31), - d( 8),d(56),d( 4),d(52),d(11),d(59),d( 7),d(55), - d(40),d(24),d(36),d(20),d(43),d(27),d(39),d(23), - d( 2),d(50),d(14),d(62),d( 1),d(49),d(13),d(61), - d(34),d(18),d(46),d(30),d(33),d(17),d(45),d(29), - d(10),d(58),d( 6),d(54),d( 9),d(57),d( 5),d(53), - d(42),d(26),d(38),d(22),d(41),d(25),d(37),d(21) -}; -#undef d - float4 Timer; float4 ScreenSize; float ENightDayFactor; @@ -491,18 +682,44 @@ Texture2D TextureNoise3 < string ResourceName = "menbnoise2.png"; >; +#ifdef LUTMODE_LEGACY Texture2D TextureLUT < -#ifdef LUTMODE_LEGACY string ResourceName = "menblutpreset.png"; -#endif +>; +#else +Texture2D TextureLUTN +< #ifdef LUTMODE_16 - string ResourceName = "menblut16.png"; + string ResourceName = "menblut16_night.png"; #endif #ifdef LUTMODE_64 - string ResourceName = "menblut64.png"; + string ResourceName = "menblut64_night.png"; #endif >; +Texture2D TextureLUTD +< +#ifdef LUTMODE_16 + string ResourceName = "menblut16_day.png"; +#endif +#ifdef LUTMODE_64 + string ResourceName = "menblut64_day.png"; +#endif +>; +Texture2D TextureLUTI +< +#ifdef LUTMODE_16 + string ResourceName = "menblut16_interior.png"; +#endif +#ifdef LUTMODE_64 + string ResourceName = "menblut64_interior.png"; +#endif +>; +#endif +Texture2D TextureTonemap +< + string ResourceName = "menbfilmlut.png"; +>; SamplerState Sampler0 { @@ -585,7 +802,7 @@ float3 hsv2rgb( float3 c ) return c.z*lerp(K.x,saturate(p-K.x),c.y); } -/* "uncharted 2" filmic tone mapping */ +/* Uncharted 2 tone mapping */ float3 Uch( float3 res ) { float A = tod_ind(unA); @@ -596,12 +813,108 @@ float3 Uch( float3 res ) float F = tod_ind(unF); return ((res*(A*res+C*B)+D*E)/(res*(A*res+B)+D*F))-E/F; } -float3 Tonemap( float3 res ) +float3 TonemapUC2( float3 res ) { float W = tod_ind(unW); float3 ucol = Uch(res); float3 uwhite = Uch(W); - return max(ucol/uwhite,0.0); + return pow(max(ucol/uwhite,0.0),1.0/2.2); +} +/* Vanilla tonemap is weird */ +float3 TonemapGame( float3 res ) +{ +#ifdef SKYRIMSE + return pow(max(res,0.0),1.0/2.2); +#else + float3 wat = res*2.0; + float3 huh = res*0.3+0.05; + float2 weh = float2(0.2,3.333333)*Params01[1].w; + huh = wat*huh+weh.x; + float3 ehh = wat*0.3+0.5; + ehh = ehh*0.3+0.5; + ehh = wat*ehh+0.06; + ehh = huh/ehh; + ehh = -Params01[1].w*3.333333+ehh; + wat.x = Params01[1].w*0.2+19.376; + wat.x = wat.x*0.0408564-weh.y; + return pow(max(ehh/wat.x,0.0),1.0/2.2); +#endif +} +/* Ugly old Reinhard tone mapping */ +float3 TonemapReinhard( float3 res ) +{ + float3 tcol = res/(1+res); + return pow(max(tcol,0.0),1.0/2.2); +} +/* That thing used in watch_dogs */ +float3 TonemapHaarmPeterDuiker( float3 res ) +{ + float3 ld = 0.002; + float linReference = 0.18; + float logReference = 444; + float logGamma = 0.45; + float3 LogColor; + LogColor.rgb = (log10(0.4*res/linReference)/ld*logGamma+logReference)/1023.f; + LogColor.rgb = saturate(LogColor.rgb); + float FilmLutWidth = 256; + float Padding = .5/FilmLutWidth; + float3 retColor; + retColor.r = TextureTonemap.Sample(Sampler1,float2(lerp(Padding,1-Padding,LogColor.r),.5)).x; + retColor.g = TextureTonemap.Sample(Sampler1,float2(lerp(Padding,1-Padding,LogColor.g),.5)).x; + retColor.b = TextureTonemap.Sample(Sampler1,float2(lerp(Padding,1-Padding,LogColor.b),.5)).x; + return retColor; +} +/* Practically nothing */ +float3 TonemapLinear( float3 res ) +{ + return pow(max(res,0.0),1.0/2.2); +} +/* People somehow call this one realistic */ +float3 TonemapHejlDawson( float3 res ) +{ + float3 x = max(0.0,res-0.004); + return (x*(6.2*x+.5))/(x*(6.2*x+1.7)+0.06); +} +/* The standard tonemap from sweetfx */ +float3 TonemapSFX( float3 res ) +{ + float Gamma = tod_ind(sfxgamma); + float Exposure = tod_ind(sfxexposure); + float Saturation = tod_ind(sfxsaturation); + float Bleach = tod_ind(sfxbleach); + float Defog = tod_ind(sfxdefog); + float3 FogColor = tod_ind(sfxfogcolor); + float3 tcol = res; + tcol = saturate(tcol-Defog*FogColor*2.55); + tcol *= pow(2.0,Exposure); + tcol = pow(tcol,Gamma); + float lum = luminance(tcol); + float L = saturate(1.0*(lum-0.45)); + float3 A2 = Bleach*tcol; + float3 res1 = 2.0*tcol*lum; + float3 res2 = 1.0-2.0*(1.0-lum)*(1.0-tcol); + float3 newc = lerp(res1,res2,L); + float3 mixrgb = A2*newc; + tcol += (1.0-A2)*mixrgb; + float3 gray = dot(tcol,1.0/3.0); + float3 diff = tcol-gray; + return (tcol+diff*Saturation)/(1+(diff*Saturation)); +} +float3 Tonemap( float3 res ) +{ + float3 tcol = pow(max(res,0.0),1.0/2.2); + if ( tmapenable == -1 ) return tcol; + res *= tod_ind(tmapexposure); + float tblend = tod_ind(tmapblend); + float3 mapped; + if ( tmapenable == 6 ) mapped = TonemapSFX(res); + else if ( tmapenable == 5 ) mapped = TonemapHaarmPeterDuiker(res); + else if ( tmapenable == 4 ) mapped = TonemapHejlDawson(res); + else if ( tmapenable == 3 ) mapped = TonemapUC2(res); + else if ( tmapenable == 2 ) mapped = TonemapReinhard(res); + else if ( tmapenable == 1 ) mapped = TonemapLinear(res); + else if ( tmapenable == 0 ) mapped = TonemapGame(res); + return lerp(tcol,mapped,tblend); } /* colour grading passes */ float3 GradingRGB( float3 res ) @@ -642,12 +955,25 @@ float3 GradingLUT( float3 res ) float3 tcol = clamp(res,0.0001,0.9999); tcol.rg = tcol.rg*0.5+0.25; #ifdef LUTMODE_LEGACY - float2 lc1 = float2(tcol.r/16.0+floor(tcol.b*16.0)/16.0,tcol.g/64.0 - +clut/64.0); - float2 lc2 = float2(tcol.r/16.0+ceil(tcol.b*16.0)/16.0,tcol.g/64.0 - +clut/64.0); + float2 lc1 = float2(tcol.r/16.0+floor(tcol.b*16.0)/16.0,tcol.g/64.0); + float2 lc2 = float2(tcol.r/16.0+ceil(tcol.b*16.0)/16.0,tcol.g/64.0); float dec = (ceil(tcol.b*16.0)==16.0)?(0.0):frac(tcol.b*16.0); -#endif + /* night samples */ + float3 tcl1_n = TextureLUT.Sample(SamplerLUT,lc1 + +float2(0,clut_n/64.0)).rgb; + float3 tcl2_n = TextureLUT.Sample(SamplerLUT,lc2 + +float2(0,clut_n/64.0)).rgb; + /* day samples */ + float3 tcl1_d = TextureLUT.Sample(SamplerLUT,lc1 + +float2(0,clut_d/64.0)).rgb; + float3 tcl2_d = TextureLUT.Sample(SamplerLUT,lc2 + +float2(0,clut_d/64.0)).rgb; + /* interior samples */ + float3 tcl1_i = TextureLUT.Sample(SamplerLUT,lc1 + +float2(0,clut_i/64.0)).rgb; + float3 tcl2_i = TextureLUT.Sample(SamplerLUT,lc2 + +float2(0,clut_i/64.0)).rgb; +#else #ifdef LUTMODE_16 float2 lc1 = float2(tcol.r,tcol.g/16.0+floor(tcol.b*16.0)/16.0); float2 lc2 = float2(tcol.r,tcol.g/16.0+ceil(tcol.b*16.0)/16.0); @@ -658,8 +984,18 @@ float3 GradingLUT( float3 res ) float2 lc2 = float2(tcol.r,tcol.g/64.0+ceil(tcol.b*64.0)/64.0); float dec = (ceil(tcol.b*64.0)==64.0)?(0.0):frac(tcol.b*64.0); #endif - float3 tcl1 = TextureLUT.Sample(SamplerLUT,lc1).rgb; - float3 tcl2 = TextureLUT.Sample(SamplerLUT,lc2).rgb; + /* night samples */ + float3 tcl1_n = TextureLUTN.Sample(SamplerLUT,lc1).rgb; + float3 tcl2_n = TextureLUTN.Sample(SamplerLUT,lc2).rgb; + /* day samples */ + float3 tcl1_d = TextureLUTD.Sample(SamplerLUT,lc1).rgb; + float3 tcl2_d = TextureLUTD.Sample(SamplerLUT,lc2).rgb; + /* interior samples */ + float3 tcl1_i = TextureLUTI.Sample(SamplerLUT,lc1).rgb; + float3 tcl2_i = TextureLUTI.Sample(SamplerLUT,lc2).rgb; +#endif + float3 tcl1 = tod_ind(tcl1); + float3 tcl2 = tod_ind(tcl2); tcol = lerp(tcl1,tcl2,dec); float lutblend = tod_ind(lutblend); return lerp(res,tcol,lutblend); @@ -674,24 +1010,6 @@ float3 Technicolor( float3 res ) float3 tint = float3(green*blue,red*blue,red*green)*res; return lerp(res,res+0.5*(tint-res),techblend); } -/* post-pass dithering, something apparently only my ENB does */ -float3 Dither( float3 res, float2 coord ) -{ - float2 rcoord = coord*float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); - float3 col = res; - float dml = (1.0/256.0); - if ( dither == 1 ) - col += ordered2[int(rcoord.x%2)+2*int(rcoord.y%2)]*dml-0.5*dml; - else if ( dither == 2 ) - col += ordered3[int(rcoord.x%3)+3*int(rcoord.y%3)]*dml-0.5*dml; - else if ( dither == 3 ) - col += ordered4[int(rcoord.x%4)+4*int(rcoord.y%4)]*dml-0.5*dml; - else if ( dither == 4 ) - col += ordered8[int(rcoord.x%8)+8*int(rcoord.y%8)]*dml-0.5*dml; - else col += checkers[int(rcoord.x%2)+2*int(rcoord.y%2)]*dml-0.5*dml; - col = (trunc(col*256.0)/256.0); - return col; -} /* Fuzzy */ float3 FilmGrain( float3 res, float2 coord ) { @@ -731,80 +1049,86 @@ float3 FilmGrain( float3 res, float2 coord ) float3 ng = float3(n4,n4,n4); float3 nc = float3(n1,n2,n3); float3 nt = pow(clamp(lerp(ng,nc,ns),0.0,1.0),nj); - if ( nb == 1 ) return res+nt*ni; - if ( nb == 2 ) return overlay(res,(nt*ni)); + if ( nb == 1 ) return res+nt*ni*0.01; + if ( nb == 2 ) return overlay(res,(nt*ni*0.01)); if ( nb == 3 ) { float bn = 1.0-saturate((res.r+res.g+res.b)/3.0); bn = pow(bn,bnp); float3 nn = saturate(nt*bn); - return darkmask(res,(nn*ni)); + return darkmask(res,(nn*ni*0.01)); } - return lerp(res,nt,ni); + return lerp(res,nt,ni*0.01); +} + +/* identical between games, the only difference is parameter indices */ +float3 GradingGame( float3 res, float adapt ) +{ + float satv, tintv, conv, brtv; + float3 tintc; +#ifdef SKYRIMSE + satv = Params01[3].x; + tintc = Params01[4].xyz; + tintv = Params01[4].w; + conv = Params01[3].w; + brtv = Params01[3].z; +#else + satv = Params01[2].x; + tintc = Params01[3].xyz; + tintv = Params01[3].w; + conv = Params01[2].w; + brtv = Params01[2].z; +#endif + float val = luminance(res); + float3 tcol = res-val; + satv = (satv<0.0)?(-pow(abs(satv),vsatpow)*vsatmul) + :(pow(max(satv,0.0),vsatpow)*vsatmul); + tcol = satv*tcol+val; + tcol = lerp(res,tcol,vsatblend); + float3 tint = tintc*val-tcol; + tintv = (tintv<0.0)?(-pow(abs(tintv),vtintpow)*vtintmul) + :(pow(max(tintv,0.0),vtintpow)*vtintmul); + tcol = tintv*tint+tcol; + tcol = lerp(res,tcol,vtintblend); + tcol = conv*tcol-adapt; + tcol = brtv*tcol+adapt; + return lerp(res,tcol,vconblend); +} +/* Skyrim SE version is blatantly incomplete and will glitch out */ +float2 Adaptation( float2 coord ) +{ +#ifdef SKYRIMSE + float adapt = TextureAdaptation.Sample(Sampler1,coord).x; + return float2(adapt); +#else + float adapt = TextureAdaptation.Sample(Sampler0,coord).x; + float adapt_v1 = Params01[1].z/(0.001+adapt); + float adapt_v2 = adapt_v1 = {0.0,0.0}; /* palette type: - -2 : Standard VGA 256-color palette -1 : disable 0 : CGA (320x200 4-color, or 640x200 monochrome) 1 : EGA (320x200, 16 colors) 2 : RGB2 (64-color quarter VGA palette, used in AOS) - 3 : RGB323 (8-bit RGB, I don't think this was a real thing) - 4 : VGA (256 colors, standard palette) - 5 : Doom (256 colors, does not cover a lot) - 6 : Quake I (256 colors, covers even less) - 7 : RGB4 (4bpc, I also don't think this was ever used in real hardware) - 8 : RGB565 (ol' 16-bit "true color") - 9 : RGB6 (typical screens incapable of 8bpc) + 3 : VGA (256 colors) + 4 : RGB565 (ol' 16-bit "true color") */ int paltype < string UIName = "Palette Type"; string UIWidget = "Spinner"; int UIMin = -1; - int UIMax = 9; + int UIMax = 4; > = {1}; /* CGA palette to use: @@ -83,22 +77,46 @@ int egapal int UIMin = 0; int UIMax = 1; > = {0}; +/* + VGA palette to use: + 0 : Standard VGA + 1 : Amulets & Armor + 2 : Blood + 3 : Doom + 4 : Duke Nukem 3D + 5 : Hacx 2.0 + 6 : Heretic + 7 : Hexen + 8 : Hexen 2 + 9 : Quake + 10 : Quake 2 + 11 : Rise of the Triad + 12 : Shadow Warrior + 13 : Strife + 14 : Wolfenstein 3D + TODO Project .Blank palette (when the design is finished) +*/ +int vgapal +< + string UIName = "VGA Palette"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 14; +> = {0}; /* Dithering mode: -1 : No dithering, just raw banding 0 : 2x2 checkerboard dithering, looks like ass 1 : 2x2 ordered dithering - 2 : 3x3 ordered dithering - 3 : 4x4 ordered dithering - 4 : 8x8 ordered dithering + 2 : 8x8 ordered dithering */ int dither < string UIName = "Dithering Pattern"; string UIWidget = "Spinner"; int UIMin = -1; - int UIMax = 4; -> = {4}; + int UIMax = 2; +> = {2}; /* gamma modifier for base color, lower values raise midtones and viceversa */ float bgamma < @@ -125,25 +143,6 @@ float bdmult string UIWidget = "Spinner"; float UIMin = 0.0; > = {0.25}; -/* ASCII art filter */ -string str_ascii = "Luma ASCII Art Filter"; -bool asciienable -< - string UIName = "Enable ASCII"; - string UIWidget = "Checkbox"; -> = {false}; -bool asciimono -< - string UIName = "ASCII Monochrome"; - string UIWidget = "Checkbox"; -> = {true}; -float asciiblend -< - string UIName = "ASCII Blend"; - string UIWidget = "Spinner"; - float UIMin = 0.0; - float UIMax = 1.0; -> = {0.0}; string str_mask = "Depth Chroma Key"; bool maskenable < @@ -162,64 +161,6 @@ float maskd float UIMin = 0.0; float UIMax = 1.0; > = {0.5}; -string str_dot = "RGBI Dot Matrix"; -bool dotenable -< - string UIName = "Enable Dot Matrix"; - string UIWidget = "Checkbox"; -> = {false}; -int dotsize -< - string UIName = "Dot Size"; - string UIWidget = "Spinner"; - int UIMin = 1; -> = {1}; -float dotblend -< - string UIName = "Dot Blend"; - string UIWidget = "Spinner"; - float UIMin = 0.0; - float UIMax = 1.0; -> = {0.4}; -float dotmult -< - string UIName = "Dot Intensity"; - string UIWidget = "Spinner"; - float UIMin = 0.0; -> = {1.0}; -float dotpow -< - string UIName = "Dot Contrast"; - string UIWidget = "Spinner"; - float UIMin = 0.0; -> = {1.0}; -string str_curve = "Lens Curvature"; -bool curveenable -< - string UIName = "Enable Curvature"; - string UIWidget = "Checkbox"; -> = {false}; -float chromaab -< - string UIName = "Curve Chromatic Aberration"; - string UIWidget = "Spinner"; -> = {0.0}; -float lenszoom -< - string UIName = "Curve Zooming"; - string UIWidget = "Spinner"; -> = {50.0}; -float lensdist -< - string UIName = "Curve Distortion"; - string UIWidget = "Spinner"; -> = {0.0}; -float curvesoft -< - string UIName = "Curve Sampling Soften"; - string UIWidget = "Spinner"; - float UIMin = 0.0; -> = {0.0}; /* BlurSharpShift, some people are obsessed with this nonsense */ string str_bss = "BlurSharpShift"; bool bssblurenable @@ -286,6 +227,25 @@ float lsharpblend string UIWidget = "Spinner"; float UIMin = 0.0; > = {1.2}; +/* very cinematic black bars */ +string str_box = "Black Bars"; +bool boxenable +< + string UIName = "Enable Black Bars"; + string UIWidget = "Checkbox"; +> = {false}; +float boxh +< + string UIName = "Box Horizontal Ratio"; + string UIWidget = "Spinner"; + float UIMin = 1.0; +> = {2.39}; +float boxv +< + string UIName = "Box Vertical Ratio"; + string UIWidget = "Spinner"; + float UIMin = 1.0; +> = {1.0}; /* dithering threshold maps @@ -303,23 +263,6 @@ static const float ordered2[4] = d(4),d(2) }; #undef d -#define d(x) x/9.0 -static const float ordered3[9] = -{ - d(2),d(6),d(3), - d(5),d(0),d(8), - d(1),d(7),d(4) -}; -#undef d -#define d(x) x/16.0 -static const float ordered4[16] = -{ - d( 0),d( 8),d( 2),d(10), - d(12),d( 4),d(14),d( 6), - d( 3),d(11),d( 1),d( 9), - d(15),d( 7),d(13),d( 5) -}; -#undef d #define d(x) x/64.0 static const float ordered8[64] = { @@ -333,94 +276,6 @@ static const float ordered8[64] = d(42),d(26),d(38),d(22),d(41),d(25),d(37),d(21) }; #undef d -/* - palettes - don't touch unless you know what you're doing -*/ -#define d(x) x/3.0 -static const float3 cga1l[4] = -{ - float3(d(0),d(0),d(0)), - float3(d(0),d(2),d(2)), - float3(d(2),d(0),d(2)), - float3(d(2),d(2),d(2)) -}; -static const float3 cga1h[4] = -{ - float3(d(0),d(0),d(0)), - float3(d(1),d(3),d(3)), - float3(d(3),d(1),d(3)), - float3(d(3),d(3),d(3)) -}; -static const float3 cga2l[4] = -{ - float3(d(0),d(0),d(0)), - float3(d(0),d(2),d(0)), - float3(d(2),d(0),d(0)), - float3(d(2),d(1),d(0)) -}; -static const float3 cga2h[4] = -{ - float3(d(0),d(0),d(0)), - float3(d(1),d(3),d(1)), - float3(d(3),d(1),d(1)), - float3(d(3),d(2),d(1)) -}; -static const float3 cga3l[4] = -{ - float3(d(0),d(0),d(0)), - float3(d(0),d(2),d(2)), - float3(d(2),d(0),d(0)), - float3(d(2),d(2),d(2)) -}; -static const float3 cga3h[4] = -{ - float3(d(0),d(0),d(0)), - float3(d(1),d(3),d(3)), - float3(d(3),d(1),d(1)), - float3(d(3),d(3),d(3)) -}; -static const float3 stdega[16] = -{ - float3(d(0),d(0),d(0)), - float3(d(2),d(0),d(0)), - float3(d(0),d(2),d(0)), - float3(d(2),d(1),d(0)), - float3(d(0),d(0),d(2)), - float3(d(2),d(0),d(2)), - float3(d(0),d(2),d(2)), - float3(d(2),d(2),d(2)), - float3(d(1),d(1),d(1)), - float3(d(3),d(1),d(1)), - float3(d(1),d(3),d(1)), - float3(d(3),d(3),d(1)), - float3(d(1),d(1),d(3)), - float3(d(3),d(1),d(3)), - float3(d(1),d(3),d(3)), - float3(d(3),d(3),d(3)) -}; -#undef d -#define d(x) x/256.0 -static const float3 aosega[16] = -{ - float3(d( 0),d( 0),d( 0)), - float3(d(128),d( 0),d( 0)), - float3(d( 32),d(128),d( 0)), - float3(d(160),d( 64),d( 32)), - float3(d( 0),d( 32),d( 88)), - float3(d( 60),d( 0),d( 88)), - float3(d( 16),d(160),d(208)), - float3(d( 88),d( 88),d( 88)), - float3(d( 32),d( 32),d( 32)), - float3(d(256),d( 64),d( 64)), - float3(d( 72),d(256),d( 64)), - float3(d(256),d(224),d( 60)), - float3(d( 48),d(128),d(256)), - float3(d(192),d( 48),d(256)), - float3(d( 72),d(224),d(256)), - float3(d(256),d(256),d(256)), -}; -#undef d /* gauss stuff */ float gauss3[3] = { @@ -431,21 +286,13 @@ float4 ScreenSize; Texture2D TextureOriginal; Texture2D TextureColor; Texture2D TextureDepth; -Texture2D TextureFont +Texture2D TextureCGA < - string ResourceName = "menbvgaluma.png"; + string ResourceName = "menbcgalut.png"; >; -Texture2D TextureDots +Texture2D TextureEGA < - string ResourceName = "menbdots.png"; ->; -Texture2D TextureDoom -< - string ResourceName = "menbdoomlut.png"; ->; -Texture2D TextureQuake -< - string ResourceName = "menbquakelut.png"; + string ResourceName = "menbegalut.png"; >; Texture2D TextureVGA < @@ -464,22 +311,6 @@ SamplerState SamplerB AddressU = Border; AddressV = Border; }; -SamplerState SamplerFont -{ - Filter = MIN_LINEAR_MAG_MIP_POINT; - AddressU = Wrap; - AddressV = Wrap; - MaxLOD = 0; - MinLOD = 0; -}; -SamplerState SamplerDots -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = Wrap; - AddressV = Wrap; - MaxLOD = 0; - MinLOD = 0; -}; SamplerState SamplerLUT { Filter = MIN_MAG_MIP_POINT; @@ -541,10 +372,6 @@ float4 ReducePrepass( in float4 col, in float2 coord ) else if ( dither == 1 ) col += bdbump+ordered2[int(coord.x%2)+2*int(coord.y%2)]*bdmult; else if ( dither == 2 ) - col += bdbump+ordered3[int(coord.x%3)+3*int(coord.y%3)]*bdmult; - else if ( dither == 3 ) - col += bdbump+ordered4[int(coord.x%4)+4*int(coord.y%4)]*bdmult; - else if ( dither == 4 ) col += bdbump+ordered8[int(coord.x%8)+8*int(coord.y%8)]*bdmult; col = saturate(col); return col; @@ -559,75 +386,10 @@ float4 ReducePrepass( in float4 col, in float2 coord ) */ float4 ReduceCGA( in float4 color, in float2 coord ) { - float4 dac = ReducePrepass(color,coord); - if ( cgapal == 0 ) - { - dac.a = (dac.r+dac.g+dac.b)/3.0; - return (dac.a>0.5); - } - float dist = 2.0; - int idx = 0; - if ( cgapal == 1 ) - { - [unroll] for ( int i=0; i<4; i++ ) - if ( distance(dac.rgb,cga1l[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,cga1l[i]); - } - color.rgb = cga1l[idx]; - } - else if ( cgapal == 2 ) - { - [unroll] for ( int i=0; i<4; i++ ) - if ( distance(dac.rgb,cga1h[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,cga1h[i]); - } - color.rgb = cga1h[idx]; - } - else if ( cgapal == 3 ) - { - [unroll] for ( int i=0; i<4; i++ ) - if ( distance(dac.rgb,cga2l[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,cga2l[i]); - } - color.rgb = cga2l[idx]; - } - else if ( cgapal == 4 ) - { - [unroll] for ( int i=0; i<4; i++ ) - if ( distance(dac.rgb,cga2h[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,cga2h[i]); - } - color.rgb = cga2h[idx]; - } - else if ( cgapal == 5 ) - { - [unroll] for ( int i=0; i<4; i++ ) - if ( distance(dac.rgb,cga3l[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,cga3l[i]); - } - color.rgb = cga3l[idx]; - } - else if ( cgapal == 6 ) - { - [unroll] for ( int i=0; i<4; i++ ) - if ( distance(dac.rgb,cga3h[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,cga3h[i]); - } - color.rgb = cga3h[idx]; - } - return color; + float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995); + float2 lc = float2((dac.r+cgapal)/7.0, + dac.g/64.0+floor(dac.b*64.0)/64.0); + return TextureCGA.Sample(SamplerLUT,lc); } /* EGA technically only had the 320x200 16-colour graphic mode, but when VGA @@ -637,30 +399,10 @@ float4 ReduceCGA( in float4 color, in float2 coord ) */ float4 ReduceEGA( in float4 color, in float2 coord ) { - float4 dac = ReducePrepass(color,coord); - float dist = 2.0; - int idx = 0; - if ( egapal == 0 ) - { - [unroll] for ( int i=0; i<16; i++ ) - if ( distance(dac.rgb,stdega[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,stdega[i]); - } - color.rgb = stdega[idx]; - } - else - { - [unroll] for ( int i=0; i<16; i++ ) - if ( distance(dac.rgb,aosega[i]) < dist ) - { - idx = i; - dist = distance(dac.rgb,aosega[i]); - } - color.rgb = aosega[idx]; - } - return color; + float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995); + float2 lc = float2((dac.r+egapal)/2.0, + dac.g/64.0+floor(dac.b*64.0)/64.0); + return TextureEGA.Sample(SamplerLUT,lc); } /* A two bits per channel mode that can usually fit VGA mode 13h and mode x */ float4 ReduceRGB2( in float4 color, in float2 coord ) @@ -669,20 +411,6 @@ float4 ReduceRGB2( in float4 color, in float2 coord ) color.rgb = trunc(dac.rgb*4.0)/4.0; return color; } -/* Effectively has 256 colours, with a magenta tint due to precision loss */ -float4 ReduceRGB323( in float4 color, in float2 coord ) -{ - float4 dac = ReducePrepass(color,coord); - color.rgb = trunc(dac.rgb*float3(8.0,4.0,8.0))/float3(8.0,4.0,8.0); - return color; -} -/* 4096 colours, no actual graphics hardware existed that used 4bpc, though */ -float4 ReduceRGB4( in float4 color, in float2 coord ) -{ - float4 dac = ReducePrepass(color,coord); - color.rgb = trunc(dac.rgb*16.0)/16.0; - return color; -} /* The classic 16-bit colour mode everyone from my generation would remember, especially that subtle green tint and the banding due to lack of dithering @@ -695,38 +423,12 @@ float4 ReduceRGB565( in float4 color, in float2 coord ) /float3(32.0,64.0,32.0); return color; } -/* - If you see no difference when using this, then it could be because your - own screen is already 6bpc. This is the case for a lot of LCDs, both old - and modern. 8bpc tends to be the norm on IPS, though. 10bpc is the next - step, but for now it's only used internally in video codecs for more - efficient compression with lower quality loss. I seem to recall that in - most *nix systems such as Linux it's possible to have 10bpc already with - NVIDIA, but it causes compatibility issues with a lot of programs. -*/ -float4 ReduceRGB6( in float4 color, in float2 coord ) -{ - float4 dac = ReducePrepass(color,coord); - color.rgb = trunc(dac.rgb*64.0)/64.0; - return color; -} -/* Various VGA 256-colour palettes: Doom, Quake I, and the standard. */ -float4 ReduceDoom( in float4 color, in float2 coord ) -{ - float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995); - float2 lc = float2(dac.r,dac.g/64.0+floor(dac.b*64.0)/64.0); - return TextureDoom.Sample(SamplerLUT,lc); -} -float4 ReduceQuake( in float4 color, in float2 coord ) -{ - float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995); - float2 lc = float2(dac.r,dac.g/64.0+floor(dac.b*64.0)/64.0); - return TextureQuake.Sample(SamplerLUT,lc); -} +/* Various VGA 256-colour palettes */ float4 ReduceVGA( in float4 color, in float2 coord ) { float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995); - float2 lc = float2(dac.r,dac.g/64.0+floor(dac.b*64.0)/64.0); + float2 lc = float2((dac.r+vgapal)/15.0, + dac.g/64.0+floor(dac.b*64.0)/64.0); return TextureVGA.Sample(SamplerLUT,lc); } @@ -758,13 +460,8 @@ float4 PS_Retro( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target if ( paltype == 0 ) res = ReduceCGA(tcol,(coord*rresl)/sresl); else if ( paltype == 1 ) res = ReduceEGA(tcol,(coord*rresl)/sresl); else if ( paltype == 2 ) res = ReduceRGB2(tcol,(coord*rresl)/sresl); - else if ( paltype == 3 ) res = ReduceRGB323(tcol,(coord*rresl)/sresl); - else if ( paltype == 4 ) res = ReduceVGA(tcol,(coord*rresl)/sresl); - else if ( paltype == 5 ) res = ReduceDoom(tcol,(coord*rresl)/sresl); - else if ( paltype == 6 ) res = ReduceQuake(tcol,(coord*rresl)/sresl); - else if ( paltype == 7 ) res = ReduceRGB4(tcol,(coord*rresl)/sresl); - else if ( paltype == 8 ) res = ReduceRGB565(tcol,(coord*rresl)/sresl); - else if ( paltype == 9 ) res = ReduceRGB6(tcol,(coord*rresl)/sresl); + else if ( paltype == 3 ) res = ReduceVGA(tcol,(coord*rresl)/sresl); + else if ( paltype == 4 ) res = ReduceRGB565(tcol,(coord*rresl)/sresl); else res = tcol; if ( ncoord.x < 0 || ncoord.x >= 1 || ncoord.y < 0 || ncoord.y >= 1 ) res *= 0; @@ -772,41 +469,6 @@ float4 PS_Retro( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target return res; } -/* ASCII art (more like CP437 art) */ -float4 PS_ASCII( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target -{ - float2 coord = IN.txcoord.xy; - float4 res = TextureColor.Sample(Sampler,coord); - if ( !asciienable ) return res; - float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); - float2 fresl = float2(FONT_WIDTH,FONT_HEIGHT); - float2 cresl = float2(GLYPH_WIDTH,GLYPH_HEIGHT); - float2 bscl = floor(bresl/cresl); - /* - Here I use the "cheap" method, based on the overall luminance of each - glyph, rather than attempt to search for the best fitting glyph for - each cell. If you want to know why, take a look at the ASCII filter - bundled with the Dolphin emulator, and be prepared for the resulting - seconds per frame it runs at. The calculations needed for such a filter - are completely insane even for the highest-end GPUs. - */ - float3 col = TextureOriginal.Sample(Sampler,floor(bscl*coord)/bscl).rgb; - int lum = clamp(luminance(col)*FONT_LEVELS,0,FONT_LEVELS); - float2 itx = floor(coord*bresl); - float2 blk = floor(itx/cresl)*cresl; - float2 ofs = itx-blk; - ofs.y += lum*cresl.y; - ofs /= fresl; - float gch = TextureFont.Sample(SamplerFont,ofs).x; - if ( gch < 0.5 ) res.rgb = res.rgb*asciiblend; - else - { - if ( asciimono ) res.rgb = 1.0; - else res.rgb = col; - } - return res; -} - float4 PS_ChromaKey( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target { float2 coord = IN.txcoord.xy; @@ -817,87 +479,6 @@ float4 PS_ChromaKey( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target return res; } -/* 2x2 RGBI dot matrix, not even close to anything that exists IRL but meh */ -float4 PS_DotMatrix( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target -{ - float2 coord = IN.txcoord.xy; - float4 res = TextureColor.Sample(Sampler,coord); - if ( !dotenable ) return res; - float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); - bresl.xy *= 1.0/(dotsize*2.0); - float4 dac = float4(res.r*0.5,res.g*0.5,res.b*0.5, - (res.r+res.g+res.b)/6.0); - /* - There are two types of CRTs: aperture grille and shadow mask. - The former is blurry and has scanlines (rather big ones, even), but - is cheap to emulate; while the latter is the one most known for its - crisp, square pixels with minimal distortion. Most individuals into - this whole "retro graphics" stuff prefer aperture grille, which - looks like shit, then again, that's the sort of visual quality they - want. The main issue with shadow mask CRTs is that it's impossible - to accurately emulate them unless done on a screen with a HUGE - resolution. After all, the subpixels need to be clearly visible, and - if on top of it you add curvature distortion, you need to reduce - moire patterns that will inevitably show up at low resolutions. - - It would be more desirable to eventually have flat panels that can - display arbitrary resolutions using a form of scaling that preserves - square pixels with unnoticeable distortion (typically, with nearest - neighbour you'd get some pixels that are bigger/smaller than others - if the upscale resolution isn't an integer multiple of the real - resolution. - - This 2x2 RGBI thing is a rather naïve filter I made many years ago, - it looks unlike any real CRT, but scales well. Its only problem is - moire patterns when using the default size of 2x2. - */ - float4 dots = TextureDots.Sample(SamplerDots,coord*bresl)*dac; - float3 tcol = pow(max(0,dots.rgb+dots.a),dotpow)*dotmult; - res.rgb = res.rgb*(1-dotblend)+tcol*dotblend; - return res; -} -/* that's right, CRT curvature */ -float4 PS_Curvature( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target -{ - float2 coord = IN.txcoord.xy; - float4 res = TextureColor.Sample(Sampler,coord); - if ( !curveenable ) return res; - float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); - float2 bof = (1.0/bresl)*curvesoft; - float3 eta = float3(1+chromaab*0.009,1+chromaab*0.006,1+chromaab - *0.003); - float2 center = float2(coord.x-0.5,coord.y-0.5); - float zfact = 100.0/lenszoom; - float r2 = center.x*center.x+center.y*center.y; - float f = 1+r2*lensdist*0.01; - float x = f*zfact*center.x+0.5; - float y = f*zfact*center.y+0.5; - float2 rcoord = (f*eta.r)*zfact*(center.xy*0.5)+0.5; - float2 gcoord = (f*eta.g)*zfact*(center.xy*0.5)+0.5; - float2 bcoord = (f*eta.b)*zfact*(center.xy*0.5)+0.5; - int i,j; - float4 idist = float4(0,0,0,0); - /* - sticking a 5x5 gaussian blur with a tweakable radius in here to - attempt to reduce moire patterns in some cases. Supersampling would - be more useful for that, but ENB sucks ass through a crazy straw in - that aspect, so it would be more desirable to use GeDoSaTo (I sure - hope I can port all my stuff to it one day, at least the damn thing - is FOSS). - */ - [unroll] for ( i=-2; i<=2; i++ ) [unroll] for ( j=-2; j<=2; j++ ) - { - idist += gauss3[abs(i)]*gauss3[abs(j)] - *float4(TextureColor.Sample(Sampler,rcoord+bof - *float2(i,j)).r,TextureColor.Sample(SamplerB,gcoord+bof - *float2(i,j)).g,TextureColor.Sample(SamplerB,bcoord+bof - *float2(i,j)).b,TextureColor.Sample(SamplerB,float2(x, - y)+bof*float2(i,j)).a); - } - res.rgb = idist.rgb; - return res; -} - /* Why am I doing this */ float4 PS_Blur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target { @@ -988,6 +569,24 @@ float4 PS_LumaSharp( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target return theywillnotheal; } +/* ultimate super-cinematic immersive black bars */ +float4 PS_Cinematic( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target +{ + float2 coord = IN.txcoord.xy; + float4 res = TextureColor.Sample(Sampler,coord); + if ( !boxenable ) return res; + float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float sar = bresl.x/bresl.y; + float tar = boxh/boxv; + float2 box = (sar { pass p0 @@ -1041,22 +640,6 @@ technique11 ExtraFilters6 pass p0 { SetVertexShader(CompileShader(vs_5_0,VS_PostProcess())); - SetPixelShader(CompileShader(ps_5_0,PS_ASCII())); - } -} -technique11 ExtraFilters7 -{ - pass p0 - { - SetVertexShader(CompileShader(vs_5_0,VS_PostProcess())); - SetPixelShader(CompileShader(ps_5_0,PS_DotMatrix())); - } -} -technique11 ExtraFilters8 -{ - pass p0 - { - SetVertexShader(CompileShader(vs_5_0,VS_PostProcess())); - SetPixelShader(CompileShader(ps_5_0,PS_Curvature())); + SetPixelShader(CompileShader(ps_5_0,PS_Cinematic())); } } diff --git a/enbseries/enbeffectpostpass.fx.ini b/enbseries/enbeffectpostpass.fx.ini index 740c7b3..6f0216e 100644 --- a/enbseries/enbeffectpostpass.fx.ini +++ b/enbseries/enbeffectpostpass.fx.ini @@ -3,20 +3,20 @@ TECHNIQUE=1 Enable Block GFX=false Emulated Resolution=0, 0, 0 Zoom Factor=0, 0, 0 -Palette Type=6 -CGA Palette=1 +Palette Type=4 +CGA Palette=0 EGA Palette=0 -Dithering Pattern=4 -Contrast Modifier=1.3 -Saturation Modifier=1.2 -Dither Offset=-0.15 -Dither Range=0.25 +Dithering Pattern=-1 +Contrast Modifier=1.5 +Saturation Modifier=0.6 +Dither Offset=-0.1 +Dither Range=0.1 Enable ASCII=false ASCII Monochrome=false ASCII Blend=0.0 Enable Chroma Key=false Chroma Key Color=0.0, 1.0, 0.0 -Chroma Key Depth=0.92 +Chroma Key Depth=0.99 Enable Dot Matrix=false Dot Size=1 Dot Blend=0.4 @@ -27,17 +27,17 @@ Curve Chromatic Aberration=0.7 Curve Zooming=50.200008 Curve Distortion=0.0 Curve Sampling Soften=0.0 -Enable Blur=false -Blur Sampling Range=0.15 -Enable Sharp=false -Sharp Sampling Range=0.35 -Sharpening Amount=3.0 +Enable Blur=true +Blur Sampling Range=0.2 +Enable Sharp=true +Sharp Sampling Range=0.41 +Sharpening Amount=1.76 Enable Shift=false Shift Sampling Range=0.6 Luma Sharpen Enable=true Luma Sharpen Radius=0.8 -Luma Sharpen Clamp=0.12 -Luma Sharpen Blending=6.0 +Luma Sharpen Clamp=0.1 +Luma Sharpen Blending=8.0 Emulated Resolution Width=0.0 Emulated Resolution Height=0.0 Zoom Factor X=0.0 @@ -45,3 +45,7 @@ Zoom Factor Y=0.0 Chroma Key Red=0, 1, 0 Chroma Key Green=1.0 Chroma Key Blue=0.0 +VGA Palette=0 +Enable Black Bars=false +Box Horizontal Ratio=2.39 +Box Vertical Ratio=1.0 diff --git a/enbseries/menbcgalut.png b/enbseries/menbcgalut.png new file mode 100644 index 0000000..55cccbc Binary files /dev/null and b/enbseries/menbcgalut.png differ diff --git a/enbseries/menbdoomlut.png b/enbseries/menbdoomlut.png deleted file mode 100644 index b2c3c45..0000000 Binary files a/enbseries/menbdoomlut.png and /dev/null differ diff --git a/enbseries/menbdots.png b/enbseries/menbdots.png deleted file mode 100644 index 2027ba1..0000000 Binary files a/enbseries/menbdots.png and /dev/null differ diff --git a/enbseries/menbegalut.png b/enbseries/menbegalut.png new file mode 100644 index 0000000..9615797 Binary files /dev/null and b/enbseries/menbegalut.png differ diff --git a/enbseries/menbfilmlut.png b/enbseries/menbfilmlut.png new file mode 100644 index 0000000..fec04d6 Binary files /dev/null and b/enbseries/menbfilmlut.png differ diff --git a/enbseries/menblens.png b/enbseries/menblens.png deleted file mode 100644 index 61f8955..0000000 Binary files a/enbseries/menblens.png and /dev/null differ diff --git a/enbseries/menblut64.png b/enbseries/menblut64.png deleted file mode 100644 index 1c58d5f..0000000 Binary files a/enbseries/menblut64.png and /dev/null differ diff --git a/enbseries/menblut64_day.png b/enbseries/menblut64_day.png new file mode 100644 index 0000000..d16da25 Binary files /dev/null and b/enbseries/menblut64_day.png differ diff --git a/enbseries/menblut64_interior.png b/enbseries/menblut64_interior.png new file mode 100644 index 0000000..203f948 Binary files /dev/null and b/enbseries/menblut64_interior.png differ diff --git a/enbseries/menblut64_night.png b/enbseries/menblut64_night.png new file mode 100644 index 0000000..986f12e Binary files /dev/null and b/enbseries/menblut64_night.png differ diff --git a/enbseries/menbquakelut.png b/enbseries/menbquakelut.png deleted file mode 100644 index 44f172a..0000000 Binary files a/enbseries/menbquakelut.png and /dev/null differ diff --git a/enbseries/menbvgaluma.png b/enbseries/menbvgaluma.png deleted file mode 100644 index ff6cccf..0000000 Binary files a/enbseries/menbvgaluma.png and /dev/null differ diff --git a/enbseries/menbvgalut.png b/enbseries/menbvgalut.png index 9e752b2..b7d5e90 100644 Binary files a/enbseries/menbvgalut.png and b/enbseries/menbvgalut.png differ