1
Fork 0

MariENB DUST 2.4.2

This commit is contained in:
Marisa the Magician 2019-04-07 17:36:51 +02:00
commit ab1e14f22e
44 changed files with 1396 additions and 1139 deletions

View file

@ -22,11 +22,11 @@ DetectorLevelDay=0.75
DetectorLevelNight=0.25
DetectorLevelCurve=1.0
[ADAPTATION]
ForceMinMaxValues=true
AdaptationSensitivity=0.78
AdaptationTime=3.55
AdaptationMin=0.5
AdaptationMax=0.5
ForceMinMaxValues=false
AdaptationSensitivity=0.2
AdaptationTime=0.65
AdaptationMin=0.0
AdaptationMax=1.0
[BLOOM]
Quality=0
AmountDay=1.0
@ -51,84 +51,84 @@ LenzDirtPowerInterior=1.0
[SSAO_SSIL]
EnableSupersampling=false
UseIndirectLighting=true
SamplingQuality=1
SamplingPrecision=1
SamplingRange=1.0
FadeFogRangeDay=0.25
FadeFogRangeNight=0.25
SamplingQuality=0
SamplingPrecision=0
SamplingRange=0.25
FadeFogRangeDay=3.0
FadeFogRangeNight=3.0
SizeScale=0.5
SourceTexturesScale=0.5
FilterQuality=0
AOAmount=1.5
AOAmountInterior=1.2
ILAmount=1.2
ILAmountInterior=1.1
AOIntensity=1.3
AOIntensityInterior=1.2
AOAmount=1.07
AOAmountInterior=1.05
ILAmount=2.23
ILAmountInterior=2.12
AOIntensity=0.59
AOIntensityInterior=0.52
AOType=0
AOMixingType=0
AOMixingTypeInterior=0
AOMixingType=2
AOMixingTypeInterior=3
EnableDenoiser=true
[ENVIRONMENT]
LightingIntensityDay=1.5
LightingIntensityNight=1.35
LightingIntensityInterior=1.2
LightingCurveDay=1.5
LightingCurveNight=1.35
LightingCurveInterior=1.2
LightingDesaturationDay=0.05
LightingDesaturationNight=0.1
LightingDesaturationInterior=0.2
AmbientLightingIntensityDay=0.75
AmbientLightingIntensityNight=0.65
AmbientLightingIntensityInterior=0.8
AmbientLightingCurveDay=1.3
AmbientLightingCurveNight=1.35
AmbientLightingCurveInterior=1.6
LightingIntensityDay=1.13
LightingIntensityNight=1.16
LightingIntensityInterior=1.21
LightingCurveDay=1.43
LightingCurveNight=1.29
LightingCurveInterior=1.13
LightingDesaturationDay=0.19
LightingDesaturationNight=0.12
LightingDesaturationInterior=0.24
AmbientLightingIntensityDay=0.72
AmbientLightingIntensityNight=0.48
AmbientLightingIntensityInterior=0.82
AmbientLightingCurveDay=1.2
AmbientLightingCurveNight=1.24
AmbientLightingCurveInterior=1.18
AmbientLightingDesaturationDay=0.08
AmbientLightingDesaturationNight=0.04
AmbientLightingDesaturationInterior=0.02
FogColorMultiplierDay=1.0
FogColorMultiplierNight=1.0
FogColorMultiplierInterior=1.0
FogColorCurveDay=1.0
FogColorCurveNight=1.0
FogColorCurveInterior=1.0
FogColorMultiplierDay=0.91
FogColorMultiplierNight=0.87
FogColorMultiplierInterior=0.95
FogColorCurveDay=1.04
FogColorCurveNight=1.11
FogColorCurveInterior=1.09
[SKY]
Enable=true
StarsIntensity=2.0
StarsCurve=1.5
CloudsIntensityDay=1.1
CloudsIntensityNight=1.05
CloudsCurveDay=0.95
CloudsCurveNight=1.1
CloudsDesaturationDay=0.0
CloudsDesaturationNight=0.0
StarsIntensity=0.39
StarsCurve=1.57
CloudsIntensityDay=1.02
CloudsIntensityNight=0.91
CloudsCurveDay=1.07
CloudsCurveNight=1.21
CloudsDesaturationDay=0.17
CloudsDesaturationNight=0.14
CloudsEdgeClamp=0.5
CloudsEdgeIntensity=1.0
GradientIntensityDay=1.3
GradientIntensityNight=1.0
GradientDesaturationDay=0.0
GradientDesaturationNight=0.0
GradientTopIntensityDay=1.25
GradientTopIntensityNight=0.9
GradientIntensityDay=1.08
GradientIntensityNight=0.92
GradientDesaturationDay=0.53
GradientDesaturationNight=0.25
GradientTopIntensityDay=0.86
GradientTopIntensityNight=0.79
GradientTopCurveDay=0.85
GradientTopCurveNight=1.0
GradientMiddleIntensityDay=1.0
GradientMiddleIntensityNight=0.9
GradientMiddleCurveDay=0.95
GradientTopCurveNight=1.04
GradientMiddleIntensityDay=0.97
GradientMiddleIntensityNight=0.92
GradientMiddleCurveDay=0.98
GradientMiddleCurveNight=1.05
GradientHorizonIntensityDay=1.15
GradientHorizonIntensityNight=0.95
GradientHorizonCurveDay=1.1
GradientHorizonCurveNight=1.1
SunIntensity=3.0
GradientHorizonIntensityDay=1.09
GradientHorizonIntensityNight=1.11
GradientHorizonCurveDay=1.02
GradientHorizonCurveNight=1.03
SunIntensity=1.7
SunDesaturation=0.0
SunCoronaIntensity=0.001
SunCoronaCurve=1.0
SunCoronaDesaturation=0.0
MoonIntensity=2.0
MoonCurve=1.0
MoonIntensity=0.97
MoonCurve=1.29
MoonDesaturation=0.0
MoonCoronaIntensity=0.001
[DEPTHOFFIELD]
@ -137,4 +137,4 @@ FadeTime=0.4
DetailedShadowQuality=1
ShadowDesaturation=0.0
[RAYS]
SunRaysMultiplier=0.6
SunRaysMultiplier=0.31

1
enbseries/VERSION Normal file
View file

@ -0,0 +1 @@
2.4.2-1 "Return to DUST"

View file

@ -1,6 +1,6 @@
/*
effect.txt : MariENB extra shader.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/

View file

@ -5,10 +5,10 @@ Emulated Resolution Width=0.5
Emulated Resolution Height=0.5
Zoom Factor X=0.0
Zoom Factor Y=0.0
Palette Type=6
Palette Type=4
CGA Palette=1
EGA Palette=0
Dithering Pattern=4
Dithering Pattern=2
Contrast Modifier=1.0
Saturation Modifier=0.75
Dither Offset=-0.1
@ -32,9 +32,17 @@ Curve Zooming=50.29995
Curve Distortion=0.0
Curve Sampling Soften=0.0
Enable Blur=true
Blur Sampling Range=0.15
Blur Sampling Range=0.18
Enable Sharp=true
Sharp Sampling Range=0.35
Sharpening Amount=2.0
Sharp Sampling Range=0.67
Sharpening Amount=1.78
Enable Shift=true
Shift Sampling Range=0.6
Shift Sampling Range=0.5
VGA Palette=0
Chroma Key Depth Horizontal Tilt Center=0.5
Chroma Key Depth Vertical Tilt Center=0.5
Chroma Key Depth Horizontal Tilt=0.0
Chroma Key Depth Vertical Tilt=0.0
Enable Black Bars=false
Box Horizontal Ratio=2.39
Box Vertical Ratio=1.0

View file

@ -1,6 +1,6 @@
/*
enbbloom.fx : MariENB bloom filter.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/

View file

@ -1,25 +1,25 @@
[ENBBLOOM.FX]
TECHNIQUE=0
Bloom Intensity Night=0.63
Bloom Intensity Day=0.83
Bloom Intensity Interior Night=0.68
Bloom Intensity Interior Day=0.68
Bloom Contrast Night=1.07
Bloom Contrast Day=1.02
Bloom Contrast Interior Night=1.05
Bloom Contrast Interior Day=1.05
Bloom Saturation Night=0.97
Bloom Saturation Day=0.87
Bloom Saturation Interior Night=0.95
Bloom Saturation Interior Day=0.95
Bloom Offset Night=-0.18
Bloom Offset Day=-0.27
Bloom Offset Interior Night=-0.24
Bloom Offset Interior Day=-0.24
Bloom Intensity Cap Night=10.0
Bloom Intensity Cap Day=10.0
Bloom Intensity Cap Interior Night=10.0
Bloom Intensity Cap Interior Day=10.0
Bloom Intensity Night=0.38
Bloom Intensity Day=0.46
Bloom Intensity Interior Night=0.28
Bloom Intensity Interior Day=0.28
Bloom Contrast Night=1.01
Bloom Contrast Day=1.05
Bloom Contrast Interior Night=1.03
Bloom Contrast Interior Day=1.03
Bloom Saturation Night=1.22
Bloom Saturation Day=1.29
Bloom Saturation Interior Night=1.24
Bloom Saturation Interior Day=1.24
Bloom Offset Night=-0.14
Bloom Offset Day=-0.17
Bloom Offset Interior Night=-0.11
Bloom Offset Interior Day=-0.11
Bloom Intensity Cap Night=25.0
Bloom Intensity Cap Day=25.0
Bloom Intensity Cap Interior Night=25.0
Bloom Intensity Cap Interior Day=25.0
Bloom Blur Radius=1.0
Blue Shift Night Red=0.7
Blue Shift Night Green=0.4
@ -41,9 +41,9 @@ Blue Shift Luminance Factor Per-pass=0.41
Blue Shift Color Factor Per-pass=0.9
Enable Anamorphic Bloom=true
Anamorphic Bloom Blend Night=0.65
Anamorphic Bloom Blend Day=0.42
Anamorphic Bloom Blend Interior Night=0.56
Anamorphic Bloom Blend Interior Day=0.56
Anamorphic Bloom Blend Day=0.49
Anamorphic Bloom Blend Interior Night=0.38
Anamorphic Bloom Blend Interior Day=0.38
Anamorphic Bloom Blue Shift Night Red=0.35
Anamorphic Bloom Blue Shift Night Green=0.08
Anamorphic Bloom Blue Shift Night Blue=1.0
@ -60,17 +60,17 @@ Anamorphic Bloom Blue Shift Intensity Night=1.06
Anamorphic Bloom Blue Shift Intensity Day=1.01
Anamorphic Bloom Blue Shift Interior Night=1.1
Anamorphic Bloom Blue Shift Interior Day=1.05
Anamorphic Bloom Contrast Night=1.15
Anamorphic Bloom Contrast Day=1.06
Anamorphic Bloom Contrast Interior Night=1.12
Anamorphic Bloom Contrast Interior Day=1.12
Anamorphic Bloom Radius Multiplier=4.0
Bloom Pass 1 Blend=0.81
Bloom Pass 2 Blend=0.67
Bloom Pass 3 Blend=0.46
Bloom Pass 4 Blend=0.66
Bloom Pass 7 Blend=0.74
Bloom Pass 8 Blend=0.98
Anamorphic Bloom Contrast Night=1.28
Anamorphic Bloom Contrast Day=1.38
Anamorphic Bloom Contrast Interior Night=1.42
Anamorphic Bloom Contrast Interior Day=1.42
Anamorphic Bloom Radius Multiplier=1.0
Bloom Pass 1 Blend=0.33
Bloom Pass 2 Blend=0.45
Bloom Pass 3 Blend=0.57
Bloom Pass 4 Blend=0.74
Bloom Pass 7 Blend=0.98
Bloom Pass 8 Blend=1.34
Bloom Prepass Blend=0.0
Bloom Base Blend=0.0
Enable Lens Dirt=true

View file

@ -1,6 +1,6 @@
/*
enbeffect.fx : MariENB base shader.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/

View file

@ -2,31 +2,31 @@
TECHNIQUE=0
Enable Grain=true
Grain Speed=15.0
Grain Intensity=0.02
Grain Intensity=0.18
Grain Saturation=-0.19
Grain Two-Pass=true
Grain Blending Mode=3
Grain Dark Mask Contrast=0.69
Grain Two-Pass Factor=2.53
Grain Dark Mask Contrast=19.110001
Grain Two-Pass Factor=0.04
Grain Magnification 1=15.13
Grain Magnification 2=15.3
Grain Magnification 3=13.15
Grain Pass 1 Magnification 1=1.64
Grain Pass 1 Magnification 2=1.78
Grain Pass 1 Magnification 3=1.62
Grain Pass 2 Magnification 1=0.07
Grain Pass 2 Magnification 2=0.1
Grain Pass 2 Magnification 3=0.18
Grain Contrast=2.54
Grain Pass 1 Magnification 1=2.05
Grain Pass 1 Magnification 2=3.11
Grain Pass 1 Magnification 3=2.22
Grain Pass 2 Magnification 1=4.25
Grain Pass 2 Magnification 2=9.42
Grain Pass 2 Magnification 3=6.29
Grain Contrast=4.63
Enable Adaptation=true
Adaptation Min Night=0.74
Adaptation Min Day=0.94
Adaptation Min Interior Night=0.62
Adaptation Min Interior Day=0.62
Adaptation Max Night=1.21
Adaptation Max Day=1.82
Adaptation Max Interior Night=1.33
Adaptation Max Interior Day=1.33
Adaptation Min Night=0.69
Adaptation Min Day=0.82
Adaptation Min Interior Night=0.72
Adaptation Min Interior Day=0.72
Adaptation Max Night=1.7
Adaptation Max Day=1.96
Adaptation Max Interior Night=1.83
Adaptation Max Interior Day=1.83
Enable Tonemapping=true
Tonemap Shoulder Strength Night=0.97
Tonemap Shoulder Strength Day=0.94
@ -61,72 +61,148 @@ Grading Intensity Night Red=1.01
Grading Intensity Night Green=1.05
Grading Intensity Night Blue=1.04
Grading Intensity Day Red=1.03
Grading Intensity Day Green=1.02
Grading Intensity Day Green=1.0
Grading Intensity Day Blue=1.02
Grading Intensity Interior Night Red=1.07
Grading Intensity Interior Night Green=1.03
Grading Intensity Interior Night Red=1.0
Grading Intensity Interior Night Green=1.05
Grading Intensity Interior Night Blue=1.01
Grading Intensity Interior Day Red=1.07
Grading Intensity Interior Day Green=1.03
Grading Intensity Interior Day Red=1.0
Grading Intensity Interior Day Green=1.05
Grading Intensity Interior Day Blue=1.01
Grading Contrast Night Red=0.97
Grading Contrast Night Green=0.94
Grading Contrast Night Blue=0.94
Grading Contrast Day Red=0.96
Grading Contrast Day Green=0.98
Grading Contrast Day Green=0.99
Grading Contrast Day Blue=0.99
Grading Contrast Interior Night Red=0.96
Grading Contrast Interior Night Green=0.98
Grading Contrast Interior Night Red=0.97
Grading Contrast Interior Night Green=0.99
Grading Contrast Interior Night Blue=0.95
Grading Contrast Interior Day Red=0.96
Grading Contrast Interior Day Green=0.98
Grading Contrast Interior Day Red=0.97
Grading Contrast Interior Day Green=0.99
Grading Contrast Interior Day Blue=0.95
Enable Vibrance Grading=true
Grading Color Night Red=-0.61
Grading Color Night Green=-0.88
Grading Color Night Blue=-0.86
Grading Color Day Red=-0.27
Grading Color Day Green=-0.1
Grading Color Day Blue=-0.79
Grading Color Interior Night Red=-0.25
Grading Color Interior Night Green=-0.15
Grading Color Interior Night Blue=-0.05
Grading Color Day Red=-0.59
Grading Color Day Green=-0.15
Grading Color Day Blue=-0.43
Grading Color Interior Night Red=-0.21
Grading Color Interior Night Green=-0.05
Grading Color Interior Night Blue=-0.79
Grading Color Interior Day Red=-0.25
Grading Color Interior Day Green=-0.15
Grading Color Interior Day Blue=-0.05
Grading Color Interior Day Green=-0.05
Grading Color Interior Day Blue=-0.79
Grading Color Factor Night=-0.11
Grading Color Factor Day=-0.07
Grading Color Factor Day=-0.12
Grading Color Factor Interior Night=-0.1
Grading Color Factor Interior Day=-0.1
Enable HSV Grading=true
Grading Saturation Intensity Night=1.2
Grading Saturation Intensity Day=1.07
Grading Saturation Intensity Interior Night=1.24
Grading Saturation Intensity Interior Day=1.24
Grading Saturation Contrast Night=1.17
Grading Saturation Contrast Day=1.36
Grading Saturation Contrast Interior Night=1.15
Grading Saturation Contrast Interior Day=1.15
Grading Value Intensity Night=1.06
Grading Value Intensity Day=1.02
Grading Value Intensity Interior Night=1.12
Grading Value Intensity Interior Day=1.12
Grading Value Contrast Night=1.34
Grading Value Contrast Day=1.43
Grading Value Contrast Interior Night=1.12
Grading Value Contrast Interior Day=1.12
Grading Saturation Intensity Day=1.36
Grading Saturation Intensity Interior Night=1.05
Grading Saturation Intensity Interior Day=1.05
Grading Saturation Contrast Night=1.18
Grading Saturation Contrast Day=1.13
Grading Saturation Contrast Interior Night=1.25
Grading Saturation Contrast Interior Day=1.25
Grading Value Intensity Night=0.91
Grading Value Intensity Day=0.83
Grading Value Intensity Interior Night=0.94
Grading Value Intensity Interior Day=0.94
Grading Value Contrast Night=1.18
Grading Value Contrast Day=1.26
Grading Value Contrast Interior Night=1.09
Grading Value Contrast Interior Day=1.09
Colorize After HSV=true
Enable Vanilla Imagespace=true
Vanilla Tint Blend=1.0
Vanilla Vibrance Blend=1.0
Vanilla Contrast Blend=1.0
Vanilla Tint Blend=0.93
Vanilla Vibrance Blend=0.91
Vanilla Contrast Blend=0.81
Enable LUT Grading=true
LUT Blend Night=0.49
LUT Blend Day=0.76
LUT Blend Night=0.48
LUT Blend Day=0.41
LUT Blend Interior Night=0.37
LUT Blend Interior Day=0.37
Enable ENB Palette=false
Palette Blend=1.0
Enable Post Dither=true
Dither Pattern=4
Dither Pattern=2
Display Bloom=false
Apply Grain Before Tone Mapping=true
Tonemapping Method=2
Tonemap Exposure Night=6.45
Tonemap Exposure Day=6.869999
Tonemap Exposure Interior Night=6.72
Tonemap Exposure Interior Day=6.72
Tonemap Blend Night=1.0
Tonemap Blend Day=1.0
Tonemap Blend Interior Night=1.0
Tonemap Blend Interior Day=1.0
Uncharted2 Shoulder Strength Night=0.22
Uncharted2 Shoulder Strength Day=0.25
Uncharted2 Shoulder Strength Interior Night=0.21
Uncharted2 Shoulder Strength Interior Day=0.21
Uncharted2 Linear Strength Night=1.37
Uncharted2 Linear Strength Day=1.32
Uncharted2 Linear Strength Interior Night=1.27
Uncharted2 Linear Strength Interior Day=1.27
Uncharted2 Linear Angle Night=0.45
Uncharted2 Linear Angle Day=0.37
Uncharted2 Linear Angle Interior Night=0.55
Uncharted2 Linear Angle Interior Day=0.55
Uncharted2 Toe Strength Night=1.37
Uncharted2 Toe Strength Day=1.34
Uncharted2 Toe Strength Interior Night=1.58
Uncharted2 Toe Strength Interior Day=1.58
Uncharted2 Toe Numerator Night=0.23
Uncharted2 Toe Numerator Day=0.28
Uncharted2 Toe Numerator Interior Night=0.27
Uncharted2 Toe Numerator Interior Day=0.27
Uncharted2 Toe Denominator Night=1.44
Uncharted2 Toe Denominator Day=1.66
Uncharted2 Toe Denominator Interior Night=1.43
Uncharted2 Toe Denominator Interior Day=1.43
Uncharted2 Linear White Night=15.7
Uncharted2 Linear White Day=20.619999
Uncharted2 Linear White Interior Night=27.4
Uncharted2 Linear White Interior Day=27.4
SweetFX Gamma Night=1.0
SweetFX Gamma Day=1.0
SweetFX Gamma Interior Night=1.0
SweetFX Gamma Interior Day=1.0
SweetFX Exposure Night=0.0
SweetFX Exposure Day=0.0
SweetFX Exposure Interior Night=0.0
SweetFX Exposure Interior Day=0.0
SweetFX Saturation Night=0.0
SweetFX Saturation Day=0.0
SweetFX Saturation Interior Night=0.0
SweetFX Saturation Interior Day=0.0
SweetFX Bleach Night=0.0
SweetFX Bleach Day=0.0
SweetFX Bleach Interior Night=0.0
SweetFX Bleach Interior Day=0.0
SweetFX Defog Night=0.0
SweetFX Defog Day=0.0
SweetFX Defog Interior Night=0.0
SweetFX Defog Interior Day=0.0
SweetFX Defog Color Red Night=0.0
SweetFX Defog Color Green Night=0.0
SweetFX Defog Color Blue Night=1.0
SweetFX Defog Color Red Day=0.0
SweetFX Defog Color Green Day=0.0
SweetFX Defog Color Blue Day=1.0
SweetFX Defog Color Red Interior Night=0.0
SweetFX Defog Color Green Interior Night=0.0
SweetFX Defog Color Blue Interior Night=1.0
SweetFX Defog Color Red Interior Day=0.0
SweetFX Defog Color Green Interior Day=0.0
SweetFX Defog Color Blue Interior Day=1.0
Vanilla Tint Contrast=1.28
Vanilla Tint Strength=1.0
Vanilla Vibrance Contrast=1.14
Vanilla Vibrance Strength=1.0
Enable Technicolor=true
Technicolor Blend=0.65

View file

@ -1,6 +1,6 @@
/*
enbeffectprepass.fx : MariENB pre-pass filters.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/

View file

@ -1,5 +1,5 @@
[ENBEFFECTPREPASS.FX]
TECHNIQUE=2
TECHNIQUE=0
Fixed Resolution Width=1920
Fixed Resolution Height=1080
Depth Cutoff=999998.0
@ -19,13 +19,13 @@ Underwater Amplitude 3=0.07
Underwater Zoom=0.15
Always Underwater=false
Enable Hot Air Refraction=true
Heat Texture Size=9.73
Heat Speed=0.44
Heat Texture Size=8.16
Heat Speed=0.36
Heat Fade Contrast=231.910004
Heat Fade Intensity=0.78
Heat Fade Intensity=0.72
Heat Fade Offset=-0.61
Heat Intensity=1.04
Heat Contrast=0.86
Heat Contrast=1.18
Heat Time-of-day Contrast=0.65
Heat Always Enable=false
Enable Screen Frost=false
@ -87,23 +87,23 @@ DOF Fixed Focus Blend Night=0.0
DOF Fixed Focus Blend Day=0.0
DOF Fixed Focus Blend Interior Night=0.0
DOF Fixed Focus Blend Interior Day=0.0
DOF Fixed Unfocus Intensity Night=1.29
DOF Fixed Unfocus Intensity Day=1.34
DOF Fixed Unfocus Intensity Interior Night=1.31
DOF Fixed Unfocus Intensity Interior Day=1.31
DOF Fixed Unfocus Intensity Night=1.19
DOF Fixed Unfocus Intensity Day=1.36
DOF Fixed Unfocus Intensity Interior Night=1.21
DOF Fixed Unfocus Intensity Interior Day=1.21
DOF Fixed Unfocus Contrast Night=229.100006
DOF Fixed Unfocus Contrast Day=324.540009
DOF Fixed Unfocus Contrast Interior Night=188.509995
DOF Fixed Unfocus Contrast Interior Day=188.509995
DOF Fixed Unfocus Shift Night=-1.19
DOF Fixed Unfocus Shift Day=-1.26
DOF Fixed Unfocus Shift Interior Night=-1.1
DOF Fixed Unfocus Shift Interior Day=-1.1
DOF Fixed Unfocus Shift Night=-0.85
DOF Fixed Unfocus Shift Day=-0.96
DOF Fixed Unfocus Shift Interior Night=-1.03
DOF Fixed Unfocus Shift Interior Day=-1.03
DOF Fixed Unfocus Blend Night=1.0
DOF Fixed Unfocus Blend Day=1.0
DOF Fixed Unfocus Blend Interior Night=1.0
DOF Fixed Unfocus Blend Interior Day=1.0
DOF Fixed Use Cutoff=true
DOF Fixed Use Cutoff=false
Disable DOF=false
DOF Gather Blur Radius=12.0
Debug Depth=false
@ -121,22 +121,22 @@ Edgevision Contrast=0.25
Edgevision Intensity=4.0
Edgevision Radius=1.0
Enable SSAO=false
SSAO Radius=0.15
SSAO Radius=0.05
SSAO Noise=0
SSAO Fade Contrast Night=0.48
SSAO Fade Contrast Day=0.52
SSAO Fade Contrast Day=0.45
SSAO Fade Contrast Interior Night=0.43
SSAO Fade Contrast Interior Day=0.43
SSAO Fade Intensity Night=13.429999
SSAO Fade Intensity Day=13.099999
SSAO Fade Intensity Interior Night=14.09
SSAO Fade Intensity Interior Day=14.09
SSAO Intensity=1.0
SSAO Contrast=1.5
SSAO Blending=0.75
SSAO Fade Intensity Night=1.343
SSAO Fade Intensity Day=1.53
SSAO Fade Intensity Interior Night=1.41
SSAO Fade Intensity Interior Day=1.41
SSAO Intensity=1.25
SSAO Contrast=0.65
SSAO Blending=0.8
SSAO Blur=true
SSAO Bilateral Factor=4000.0
SSAO Range=40.0
SSAO Bilateral Factor=1500.0
SSAO Range=20.0
SSAO Range Min=0.0
SSAO Blur Radius=1.0
Debug SSAO=false
@ -147,5 +147,29 @@ Sharpen Radius=0.8
Sharpen Clamp=0.12
Sharpen Blending=6.0
DOF Bilateral Factor=20.0
DOF Blur Radius=1.0
DOF Blur Radius=8.0
DOF Minimum Blur=0.01
Focus Mode=1
Enable DOF Fog=false
DOF Fog Intensity Night=2.0
DOF Fog Intensity Day=2.0
DOF Fog Intensity Interior Night=2.0
DOF Fog Intensity Interior Day=2.0
DOF Fog Contrast Night=1000.0
DOF Fog Contrast Day=1000.0
DOF Fog Contrast Interior Night=1000.0
DOF Fog Contrast Interior Day=1000.0
DOF Fog Shift Night=0.0
DOF Fog Shift Day=0.0
DOF Fog Shift Interior Night=0.0
DOF Fog Shift Interior Day=0.0
DOF Fog Blend Night=0.0
DOF Fog Blend Day=0.0
DOF Fog Blend Interior Night=0.0
DOF Fog Blend Interior Day=0.0
Use Only Fixed DOF=false
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

View file

@ -1,6 +1,6 @@
/*
enblens.fx : MariENB Lens filters.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Before After
Before After

BIN
enbseries/enbraindrops.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -1,6 +1,6 @@
/*
enbsunsprite.fx : MariENB sun sprite filters.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/

View file

@ -1,6 +1,6 @@
/*
menbbloomfilters.fx : MariENB bloom shader routines.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -60,10 +60,11 @@ float4 PS_BloomTexture1(VS_OUTPUT_POST In) : COLOR
float4 res = float4(0,0,0,0);
int i;
float sum = 0;
float inc = TempParameters.z*bloomradiusx;
float2 pp;
[unroll] for ( i=-7; i<=7; i++ )
{
pp = coord+float2(i,0)*TempParameters.z*bloomradiusx;
pp = coord+float2(i,0)*inc;
res += gauss8[abs(i)]*tex2D(SamplerBloom1,pp);
sum += ((pp.x>=0)&&(pp.x<1))?gauss8[abs(i)]:0;
}
@ -78,10 +79,11 @@ float4 PS_BloomTexture2(VS_OUTPUT_POST In) : COLOR
float4 res = float4(0,0,0,0), base = tex2D(SamplerBloom5,coord);
int i;
float sum = 0;
float inc = TempParameters.z*bloomradiusy;
float2 pp;
[unroll] for ( i=-7; i<=7; i++ )
{
pp = coord+float2(0,i)*TempParameters.z*bloomradiusy;
pp = coord+float2(0,i)*inc;
res += gauss8[abs(i)]*tex2D(SamplerBloom1,pp);
sum += ((pp.y>=0)&&(pp.y<1))?gauss8[abs(i)]:0;
}
@ -93,7 +95,7 @@ float4 PS_BloomTexture2(VS_OUTPUT_POST In) : COLOR
float3 blu_id = float3(blu_id_r,blu_id_g,blu_id_b);
float3 blu = tod_ind(blu);
float bsi = tod_ind(bsi);
float lm = max(0,luminance(res.rgb)-luminance(base.rgb))*bsi;
float lm = clamp(0,1,luminance(res.rgb)-luminance(base.rgb))*bsi;
lm = lm/(1.0+lm);
lm *= 1.0-saturate((TempParameters.w-1.0)*bslp);
blu = saturate(blu+(TempParameters.w-1.0)*bsbp);
@ -123,12 +125,13 @@ float4 PS_AnamPass(VS_OUTPUT_POST In) : COLOR
float4 res = float4(0,0,0,0), base = tex2D(SamplerBloom5,coord);
int i;
float sum = 0;
float inc = TempParameters.z*bloomradiusx*flen;
float2 pp;
[unroll] for ( i=-39; i<=39; i++ )
[unroll] for ( i=-79; i<=79; i++ )
{
pp = coord+float2(i,0)*TempParameters.z*bloomradiusx*flen;
res += gauss40[abs(i)]*tex2D(SamplerBloom1,pp);
sum += ((pp.x>=0)&&(pp.x<1))?gauss40[abs(i)]:0;
pp = coord+float2(i,0)*inc;
res += gauss80[abs(i)]*tex2D(SamplerBloom1,pp);
sum += ((pp.x>=0)&&(pp.x<1))?gauss80[abs(i)]:0;
}
res *= 1.0/sum;
/* blue shift */
@ -138,7 +141,7 @@ float4 PS_AnamPass(VS_OUTPUT_POST In) : COLOR
float3 flu_id = float3(flu_id_r,flu_id_g,flu_id_b);
float3 flu = tod_ind(flu);
float fsi = tod_ind(fsi);
float lm = max(0,luminance(res.rgb)-luminance(base.rgb))*fsi;
float lm = clamp(0,1,luminance(res.rgb)-luminance(base.rgb))*fsi;
lm = lm/(1.0+lm);
float fbl = tod_ind(fbl);
float fpw = tod_ind(fpw);
@ -165,34 +168,6 @@ float4 PS_BloomPostPass(VS_OUTPUT_POST In) : COLOR
res.a = 1.0;
return res;
}
/* crappy lens filter, useful when playing characters with glasses */
float4 PS_LensDirtPass(VS_OUTPUT_POST In) : COLOR
{
float4 mud = float4(0,0,0,0);
if ( !dirtenable ) return mud;
float2 coord = In.txcoord0.xy;
float2 ccoord = coord;
#ifdef ASPECT_LENSDIRT
ccoord.y = (coord.y-0.5)*ScreenSize.w+0.5;
#endif
float4 crap = tex2D(SamplerLens,ccoord);
mud += dirtmix1*tex2D(SamplerBloomC1,coord); // P1
mud += dirtmix2*tex2D(SamplerBloomC2,coord); // P2
mud += dirtmix3*tex2D(SamplerBloomC3,coord); // P3
mud += dirtmix4*tex2D(SamplerBloomC4,coord); // P4
mud += dirtmix5*tex2D(SamplerBloomC5,coord); // Prepass
mud += dirtmix6*tex2D(SamplerBloomC6,coord); // Base
mud += dirtmix7*tex2D(SamplerBloomC7,coord); // P5
mud += dirtmix8*tex2D(SamplerBloomC8,coord); // P6
mud.rgb /= 6.0;
mud.rgb = clamp(mud.rgb,0,32768);
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;
mud.a = 1.0;
return mud;
}
/* techniques */
technique BloomPrePass
{
@ -260,11 +235,4 @@ technique BloomPostPass
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
pass p1
{
AlphaBlendEnable = true;
SrcBlend = One;
DestBlend = One;
PixelShader = compile ps_3_0 PS_LensDirtPass();
}
}

View file

@ -1,6 +1,6 @@
/*
menbbloominternals.fx : MariENB bloom internal variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -19,7 +19,7 @@ static const float gauss8[8] =
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,
@ -31,9 +31,9 @@ static const float gauss40[40] =
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,
@ -49,7 +49,7 @@ static const float gauss40[40] =
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
};*/
};
/* standard stuff */
float4 ScreenSize;
float4 TempParameters;
@ -65,14 +65,6 @@ texture2D texBloom5;
texture2D texBloom6;
texture2D texBloom7;
texture2D texBloom8;
texture2D texLens
<
#ifdef LENSDIRT_DDS
string ResourceName = "menblens.dds";
#else
string ResourceName = "menblens.png";
#endif
>;
sampler2D SamplerBloom1 = sampler_state
{
Texture = <texBloom1>;
@ -265,18 +257,6 @@ sampler2D SamplerBloomC8 = sampler_state
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerLens = sampler_state
{
Texture = <texLens>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
/* whatever */
struct VS_OUTPUT_POST
{

View file

@ -1,6 +1,6 @@
/*
menbbloomsettings.fx : MariENB bloom user-tweakable variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -416,59 +416,3 @@ float bloommix6
string UIName = "Bloom Base Blend";
string UIWidget = "Spinner";
> = {0.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 dirtmix7
<
string UIName = "Dirt Pass 7 Blend";
string UIWidget = "Spinner";
> = {1.0};
float dirtmix8
<
string UIName = "Dirt Pass 8 Blend";
string UIWidget = "Spinner";
> = {3.0};
float dirtmix5
<
string UIName = "Dirt Prepass Blend";
string UIWidget = "Spinner";
> = {0.0};
float dirtmix6
<
string UIName = "Dirt Base Blend";
string UIWidget = "Spinner";
> = {0.0};
float ldirtpow
<
string UIName = "Dirt Contrast";
string UIWidget = "Spinner";
> = {1.25};
float ldirtfactor
<
string UIName = "Dirt Factor";
string UIWidget = "Spinner";
> = {1.5};

BIN
enbseries/menbcgalut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -1,6 +1,6 @@
/*
menbeffectfilters.fx : MariENB base shader routines.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -98,7 +98,7 @@ float3 Adaptation( float3 res )
amax = tod_ind(amax);
return res/(adapts*amax+amin);
}
/* "uncharted 2" filmic tone mapping */
/* Uncharted 2 tone mapping */
float3 Uch( float3 res )
{
float A = tod_ind(unA);
@ -109,12 +109,88 @@ 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 ucol/uwhite;
return pow(max(ucol/uwhite,0.0),1.0/2.2);
}
/* 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 = tex2D(SamplerTonemap,float2(lerp(Padding,1-Padding,LogColor.r),.5)).x;
retColor.g = tex2D(SamplerTonemap,float2(lerp(Padding,1-Padding,LogColor.g),.5)).x;
retColor.b = tex2D(SamplerTonemap,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 = float3(tod_ind(sfxfogcolor_r),tod_ind(sfxfogcolor_g),
tod_ind(sfxfogcolor_b));
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 == 5 ) mapped = TonemapSFX(res);
else if ( tmapenable == 4 ) mapped = TonemapHaarmPeterDuiker(res);
else if ( tmapenable == 3 ) mapped = TonemapHejlDawson(res);
else if ( tmapenable == 2 ) mapped = TonemapUC2(res);
else if ( tmapenable == 1 ) mapped = TonemapReinhard(res);
else if ( tmapenable == 0 ) mapped = TonemapLinear(res);
return lerp(tcol,mapped,tblend);
}
/* colour grading passes */
float3 GradingRGB( float3 res )
@ -161,10 +237,14 @@ float3 GradingGame( float3 res )
*/
float3 tgray = luminance(res);
/* saturation */
float3 tcol = res*_r3.x + tgray*(1.0-_r3.x);
float satv = (_r3.x<0.0)?(-pow(abs(_r3.x),vsatpow)*vsatmul)
:(pow(max(_r3.x,0.0),vsatpow)*vsatmul);
float3 tcol = res*satv + tgray*(1.0-satv);
tcol = lerp(res,tcol,vsatblend);
/* tint */
tcol = _r4.w*(tgray*_r4.rgb-tcol)+tcol;
float tintv = (_r4.w<0.0)?(-pow(abs(_r4.w),vtintpow)*vtintmul)
:(pow(max(_r4.w,0.0),vtintpow)*vtintmul);
tcol = tintv*(tgray*_r4.rgb-tcol)+tcol;
tcol = lerp(res,tcol,vtintblend);
/* contrast(?) stuff */
#ifdef FALLOUT
@ -318,27 +398,54 @@ float3 GradingLUT( float3 res )
volume maps, but PS 3.0 has a limit of 16 samplers and I think ENB
can't load volume maps anyway.
*/
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);
float3 tcol = clamp(res,0.08,0.92);
tcol.rg = tcol.rg*0.5+0.25;
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 = tex2D(SamplerLUT,lc1+float2(0,clut_n/64.0));
float3 tcl2_n = tex2D(SamplerLUT,lc2+float2(0,clut_n/64.0));
/* day samples */
float3 tcl1_d = tex2D(SamplerLUT,lc1+float2(0,clut_d/64.0));
float3 tcl2_d = tex2D(SamplerLUT,lc2+float2(0,clut_d/64.0));
/* interior night samples */
float3 tcl1_in = tex2D(SamplerLUT,lc1+float2(0,clut_in/64.0));
float3 tcl2_in = tex2D(SamplerLUT,lc2+float2(0,clut_in/64.0));
/* interior day samples */
float3 tcl1_id = tex2D(SamplerLUT,lc1+float2(0,clut_id/64.0));
float3 tcl2_id = tex2D(SamplerLUT,lc2+float2(0,clut_id/64.0));
#else
#ifdef LUTMODE_16
float3 tcol = clamp(res,0.08,0.92);
tcol.rg = tcol.rg*0.5+0.25;
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);
float dec = (ceil(tcol.b*16.0)==16.0)?(0.0):frac(tcol.b*16.0);
#endif
#ifdef LUTMODE_64
float3 tcol = clamp(res,0.02,0.98);
tcol.rg = tcol.rg*0.5+0.25;
float2 lc1 = float2(tcol.r,tcol.g/64.0+floor(tcol.b*64.0)/64.0);
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 = tex2D(SamplerLUT,lc1);
float3 tcl2 = tex2D(SamplerLUT,lc2);
/* night samples */
float3 tcl1_n = tex2D(SamplerLUTN,lc1);
float3 tcl2_n = tex2D(SamplerLUTN,lc2);
/* day samples */
float3 tcl1_d = tex2D(SamplerLUTD,lc1);
float3 tcl2_d = tex2D(SamplerLUTD,lc2);
/* interior night samples */
float3 tcl1_in = tex2D(SamplerLUTIN,lc1);
float3 tcl2_in = tex2D(SamplerLUTIN,lc2);
/* interior day samples */
float3 tcl1_id = tex2D(SamplerLUTID,lc1);
float3 tcl2_id = tex2D(SamplerLUTID,lc2);
#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);
@ -360,6 +467,16 @@ float3 GradingPal( float3 res )
palt.b = tex2D(_s7,coord).b;
return lerp(res,palt,palblend);
}
/* I think this Technicolor implementation is correct... maybe */
float3 Technicolor( float3 res )
{
res = clamp(res,0.0,1.0);
float red = 1.0-(res.r-(res.g+res.b)*0.5);
float green = 1.0-(res.g-(res.r+res.b)*0.5);
float blue = 1.0-(res.b-(res.r+res.g)*0.5);
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 )
{
@ -369,10 +486,6 @@ float3 Dither( float3 res, float2 coord )
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);
@ -417,26 +530,29 @@ 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);
}
/* MariENB shader */
float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord0.xy;
float4 res = tex2D(_s0,coord);
if ( aenable ) res.rgb = Adaptation(res.rgb);
if ( tmapenable ) res.rgb = Tonemap(res.rgb);
res.rgb = pow(max(res.rgb,0.0),2.2);
float3 bcol = tex2D(_s3,coord).rgb*EBloomAmount;
if ( bloomdebug ) res.rgb *= 0;
res.rgb += tex2D(_s3,coord).rgb*EBloomAmount;
res.rgb += bcol;
if ( aenable ) res.rgb = Adaptation(res.rgb);
if ( nbt && ne ) res.rgb = FilmGrain(res.rgb,coord);
res.rgb = Tonemap(res.rgb);
if ( vgradeenable ) res.rgb = GradingGame(res.rgb);
if ( gradeenable1 ) res.rgb = GradingRGB(res.rgb);
if ( colorizeafterhsv )
@ -451,7 +567,8 @@ float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
}
if ( lutenable ) res.rgb = GradingLUT(res.rgb);
if ( palenable ) res.rgb = GradingPal(res.rgb);
if ( ne ) res.rgb = FilmGrain(res.rgb,coord);
if ( techenable ) res.rgb = Technicolor(res.rgb);
if ( !nbt && ne ) res.rgb = FilmGrain(res.rgb,coord);
#ifdef FALLOUT
res.rgb = _r5.rgb*_r5.a + res.rgb*(1.0-_r5.a);
#else

View file

@ -1,6 +1,6 @@
/*
menbeffectinternals.fx : MariENB base internal variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -20,23 +20,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] =
{
@ -50,6 +33,7 @@ static const float ordered8[64] =
d(42),d(26),d(38),d(22),d(41),d(25),d(37),d(21)
};
#undef d
/* standard stuff */
float4 ScreenSize;
float4 Timer;
@ -71,18 +55,53 @@ texture2D texNoise3
<
string ResourceName = "menbnoise2.png";
>;
#ifdef LUTMODE_LEGACY
texture2D texLUT
<
#ifdef LUTMODE_LEGACY
string ResourceName = "menblutpreset.png";
#endif
>;
#else
texture2D texLUTN
<
#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 texLUTD
<
#ifdef LUTMODE_16
string ResourceName = "menblut16_day.png";
#endif
#ifdef LUTMODE_64
string ResourceName = "menblut64_day.png";
#endif
>;
texture2D texLUTIN
<
#ifdef LUTMODE_16
string ResourceName = "menblut16_interiornight.png";
#endif
#ifdef LUTMODE_64
string ResourceName = "menblut64_interiornight.png";
#endif
>;
texture2D texLUTID
<
#ifdef LUTMODE_16
string ResourceName = "menblut16_interiorday.png";
#endif
#ifdef LUTMODE_64
string ResourceName = "menblut64_interiorday.png";
#endif
>;
#endif
texture2D texTonemap
<
string ResourceName = "menbfilmlut.png";
>;
sampler2D _s0 = sampler_state
{
Texture = <texs0>;
@ -179,6 +198,7 @@ sampler2D SamplerNoise3 = sampler_state
MaxMipLevel = 0;
MipMapLodBias = 0;
};
#ifdef LUTMODE_LEGACY
sampler2D SamplerLUT = sampler_state
{
Texture = <texLUT>;
@ -191,6 +211,68 @@ sampler2D SamplerLUT = sampler_state
MaxMipLevel = 0;
MipMapLodBias = 0;
};
#else
sampler2D SamplerLUTN = sampler_state
{
Texture = <texLUTN>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerLUTD = sampler_state
{
Texture = <texLUTD>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerLUTIN = sampler_state
{
Texture = <texLUTIN>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerLUTID = sampler_state
{
Texture = <texLUTID>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
#endif
sampler2D SamplerTonemap = sampler_state
{
Texture = <texTonemap>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
/* whatever */
struct VS_OUTPUT_POST
{

View file

@ -1,6 +1,6 @@
/*
menbeffectsettings.fx : MariENB base user-tweakable variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -115,6 +115,11 @@ float nj
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
bool nbt
<
string UIName = "Apply Grain Before Tone Mapping";
string UIWidget = "Checkbox";
> = {true};
/* "adaptation" factors */
string str_adaptation = "Eye Adaptation";
bool aenable
@ -163,152 +168,430 @@ float amax_id
string UIWidget = "Spinner";
> = {1.0};
/* tone mapping */
string str_tonemap = "Filmic Tone Mapping";
bool tmapenable
string str_tonemap = "Tone Mapping";
int tmapenable
<
string UIName = "Enable Tonemapping";
string UIWidget = "Checkbox";
> = {false};
string UIName = "Tonemapping Method";
string UIWidget = "Spinner";
int UIMin = -1;
int UIMax = 5;
> = {2};
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_in
<
string UIName = "Tonemap Exposure Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float tmapexposure_id
<
string UIName = "Tonemap Exposure Interior Day";
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_in
<
string UIName = "Tonemap Blend Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float tmapblend_id
<
string UIName = "Tonemap Blend Interior Day";
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_in
<
string UIName = "Tonemap Shoulder Strength Interior Night";
string UIName = "Uncharted2 Shoulder Strength Interior Night";
string UIWidget = "Spinner";
> = {0.5};
float unA_id
<
string UIName = "Tonemap Shoulder Strength Interior Day";
string UIName = "Uncharted2 Shoulder Strength Interior Day";
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_in
<
string UIName = "Tonemap Linear Strength Interior Night";
string UIName = "Uncharted2 Linear Strength Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float unB_id
<
string UIName = "Tonemap Linear Strength Interior Day";
string UIName = "Uncharted2 Linear Strength Interior Day";
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_in
<
string UIName = "Tonemap Linear Angle Interior Night";
string UIName = "Uncharted2 Linear Angle Interior Night";
string UIWidget = "Spinner";
> = {0.2};
float unC_id
<
string UIName = "Tonemap Linear Angle Interior Day";
string UIName = "Uncharted2 Linear Angle Interior Day";
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_in
<
string UIName = "Tonemap Toe Strength Interior Night";
string UIName = "Uncharted2 Toe Strength Interior Night";
string UIWidget = "Spinner";
> = {0.75};
float unD_id
<
string UIName = "Tonemap Toe Strength Interior Day";
string UIName = "Uncharted2 Toe Strength Interior Day";
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_in
<
string UIName = "Tonemap Toe Numerator Interior Night";
string UIName = "Uncharted2 Toe Numerator Interior Night";
string UIWidget = "Spinner";
> = {0.02};
float unE_id
<
string UIName = "Tonemap Toe Numerator Interior Day";
string UIName = "Uncharted2 Toe Numerator Interior Day";
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_in
<
string UIName = "Tonemap Toe Denominator Interior Night";
string UIName = "Uncharted2 Toe Denominator Interior Night";
string UIWidget = "Spinner";
> = {0.30};
float unF_id
<
string UIName = "Tonemap Toe Denominator Interior Day";
string UIName = "Uncharted2 Toe Denominator Interior Day";
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_in
<
string UIName = "Tonemap Linear White Interior Night";
string UIName = "Uncharted2 Linear White Interior Night";
string UIWidget = "Spinner";
> = {10.0};
float unW_id
<
string UIName = "Tonemap Linear White Interior Day";
string UIName = "Uncharted2 Linear White Interior Day";
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_in
<
string UIName = "SweetFX Gamma Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 2.0;
> = {1.0};
float sfxgamma_id
<
string UIName = "SweetFX Gamma Interior Day";
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_in
<
string UIName = "SweetFX Exposure Interior Night";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxexposure_id
<
string UIName = "SweetFX Exposure Interior Day";
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_in
<
string UIName = "SweetFX Saturation Interior Night";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxsaturation_id
<
string UIName = "SweetFX Saturation Interior Day";
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_in
<
string UIName = "SweetFX Bleach Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxbleach_id
<
string UIName = "SweetFX Bleach Interior Day";
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_in
<
string UIName = "SweetFX Defog Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxdefog_id
<
string UIName = "SweetFX Defog Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_r_n
<
string UIName = "SweetFX Defog Color Red Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_g_n
<
string UIName = "SweetFX Defog Color Green Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_b_n
<
string UIName = "SweetFX Defog Color Blue Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float sfxfogcolor_r_d
<
string UIName = "SweetFX Defog Color Red Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_g_d
<
string UIName = "SweetFX Defog Color Green Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_b_d
<
string UIName = "SweetFX Defog Color Blue Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float sfxfogcolor_r_in
<
string UIName = "SweetFX Defog Color Red Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_g_in
<
string UIName = "SweetFX Defog Color Green Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_b_in
<
string UIName = "SweetFX Defog Color Blue Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float sfxfogcolor_r_id
<
string UIName = "SweetFX Defog Color Red Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_g_id
<
string UIName = "SweetFX Defog Color Green Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxfogcolor_b_id
<
string UIName = "SweetFX Defog Color Blue Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
/* Color grading */
string str_grade = "Color Grading Suite";
bool gradeenable1
@ -661,6 +944,30 @@ float vconblend
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float vtintpow
<
string UIName = "Vanilla Tint Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float vtintmul
<
string UIName = "Vanilla Tint Strength";
string UIWidget = "Spinner";
float UIMin = 0.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};
/* LUT grading */
string str_lut = "RGB Lookup Table Grading";
bool lutenable
@ -689,9 +996,30 @@ float lutblend_id
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_in
<
string UIName = "LUT Preset Interior Night";
string UIWidget = "Spinner";
int UIMin = 0;
int UIMax = 63;
> = {1};
int clut_id
<
string UIName = "LUT Preset Interior Day";
string UIWidget = "Spinner";
int UIMin = 0;
int UIMax = 63;
@ -708,6 +1036,22 @@ float palblend
<
string UIName = "Palette Blend";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
/* technicolor shader */
string str_tech = "Technicolor";
bool techenable
<
string UIName = "Enable Technicolor";
string UIWidget = "Checkbox";
> = {false};
float techblend
<
string UIName = "Technicolor Blend";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
string str_dither = "Dithering";
bool dodither
@ -720,8 +1064,8 @@ int dither
string UIName = "Dither Pattern";
string UIWidget = "Spinner";
int UIMin = 0;
int UIMax = 4;
> = {4};
int UIMax = 2;
> = {2};
string str_debug = "Debugging";
bool bloomdebug
<

BIN
enbseries/menbegalut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -1,6 +1,6 @@
/*
menbextrafilters.fx : MariENB extra shader routines.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -43,10 +43,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;
@ -61,108 +57,23 @@ 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.02,0.98);
float2 lc = float2((dac.r+cgapal)/7.0,
dac.g/64.0+floor(dac.b*64.0)/64.0);
return tex2D(SamplerCGA,lc);
}
/*
EGA technically only had the 320x200 16-colour graphic mode, but when VGA
came out, it was possible to tweak the DAC, allowing for custom palettes.
EGA technically only had a fixed 16-colour palette, but when VGA came out,
it was possible to tweak the DAC, allowing for custom palettes.
AOS EGA is a palette based on my terminal colour scheme on Linux, which I
also use for AliceOS.
*/
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.02,0.98);
float2 lc = float2((dac.r+egapal)/2.0,
dac.g/64.0+floor(dac.b*64.0)/64.0);
return tex2D(SamplerEGA,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 )
@ -171,20 +82,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
@ -197,50 +94,23 @@ 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 tex2D(SamplerDoom,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 tex2D(SamplerQuake,lc);
}
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);
float4 dac = clamp(ReducePrepass(color,coord),0.02,0.98);
float2 lc = float2((dac.r+vgapal)/15.0,
dac.g/64.0+floor(dac.b*64.0)/64.0);
return tex2D(SamplerVGA,lc);
}
/* Retro rockets */
float4 PS_Retro( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
float4 res = tex2D(SamplerColorb,coord);
if ( !useblock ) return res;
float2 rresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float4 tcol;
float2 bresl = rresl;
float2 sresl = float2(sresx,sresy);
if ( bresx <= 0 || bresy <= 0 ) bresl = rresl;
else
{
@ -249,151 +119,33 @@ float4 PS_Retro( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
if ( bresy <= 1.0 ) bresl.y = rresl.y*bresy;
else bresl.y = bresy;
}
if ( sresl.x <= 0 ) sresl.x = rresl.x/bresl.x;
if ( sresl.y <= 0 ) sresl.y = rresl.y/bresl.y;
float2 ncoord = coord*(rresl/bresl);
ncoord = (-0.5/sresl)*(rresl/bresl)+ncoord/sresl+0.5;
float2 ncoord = (coord-0.5)+0.5;
ncoord = floor(ncoord*bresl)/bresl;
ncoord += 0.5/bresl;
if ( bresx <= 0 || bresy <= 0 ) ncoord = coord;
tcol = tex2D(SamplerColor,ncoord);
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);
tcol = tex2D(SamplerColorb,ncoord);
if ( paltype == 0 ) res = ReduceCGA(tcol,coord*bresl);
else if ( paltype == 1 ) res = ReduceEGA(tcol,coord*bresl);
else if ( paltype == 2 ) res = ReduceRGB2(tcol,coord*bresl);
else if ( paltype == 3 ) res = ReduceVGA(tcol,coord*bresl);
else if ( paltype == 4 ) res = ReduceRGB565(tcol,coord*bresl);
else res = tcol;
if ( ncoord.x < 0 || ncoord.x >= 1 || ncoord.y < 0 || ncoord.y >= 1 )
res *= 0;
res.a = 1.0;
return res;
}
/* ASCII art (more like CP437 art) */
float4 PS_ASCII( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,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 = tex2D(SamplerColor,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 = tex2D(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, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
if ( !maskenable ) return res;
if ( tex2D(SamplerDepth,coord).x > maskd )
float dep = tex2D(SamplerDepth,coord).x;
float msd = maskd;
msd = maskd+0.01*masktiltx*(masktiltxcenter-coord.x)
+0.01*masktilty*(masktiltycenter-coord.y);
if ( dep > msd )
return float4(maskr,maskg,maskb,1.0);
return res;
}
/* 2x2 RGBI dot matrix, not even close to anything that exists IRL but meh */
float4 PS_DotMatrix( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,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 = tex2D(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, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,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(tex2D(SamplerColorb,rcoord+bof*float2(i,j)).r,
tex2D(SamplerColorb,gcoord+bof*float2(i,j)).g,
tex2D(SamplerColorb,bcoord+bof*float2(i,j)).b,
tex2D(SamplerColorb,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, float2 vPos : VPOS ) : COLOR
{
@ -463,6 +215,24 @@ float4 PS_Shift( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
res.a = 1.0;
return res;
}
/* ultimate super-cinematic immersive black bars */
float4 PS_Cinematic( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,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<tar)?float2(0.0,(bresl.y-(bresl.x/tar))*0.5)
:float2((bresl.x-(bresl.y*tar))*0.5,0.0);
box /= bresl;
/* this is some kind of advanced black magic I can't understand */
float2 test = saturate((coord*coord-coord)-(box*box-box));
if ( -test.x != test.y ) res *= 0.0;
return res;
}
/* TODO bring back oil filter */
technique PostProcess
{
pass p0
@ -553,41 +323,7 @@ technique PostProcess6
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_ASCII();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess7
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DotMatrix();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess8
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Curvature();
PixelShader = compile ps_3_0 PS_Cinematic();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;

View file

@ -1,6 +1,6 @@
/*
menbextrainternals.fx : MariENB extra internal variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -20,23 +20,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] =
{
@ -50,99 +33,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] =
{
0.444814, 0.239936, 0.037657
};
/* standard stuff */
float4 ScreenSize;
float ENightDayFactor;
@ -150,21 +40,13 @@ float EInteriorFactor;
/* samplers and textures */
texture2D texColor;
texture2D texDepth;
texture2D texFont
texture2D texCGA
<
string ResourceName = "menbvgaluma.png";
string ResourceName = "menbcgalut.png";
>;
texture2D texDots
texture2D texEGA
<
string ResourceName = "menbdots.png";
>;
texture2D texDoom
<
string ResourceName = "menbdoomlut.png";
>;
texture2D texQuake
<
string ResourceName = "menbquakelut.png";
string ResourceName = "menbegalut.png";
>;
texture2D texVGA
<
@ -206,49 +88,25 @@ sampler2D SamplerDepth = sampler_state
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerFont = sampler_state
sampler2D SamplerCGA = sampler_state
{
Texture = <texFont>;
MinFilter = LINEAR;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Wrap;
AddressV = Wrap;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerDots = sampler_state
{
Texture = <texDots>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Wrap;
AddressV = Wrap;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerDoom = sampler_state
{
Texture = <texDoom>;
Texture = <texCGA>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressU = Wrap;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerQuake = sampler_state
sampler2D SamplerEGA = sampler_state
{
Texture = <texQuake>;
Texture = <texEGA>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressU = Wrap;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
@ -260,7 +118,7 @@ sampler2D SamplerVGA = sampler_state
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressU = Wrap;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;

View file

@ -1,6 +1,6 @@
/*
menbextrasettings.fx : MariENB extra user-tweakable variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -29,40 +29,21 @@ float bresy
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.5};
/* zooming factors (<=0 for stretch) */
float sresx
<
string UIName = "Zoom Factor X";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float sresy
<
string UIName = "Zoom Factor Y";
string UIWidget = "Spinner";
float UIMin = 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:
@ -93,22 +74,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
<
@ -135,25 +140,7 @@ 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};
/* Depth-cutting chroma key */
string str_mask = "Depth Chroma Key";
bool maskenable
<
@ -188,63 +175,30 @@ float maskd
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.5};
string str_dot = "RGBI Dot Matrix";
bool dotenable
/* tilting */
float masktiltxcenter
<
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 UIName = "Chroma Key Depth Horizontal Tilt Center";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.4};
float dotmult
> = {0.5};
float masktiltycenter
<
string UIName = "Dot Intensity";
string UIName = "Chroma Key Depth Vertical Tilt Center";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dotpow
float UIMax = 1.0;
> = {0.5};
float masktiltx
<
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 UIName = "Chroma Key Depth Horizontal Tilt";
string UIWidget = "Spinner";
> = {0.0};
float lenszoom
float masktilty
<
string UIName = "Curve Zooming";
string UIName = "Chroma Key Depth Vertical Tilt";
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";
@ -287,3 +241,22 @@ float bssshiftradius
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.75};
/* 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};

BIN
enbseries/menbfilmlut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 KiB

After

Width:  |  Height:  |  Size: 736 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

Before After
Before After

View file

@ -1,6 +1,6 @@
/*
menbglobaldefs.fx : MariENB global shared code.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -20,6 +20,10 @@
#define WT_TEMPERATE 0.0
#define WT_HOT 1.0
#define WT_COLD 2.0
/* new additions */
#define WT_TEMPERATE_FOG 3.0
#define WT_COLD_FOG 4.0
#define WT_HOT_FOG 5.0
#define weatherfactor(id) ((WeatherAndTime.x==id)?(WeatherAndTime.y==id)\
?(1.0):(WeatherAndTime.z):(WeatherAndTime.y==id)\
?(1.0-WeatherAndTime.z):(0.0))
@ -60,7 +64,4 @@
//#define HEAT_DDS
//#define LENSDIRT_DDS
//#define FROST_DDS
//#define FROSTBUMP_DDS
/* experimental features (TODO) */
#define USE_BOKEH
//#define MULTIPASS_RMAO
//#define FROSTBUMP_DDS

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

BIN
enbseries/menblut64_day.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -1,6 +1,6 @@
/*
menbprepassfilters.fx : MariENB prepass shader routines.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -137,9 +137,9 @@ float4 PS_EdgePlusSSAOPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
float sdepth, so, delta;
float sclamp = ssaoclamp/100000.0;
float sclampmin = ssaoclampmin/100000.0;
if ( ssaoquarter ) [unroll] for ( i=0; i<16; i++ )
[unroll] for ( i=0; i<16; i++ )
{
sample = reflect(ssao_samples_lq[i],rnormal);
sample = reflect(ssao_samples[i],rnormal);
sample *= sign(dot(normal,sample));
so = ldepth-sample.z*bof.x;
sdepth = depthlinear(coord+bof*sample.xy/ldepth);
@ -148,18 +148,7 @@ float4 PS_EdgePlusSSAOPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
if ( (delta > sclampmin) && (delta < sclamp) )
occ += 1.0-delta;
}
else [unroll] for ( i=0; i<64; i++ )
{
sample = reflect(ssao_samples_hq[i],rnormal);
sample *= sign(dot(normal,sample));
so = ldepth-sample.z*bof.x;
sdepth = depthlinear(coord+bof*sample.xy/ldepth);
delta = saturate(so-sdepth);
delta *= 1.0-smoothstep(0.0,sclamp,delta);
if ( (delta > sclampmin) && (delta < sclamp) )
occ += 1.0-delta;
}
float uocc = saturate(occ/(ssaoquarter?16.0:64.0));
float uocc = saturate(occ/16.0);
float fade = 1.0-depth;
uocc *= saturate(pow(max(0,fade),ssaofadepow)*ssaofademult);
uocc = saturate(pow(max(0,uocc),ssaopow)*ssaomult);
@ -189,7 +178,8 @@ float2 DistantHeat( float2 coord )
float distfade = clamp(pow(max(0,dep),heatfadepow)*heatfademul
+heatfadebump,0.0,1.0);
if ( distfade <= 0.0 ) return coord;
float todpow = pow(max(0,ENightDayFactor*(1.0-EInteriorFactor)),
float todpow = pow(max(0,ENightDayFactor*min(1.0,weatherfactor(WT_HOT)
+weatherfactor(WT_HOT_FOG)+1.0-EInteriorFactor)),
heattodpow);
if ( !heatalways && (todpow <= 0.0) ) return coord;
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
@ -201,7 +191,8 @@ float2 DistantHeat( float2 coord )
ofs *= pow(length(ofs),heatpow);
if ( !heatalways ) ofs *= todpow
#ifndef FALLOUT
*weatherfactor(WT_HOT)
*max(0.0,(weatherfactor(WT_HOT)+weatherfactor(WT_HOT_FOG))
-(weatherfactor(WT_COLD)+weatherfactor(WT_COLD_FOG)))
#endif
;
odep = tex2D(SamplerDepth,coord+ofs*heatstrength*distfade*0.01).x;
@ -251,16 +242,7 @@ float4 PS_SSAOBlurH( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
res.a = 0.0;
int i;
isd = tex2D(SamplerDepth,coord).x;
if ( ssaohalfblur ) [unroll] for ( i=-7; i<=7; i++ )
{
sd = tex2D(SamplerDepth,coord+float2(i,0)*bof).x;
ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
sw = ds;
sw *= gauss8[abs(i)];
tw += sw;
res.a += sw*tex2D(SamplerColor,coord+float2(i,0)*bof).a;
}
else [unroll] for ( i=-15; i<=15; i++ )
[unroll] for ( i=-15; i<=15; i++ )
{
sd = tex2D(SamplerDepth,coord+float2(i,0)*bof).x;
ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
@ -288,16 +270,7 @@ float4 PS_SSAOBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
res.a = 0.0;
int i;
isd = tex2D(SamplerDepth,coord).x;
if ( ssaohalfblur ) [unroll] for ( i=-7; i<=7; i++ )
{
sd = tex2D(SamplerDepth,coord+float2(0,i)*bof).x;
ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
sw = ds;
sw *= gauss8[abs(i)];
tw += sw;
res.a += sw*tex2D(SamplerColor,coord+float2(0,i)*bof).a;
}
else [unroll] for ( i=-15; i<=15; i++ )
[unroll] for ( i=-15; i<=15; i++ )
{
sd = tex2D(SamplerDepth,coord+float2(0,i)*bof).x;
ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
@ -315,11 +288,23 @@ float4 PS_SSAOBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
float4 PS_ReadFocus( VS_OUTPUT_POST IN ) : COLOR
{
if ( dofdisable ) return 0.0;
if ( focusmanual ) return focusmanualvalue;
if ( focuscircle < 0 ) return focusmanualvalue;
float focusmax = tod_ind(focusmax);
float2 fcenter = float2(focuscenter_x,focuscenter_y);
float cfocus = min(tex2D(SamplerDepth,fcenter).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(tex2D(SamplerDepth,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);
@ -362,12 +347,20 @@ float4 PS_DoFPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
float doffixedunfocusmult = tod_ind(doffixedunfocusmult);
float doffixedunfocusbump = tod_ind(doffixedunfocusbump);
float doffixedunfocusblend = tod_ind(doffixedunfocusblend);
float doffogpow = tod_ind(doffogpow);
float doffogmult = tod_ind(doffogmult);
float doffogbump = tod_ind(doffogbump);
float doffogblend = tod_ind(doffogblend);
float dep = tex2D(SamplerDepth,coord).x;
float foc = tex2D(SamplerFocus,coord).x;
/* 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;
float dfog = dff;
/*
Change power of dof based on field of view. Works only in Skyrim.
The FieldOfView variable seems to hold bogus values in Fallout
@ -388,18 +381,20 @@ float4 PS_DoFPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
+doffixedfocusbump,0.0,1.0);
dfu = clamp(pow(dfu,doffixedunfocuspow)*doffixedunfocusmult
+doffixedunfocusbump,0.0,1.0);
dfog = clamp(pow(dfog,doffogpow)*doffogmult+doffogbump,0.0,1.0);
if ( doffixedonly ) dfc *= 0;
dfc *= lerp(1.0,dff,doffixedfocusblend);
dfc += lerp(0.0,dfu,doffixedunfocusblend);
if ( doffogenable )
dfc += (weatherfactor(WT_TEMPERATE_FOG)
+weatherfactor(WT_COLD_FOG)+weatherfactor(WT_HOT_FOG))
*lerp(0.0,dfog,doffogblend);
dfc = saturate(dfc);
float4 res = tex2D(SamplerColor,coord);
res.a = dfc;
return res;
}
/*
This method skips blurring areas that are perfectly in focus. The
performance gain is negligible in most cases, though.
*/
/* gather blur pass */
/* gather blur pass */
float4 PS_DoFGather( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float2 coord = IN.txcoord.xy;
@ -411,80 +406,113 @@ float4 PS_DoFGather( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = 1.0/bresl;
/*
Skip blurring areas that are perfectly in focus. The performance
gain is negligible in most cases, though.
*/
if ( dfc <= dofminblur ) return tex2D(SamplerColor,coord);
float4 res = float4(0,0,0,0);
float dep = tex2D(SamplerDepth,coord).x;
float sd, ds, sw, tw = 0;
float ds, sw, tw = 0;
float2 bsz = bof*dofpradius*dfc;
float4 sc;
[unroll] for ( int i=0; i<32; i++ )
{
sc = tex2Dlod(SamplerColor,float4(coord.x
+poisson32[i].x*bsz.x,coord.y+poisson32[i].y
*bsz.y,0.0,dfc*4.0));
sc = float4(tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
+dofpcha*0.1)).r,tex2D(SamplerColor,coord+poisson32[i]
*bsz).g,tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
-dofpcha*0.1)).b,tex2D(SamplerColor,coord+poisson32[i]
*bsz).a);
ds = tex2D(SamplerDepth,coord+poisson32[i]*bsz).x;
sd = tex2D(SamplerColor,coord+poisson32[i]*bsz).a;
sw = (ds>dep)?1.0:sd;
sw = (ds>dep)?1.0:sc.a;
tw += sw;
res += sc*sw;
}
res /= tw;
res.a = 1.0;
return res;
}
float4 PS_DoFBlurH( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float2 coord = IN.txcoord.xy;
if ( dofdisable ) return tex2D(SamplerColor,coord);
float dfc = tex2D(SamplerColor,coord).a;
if ( dofdebug ) return tex2D(SamplerDepth,coord).x;
if ( dfcdebug ) return dfc;
float bresl = (fixedx>0)?fixedx:ScreenSize.x;
float bof = (1.0/bresl)*dofbradius;
float4 res = float4(0,0,0,0);
if ( dfc <= dofminblur ) return tex2D(SamplerColor,coord);
int i;
float isd, sd, ds, sw, tw = 0;
isd = dfc;
[unroll] for ( i=-7; i<=7; i++ )
{
sd = tex2D(SamplerColor,coord+float2(i,0)*bof*dfc).a;
ds = abs(isd-sd)*dofbfact+0.5;
sw = 1.0/(ds+1.0);
sw *= gauss8[abs(i)];
tw += sw;
res += sw*tex2D(SamplerColor,coord+float2(i,0)*bof*dfc);
}
res /= tw;
res.a = dfc;
return res;
}
float4 PS_DoFBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
/* "bokeh" blur pass */
float4 PS_DoFBorkeh( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float2 coord = IN.txcoord.xy;
if ( dofdisable ) return tex2D(SamplerColor,coord);
float dfc = tex2D(SamplerColor,coord).a;
if ( dofdebug ) return tex2D(SamplerDepth,coord).x;
if ( dfcdebug ) return dfc;
float bresl = (fixedy>0)?fixedy:(ScreenSize.x*ScreenSize.w);
float bof = (1.0/bresl)*dofbradius;
float4 res = float4(0,0,0,0);
if ( dfc <= dofminblur ) return tex2D(SamplerColor,coord);
int i;
float isd, sd, ds, sw, tw = 0;
isd = dfc;
[unroll] for ( i=-7; i<=7; i++ )
float2 bresl;
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = 1.0/bresl;
float4 res = tex2D(SamplerColor,coord);
res.a = 0.0;
/*
Skip blurring areas that are perfectly in focus. The performance
gain is negligible in most cases, though.
*/
if ( dfc <= dofminblur ) return res;
float dep = tex2D(SamplerDepth,coord).x;
float sr = dofpradius*dfc;
float w = max(0,(1/(sr*sr+1))*luminance(res.rgb+0.01));
res *= w;
float tw = w;
float2 bsz = bof*sr;
float4 pc;
float sc, ds;
[unroll] for ( int i=0; i<32; i++ )
{
sd = tex2D(SamplerColor,coord+float2(0,i)*bof*dfc).a;
ds = abs(isd-sd)*dofbfact+0.5;
sw = 1.0/(ds+1.0);
sw *= gauss8[abs(i)];
tw += sw;
res += sw*tex2D(SamplerColor,coord+float2(0,i)*bof*dfc);
pc = float4(tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
+dofpcha*0.1)).r,tex2D(SamplerColor,coord+poisson32[i]
*bsz).g,tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
-dofpcha*0.1)).b,tex2D(SamplerColor,coord+poisson32[i]
*bsz).a);
ds = tex2D(SamplerDepth,coord+poisson32[i]*bsz).x;
sc = abs(pc.a*dofpradius);
if ( sr < 0.0 ) sc = max(abs(sr),sc);
w = (1.0/(pow(sc,2)+1))*luminance(pc.rgb+0.01);
w *= saturate(1-smoothstep(sc,sc*1.1,length(poisson32[i]*bsz)
*abs(sr)));
w *= (ds>dep)?1.0:sc;
res += pc*w;
tw += w;
}
res /= tw;
res.a = dfc;
return res;
}
float4 PS_DoFPostBlur( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float2 coord = IN.txcoord.xy;
if ( dofdisable ) return tex2D(SamplerColor,coord);
float dfc = tex2D(SamplerColor,coord).a;
if ( dofdebug ) return tex2D(SamplerDepth,coord).x;
if ( dfcdebug ) return dfc;
float2 bresl;
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = 1.0/bresl;
float2 ofs[16] =
{
float2(1.0,1.0), float2(-1.0,-1.0),
float2(-1.0,1.0), float2(1.0,-1.0),
float2(1.0,0.0), float2(-1.0,0.0),
float2(0.0,1.0), float2(0.0,-1.0),
float2(1.41,0.0), float2(-1.41,0.0),
float2(0.0,1.41), float2(0.0,-1.41),
float2(1.41,1.41), float2(-1.41,-1.41),
float2(-1.41,1.41), float2(1.41,-1.41)
};
float4 res = tex2D(SamplerColor,coord);
int i;
[unroll] for ( i=0; i<16; i++ )
res += tex2D(SamplerColor,coord+ofs[i]*bof*dfc);
res /= 17.0;
res.a = 1.0;
return res;
}
/* Screen frost shader. Not very realistic either, but looks fine too. */
float2 ScreenFrost( float2 coord )
@ -498,7 +526,8 @@ float2 ScreenFrost( float2 coord )
ofs *= pow(length(ofs),frostpow)*froststrength;
if ( !frostalways ) ofs *=
#ifndef FALLOUT
weatherfactor(WT_COLD)+(1.0-weatherfactor(WT_HOT))*
max(0.0,(weatherfactor(WT_COLD)+weatherfactor(WT_COLD_FOG))
-(weatherfactor(WT_HOT)+weatherfactor(WT_HOT_FOG)))*
#endif
(1.0-ENightDayFactor)*frostnight;
if ( EInteriorFactor == 1.0 ) ofs *= frostind;
@ -536,16 +565,31 @@ float4 PS_FrostPass( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
1.0)*frostblend;
if ( !frostalways ) dist *=
#ifndef FALLOUT
weatherfactor(WT_COLD)+(1.0-weatherfactor(WT_HOT))*
max(0.0,(weatherfactor(WT_COLD)
+weatherfactor(WT_COLD_FOG))+(weatherfactor(WT_HOT)
+weatherfactor(WT_HOT_FOG)))*
#endif
(1.0-ENightDayFactor)*frostnight;
if ( EInteriorFactor == 1.0 ) dist *= frostind;
res.rgb *= 1.0+bmp*dist;
}
else res = tex2D(SamplerColor,coord);
if ( !focusdisplay ) return res;
if ( !focusdisplay || (focuscircle < 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;
}
float2 fcenter = float2(focuscenter_x,focuscenter_y);
if ( distance(coord,fcenter) < 0.01 ) res.rgb = float3(1,0,0);
if ( distance(coord,fcenter) < 0.005 ) res.rgb = float3(1,0,0);
if ( focuscircle == 0 ) return res;
float cstep = (1.0/3.0);
float2 tcoord;
float focusradius = tod_ind(focusradius);
@ -553,13 +597,13 @@ float4 PS_FrostPass( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
float fan = focuscircleangle*2.0*pi;
tcoord.x = fcenter.x+sin(fan)*bof.x;
tcoord.y = fcenter.y+cos(fan)*bof.y;
if ( distance(coord,tcoord) < 0.01 ) res.rgb = float3(1,0,0);
if ( distance(coord,tcoord) < 0.005 ) res.rgb = float3(1,0,0);
tcoord.x = fcenter.x+sin(fan+2.0*pi*cstep)*bof.x;
tcoord.y = fcenter.y+cos(fan+2.0*pi*cstep)*bof.y;
if ( distance(coord,tcoord) < 0.01 ) res.rgb = float3(1,0,0);
if ( distance(coord,tcoord) < 0.005 ) res.rgb = float3(1,0,0);
tcoord.x = fcenter.x+sin(fan+4.0*pi*cstep)*bof.x;
tcoord.y = fcenter.y+cos(fan+4.0*pi*cstep)*bof.y;
if ( distance(coord,tcoord) < 0.01 ) res.rgb = float3(1,0,0);
if ( distance(coord,tcoord) < 0.005 ) res.rgb = float3(1,0,0);
return res;
}
technique ReadFocus
@ -592,7 +636,7 @@ technique WriteFocus
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess <string UIName="MariENB Bilateral Blur DoF";>
technique PostProcess
{
pass p0
{
@ -682,7 +726,7 @@ technique PostProcess6
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DoFBlurH();
PixelShader = compile ps_3_0 PS_DoFGather();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
@ -699,7 +743,7 @@ technique PostProcess7
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DoFBlurV();
PixelShader = compile ps_3_0 PS_DoFPostBlur();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
@ -728,7 +772,8 @@ technique PostProcess8
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG <string UIName="MariENB Gather Blur DoF";>
technique PostProcessB <string UIName="Bokeh (WIP)";>
{
pass p0
{
@ -745,7 +790,7 @@ technique PostProcessG <string UIName="MariENB Gather Blur DoF";>
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG2
technique PostProcessB2
{
pass p0
{
@ -762,7 +807,7 @@ technique PostProcessG2
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG3
technique PostProcessB3
{
pass p0
{
@ -779,7 +824,7 @@ technique PostProcessG3
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG4
technique PostProcessB4
{
pass p0
{
@ -796,7 +841,7 @@ technique PostProcessG4
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG5
technique PostProcessB5
{
pass p0
{
@ -813,12 +858,12 @@ technique PostProcessG5
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG6
technique PostProcessB6
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DoFGather();
PixelShader = compile ps_3_0 PS_DoFBorkeh();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
@ -830,7 +875,24 @@ technique PostProcessG6
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessG8
technique PostProcessB7
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DoFPostBlur();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcessB8
{
pass p0
{

View file

@ -1,6 +1,6 @@
/*
menbprepassinternals.fx : MariENB prepass internal variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -34,7 +34,7 @@ static const float gauss16[16] =
0.026131, 0.024268, 0.022405, 0.020563
};
/* SSAO samples */
static const float3 ssao_samples_lq[16] =
static const float3 ssao_samples[16] =
{
float3( 0.0000,-0.0002, 0.0000),float3(-0.0004, 0.0013, 0.0014),
float3(-0.0030, 0.0048,-0.0034),float3( 0.0147, 0.0046,-0.0026),
@ -45,41 +45,6 @@ static const float3 ssao_samples_lq[16] =
float3( 0.0072,-0.3534, 0.4035),float3(-0.0024,-0.2385, 0.6260),
float3(-0.1940, 0.5722,-0.5602),float3(-0.0910,-0.7548,-0.6497)
};
static const float3 ssao_samples_hq[64] =
{
float3( 0.0000,-0.0000,-0.0000),float3( 0.0000, 0.0000,-0.0000),
float3( 0.0001,-0.0000,-0.0000),float3( 0.0002, 0.0001,-0.0001),
float3(-0.0000,-0.0005, 0.0000),float3( 0.0004,-0.0004,-0.0006),
float3( 0.0005,-0.0011,-0.0004),float3(-0.0000, 0.0013,-0.0014),
float3( 0.0024, 0.0006, 0.0013),float3(-0.0017,-0.0017, 0.0030),
float3(-0.0037, 0.0033,-0.0011),float3( 0.0010, 0.0018,-0.0063),
float3( 0.0059, 0.0056,-0.0020),float3(-0.0009, 0.0083,-0.0063),
float3(-0.0110, 0.0065,-0.0016),float3( 0.0089, 0.0070,-0.0108),
float3(-0.0115,-0.0134,-0.0062),float3(-0.0121,-0.0172, 0.0071),
float3(-0.0066, 0.0246,-0.0060),float3( 0.0057,-0.0279, 0.0109),
float3(-0.0269,-0.0160,-0.0164),float3( 0.0402, 0.0045, 0.0034),
float3( 0.0248,-0.0045, 0.0390),float3( 0.0110,-0.0491,-0.0159),
float3(-0.0193,-0.0431, 0.0363),float3( 0.0441, 0.0271,-0.0426),
float3( 0.0385,-0.0428,-0.0482),float3(-0.0623,-0.0501, 0.0249),
float3( 0.0683,-0.0000, 0.0631),float3( 0.1008, 0.0180,-0.0114),
float3(-0.0156,-0.0713, 0.0871),float3(-0.0561,-0.0757, 0.0822),
float3( 0.0714, 0.0850,-0.0805),float3(-0.1320,-0.0042, 0.0711),
float3( 0.1553, 0.0486,-0.0167),float3(-0.1164,-0.0125,-0.1341),
float3( 0.1380,-0.1230,-0.0562),float3( 0.0868,-0.1897,-0.0175),
float3( 0.0749, 0.1495, 0.1525),float3(-0.2038,-0.1324,-0.0235),
float3( 0.0205, 0.1920, 0.1784),float3( 0.1637,-0.0964,-0.2092),
float3( 0.2875, 0.0966,-0.0020),float3( 0.0572,-0.0180,-0.3194),
float3(-0.3329, 0.0981,-0.0189),float3( 0.2627, 0.2092,-0.1585),
float3( 0.1783,-0.3359,-0.1108),float3( 0.2675, 0.2056,-0.2533),
float3(-0.1852, 0.3017,-0.2759),float3(-0.0944, 0.3532, 0.3061),
float3(-0.0022,-0.3744, 0.3404),float3(-0.0600,-0.4031,-0.3487),
float3(-0.2663, 0.4915, 0.1004),float3(-0.2442, 0.4253, 0.3468),
float3( 0.2583, 0.1321,-0.5645),float3(-0.0219, 0.4516, 0.4943),
float3(-0.5503, 0.2597,-0.3590),float3( 0.2239,-0.5571,-0.4398),
float3(-0.7210,-0.1982, 0.2339),float3( 0.7948,-0.1848, 0.1145),
float3(-0.7190, 0.1767, 0.4489),float3(-0.5617, 0.5845,-0.4116),
float3(-0.8919,-0.0384, 0.3360),float3(-0.0144, 0.9775,-0.2105)
};
/* For high quality DOF */
static const float2 poisson32[32] =
{

View file

@ -1,6 +1,6 @@
/*
menbprepasssettings.fx : MariENB prepass user-tweakable variables.
(C)2013-2016 Marisa Kirisame, UnSX Team.
(C)2013-2017 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
@ -240,22 +240,28 @@ bool frostalways
string UIWidget = "Checkbox";
> = {false};
string str_focus = "Focusing Parameters";
/* circle (triangle, actually) average focus */
bool focuscircle
/*
focus modes:
-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 = -1;
int UIMax = 2;
> = {1};
bool focusdisplay
<
string UIName = "Display Focus Points";
string UIWidget = "Checkbox";
> = {false};
bool focusmanual
<
string UIName = "Enable Manual Focus";
string UIWidget = "Checkbox";
> = {false};
float focusmanualvalue
<
string UIName = "Manual Focus Depth";
@ -375,7 +381,7 @@ float dofmult_id
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {500.0};
/* dof power (falloff, kinda) */
/* dof power (the higher it is, the wider the focused area gets) */
float dofpow_n
<
string UIName = "DOF Contrast Night";
@ -400,7 +406,7 @@ float dofpow_id
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {4.0};
/* dof bump (to emulate tilt shift I guess, I brought it back) */
/* dof bump (negative shift increases the area in complete focus) */
float dofbump_n
<
string UIName = "DOF Shift Night";
@ -613,29 +619,126 @@ bool doffixedcut
string UIName = "DOF Fixed Use Cutoff";
string UIWidget = "Checkbox";
> = {true};
/* fixed dof for foggy weathers */
bool doffogenable
<
string UIName = "Enable DOF Fog";
string UIWidget = "Checkbox";
> = {true};
float doffogmult_n
<
string UIName = "DOF Fog Intensity Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
float doffogmult_d
<
string UIName = "DOF Fog Intensity Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
float doffogmult_in
<
string UIName = "DOF Fog Intensity Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
float doffogmult_id
<
string UIName = "DOF Fog Intensity Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
float doffogpow_n
<
string UIName = "DOF Fog Contrast Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1000.0};
float doffogpow_d
<
string UIName = "DOF Fog Contrast Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1000.0};
float doffogpow_in
<
string UIName = "DOF Fog Contrast Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1000.0};
float doffogpow_id
<
string UIName = "DOF Fog Contrast Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1000.0};
float doffogbump_n
<
string UIName = "DOF Fog Shift Night";
string UIWidget = "Spinner";
> = {0.0};
float doffogbump_d
<
string UIName = "DOF Fog Shift Day";
string UIWidget = "Spinner";
> = {0.0};
float doffogbump_in
<
string UIName = "DOF Fog Shift Interior Night";
string UIWidget = "Spinner";
> = {0.0};
float doffogbump_id
<
string UIName = "DOF Fog Shift Interior Day";
string UIWidget = "Spinner";
> = {0.0};
float doffogblend_n
<
string UIName = "DOF Fog Blend Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float doffogblend_d
<
string UIName = "DOF Fog Blend Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float doffogblend_in
<
string UIName = "DOF Fog Blend Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float doffogblend_id
<
string UIName = "DOF Fog Blend Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
/* disable depth of field */
bool dofdisable
<
string UIName = "Disable DOF";
string UIWidget = "Checkbox";
> = {false};
float dofbfact
bool doffixedonly
<
string UIName = "DOF Bilateral Factor";
string UIWidget = "Spinner";
> = {20.0};
float dofbradius
string UIName = "Use Only Fixed DOF";
string UIWidget = "Checkbox";
> = {false};
float dofpradius
<
string UIName = "DOF Blur Radius";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dofpradius
<
string UIName = "DOF Gather Blur Radius";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {6.0};
float dofpcha
<
string UIName = "DOF Blur Chromatic Aberration";
string UIWidget = "Spinner";
> = {0.0};
#ifndef FALLOUT
bool dofrelfov
<
@ -670,6 +773,31 @@ float relfovfactor_id
string UIWidget = "Spinner";
> = {2.0};
#endif
/* tilting */
float doftiltxcenter
<
string UIName = "Focus Plane Horizontal Tilt Center";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.5};
float doftiltycenter
<
string UIName = "Focus Plane Vertical Tilt Center";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.5};
float doftiltx
<
string UIName = "Focus Plane Horizontal Tilt";
string UIWidget = "Spinner";
> = {0.0};
float doftilty
<
string UIName = "Focus Plane Vertical Tilt";
string UIWidget = "Spinner";
> = {0.0};
/* cheap performance option */
float dofminblur
<
@ -880,16 +1008,6 @@ bool ssaodebug
string UIName = "Debug SSAO";
string UIWidget = "Checkbox";
> = {false};
bool ssaoquarter
<
string UIName = "SSAO Use Less Samples";
string UIWidget = "Checkbox";
> = {true};
bool ssaohalfblur
<
string UIName = "SSAO Blur Use Less Samples";
string UIWidget = "Checkbox";
> = {true};
/* luma sharpen because of reasons */
string str_sharp = "Luma Sharpen";
bool sharpenable

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 492 KiB

Before After
Before After