1
Fork 0

MariENB DUST 2.5.0

This commit is contained in:
Marisa the Magician 2019-04-07 17:37:01 +02:00
commit 486f144495
16 changed files with 1162 additions and 218 deletions

View file

@ -18,9 +18,9 @@ Brightness=1.0
GammaCurve=1.0
[NIGHTDAY]
DetectorDefaultDay=false
DetectorLevelDay=0.75
DetectorLevelNight=0.25
DetectorLevelCurve=1.0
DetectorLevelDay=0.6
DetectorLevelNight=0.2
DetectorLevelCurve=0.5
[ADAPTATION]
ForceMinMaxValues=false
AdaptationSensitivity=0.2
@ -70,59 +70,59 @@ AOMixingType=2
AOMixingTypeInterior=3
EnableDenoiser=true
[ENVIRONMENT]
LightingIntensityDay=1.13
LightingIntensityNight=1.16
LightingIntensityDay=1.15
LightingIntensityNight=1.14
LightingIntensityInterior=1.21
LightingCurveDay=1.43
LightingCurveNight=1.29
LightingCurveInterior=1.13
LightingDesaturationDay=0.19
LightingDesaturationDay=0.18
LightingDesaturationNight=0.12
LightingDesaturationInterior=0.24
AmbientLightingIntensityDay=0.72
AmbientLightingIntensityNight=0.48
AmbientLightingIntensityInterior=0.82
AmbientLightingIntensityNight=0.49
AmbientLightingIntensityInterior=0.61
AmbientLightingCurveDay=1.2
AmbientLightingCurveNight=1.24
AmbientLightingCurveInterior=1.18
AmbientLightingCurveInterior=1.32
AmbientLightingDesaturationDay=0.08
AmbientLightingDesaturationNight=0.04
AmbientLightingDesaturationInterior=0.02
FogColorMultiplierDay=0.91
FogColorMultiplierNight=0.87
FogColorMultiplierInterior=0.95
FogColorCurveDay=1.04
FogColorCurveNight=1.11
FogColorCurveInterior=1.09
FogColorMultiplierDay=0.94
FogColorMultiplierNight=0.78
FogColorMultiplierInterior=0.82
FogColorCurveDay=0.95
FogColorCurveNight=1.23
FogColorCurveInterior=1.17
[SKY]
Enable=true
StarsIntensity=0.39
StarsCurve=1.57
CloudsIntensityDay=1.02
CloudsIntensityNight=0.91
CloudsCurveDay=1.07
CloudsIntensityDay=1.170001
CloudsIntensityNight=0.55
CloudsCurveDay=0.99
CloudsCurveNight=1.21
CloudsDesaturationDay=0.17
CloudsDesaturationNight=0.14
CloudsDesaturationDay=0.18
CloudsDesaturationNight=0.05
CloudsEdgeClamp=0.5
CloudsEdgeIntensity=1.0
GradientIntensityDay=1.08
GradientIntensityNight=0.92
GradientDesaturationDay=0.53
GradientDesaturationNight=0.25
GradientTopIntensityDay=0.86
GradientIntensityDay=1.17
GradientIntensityNight=0.71
GradientDesaturationDay=0.33
GradientDesaturationNight=0.09
GradientTopIntensityDay=1.13
GradientTopIntensityNight=0.79
GradientTopCurveDay=0.85
GradientTopCurveDay=0.82
GradientTopCurveNight=1.04
GradientMiddleIntensityDay=0.97
GradientMiddleIntensityDay=1.03
GradientMiddleIntensityNight=0.92
GradientMiddleCurveDay=0.98
GradientMiddleCurveDay=1.05
GradientMiddleCurveNight=1.05
GradientHorizonIntensityDay=1.09
GradientHorizonIntensityDay=1.1
GradientHorizonIntensityNight=1.11
GradientHorizonCurveDay=1.02
GradientHorizonCurveNight=1.03
SunIntensity=1.7
SunIntensity=3.79
SunDesaturation=0.0
SunCoronaIntensity=0.001
SunCoronaCurve=1.0
@ -137,4 +137,4 @@ FadeTime=0.4
DetailedShadowQuality=1
ShadowDesaturation=0.0
[RAYS]
SunRaysMultiplier=0.31
SunRaysMultiplier=0.35

View file

@ -1 +1 @@
2.4.2-1 "Return to DUST"
2.5.0-1 "Begin Again"

View file

@ -46,3 +46,17 @@ Chroma Key Depth Vertical Tilt=0.0
Enable Black Bars=false
Box Horizontal Ratio=2.39
Box Vertical Ratio=1.0
Enable Vignette=false
Enable Border Blur=false
Vignette Shape=0
Vignette Blending Mode=0
Vignette Contrast=1.0
Vignette Intensity=1.0
Vignette Shift=0.0
Vignette Color Red=0.0
Vignette Color Green=0.0
Vignette Color Blue=0.0
Border Blur Contrast=1.0
Border Blur Intensity=1.0
Border Blur Shift=0.0
Border Blur Radius=1.0

View file

@ -1,11 +1,11 @@
[ENBBLOOM.FX]
TECHNIQUE=0
Bloom Intensity Night=0.38
Bloom Intensity Day=0.46
Bloom Intensity Day=0.48
Bloom Intensity Interior Night=0.28
Bloom Intensity Interior Day=0.28
Bloom Contrast Night=1.01
Bloom Contrast Day=1.05
Bloom Contrast Day=1.04
Bloom Contrast Interior Night=1.03
Bloom Contrast Interior Day=1.03
Bloom Saturation Night=1.22

View file

@ -20,11 +20,11 @@ Grain Pass 2 Magnification 3=6.29
Grain Contrast=4.63
Enable Adaptation=true
Adaptation Min Night=0.69
Adaptation Min Day=0.82
Adaptation Min Day=0.8
Adaptation Min Interior Night=0.72
Adaptation Min Interior Day=0.72
Adaptation Max Night=1.7
Adaptation Max Day=1.96
Adaptation Max Day=1.97
Adaptation Max Interior Night=1.83
Adaptation Max Interior Day=1.83
Enable Tonemapping=true
@ -99,30 +99,30 @@ 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.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 Intensity Night=1.11
Grading Saturation Intensity Day=1.09
Grading Saturation Intensity Interior Night=1.12
Grading Saturation Intensity Interior Day=1.12
Grading Saturation Contrast Night=1.41
Grading Saturation Contrast Day=1.34
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 Intensity Night=0.84
Grading Value Intensity Day=0.82
Grading Value Intensity Interior Night=0.86
Grading Value Intensity Interior Day=0.86
Grading Value Contrast Night=1.18
Grading Value Contrast Day=1.26
Grading Value Contrast Day=1.25
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=0.93
Vanilla Vibrance Blend=0.91
Vanilla Contrast Blend=0.81
Vanilla Tint Blend=0.98
Vanilla Vibrance Blend=0.96
Vanilla Contrast Blend=0.84
Enable LUT Grading=true
LUT Blend Night=0.48
LUT Blend Day=0.41
LUT Blend Night=0.43
LUT Blend Day=0.32
LUT Blend Interior Night=0.37
LUT Blend Interior Day=0.37
Enable ENB Palette=false
@ -148,8 +148,8 @@ 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 Night=0.47
Uncharted2 Linear Angle Day=0.69
Uncharted2 Linear Angle Interior Night=0.55
Uncharted2 Linear Angle Interior Day=0.55
Uncharted2 Toe Strength Night=1.37
@ -164,10 +164,10 @@ 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
Uncharted2 Linear White Night=15.61
Uncharted2 Linear White Day=38.73
Uncharted2 Linear White Interior Night=27.370001
Uncharted2 Linear White Interior Day=27.370001
SweetFX Gamma Night=1.0
SweetFX Gamma Day=1.0
SweetFX Gamma Interior Night=1.0
@ -200,9 +200,9 @@ 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 Contrast=1.31
Vanilla Tint Strength=1.0
Vanilla Vibrance Contrast=1.14
Vanilla Vibrance Strength=1.0
Enable Technicolor=true
Technicolor Blend=0.65
Technicolor Blend=0.5

View file

@ -28,15 +28,15 @@ Heat Intensity=1.04
Heat Contrast=1.18
Heat Time-of-day Contrast=0.65
Heat Always Enable=false
Enable Screen Frost=false
Frost Contrast=1.08
Frost Strength=0.04
Frost Radial Contrast=0.87
Frost Radial Intensity=1.11
Frost Radial Offset=-0.93
Frost Texture Blend=3.79
Frost Texture Blend Contrast=4.56
Frost Texture Size=1.0
Enable Screen Frost=true
Frost Contrast=1.22
Frost Strength=0.15
Frost Radial Contrast=1.93
Frost Radial Intensity=1.32
Frost Radial Offset=-1.22
Frost Texture Blend=1.24
Frost Texture Blend Contrast=4.36
Frost Texture Size=0.85
Frost Indoor Factor=0.0
Frost Night Factor=0.5
Frost Always Enable=false
@ -44,8 +44,8 @@ Enable Focus Triangle=true
Display Focus Points=false
Enable Manual Focus=false
Manual Focus Depth=1.0
Focus Point Center X=0.5
Focus Point Center Y=0.5
Focus Point Center X=50.0
Focus Point Center Y=50.0
Focus Triangle Angle=0.5
Focus Triangle Radius Night=6.0
Focus Triangle Radius Day=10.0
@ -89,23 +89,23 @@ DOF Fixed Focus Blend Interior Night=0.0
DOF Fixed Focus Blend Interior Day=0.0
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 Intensity Interior Night=1.24
DOF Fixed Unfocus Intensity Interior Day=1.24
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=-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 Shift Interior Night=-1.04
DOF Fixed Unfocus Shift Interior Day=-1.04
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=false
Disable DOF=false
DOF Gather Blur Radius=12.0
DOF Gather Blur Radius=8.0
Debug Depth=false
Debug Focus=false
Enable Edgevision=false
@ -144,8 +144,8 @@ SSAO Use Less Samples=true
SSAO Blur Use Less Samples=true
Sharpen Enable=true
Sharpen Radius=0.8
Sharpen Clamp=0.12
Sharpen Blending=6.0
Sharpen Clamp=0.1
Sharpen Blending=8.0
DOF Bilateral Factor=20.0
DOF Blur Radius=8.0
DOF Minimum Blur=0.01
@ -168,8 +168,104 @@ 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
DOF Blur Chromatic Aberration=2.37
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
Heat Factor Night=-0.88
Heat Factor Day=1.1
Heat Factor Interior Night=0.0
Heat Factor Interior Day=0.0
Frost Factor Night=1.27
Frost Factor Day=-1.36
Frost Factor Interior Night=0.0
Frost Factor Interior Day=0.0
DOF Fixed Focus Depth=0.0
DOF Fixed Focus Cap=0.0
DOF Fixed Unfocus Depth=0.0
Enable DOF Post-Blur=true
DOF Post-Blur Radius=1.0
Enable DOF Highlights=true
DOF Highlight Threshold=0.45
DOF Highlight Gain=2.39
DOF Bokeh Blur Radius=1.91
DOF Bokeh Edge Bias=0.74
DOF Bokeh Fuzz=0.1
Depth Grading Center Depth=0.0
Depth Grading Contrast Night=230.529999
Depth Grading Contrast Day=263.980011
Depth Grading Contrast Interior Night=244.149994
Depth Grading Contrast Interior Day=244.149994
Depth Grading Intensity Night=1.47
Depth Grading Intensity Day=1.35
Depth Grading Intensity Interior Night=1.64
Depth Grading Intensity Interior Day=1.64
Depth Grading Shift Night=-0.66
Depth Grading Shift Day=-0.82
Depth Grading Shift Interior Night=-0.47
Depth Grading Shift Interior Day=-0.47
Depth Grading Blend Night=1.0
Depth Grading Blend Day=1.0
Depth Grading Blend Interior Night=1.0
Depth Grading Blend Interior Day=1.0
Enable RGB Grading=true
Grading Intensity Night Red=0.94
Grading Intensity Night Green=0.97
Grading Intensity Night Blue=1.02
Grading Intensity Day Red=1.07
Grading Intensity Day Green=0.98
Grading Intensity Day Blue=0.89
Grading Intensity Interior Night Red=1.02
Grading Intensity Interior Night Green=0.99
Grading Intensity Interior Night Blue=0.95
Grading Intensity Interior Day Red=1.02
Grading Intensity Interior Day Green=0.99
Grading Intensity Interior Day Blue=0.95
Grading Contrast Night Red=1.06
Grading Contrast Night Green=0.99
Grading Contrast Night Blue=0.93
Grading Contrast Day Red=0.87
Grading Contrast Day Green=0.95
Grading Contrast Day Blue=1.02
Grading Contrast Interior Night Red=1.01
Grading Contrast Interior Night Green=0.92
Grading Contrast Interior Night Blue=0.89
Grading Contrast Interior Day Red=1.01
Grading Contrast Interior Day Green=0.92
Grading Contrast Interior Day Blue=0.89
Enable Vibrance Grading=true
Grading Color Night Red=-0.54
Grading Color Night Green=-0.21
Grading Color Night Blue=-0.92
Grading Color Day Red=-0.57
Grading Color Day Green=-0.36
Grading Color Day Blue=-0.79
Grading Color Interior Night Red=-0.86
Grading Color Interior Night Green=-0.32
Grading Color Interior Night Blue=-0.42
Grading Color Interior Day Red=-0.86
Grading Color Interior Day Green=-0.32
Grading Color Interior Day Blue=-0.42
Grading Color Factor Night=-0.18
Grading Color Factor Day=-0.25
Grading Color Factor Interior Night=-0.11
Grading Color Factor Interior Day=-0.11
Enable HSV Grading=true
Grading Saturation Intensity Night=1.09
Grading Saturation Intensity Day=1.05
Grading Saturation Intensity Interior Night=1.11
Grading Saturation Intensity Interior Day=1.11
Grading Saturation Contrast Night=1.36
Grading Saturation Contrast Day=1.27
Grading Saturation Contrast Interior Night=1.17
Grading Saturation Contrast Interior Day=1.17
Grading Value Intensity Night=0.44
Grading Value Intensity Day=0.65
Grading Value Intensity Interior Night=0.32
Grading Value Intensity Interior Day=0.32
Grading Value Contrast Night=0.75
Grading Value Contrast Day=0.65
Grading Value Contrast Interior Night=0.79
Grading Value Contrast Interior Day=0.79
Colorize After HSV=true

View file

@ -391,12 +391,10 @@ float3 GradingGame( float3 res )
float3 GradingLUT( float3 res )
{
/*
gross hacks were needed to "fix" the way direct3d interpolates on
sampling, and to manually interpolate on the blue channel
this could be alleviated if I could have all the LUTs as 64 separate
volume maps, but PS 3.0 has a limit of 16 samplers and I think ENB
can't load volume maps anyway.
Gross hacks were needed to "fix" the way direct3d interpolates on
sampling, and to manually interpolate on the blue channel.
This could be removed if I could have the LUTs as volume maps, but
I think ENB doesn't support those.
*/
#ifdef LUTMODE_LEGACY
float3 tcol = clamp(res,0.08,0.92);
@ -405,17 +403,17 @@ float3 GradingLUT( float3 res )
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);
/* 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));
float3 tcl1_n = tex2D(SamplerLUT,lc1+float2(0,clut_n/64.0)).rgb;
float3 tcl2_n = tex2D(SamplerLUT,lc2+float2(0,clut_n/64.0)).rgb;
/* 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));
float3 tcl1_d = tex2D(SamplerLUT,lc1+float2(0,clut_d/64.0)).rgb;
float3 tcl2_d = tex2D(SamplerLUT,lc2+float2(0,clut_d/64.0)).rgb;
/* 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));
float3 tcl1_in = tex2D(SamplerLUT,lc1+float2(0,clut_in/64.0)).rgb;
float3 tcl2_in = tex2D(SamplerLUT,lc2+float2(0,clut_in/64.0)).rgb;
/* 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));
float3 tcl1_id = tex2D(SamplerLUT,lc1+float2(0,clut_id/64.0)).rgb;
float3 tcl2_id = tex2D(SamplerLUT,lc2+float2(0,clut_id/64.0)).rgb;
#else
#ifdef LUTMODE_16
float3 tcol = clamp(res,0.08,0.92);
@ -432,17 +430,17 @@ float3 GradingLUT( float3 res )
float dec = (ceil(tcol.b*64.0)==64.0)?(0.0):frac(tcol.b*64.0);
#endif
/* night samples */
float3 tcl1_n = tex2D(SamplerLUTN,lc1);
float3 tcl2_n = tex2D(SamplerLUTN,lc2);
float3 tcl1_n = tex2D(SamplerLUTN,lc1).rgb;
float3 tcl2_n = tex2D(SamplerLUTN,lc2).rgb;
/* day samples */
float3 tcl1_d = tex2D(SamplerLUTD,lc1);
float3 tcl2_d = tex2D(SamplerLUTD,lc2);
float3 tcl1_d = tex2D(SamplerLUTD,lc1).rgb;
float3 tcl2_d = tex2D(SamplerLUTD,lc2).rgb;
/* interior night samples */
float3 tcl1_in = tex2D(SamplerLUTIN,lc1);
float3 tcl2_in = tex2D(SamplerLUTIN,lc2);
float3 tcl1_in = tex2D(SamplerLUTIN,lc1).rgb;
float3 tcl2_in = tex2D(SamplerLUTIN,lc2).rgb;
/* interior day samples */
float3 tcl1_id = tex2D(SamplerLUTID,lc1);
float3 tcl2_id = tex2D(SamplerLUTID,lc2);
float3 tcl1_id = tex2D(SamplerLUTID,lc1).rgb;
float3 tcl2_id = tex2D(SamplerLUTID,lc2).rgb;
#endif
float3 tcl1 = tod_ind(tcl1);
float3 tcl2 = tod_ind(tcl2);

View file

@ -40,6 +40,7 @@ float4 Timer;
float ENightDayFactor;
float EInteriorFactor;
float EBloomAmount;
float4 WeatherAndTime;
/* samplers and textures */
texture2D texs0;
texture2D texs1;

View file

@ -169,6 +169,16 @@ float amax_id
> = {1.0};
/* tone mapping */
string str_tonemap = "Tone Mapping";
/*
algorithms:
-1 : Disabled
0 : Linear
1 : Reinhard
2 : Uncharted 2
3 : Hejl Dawson
4 : Haarm-Peter Duiker
5 : SweetFX
*/
int tmapenable
<
string UIName = "Tonemapping Method";

View file

@ -215,6 +215,69 @@ float4 PS_Shift( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
res.a = 1.0;
return res;
}
/* vignette filtering */
float4 PS_Vignette( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
float4 vigdata = float4(0,0,0,0);
if ( vigshape == 0 )
{
/* circular vignette */
float2 uv = ((coord-0.5)*float2(1.0,ScreenSize.w))*2.0;
vigdata.a = dot(uv,uv);
vigdata.a = clamp(pow(vigdata.a,vigpow)*vigmul+vigbump,
0.0,1.0);
vigdata.rgb = float3(vigcolor_r,vigcolor_g,vigcolor_b);
}
else if ( vigshape == 1 )
{
/* box vignette */
float2 uv = coord.xy*(1.0-coord.yx)*4.0;
vigdata.a = 1.0-(uv.x*uv.y);
vigdata.a = clamp(pow(vigdata.a,vigpow)*vigmul+vigbump,
0.0,1.0);
vigdata.rgb = float3(vigcolor_r,vigcolor_g,vigcolor_b);
}
else
{
/* textured vignette (rgb = color, alpha = blend) */
vigdata = tex2D(SamplerVignette,coord);
}
/* apply blur */
if ( bblurenable )
{
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float bfact = clamp(pow(max(vigdata.a,0.0),bblurpow)*bblurmul
+bblurbump,0.0,1.0);
float2 bof = (1.0/bresl)*bblurradius*bfact;
res.rgb *= 0;
int i,j;
[unroll] for ( i=-3; i<4; i++ ) [unroll] for ( j=-3; j<4; j++ )
res.rgb += gauss4[abs(i)]*gauss4[abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)*bof);
}
/* apply color */
if ( vigenable )
{
float3 outcol;
if ( vigmode == 0 )
outcol = vigdata.rgb;
else if ( vigmode == 1 )
outcol = res.rgb+vigdata.rgb;
else if ( vigmode == 2 )
outcol = res.rgb*vigdata.rgb;
res.rgb = lerp(res.rgb,outcol,vigdata.a);
}
return clamp(res,0.0,1.0);
}
/* TODO paint filter */
/*float4 PS_Oily( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
return res;
}*/
/* ultimate super-cinematic immersive black bars */
float4 PS_Cinematic( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
@ -302,6 +365,24 @@ technique PostProcess4
}
}
technique PostProcess5
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Vignette();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
/* Paint will go between these two */
technique PostProcess6
{
pass p0
{
@ -318,7 +399,7 @@ technique PostProcess5
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess6
technique PostProcess7
{
pass p0
{

View file

@ -4,6 +4,12 @@
Part of MariENB, the personal ENB of Marisa.
Released under the GNU GPLv3 (or later).
*/
/* gaussian blur matrices */
/* radius: 4, std dev: 1.5 */
static const float gauss4[4] =
{
0.270682, 0.216745, 0.111281, 0.036633
};
/*
dithering threshold maps
don't touch unless you know what you're doing
@ -52,6 +58,14 @@ texture2D texVGA
<
string ResourceName = "menbvgalut.png";
>;
texture2D texVignette
<
#ifdef VIGNETTE_DDS
string ResourceName = "menbvignette.dds";
#else
string ResourceName = "menbvignette.png";
#endif
>;
sampler2D SamplerColor = sampler_state
{
Texture = <texColor>;
@ -124,6 +138,18 @@ sampler2D SamplerVGA = sampler_state
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerVignette = sampler_state
{
Texture = <texVignette>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
/* whatever */
struct VS_OUTPUT_POST
{

View file

@ -260,3 +260,86 @@ float boxv
string UIWidget = "Spinner";
float UIMin = 1.0;
> = {1.0};
/* vignette */
string str_vignette = "Vignette with border blur";
bool vigenable
<
string UIName = "Enable Vignette";
string UIWidget = "Checkbox";
> = {false};
bool bblurenable
<
string UIName = "Enable Border Blur";
string UIWidget = "Checkbox";
> = {false};
/* 0 = circle, 1 = box, 2 = texture */
int vigshape
<
string UIName = "Vignette Shape";
string UIWidget = "Spinner";
int UIMin = 0;
int UIMax = 2;
> = {0};
/* 0 = overwrite, 1 = add, 2 = multiply */
int vigmode
<
string UIName = "Vignette Blending Mode";
string UIWidget = "Spinner";
int UIMin = 0;
int UIMax = 2;
> = {0};
float vigpow
<
string UIName = "Vignette Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float vigmul
<
string UIName = "Vignette Intensity";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float vigbump
<
string UIName = "Vignette Shift";
string UIWidget = "Spinner";
> = {0.0};
float vigcolor_r
<
string UIName = "Vignette Color Red";
string UIWidget = "Spinner";
> = {0.0};
float vigcolor_g
<
string UIName = "Vignette Color Green";
string UIWidget = "Spinner";
> = {0.0};
float vigcolor_b
<
string UIName = "Vignette Color Blue";
string UIWidget = "Spinner";
> = {0.0};
float bblurpow
<
string UIName = "Border Blur Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float bblurmul
<
string UIName = "Border Blur Intensity";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float bblurbump
<
string UIName = "Border Blur Shift";
string UIWidget = "Spinner";
> = {0.0};
float bblurradius
<
string UIName = "Border Blur Radius";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};

View file

@ -9,21 +9,9 @@
/* are we running on fallout 3 / new vegas or on skyrim? */
#define FALLOUT
/* time of day and interior interpolation */
#ifdef FALLOUT
#define tod_ind(x) lerp(lerp(x##_n,x##_d,ENightDayFactor),\
(x##_in+x##_id)*0.5,EInteriorFactor)
#else
#define tod_ind(x) lerp(lerp(x##_n,x##_d,ENightDayFactor),\
lerp(x##_in,x##_id,ENightDayFactor),EInteriorFactor)
#endif
/* weather macros */
#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))
@ -39,19 +27,46 @@
?(1.0-WeatherAndTime.z) -> return inverse transition
:(0.0) -> otherwise return 0
*/
/* temperate no fog */
#define WT_NEUTRAL 0.0
#define WT_GENERAL 1.0
#define WT_FOREST 2.0
#define WT_DARK 3.0
/* cold no fog */
#define WT_COLD 4.0
#define WT_SPOOKY 5.0
/* warm no fog */
#define WT_WARM 6.0
/* temperate fog */
#define WT_GENERALFOG 7.0
#define WT_GENERALRAIN 8.0
#define WT_FORESTFOG 9.0
#define WT_FORESTRAIN 10.0
#define WT_DARKFOG 11.0
#define WT_DARKRAIN 12.0
/* cold fog */
#define WT_SPOOKYFOG 13.0
#define WT_COLDFOG 14.0
/* warm fog */
#define WT_WARMFOG 15.0
/* temperature and fog interpolation macros */
#define istemperate(x) (((x>=0.0)&&(x<=3.0))||((x>=7.0)&&(x<=12.0)))
#define iscold(x) (((x>=4.0)&&(x<=5.0))||((x>=13.0)&&(x<=14.0)))
#define iswarm(x) ((x==6.0)||(x==15.0))
#define isfog(x) ((x>=7.0)&&(x<=15.0))
#define temperatefactor (istemperate(WeatherAndTime.x)\
?istemperate(WeatherAndTime.y)?(1.0):(WeatherAndTime.z)\
:istemperate(WeatherAndTime.y)?(1.0-WeatherAndTime.z):(0.0))
#define coldfactor (iscold(WeatherAndTime.x)\
?iscold(WeatherAndTime.y)?(1.0):(WeatherAndTime.z)\
:iscold(WeatherAndTime.y)?(1.0-WeatherAndTime.z):(0.0))
#define warmfactor (iswarm(WeatherAndTime.x)\
?iswarm(WeatherAndTime.y)?(1.0):(WeatherAndTime.z)\
:iswarm(WeatherAndTime.y)?(1.0-WeatherAndTime.z):(0.0))
#define fogfactor (isfog(WeatherAndTime.x)\
?isfog(WeatherAndTime.y)?(1.0):(WeatherAndTime.z)\
:isfog(WeatherAndTime.y)?(1.0-WeatherAndTime.z):(0.0))
/* asset definitions */
/* ascii art font */
#define FONT_WIDTH 8
#define FONT_HEIGHT 4096
#define GLYPH_WIDTH 8
#define GLYPH_HEIGHT 16
#define FONT_LEVELS 255
/*
aspect correction for certain overlays
uncommented : the textures are 1:1 and must be corrected
commented : the textures are 16:9 or whatever ratio you use
*/
//#define ASPECT_LENSDIRT
/* texture sizes */
#define NOISESIZE 256.0
#define HEATSIZE 1024.0
@ -62,6 +77,6 @@
#define LUTMODE_64
/* some textures can be provided as DDS rather than PNG to save space */
//#define HEAT_DDS
//#define LENSDIRT_DDS
//#define FROST_DDS
//#define FROSTBUMP_DDS
//#define FROSTBUMP_DDS
//#define VIGNETTE_DDS

View file

@ -16,12 +16,84 @@ VS_OUTPUT_POST VS_Pass( VS_INPUT_POST IN )
#define luminance(x) dot(x,float3(0.2126,0.7152,0.0722))
/* CCIR601 */
//#define luminance(x) dot(x,float3(0.299,0.587,0.114))
/* these are znear/zfar values for Skyrim, but MAY match Fallout too */
float3 rgb2hsv( float3 c )
{
float4 K = float4(0.0,-1.0/3.0,2.0/3.0,-1.0);
float4 p = (c.g<c.b)?float4(c.bg,K.wz):float4(c.gb,K.xy);
float4 q = (c.r<p.x)?float4(p.xyw,c.r):float4(c.r,p.yzx);
float d = q.x-min(q.w,q.y);
float e = 1.0e-10;
return float3(abs(q.z+(q.w-q.y)/(6.0*d+e)),d/(q.x+e),q.x);
}
float3 hsv2rgb( float3 c )
{
float4 K = float4(1.0,2.0/3.0,1.0/3.0,3.0);
float3 p = abs(frac(c.x+K.xyz)*6.0-K.w);
return c.z*lerp(K.x,saturate(p-K.x),c.y);
}
float depthlinear( float2 coord )
{
float z = tex2D(SamplerDepth,coord).x;
return (2*zNear)/(zFar+zNear-z*(zFar-zNear));
}
/* Colour grading based on depth */
float3 DepthGradeRGB( float3 res, float dfc )
{
float dgrademul_r = tod_ind(dgrademul_r);
float dgrademul_g = tod_ind(dgrademul_g);
float dgrademul_b = tod_ind(dgrademul_b);
float dgradepow_r = tod_ind(dgradepow_r);
float dgradepow_g = tod_ind(dgradepow_g);
float dgradepow_b = tod_ind(dgradepow_b);
float3 dgrademul = float3(dgrademul_r,dgrademul_g,dgrademul_b);
float3 dgradepow = float3(dgradepow_r,dgradepow_g,dgradepow_b);
return lerp(res,pow(max(0,res),dgradepow)*dgrademul,dfc);
}
float3 DepthGradeColor( float3 res, float dfc )
{
float dgradecol_r = tod_ind(dgradecol_r);
float dgradecol_g = tod_ind(dgradecol_g);
float dgradecol_b = tod_ind(dgradecol_b);
float dgradecolfact = tod_ind(dgradecolfact);
float3 dgradecol = float3(dgradecol_r,dgradecol_g,dgradecol_b);
float tonev = luminance(res);
float3 tonecolor = dgradecol*tonev;
return lerp(res,res*(1.0-dgradecolfact)+tonecolor*dgradecolfact,dfc);
}
float3 DepthGradeHSV( float3 res, float dfc )
{
float dgradesatmul = tod_ind(dgradesatmul);
float dgradesatpow = tod_ind(dgradesatpow);
float dgradevalmul = tod_ind(dgradevalmul);
float dgradevalpow = tod_ind(dgradevalpow);
float3 hsv = rgb2hsv(res);
hsv.y = clamp(pow(max(0,hsv.y),dgradesatpow)*dgradesatmul,0.0,1.0);
hsv.z = pow(max(0,hsv.z),dgradevalpow)*dgradevalmul;
return lerp(res,hsv2rgb(hsv),dfc);
}
float3 DepthGrade( float3 res, float2 coord )
{
float dep = tex2D(SamplerDepth,coord).x;
float dfc = abs(dep-dgradedfoc*0.001);
float dgradedpow = tod_ind(dgradedpow);
float dgradedmul = tod_ind(dgradedmul);
float dgradedbump = tod_ind(dgradedbump);
float dgradedblend = tod_ind(dgradedblend);
dfc = clamp(pow(dfc,dgradedpow)*dgradedmul+dgradedbump,0.0,1.0)
*dgradedblend;
if ( dgradeenable1 ) res = DepthGradeRGB(res,dfc);
if ( dcolorizeafterhsv )
{
if ( dgradeenable3 ) res = DepthGradeHSV(res,dfc);
if ( dgradeenable2 ) res = DepthGradeColor(res,dfc);
}
else
{
if ( dgradeenable2 ) res = DepthGradeColor(res,dfc);
if ( dgradeenable3 ) res = DepthGradeHSV(res,dfc);
}
return res;
}
/* That "luma sharpen" thingy, added just because someone might want it */
float3 Sharpen( float3 res, float2 coord )
{
@ -104,12 +176,13 @@ float3 pseudonormal( float dep, float2 coord )
normal.z = -normal.z;
return normalize(normal);
}
/* Squeezed in are Edgevision and Sharpen and ssao prepass */
/* Squeezed in are Depth Grading, Edgevision, Sharpen and ssao prepass */
float4 PS_EdgePlusSSAOPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
if ( sharpenable ) res.rgb = Sharpen(res.rgb,coord);
res.rgb = DepthGrade(res.rgb,coord);
if ( edgevenable ) res.rgb = EdgeView(res.rgb,coord);
/* get occlusion using single-step Ray Marching with 64 samples */
float ssaofadepow = tod_ind(ssaofadepow);
@ -178,10 +251,6 @@ 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*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);
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 nc = coord*(bresl/HEATSIZE)*heatsize;
@ -189,10 +258,9 @@ float2 DistantHeat( float2 coord )
float2 ofs = tex2D(SamplerHeat,nc+ts).xy;
ofs = (ofs-0.5)*2.0;
ofs *= pow(length(ofs),heatpow);
if ( !heatalways ) ofs *= todpow
if ( !heatalways ) ofs *= max(tod_ind(heatfactor),0.0)
#ifndef FALLOUT
*max(0.0,(weatherfactor(WT_HOT)+weatherfactor(WT_HOT_FOG))
-(weatherfactor(WT_COLD)+weatherfactor(WT_COLD_FOG)))
*max(0.0,warmfactor-coldfactor)
#endif
;
odep = tex2D(SamplerDepth,coord+ofs*heatstrength*distfade*0.01).x;
@ -288,9 +356,9 @@ 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 ( focuscircle < 0 ) return focusmanualvalue;
if ( focuscircle < 0 ) return focusmanualvalue*0.001;
float focusmax = tod_ind(focusmax);
float2 fcenter = float2(focuscenter_x,focuscenter_y);
float2 fcenter = float2(focuscenter_x*0.01,focuscenter_y*0.01);
float cfocus = min(tex2D(SamplerDepth,fcenter).x,focusmax*0.001);
if ( focuscircle == 0 ) return cfocus;
if ( focuscircle == 2 )
@ -347,20 +415,29 @@ 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);
#ifndef FALLOUT
float doffogpow = tod_ind(doffogpow);
float doffogmult = tod_ind(doffogmult);
float doffogbump = tod_ind(doffogbump);
float doffogblend = tod_ind(doffogblend);
#endif
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;
float dff = abs(dep-doffixedfocusdepth);
dff = clamp(pow(dff,doffixedfocuspow)*doffixedfocusmult
+doffixedfocusbump,0.0,1.0);
if ( dep > doffixedfocuscap ) dff = 1.0;
float dfu = abs(dep-doffixedunfocusdepth);
dfu = clamp(pow(dfu,doffixedunfocuspow)*doffixedunfocusmult
+doffixedunfocusbump,0.0,1.0);
#ifndef FALLOUT
float dfog = abs(dep-doffogdepth);
dfog = clamp(pow(dfog,doffogpow)*doffogmult+doffogbump,0.0,1.0);
#endif
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
@ -376,24 +453,49 @@ float4 PS_DoFPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
dofpow = max(0,dofpow+relfov*relfovfactor);
}
#endif
float dfc = abs(dep-foc);
dfc = clamp(pow(dfc,dofpow)*dofmult+dofbump,0.0,1.0);
dff = clamp(pow(dff,doffixedfocuspow)*doffixedfocusmult
+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);
#ifndef FALLOUT
if ( doffogenable ) dfc += fogfactor*lerp(0.0,dfog,doffogblend);
#endif
dfc *= lerp(1.0,dff,doffixedfocusblend);
dfc = saturate(dfc);
float4 res = tex2D(SamplerColor,coord);
res.a = dfc;
return res;
}
/* helper code for simplifying these */
#define gcircle(x) float2(cos(x),sin(x))
float4 dofsample( float2 coord, float2 bsz, float blur, bool bDoHighlight,
out float4 deps, out float4 dfcs )
{
float4 res;
float cstep = 2.0*pi*(1.0/3.0);
float ang = 0.5*pi;
res.r = tex2D(SamplerColor,coord+gcircle(ang)*bsz*dofpcha*0.1).r;
deps.r = tex2D(SamplerDepth,coord+gcircle(ang)*bsz*dofpcha*0.1).x;
dfcs.r = tex2D(SamplerColor,coord+gcircle(ang)*bsz*dofpcha*0.1).a;
ang += cstep;
res.g = tex2D(SamplerColor,coord+gcircle(ang)*bsz*dofpcha*0.1).g;
deps.g = tex2D(SamplerDepth,coord+gcircle(ang)*bsz*dofpcha*0.1).x;
dfcs.g = tex2D(SamplerColor,coord+gcircle(ang)*bsz*dofpcha*0.1).a;
ang += cstep;
res.b = tex2D(SamplerColor,coord+gcircle(ang)*bsz*dofpcha*0.1).b;
deps.b = tex2D(SamplerDepth,coord+gcircle(ang)*bsz*dofpcha*0.1).x;
dfcs.b = tex2D(SamplerColor,coord+gcircle(ang)*bsz*dofpcha*0.1).a;
if ( bDoHighlight )
{
float l = luminance(res.rgb);
float threshold = max((l-dofbthreshold)*dofbgain,0.0);
res += lerp(0,res,threshold*blur);
}
res.a = tex2D(SamplerColor,coord).a;
deps.a = tex2D(SamplerDepth,coord).x;
dfcs.a = res.a;
return res;
}
/* gather blur pass */
float4 PS_DoFGather( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
@ -413,18 +515,15 @@ float4 PS_DoFGather( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
if ( dfc <= dofminblur ) return tex2D(SamplerColor,coord);
float4 res = float4(0,0,0,0);
float dep = tex2D(SamplerDepth,coord).x;
float ds, sw, tw = 0;
float2 bsz = bof*dofpradius*dfc;
float4 sc;
float4 sc, ds, sd, sw, tw = float4(0,0,0,0);
[unroll] for ( int i=0; i<32; i++ )
{
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;
sw = (ds>dep)?1.0:sc.a;
sc = dofsample(coord+poisson32[i]*bsz,bsz,dfc,dofhilite,ds,sd);
sw.r = (ds.r>dep)?1.0:sd.r;
sw.g = (ds.g>dep)?1.0:sd.g;
sw.b = (ds.b>dep)?1.0:sd.b;
sw.a = (ds.a>dep)?1.0:sd.a;
tw += sw;
res += sc*sw;
}
@ -452,29 +551,31 @@ float4 PS_DoFBorkeh( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
*/
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++ )
float2 sf = bof+(tex2D(SamplerNoise3,coord*(bresl/256.0)).xy*2.0-1.0)
*dofbnoise*0.001;
float2 sr = sf*dofbradius*dfc;
int rsamples;
float bstep, bw;
float4 sc, ds, sd, sw, tw = float4(1,1,1,1);
float2 rcoord;
#define dofbrings 7
#define dofbsamples 3
[unroll] for ( int i=1; i<=dofbrings; i++ )
{
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;
rsamples = i*dofbsamples;
[unroll] for ( int j=0; j<rsamples; j++ )
{
bstep = pi*2.0/(float)rsamples;
rcoord = gcircle(j*bstep)*i;
bw = lerp(1.0,(float)i/(float)dofbrings,dofbbias);
sc = dofsample(coord+rcoord*sr,sr*i,dfc,dofhilite,ds,sd);
sw.r = (ds.r>dep)?1.0:sd.r;
sw.g = (ds.g>dep)?1.0:sd.g;
sw.b = (ds.b>dep)?1.0:sd.b;
sw.a = (ds.a>dep)?1.0:sd.a;
res += sc*sw*bw;
tw += sw*bw;
}
}
res /= tw;
res.a = dfc;
@ -490,7 +591,7 @@ float4 PS_DoFPostBlur( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
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 bof = (1.0/bresl)*dofpbradius;
float2 ofs[16] =
{
float2(1.0,1.0), float2(-1.0,-1.0),
@ -506,13 +607,13 @@ float4 PS_DoFPostBlur( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
float2(-1.41,1.41), float2(1.41,-1.41)
};
float4 res = tex2D(SamplerColor,coord);
if ( !dofpostblur ) return float4(res.rgb,1.0);
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 )
@ -524,13 +625,11 @@ float2 ScreenFrost( float2 coord )
float2 ofs = tex2D(SamplerFrostBump,nc).xy;
ofs = (ofs-0.5)*2.0;
ofs *= pow(length(ofs),frostpow)*froststrength;
if ( !frostalways ) ofs *=
if ( !frostalways ) ofs *= max(0.0,tod_ind(frostfactor))
#ifndef FALLOUT
max(0.0,(weatherfactor(WT_COLD)+weatherfactor(WT_COLD_FOG))
-(weatherfactor(WT_HOT)+weatherfactor(WT_HOT_FOG)))*
*max(0.0,coldfactor-warmfactor)
#endif
(1.0-ENightDayFactor)*frostnight;
if ( EInteriorFactor == 1.0 ) ofs *= frostind;
;
float dist = distance(coord,float2(0.5,0.5))*2.0;
ofs *= clamp(pow(dist,frostrpow)*frostrmult+frostrbump,0.0,1.0);
return coord+ofs;
@ -563,14 +662,11 @@ float4 PS_FrostPass( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
float dist = distance(coord,float2(0.5,0.5))*2.0;
dist = clamp(pow(dist,frostrpow)*frostrmult+frostrbump,0.0,
1.0)*frostblend;
if ( !frostalways ) dist *=
if ( !frostalways ) dist *= max(0.0,tod_ind(frostfactor))
#ifndef FALLOUT
max(0.0,(weatherfactor(WT_COLD)
+weatherfactor(WT_COLD_FOG))+(weatherfactor(WT_HOT)
+weatherfactor(WT_HOT_FOG)))*
*max(0.0,coldfactor-warmfactor)
#endif
(1.0-ENightDayFactor)*frostnight;
if ( EInteriorFactor == 1.0 ) dist *= frostind;
;
res.rgb *= 1.0+bmp*dist;
}
else res = tex2D(SamplerColor,coord);
@ -587,7 +683,7 @@ float4 PS_FrostPass( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
}
return res;
}
float2 fcenter = float2(focuscenter_x,focuscenter_y);
float2 fcenter = float2(focuscenter_x*0.01,focuscenter_y*0.01);
if ( distance(coord,fcenter) < 0.005 ) res.rgb = float3(1,0,0);
if ( focuscircle == 0 ) return res;
float cstep = (1.0/3.0);
@ -773,7 +869,7 @@ technique PostProcess8
}
}
technique PostProcessB <string UIName="Bokeh (WIP)";>
technique PostProcessB <string UIName="Bokeh DOF";>
{
pass p0
{

View file

@ -159,12 +159,26 @@ float heatpow
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.2};
float heattodpow
float heatfactor_n
<
string UIName = "Heat Time-of-day Contrast";
string UIName = "Heat Factor Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.2};
> = {1.0};
float heatfactor_d
<
string UIName = "Heat Factor Day";
string UIWidget = "Spinner";
> = {1.0};
float heatfactor_in
<
string UIName = "Heat Factor Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float heatfactor_id
<
string UIName = "Heat Factor Interior Day";
string UIWidget = "Spinner";
> = {1.0};
bool heatalways
<
string UIName = "Heat Always Enable";
@ -222,18 +236,26 @@ float frostsize
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostind
float frostfactor_n
<
string UIName = "Frost Indoor Factor";
string UIName = "Frost Factor Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.05};
float frostnight
> = {1.0};
float frostfactor_d
<
string UIName = "Frost Night Factor";
string UIName = "Frost Factor Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.25};
> = {1.0};
float frostfactor_in
<
string UIName = "Frost Factor Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float frostfactor_id
<
string UIName = "Frost Factor Interior Day";
string UIWidget = "Spinner";
> = {1.0};
bool frostalways
<
string UIName = "Frost Always Enable";
@ -267,23 +289,23 @@ float focusmanualvalue
string UIName = "Manual Focus Depth";
string UIWidget = "Checkbox";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.5};
float UIMax = 1000.0;
> = {500.0};
/* center point of focus */
float focuscenter_x
<
string UIName = "Focus Point Center X";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.5};
float UIMax = 100.0;
> = {50.0};
float focuscenter_y
<
string UIName = "Focus Point Center Y";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.5};
float UIMax = 100.0;
> = {50.0};
float focuscircleangle
<
string UIName = "Focus Triangle Angle";
@ -520,6 +542,20 @@ float doffixedfocusblend_id
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float doffixedfocusdepth
<
string UIName = "DOF Fixed Focus Depth";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float doffixedfocuscap
<
string UIName = "DOF Fixed Focus Cap";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
/* fixed unfocused depth factors */
float doffixedunfocusmult_n
<
@ -613,12 +649,20 @@ float doffixedunfocusblend_id
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float doffixedunfocusdepth
<
string UIName = "DOF Fixed Unfocus Depth";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
/* prevents fixed dof from blurring the skybox */
bool doffixedcut
<
string UIName = "DOF Fixed Use Cutoff";
string UIWidget = "Checkbox";
> = {true};
#ifndef FALLOUT
/* fixed dof for foggy weathers */
bool doffogenable
<
@ -717,6 +761,14 @@ float doffogblend_id
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float doffogdepth
<
string UIName = "DOF Fog Depth";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
#endif
/* disable depth of field */
bool dofdisable
<
@ -730,15 +782,61 @@ bool doffixedonly
> = {false};
float dofpradius
<
string UIName = "DOF Blur Radius";
string UIName = "DOF Gather Blur Radius";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {6.0};
bool dofpostblur
<
string UIName = "Enable DOF Post-Blur";
string UIWidget = "Checkbox";
> = {true};
float dofpbradius
<
string UIName = "DOF Post-Blur Radius";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dofpcha
<
string UIName = "DOF Blur Chromatic Aberration";
string UIWidget = "Spinner";
> = {0.0};
bool dofhilite
<
string UIName = "Enable DOF Highlights";
string UIWidget = "Checkbox";
> = {false};
float dofbthreshold
<
string UIName = "DOF Highlight Threshold";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.5};
float dofbgain
<
string UIName = "DOF Highlight Gain";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
float dofbradius
<
string UIName = "DOF Bokeh Blur Radius";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dofbbias
<
string UIName = "DOF Bokeh Edge Bias";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.5};
float dofbnoise
<
string UIName = "DOF Bokeh Fuzz";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.01};
#ifndef FALLOUT
bool dofrelfov
<
@ -1033,3 +1131,429 @@ float sharpblend
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.2};
/* depth-based colour grading suite */
string str_grade = "Depth Color Grading Suite";
float dgradedfoc
<
string UIName = "Depth Grading Center Depth";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1000.0;
> = {500.0};
float dgradedpow_n
<
string UIName = "Depth Grading Contrast Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedpow_d
<
string UIName = "Depth Grading Contrast Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedpow_in
<
string UIName = "Depth Grading Contrast Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedpow_id
<
string UIName = "Depth Grading Contrast Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedmul_n
<
string UIName = "Depth Grading Intensity Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedmul_d
<
string UIName = "Depth Grading Intensity Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedmul_in
<
string UIName = "Depth Grading Intensity Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedmul_id
<
string UIName = "Depth Grading Intensity Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradedbump_n
<
string UIName = "Depth Grading Shift Night";
string UIWidget = "Spinner";
> = {0.0};
float dgradedbump_d
<
string UIName = "Depth Grading Shift Day";
string UIWidget = "Spinner";
> = {0.0};
float dgradedbump_in
<
string UIName = "Depth Grading Shift Interior Night";
string UIWidget = "Spinner";
> = {0.0};
float dgradedbump_id
<
string UIName = "Depth Grading Shift Interior Day";
string UIWidget = "Spinner";
> = {0.0};
float dgradedblend_n
<
string UIName = "Depth Grading Blend Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float dgradedblend_d
<
string UIName = "Depth Grading Blend Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float dgradedblend_in
<
string UIName = "Depth Grading Blend Interior Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
float dgradedblend_id
<
string UIName = "Depth Grading Blend Interior Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {1.0};
bool dgradeenable1
<
string UIName = "Enable RGB Grading";
string UIWidget = "Checkbox";
> = {false};
/* color component multipliers */
float dgrademul_r_n
<
string UIName = "Grading Intensity Night Red";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_g_n
<
string UIName = "Grading Intensity Night Green";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_b_n
<
string UIName = "Grading Intensity Night Blue";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_r_d
<
string UIName = "Grading Intensity Day Red";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_g_d
<
string UIName = "Grading Intensity Day Green";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_b_d
<
string UIName = "Grading Intensity Day Blue";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_r_in
<
string UIName = "Grading Intensity Interior Night Red";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_g_in
<
string UIName = "Grading Intensity Interior Night Green";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_b_in
<
string UIName = "Grading Intensity Interior Night Blue";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_r_id
<
string UIName = "Grading Intensity Interior Day Red";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_g_id
<
string UIName = "Grading Intensity Interior Day Green";
string UIWidget = "Spinner";
> = {1.0};
float dgrademul_b_id
<
string UIName = "Grading Intensity Interior Day Blue";
string UIWidget = "Spinner";
> = {1.0};
/* color component contrasts */
float dgradepow_r_n
<
string UIName = "Grading Contrast Night Red";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_g_n
<
string UIName = "Grading Contrast Night Green";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_b_n
<
string UIName = "Grading Contrast Night Blue";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_r_d
<
string UIName = "Grading Contrast Day Red";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_g_d
<
string UIName = "Grading Contrast Day Green";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_b_d
<
string UIName = "Grading Contrast Day Blue";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_r_in
<
string UIName = "Grading Contrast Interior Night Red";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_g_in
<
string UIName = "Grading Contrast Interior Night Green";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_b_in
<
string UIName = "Grading Contrast Interior Night Blue";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_r_id
<
string UIName = "Grading Contrast Interior Day Red";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_g_id
<
string UIName = "Grading Contrast Interior Day Green";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float dgradepow_b_id
<
string UIName = "Grading Contrast Interior Day Blue";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
/* colorization factors */
bool dgradeenable2
<
string UIName = "Enable Vibrance Grading";
string UIWidget = "Checkbox";
> = {false};
float dgradecol_r_n
<
string UIName = "Grading Color Night Red";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_g_n
<
string UIName = "Grading Color Night Green";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_b_n
<
string UIName = "Grading Color Night Blue";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_r_d
<
string UIName = "Grading Color Day Red";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_g_d
<
string UIName = "Grading Color Day Green";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_b_d
<
string UIName = "Grading Color Day Blue";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_r_in
<
string UIName = "Grading Color Interior Night Red";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_g_in
<
string UIName = "Grading Color Interior Night Green";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_b_in
<
string UIName = "Grading Color Interior Night Blue";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_r_id
<
string UIName = "Grading Color Interior Day Red";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_g_id
<
string UIName = "Grading Color Interior Day Green";
string UIWidget = "Spinner";
> = {1.0};
float dgradecol_b_id
<
string UIName = "Grading Color Interior Day Blue";
string UIWidget = "Spinner";
> = {1.0};
/* blend factor for colorization (negative values are quite fancy) */
float dgradecolfact_n
<
string UIName = "Grading Color Factor Night";
string UIWidget = "Spinner";
> = {0.0};
float dgradecolfact_d
<
string UIName = "Grading Color Factor Day";
string UIWidget = "Spinner";
> = {0.0};
float dgradecolfact_in
<
string UIName = "Grading Color Factor Interior Night";
string UIWidget = "Spinner";
> = {0.0};
float dgradecolfact_id
<
string UIName = "Grading Color Factor Interior Day";
string UIWidget = "Spinner";
> = {0.0};
/* HSV grading */
bool dgradeenable3
<
string UIName = "Enable HSV Grading";
string UIWidget = "Checkbox";
> = {false};
/* saturation multiplier */
float dgradesatmul_n
<
string UIName = "Grading Saturation Intensity Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradesatmul_d
<
string UIName = "Grading Saturation Intensity Day";
string UIWidget = "Spinner";
> = {1.0};
float dgradesatmul_in
<
string UIName = "Grading Saturation Intensity Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradesatmul_id
<
string UIName = "Grading Saturation Intensity Interior Day";
string UIWidget = "Spinner";
> = {1.0};
/* saturation power */
float dgradesatpow_n
<
string UIName = "Grading Saturation Contrast Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradesatpow_d
<
string UIName = "Grading Saturation Contrast Day";
string UIWidget = "Spinner";
> = {1.0};
float dgradesatpow_in
<
string UIName = "Grading Saturation Contrast Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradesatpow_id
<
string UIName = "Grading Saturation Contrast Interior Day";
string UIWidget = "Spinner";
> = {1.0};
/* value multiplier */
float dgradevalmul_n
<
string UIName = "Grading Value Intensity Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradevalmul_d
<
string UIName = "Grading Value Intensity Day";
string UIWidget = "Spinner";
> = {1.0};
float dgradevalmul_in
<
string UIName = "Grading Value Intensity Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradevalmul_id
<
string UIName = "Grading Value Intensity Interior Day";
string UIWidget = "Spinner";
> = {1.0};
/* value power */
float dgradevalpow_n
<
string UIName = "Grading Value Contrast Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradevalpow_d
<
string UIName = "Grading Value Contrast Day";
string UIWidget = "Spinner";
> = {1.0};
float dgradevalpow_in
<
string UIName = "Grading Value Contrast Interior Night";
string UIWidget = "Spinner";
> = {1.0};
float dgradevalpow_id
<
string UIName = "Grading Value Contrast Interior Day";
string UIWidget = "Spinner";
> = {1.0};
bool dcolorizeafterhsv
<
string UIName = "Colorize After HSV";
string UIWidget = "Checkbox";
> = {true};

BIN
enbseries/menbvignette.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB