1
Fork 0

MariENB FROST 3.3.1

This commit is contained in:
Marisa the Magician 2019-04-07 17:52:59 +02:00
commit f62484a66e
8 changed files with 268 additions and 477 deletions

View file

@ -1 +1 @@
3.3.0 "Malden's Angel"
3.3.1 "Malden's Angel"

View file

@ -39,40 +39,6 @@ float distcha
string UIName = "Distortion Chromatic Aberration";
string UIWidget = "Spinner";
> = {10.0};
bool waterenable
<
string UIName = "Enable Underwater";
string UIWidget = "Checkbox";
> = {false};
float3 uwm
<
string UIName = "Underwater Frequency";
string UIWidget = "Vector";
float3 UIMin = {0.0,0.0,0.0};
> = {1.4,1.6,1.4};
float3 uwf
<
string UIName = "Underwater Speed";
string UIWidget = "Vector";
float3 UIMin = {0.0,0.0,0.0};
> = {10.0,8.0,16.0};
float3 uws
<
string UIName = "Underwater Amplitude";
string UIWidget = "Vector";
float3 UIMin = {0.0,0.0,0.0};
> = {0.3,0.5,0.8};
float uwz
<
string UIName = "Underwater Zoom";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.5};
bool wateralways
<
string UIName = "Always Underwater";
string UIWidget = "Checkbox";
> = {false};
bool heatenable
<
string UIName = "Enable Hot Air Refraction";
@ -123,148 +89,37 @@ float heatfactor_dw
<
string UIName = "Heat Factor Dawn";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.2};
float heatfactor_sr
<
string UIName = "Heat Factor Sunrise";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.5};
float heatfactor_dy
<
string UIName = "Heat Factor Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float heatfactor_ss
<
string UIName = "Heat Factor Sunset";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.7};
float heatfactor_ds
<
string UIName = "Heat Factor Dusk";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.1};
float heatfactor_nt
<
string UIName = "Heat Factor Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float heatfactor_i
<
string UIName = "Heat Factor Interior";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
bool heatalways
<
string UIName = "Heat Always Enable";
string UIWidget = "Checkbox";
> = {false};
bool frostenable
<
string UIName = "Enable Screen Frost";
string UIWidget = "Checkbox";
> = {false};
float frostpow
<
string UIName = "Frost Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float froststrength
<
string UIName = "Frost Strength";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostrpow
<
string UIName = "Frost Radial Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostrmult
<
string UIName = "Frost Radial Intensity";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostrbump
<
string UIName = "Frost Radial Offset";
string UIWidget = "Spinner";
> = {0.0};
float frostblend
<
string UIName = "Frost Texture Blend";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostbpow
<
string UIName = "Frost Texture Blend Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostsize
<
string UIName = "Frost Texture Size";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostfactor_dw
<
string UIName = "Frost Factor Dawn";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.1};
float frostfactor_sr
<
string UIName = "Frost Factor Sunrise";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float frostfactor_dy
<
string UIName = "Frost Factor Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float frostfactor_ss
<
string UIName = "Frost Factor Sunset";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
float frostfactor_ds
<
string UIName = "Frost Factor Dusk";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.1};
float frostfactor_nt
<
string UIName = "Frost Factor Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.25};
float frostfactor_i
<
string UIName = "Frost Factor Interior";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {0.0};
bool frostalways
<
string UIName = "Frost Always Enable";
string UIWidget = "Checkbox";
> = {false};
string str_focus = "Focusing Parameters";
/*
focus modes:
@ -1197,22 +1052,6 @@ Texture2D TextureHeat
string ResourceName = "menbheat.png";
#endif
>;
Texture2D TextureFrost
<
#ifdef FROST_DDS
string ResourceName = "menbfrost.dds";
#else
string ResourceName = "menbfrost.png";
#endif
>;
Texture2D TextureFrostBump
<
#ifdef FROSTBUMP_DDS
string ResourceName = "menbfrostbump.dds";
#else
string ResourceName = "menbfrostbump.png";
#endif
>;
SamplerState Sampler0
{
@ -1541,21 +1380,6 @@ float4 PS_SSAOApply( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
return res*mud;
}
/*
Underwater distortion, which currently has no real use due to Boris being
lazy. fWaterLevel doesn't yet provide any usable values.
*/
float2 UnderwaterDistort( float2 coord )
{
if ( !wateralways ) return coord;
float2 ofs = float2(0.0,0.0);
float siny = sin(pi*2.0*(coord.y*uwm.x+Timer.x*uwf.x*100.0))*uws.x;
ofs.y = siny+sin(pi*2.0*(coord.x*uwm.y+Timer.x*uwf.y*100.0))*uws.y;
ofs.x = siny+sin(pi*2.0*(coord.x*uwm.z+Timer.x*uwf.z*100.0))*uws.z;
ofs -= (coord-0.5)*2.0*uwz;
return coord+ofs*0.01;
}
/* Distant hot air refraction. Not very realistic, but does the job. */
float2 DistantHeat( float2 coord )
{
@ -1565,8 +1389,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 = todx_ind(heatfactor);
if ( !heatalways && (todpow <= 0.0) ) return coord;
float todpow = max(0.0,todx_ind(heatfactor));
if ( todpow <= 0.0 ) return coord;
if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 nc = coord*(bresl/HEATSIZE)*heatsize;
@ -1575,7 +1399,7 @@ float2 DistantHeat( float2 coord )
ofs = (ofs-0.5)*2.0;
ofs *= pow(length(ofs),heatpow);
ofs *= todpow;
if ( !heatalways ) ofs *= max(0.0,warmfactor-coldfactor);
/*ofs *= max(0.0,warmfactor-coldfactor);*/
odep = TextureDepth.SampleLevel(Sampler1,coord+ofs*heatstrength
*distfade*0.01,0).x;
float odistfade = clamp(pow(max(0,odep),heatfadepow)*heatfademul
@ -1592,7 +1416,6 @@ float4 PS_Distortion( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 ofs = coord;
if ( waterenable ) ofs = UnderwaterDistort(ofs);
if ( heatenable ) ofs = DistantHeat(ofs);
ofs -= coord;
float4 res;
@ -1843,61 +1666,11 @@ float4 PS_DoFPostBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
return res;
}
/* Screen frost shader. Not very realistic either, but looks fine too. */
float2 ScreenFrost( float2 coord )
{
float2 bresl;
if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
float2 ofs = TextureFrostBump.Sample(Sampler2,nc).xy;
ofs = (ofs-0.5)*2.0;
ofs *= pow(length(ofs),frostpow)*froststrength;
float todpow = todx_ind(frostfactor);
if ( !frostalways ) ofs *= max(0.0,coldfactor-warmfactor)*todpow;
else ofs *= todpow;
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;
}
/* screen frost overlay */
float4 PS_FrostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
float4 PS_DebugFocus( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
{
float2 coord = IN.txcoord.xy;
float2 bresl;
if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float4 res;
[branch] if ( frostenable )
{
float2 ofs = ScreenFrost(coord);
ofs -= coord;
if ( (distcha != 0.0) && (length(ofs) != 0.0) )
{
float2 ofr, ofg, ofb;
ofr = ofs*(1.0-distcha*0.01);
ofg = ofs;
ofb = ofs*(1.0+distcha*0.01);
res = float4(TextureColor.Sample(Sampler1,coord+ofr).r,
TextureColor.Sample(Sampler1,coord+ofg).g,
TextureColor.Sample(Sampler1,coord+ofb).b,1.0);
}
else res = TextureColor.Sample(Sampler1,coord+ofs);
float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
float bmp = pow(max(0,TextureFrost.SampleLevel(Sampler2,nc,
0).x),frostbpow);
float dist = distance(coord,float2(0.5,0.5))*2.0;
dist = clamp(pow(dist,frostrpow)*frostrmult+frostrbump,0.0,
1.0)*frostblend;
float todpow = todx_ind(frostfactor);
/* Weathers not implemented in FO4 ENB as of 0.291 */
if ( !frostalways )
dist *= max(0.0,coldfactor-warmfactor)*todpow;
else dist *= todpow;
res.rgb *= 1.0+bmp*dist;
}
else res = TextureColor.Sample(Sampler1,coord);
float4 res = TextureColor.Sample(Sampler1,coord);
if ( !focusdisplay || (focuscircle == -1) ) return res;
if ( focuscircle == -2 )
{
@ -2032,7 +1805,7 @@ technique11 Prepass8
pass p0
{
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
SetPixelShader(CompileShader(ps_5_0,PS_FrostPass()));
SetPixelShader(CompileShader(ps_5_0,PS_DebugFocus()));
}
}
@ -2105,7 +1878,7 @@ technique11 PrepassB8
pass p0
{
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
SetPixelShader(CompileShader(ps_5_0,PS_FrostPass()));
SetPixelShader(CompileShader(ps_5_0,PS_DebugFocus()));
}
}

View file

@ -6,12 +6,6 @@ Depth Cutoff=999998.0
Near Z=0.05
Far Z=3098.0
Distortion Chromatic Aberration=9.5
Enable Underwater=false
Underwater Frequency=2.36, 3.39, 2.72
Underwater Speed=24.3, 21.9, 26.5
Underwater Amplitude=0.1, 0.11, 0.07
Underwater Zoom=0.15
Always Underwater=false
Enable Hot Air Refraction=false
Heat Texture Size=6.4
Heat Speed=0.45
@ -27,24 +21,6 @@ Heat Factor Sunset=0.85
Heat Factor Dusk=0.38
Heat Factor Night=0.0
Heat Factor Interior=0.0
Heat Always Enable=true
Enable Screen Frost=true
Frost Contrast=1.67
Frost Strength=0.02
Frost Radial Contrast=1.67
Frost Radial Intensity=0.83
Frost Radial Offset=-0.66
Frost Texture Blend=0.94
Frost Texture Blend Contrast=2.44
Frost Texture Size=0.85
Frost Factor Dawn=1.02
Frost Factor Sunrise=0.79
Frost Factor Day=0.61
Frost Factor Sunset=0.78
Frost Factor Dusk=1.02
Frost Factor Night=1.32
Frost Factor Interior=0.37
Frost Always Enable=true
Focus Mode=1
Display Focus Points=false
Enable Manual Focus=false
@ -150,40 +126,40 @@ Depth Grading Center Depth=0.0
Depth Grading Contrast Night=284.570007
Depth Grading Contrast Day=296.130005
Depth Grading Contrast Interior=290.209991
Depth Grading Intensity Night=1.16
Depth Grading Intensity Day=1.47
Depth Grading Intensity Interior=1.29
Depth Grading Shift Night=-0.54
Depth Grading Shift Day=-0.61
Depth Grading Intensity Night=1.07
Depth Grading Intensity Day=1.17
Depth Grading Intensity Interior=1.19
Depth Grading Shift Night=-0.65
Depth Grading Shift Day=-0.63
Depth Grading Shift Interior=-0.59
Depth Grading Blend Night=1.0
Depth Grading Blend Day=1.0
Depth Grading Blend Interior=1.0
Depth Grading Blend Night=0.3
Depth Grading Blend Day=0.4
Depth Grading Blend Interior=0.5
Enable RGB Grading=true
Grading Intensity Night=1.06, 1.01, 0.98
Grading Intensity Day=0.96, 1, 1.03
Grading Intensity Night=1.05, 0.96, 0.89
Grading Intensity Day=0.98, 1, 1.02
Grading Intensity Interior=0.98, 0.99, 1.02
Grading Contrast Night=1, 0.92, 0.87
Grading Contrast Night=1.03, 0.98, 0.96
Grading Contrast Day=1, 0.96, 0.93
Grading Contrast Interior=1, 0.97, 0.94
Enable Vibrance Grading=true
Grading Color Night=-0.23, -0.5, -0.94
Grading Color Day=-0.41, -0.38, -0.6
Grading Color Night=-0.67, -0.36, -0.45
Grading Color Day=-0.73, -0.36, -0.3
Grading Color Interior=-0.153, -0.359, -0.629
Grading Color Factor Night=-0.1
Grading Color Factor Day=-0.18
Grading Color Factor Interior=-0.15
Grading Color Factor Night=-0.11
Grading Color Factor Day=-0.13
Grading Color Factor Interior=-0.11
Enable HSV Grading=true
Grading Saturation Intensity Night=1.07
Grading Saturation Intensity Day=1.21
Grading Saturation Intensity Day=1.04
Grading Saturation Intensity Interior=1.14
Grading Saturation Contrast Night=1.14
Grading Saturation Contrast Day=1.01
Grading Saturation Contrast Night=1.08
Grading Saturation Contrast Day=1.09
Grading Saturation Contrast Interior=1.07
Grading Value Intensity Night=0.68
Grading Value Intensity Day=0.96
Grading Value Intensity Interior=0.78
Grading Value Contrast Night=0.86
Grading Value Contrast Day=0.72
Grading Value Contrast Interior=0.78
Grading Value Intensity Night=0.8
Grading Value Intensity Day=0.73
Grading Value Intensity Interior=0.72
Grading Value Contrast Night=0.9
Grading Value Contrast Day=0.92
Grading Value Contrast Interior=0.95
Colorize After HSV=true

View file

@ -6,6 +6,107 @@
*/
#include "menbglobaldefs.fx"
string str_misc = "Miscellaneous";
/* fixed resolution, keeps blur filters at a consistent internal resolution */
int2 fixed
<
string UIName = "Fixed Resolution";
string UIWidget = "Vector";
int2 UIMin = {0,0};
> = {1920,1080};
string str_dist = "Distortion Filters";
float distcha
<
string UIName = "Distortion Chromatic Aberration";
string UIWidget = "Spinner";
> = {10.0};
bool frostenable
<
string UIName = "Enable Screen Frost";
string UIWidget = "Checkbox";
> = {false};
float frostpow
<
string UIName = "Frost Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float froststrength
<
string UIName = "Frost Strength";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostrpow
<
string UIName = "Frost Radial Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostrmult
<
string UIName = "Frost Radial Intensity";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostrbump
<
string UIName = "Frost Radial Offset";
string UIWidget = "Spinner";
> = {0.0};
float frostblend
<
string UIName = "Frost Texture Blend";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostbpow
<
string UIName = "Frost Texture Blend Contrast";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostsize
<
string UIName = "Frost Texture Size";
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {1.0};
float frostfactor_dw
<
string UIName = "Frost Factor Dawn";
string UIWidget = "Spinner";
> = {0.1};
float frostfactor_sr
<
string UIName = "Frost Factor Sunrise";
string UIWidget = "Spinner";
> = {0.0};
float frostfactor_dy
<
string UIName = "Frost Factor Day";
string UIWidget = "Spinner";
> = {0.0};
float frostfactor_ss
<
string UIName = "Frost Factor Sunset";
string UIWidget = "Spinner";
> = {0.0};
float frostfactor_ds
<
string UIName = "Frost Factor Dusk";
string UIWidget = "Spinner";
> = {0.1};
float frostfactor_nt
<
string UIName = "Frost Factor Night";
string UIWidget = "Spinner";
> = {0.25};
float frostfactor_i
<
string UIName = "Frost Factor Interior";
string UIWidget = "Spinner";
> = {0.0};
string str_noise = "Film Grain";
bool ne
<
@ -109,14 +210,13 @@ string str_tonemap = "Tone Mapping";
3 : Uncharted 2
4 : Hejl Dawson
5 : Haarm-Peter Duiker
6 : SweetFX
*/
int tmapenable
<
string UIName = "Tonemapping Method";
string UIWidget = "Spinner";
int UIMin = -1;
int UIMax = 6;
int UIMax = 5;
> = {3};
float tmapexposure_n
<
@ -262,126 +362,6 @@ float unW_i
string UIName = "Uncharted2 Linear White Interior";
string UIWidget = "Spinner";
> = {10.0};
float sfxgamma_n
<
string UIName = "SweetFX Gamma Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 2.0;
> = {1.0};
float sfxgamma_d
<
string UIName = "SweetFX Gamma Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 2.0;
> = {1.0};
float sfxgamma_i
<
string UIName = "SweetFX Gamma Interior";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 2.0;
> = {1.0};
float sfxexposure_n
<
string UIName = "SweetFX Exposure Night";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxexposure_d
<
string UIName = "SweetFX Exposure Day";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxexposure_i
<
string UIName = "SweetFX Exposure Interior";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxsaturation_n
<
string UIName = "SweetFX Saturation Night";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxsaturation_d
<
string UIName = "SweetFX Saturation Day";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxsaturation_i
<
string UIName = "SweetFX Saturation Interior";
string UIWidget = "Spinner";
float UIMin = -1.0;
float UIMax = 1.0;
> = {0.0};
float sfxbleach_n
<
string UIName = "SweetFX Bleach Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxbleach_d
<
string UIName = "SweetFX Bleach Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxbleach_i
<
string UIName = "SweetFX Bleach Interior";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxdefog_n
<
string UIName = "SweetFX Defog Night";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxdefog_d
<
string UIName = "SweetFX Defog Day";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float sfxdefog_i
<
string UIName = "SweetFX Defog Interior";
string UIWidget = "Spinner";
float UIMin = 0.0;
float UIMax = 1.0;
> = {0.0};
float3 sfxfogcolor_n
<
string UIName = "SweetFX Defog Color Night";
string UIWidget = "Color";
> = {0.0,0.0,1.0};
float3 sfxfogcolor_d
<
string UIName = "SweetFX Defog Color Day";
string UIWidget = "Color";
> = {0.0,0.0,1.0};
float3 sfxfogcolor_i
<
string UIName = "SweetFX Defog Color Interior";
string UIWidget = "Color";
> = {0.0,0.0,1.0};
/* Color grading */
string str_grade = "Color Grading Suite";
@ -720,6 +700,14 @@ Texture2D TextureTonemap
<
string ResourceName = "menbfilmlut.png";
>;
Texture2D TextureFrost
<
#ifdef FROST_DDS
string ResourceName = "menbfrost.dds";
#else
string ResourceName = "menbfrost.png";
#endif
>;
SamplerState Sampler0
{
@ -733,6 +721,13 @@ SamplerState Sampler1
AddressU = Clamp;
AddressV = Clamp;
};
SamplerState Sampler2
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = Wrap;
AddressV = Wrap;
};
SamplerState SamplerLUT
{
Filter = MIN_MAG_MIP_LINEAR;
@ -875,31 +870,6 @@ float3 TonemapHejlDawson( float3 res )
float3 x = max(0.0,res-0.004);
return (x*(6.2*x+.5))/(x*(6.2*x+1.7)+0.06);
}
/* The standard tonemap from sweetfx */
float3 TonemapSFX( float3 res )
{
float Gamma = tod_ind(sfxgamma);
float Exposure = tod_ind(sfxexposure);
float Saturation = tod_ind(sfxsaturation);
float Bleach = tod_ind(sfxbleach);
float Defog = tod_ind(sfxdefog);
float3 FogColor = tod_ind(sfxfogcolor);
float3 tcol = res;
tcol = saturate(tcol-Defog*FogColor*2.55);
tcol *= pow(2.0,Exposure);
tcol = pow(tcol,Gamma);
float lum = luminance(tcol);
float L = saturate(1.0*(lum-0.45));
float3 A2 = Bleach*tcol;
float3 res1 = 2.0*tcol*lum;
float3 res2 = 1.0-2.0*(1.0-lum)*(1.0-tcol);
float3 newc = lerp(res1,res2,L);
float3 mixrgb = A2*newc;
tcol += (1.0-A2)*mixrgb;
float3 gray = dot(tcol,1.0/3.0);
float3 diff = tcol-gray;
return (tcol+diff*Saturation)/(1+(diff*Saturation));
}
float3 Tonemap( float3 res )
{
float3 tcol = pow(max(res,0.0),1.0/2.2);
@ -907,8 +877,7 @@ float3 Tonemap( float3 res )
res *= tod_ind(tmapexposure);
float tblend = tod_ind(tmapblend);
float3 mapped;
if ( tmapenable == 6 ) mapped = TonemapSFX(res);
else if ( tmapenable == 5 ) mapped = TonemapHaarmPeterDuiker(res);
if ( tmapenable == 5 ) mapped = TonemapHaarmPeterDuiker(res);
else if ( tmapenable == 4 ) mapped = TonemapHejlDawson(res);
else if ( tmapenable == 3 ) mapped = TonemapUC2(res);
else if ( tmapenable == 2 ) mapped = TonemapReinhard(res);
@ -1111,15 +1080,87 @@ float2 Adaptation( float2 coord )
#endif
}
/* Screen frost shader. Not very realistic either, but looks fine too. */
float2 ScreenFrost( float2 coord )
{
float2 bresl;
if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
float2 ofs = TextureFrost.Sample(Sampler2,nc).xy;
ofs = (ofs-0.5)*2.0;
ofs *= pow(length(ofs),frostpow)*froststrength;
float todpow = max(0.0,todx_ind(frostfactor));
ofs *= todpow;
/*ofs *= max(0.0,coldfactor-warmfactor);*/
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;
}
float4 PS_Draw( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
{
float2 coord = IN.txcoord0.xy;
float4 res = TextureColor.Sample(Sampler0,coord);
float2 bresl;
if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float4 res, mud;
[branch] if ( frostenable )
{
float2 ofs = ScreenFrost(coord);
ofs -= coord;
if ( (distcha != 0.0) && (length(ofs) != 0.0) )
{
float2 ofr, ofg, ofb;
ofr = ofs*(1.0-distcha*0.01);
ofg = ofs;
ofb = ofs*(1.0+distcha*0.01);
res = float4(TextureColor.Sample(Sampler0,coord+ofr).r,
TextureColor.Sample(Sampler0,coord+ofg).g,
TextureColor.Sample(Sampler0,coord+ofb).b,1.0);
#ifdef SKYRIMSE
float4 mud = TextureBloom.Sample(Sampler1,coord);
mud = float4(TextureBloom.Sample(Sampler1,coord+ofr).r,
TextureBloom.Sample(Sampler1,coord+ofg).g,
TextureBloom.Sample(Sampler1,coord+ofb).b,1.0);
#else
float4 mud = TextureBloom.Sample(Sampler1,Params01[4].zw*coord);
mud = float4(TextureBloom.Sample(Sampler1,
Params01[4].zw*(coord+ofr)).r,
TextureBloom.Sample(Sampler1,Params01[4].zw
*(coord+ofg)).g,TextureBloom.Sample(Sampler1,
Params01[4].zw*(coord+ofb)).b,1.0);
#endif
}
else
{
res = TextureColor.Sample(Sampler0,coord+ofs);
#ifdef SKYRIMSE
mud = TextureBloom.Sample(Sampler1,coord+ofs);
#else
mud = TextureBloom.Sample(Sampler1,Params01[4].zw
*(coord+ofs));
#endif
}
float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
float bmp = pow(max(0,TextureFrost.SampleLevel(Sampler2,nc,
0).z),frostbpow);
float dist = distance(coord,float2(0.5,0.5))*2.0;
dist = clamp(pow(dist,frostrpow)*frostrmult+frostrbump,0.0,
1.0)*frostblend;
float todpow = max(0.0,todx_ind(frostfactor));
dist *= todpow;
/* Weathers not implemented in FO4 ENB as of 0.291 */
/*dist *= max(0.0,coldfactor-warmfactor);*/
res.rgb *= 1.0+bmp*dist;
}
else
{
res = TextureColor.Sample(Sampler0,coord);
#ifdef SKYRIMSE
mud = TextureBloom.Sample(Sampler1,coord);
#else
mud = TextureBloom.Sample(Sampler1,Params01[4].zw*coord);
#endif
}
/* Insert MariENB filters here */
float2 adapt = Adaptation(coord);
if ( bloomdebug ) res.rgb *= 0;

View file

@ -1,5 +1,24 @@
[ENBEFFECT.FX]
TECHNIQUE=1
Fixed ResolutionX=1920
Fixed ResolutionY=1080
Distortion Chromatic Aberration=9.45
Enable Screen Frost=true
Frost Contrast=1.24
Frost Strength=0.09
Frost Radial Contrast=2.18
Frost Radial Intensity=0.86
Frost Radial Offset=-0.73
Frost Texture Blend=2.23
Frost Texture Blend Contrast=1.36
Frost Texture Size=1.0
Frost Factor Dawn=1.02
Frost Factor Sunrise=0.79
Frost Factor Day=0.61
Frost Factor Sunset=0.78
Frost Factor Dusk=1.02
Frost Factor Night=1.32
Frost Factor Interior=0.22
Enable Grain=true
Grain Speed=25.0
Grain Intensity=0.650001
@ -17,81 +36,63 @@ Enable Adaptation=true
Tonemapping Method=3
Tonemap Exposure Night=1.05
Tonemap Exposure Day=1.320001
Tonemap Exposure Interior=1.199999
Tonemap Exposure Interior=1.179999
Tonemap Blend Night=1.0
Tonemap Blend Day=1.0
Tonemap Blend Interior=1.0
Uncharted2 Shoulder Strength Night=0.21
Uncharted2 Shoulder Strength Day=0.32
Uncharted2 Shoulder Strength Interior=0.23
Uncharted2 Linear Strength Night=1.64
Uncharted2 Linear Strength Day=1.4
Uncharted2 Linear Strength Interior=1.55
Uncharted2 Linear Angle Night=0.54
Uncharted2 Shoulder Strength Interior=0.24
Uncharted2 Linear Strength Night=1.34
Uncharted2 Linear Strength Day=1.38
Uncharted2 Linear Strength Interior=1.51
Uncharted2 Linear Angle Night=0.64
Uncharted2 Linear Angle Day=0.68
Uncharted2 Linear Angle Interior=0.57
Uncharted2 Toe Strength Night=1.22
Uncharted2 Toe Strength Day=1.22
Uncharted2 Toe Strength Interior=1.24
Uncharted2 Toe Strength Interior=1.23
Uncharted2 Toe Numerator Night=0.21
Uncharted2 Toe Numerator Day=0.28
Uncharted2 Toe Numerator Interior=0.2
Uncharted2 Toe Denominator Night=1.29
Uncharted2 Toe Numerator Interior=0.23
Uncharted2 Toe Denominator Night=1.38
Uncharted2 Toe Denominator Day=1.32
Uncharted2 Toe Denominator Interior=1.27
Uncharted2 Linear White Night=20.289999
Uncharted2 Toe Denominator Interior=1.25
Uncharted2 Linear White Night=20.299999
Uncharted2 Linear White Day=24.139999
Uncharted2 Linear White Interior=23.09
SweetFX Gamma Night=0.38
SweetFX Gamma Day=0.36
SweetFX Gamma Interior=0.37
SweetFX Exposure Night=-0.83
SweetFX Exposure Day=-0.86
SweetFX Exposure Interior=-0.84
SweetFX Saturation Night=0.0
SweetFX Saturation Day=0.0
SweetFX Saturation Interior=0.0
SweetFX Bleach Night=0.0
SweetFX Bleach Day=0.0
SweetFX Bleach Interior=0.0
SweetFX Defog Night=0.0
SweetFX Defog Day=0.0
SweetFX Defog Interior=0.0
SweetFX Defog Color Night=0, 0, 1
SweetFX Defog Color Day=0, 0, 1
SweetFX Defog Color Interior=0, 0, 1
Uncharted2 Linear White Interior=22.130001
Enable RGB Grading=true
Grading Intensity Night=1.02, 1, 1.05
Grading Intensity Night=1.02, 0.98, 0.93
Grading Intensity Day=1.04, 1.02, 1
Grading Intensity Interior=1.03, 1.01, 1
Grading Contrast Night=0.97, 0.95, 0.96
Grading Contrast Night=1.02, 0.95, 0.91
Grading Contrast Day=0.94, 0.95, 0.96
Grading Contrast Interior=0.96, 0.94, 0.97
Enable Vibrance Grading=true
Grading Color Night=-0.59, 0.16, -0.74
Grading Color Night=-0.75, -0.32, -0.69
Grading Color Day=-0.24, -0.12, -0.38
Grading Color Interior=-0.33, -0.04, -0.89
Grading Color Factor Night=-0.06
Grading Color Factor Night=-0.12
Grading Color Factor Day=-0.1
Grading Color Factor Interior=-0.05
Enable HSV Grading=true
Grading Saturation Intensity Night=1.12
Grading Saturation Intensity Night=1.13
Grading Saturation Intensity Day=1.17
Grading Saturation Intensity Interior=1.16
Grading Saturation Contrast Night=1.18
Grading Saturation Intensity Interior=1.1
Grading Saturation Contrast Night=1.35
Grading Saturation Contrast Day=1.27
Grading Saturation Contrast Interior=1.1
Grading Saturation Contrast Interior=1.24
Grading Value Intensity Night=0.95
Grading Value Intensity Day=0.92
Grading Value Intensity Interior=0.95
Grading Value Intensity Interior=0.97
Grading Value Contrast Night=1.05
Grading Value Contrast Day=1.12
Grading Value Contrast Interior=1.08
Grading Value Contrast Interior=1.06
Colorize After HSV=true
Enable LUT Grading=true
LUT Blend Night=0.19
LUT Blend Day=0.25
LUT Blend Interior=0.22
LUT Blend Interior=0.36
Enable Technicolor=true
Technicolor Blend=0.5
Enable Vanilla Imagespace=true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 KiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 273 KiB

Before After
Before After