MariENB FROST 3.4.0
|
|
@ -269,7 +269,7 @@ AmbientLightingIntensityInteriorNight=0.12
|
|||
[SSAO_SSIL]
|
||||
UseIndirectLighting=true
|
||||
SamplingQuality=1
|
||||
SamplingRange=0.25
|
||||
SamplingRange=0.1
|
||||
AOIntensity=0.94
|
||||
AOIntensityInterior=0.89
|
||||
AOAmount=1.25
|
||||
|
|
@ -279,7 +279,7 @@ ILAmountInterior=1.18
|
|||
AOMixingType=2
|
||||
AOMixingTypeInterior=3
|
||||
ResolutionScale=0.5
|
||||
SourceTexturesScale=0.5
|
||||
SourceTexturesScale=1.0
|
||||
[FOG]
|
||||
IgnoreWeatherSystem=true
|
||||
DistanceFadeDawn=1.0
|
||||
|
|
|
|||
BIN
enbseries/SMAA/AreaTex.dds
Normal file
24
enbseries/SMAA/LICENSE.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Copyright (C) 2013 Jorge Jimenez (jorge@iryoku.com)
|
||||
Copyright (C) 2013 Jose I. Echevarria (joseignacioechevarria@gmail.com)
|
||||
Copyright (C) 2013 Belen Masia (bmasia@unizar.es)
|
||||
Copyright (C) 2013 Fernando Navarro (fernandn@microsoft.com)
|
||||
Copyright (C) 2013 Diego Gutierrez (diegog@unizar.es)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software. As clarification, there is no
|
||||
requirement that the copyright notice and permission be included in binary
|
||||
distributions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
1361
enbseries/SMAA/SMAA.fxh
Normal file
BIN
enbseries/SMAA/SearchTex.dds
Normal file
|
|
@ -1 +1 @@
|
|||
3.3.1 "Malden's Angel"
|
||||
3.4.0 "Who In Their Right Mind Would Frost A Cake With Their Butt"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Texture2D TexturePrevious;
|
|||
|
||||
SamplerState Sampler0
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
|
@ -50,7 +50,10 @@ float4 PS_Downsample( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
|||
float4 res = float4(0,0,0,0);
|
||||
int x, y;
|
||||
[unroll] for ( y=-8; y<8; y++ ) [unroll] for ( x=-8; x<8; x++ )
|
||||
res += TextureCurrent.Sample(Sampler0,coord+float2(x,y)*ssz);
|
||||
{
|
||||
res += TextureCurrent.Sample(Sampler0,coord
|
||||
+float2(x+0.5,y+0.5)*ssz);
|
||||
}
|
||||
res /= 256.0;
|
||||
res = luminance(res.rgb);
|
||||
res.w = 1.0;
|
||||
|
|
@ -67,7 +70,8 @@ float4 PS_Adaptation(VS_OUTPUT_POST IN, float4 v0 : SV_Position0) : SV_Target
|
|||
int x, y;
|
||||
[unroll] for ( y=-8; y<8; y++ ) [unroll] for ( x=-8; x<8; x++ )
|
||||
{
|
||||
smp = TextureCurrent.Sample(Sampler0,coord+float2(x,y)*ssz).x;
|
||||
smp = TextureCurrent.Sample(Sampler0,coord
|
||||
+float2(x+0.5,y+0.5)*ssz).x;
|
||||
smpmax = max(smpmax,smp);
|
||||
res += smp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ Texture2D RenderTarget256;
|
|||
Texture2D RenderTarget128;
|
||||
Texture2D RenderTarget64;
|
||||
Texture2D RenderTarget32;
|
||||
Texture2D RenderTargetRGBA64F;
|
||||
Texture2D RenderTarget16;
|
||||
|
||||
SamplerState Sampler
|
||||
{
|
||||
|
|
@ -412,11 +412,7 @@ float4 PS_PrePass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
|||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
progressive downsizing of textures, with interpolation.
|
||||
|
||||
First downsample is unnecessary because both textures are the same size.
|
||||
*/
|
||||
/* progressive downsizing of textures, with interpolation. */
|
||||
float4 PS_Downsize( VS_OUTPUT_POST IN, float4 v0 : SV_Position0,
|
||||
uniform Texture2D intex, uniform float insz ) : SV_Target
|
||||
{
|
||||
|
|
@ -445,7 +441,7 @@ float4 PS_Downsize( VS_OUTPUT_POST IN, float4 v0 : SV_Position0,
|
|||
float4 Anamorphic( float2 coord, Texture2D intex, float insz )
|
||||
{
|
||||
float4 res = float4(0.0,0.0,0.0,0.0),
|
||||
base = RenderTargetRGBA64F.Sample(Sampler,coord);
|
||||
base = RenderTarget1024.Sample(Sampler,coord);
|
||||
int i;
|
||||
float sum = 0.0;
|
||||
float inc = flen/insz;
|
||||
|
|
@ -498,7 +494,7 @@ float4 PS_VerticalBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0,
|
|||
|
||||
float2 coord = IN.txcoord0.xy;
|
||||
float4 res = float4(0.0,0.0,0.0,0.0),
|
||||
base = RenderTargetRGBA64F.Sample(Sampler,coord);
|
||||
base = RenderTarget1024.Sample(Sampler,coord);
|
||||
int i;
|
||||
float sum = 0.0;
|
||||
float inc = bloomradiusy/insz;
|
||||
|
|
@ -525,12 +521,12 @@ float4 PS_VerticalBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0,
|
|||
float4 PS_PostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord0.xy;
|
||||
float4 res = bloommix1*RenderTarget1024.Sample(Sampler2,coord);
|
||||
res += bloommix2*RenderTarget512.Sample(Sampler2,coord);
|
||||
res += bloommix3*RenderTarget256.Sample(Sampler2,coord);
|
||||
res += bloommix4*RenderTarget128.Sample(Sampler2,coord);
|
||||
res += bloommix5*RenderTarget64.Sample(Sampler2,coord);
|
||||
res += bloommix6*RenderTarget32.Sample(Sampler2,coord);
|
||||
float4 res = bloommix1*RenderTarget512.Sample(Sampler2,coord);
|
||||
res += bloommix2*RenderTarget256.Sample(Sampler2,coord);
|
||||
res += bloommix3*RenderTarget128.Sample(Sampler2,coord);
|
||||
res += bloommix4*RenderTarget64.Sample(Sampler2,coord);
|
||||
res += bloommix5*RenderTarget32.Sample(Sampler2,coord);
|
||||
res += bloommix6*RenderTarget16.Sample(Sampler2,coord);
|
||||
res.rgb /= 6.0;
|
||||
res.rgb = clamp(res.rgb,0.0,32768.0);
|
||||
res.a = 1.0;
|
||||
|
|
@ -540,13 +536,13 @@ float4 PS_PostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
|||
float4 PS_SPostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord0.xy;
|
||||
float4 res = bloommixs*RenderTarget128.Sample(Sampler2,coord);
|
||||
float4 res = bloommixs*RenderTarget64.Sample(Sampler2,coord);
|
||||
res.rgb = clamp(res.rgb,0.0,32768.0);
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
|
||||
technique11 BloomSimplePass <string UIName="MariENB Simple Bloom"; string RenderTarget="RenderTargetRGBA64F";>
|
||||
technique11 BloomSimplePass <string UIName="MariENB Simple Bloom"; string RenderTarget="RenderTarget1024";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -554,15 +550,7 @@ technique11 BloomSimplePass <string UIName="MariENB Simple Bloom"; string Render
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_PrePass()));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass1 <string RenderTarget="RenderTarget1024";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTargetRGBA64F,0.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass2 <string RenderTarget="RenderTarget512";>
|
||||
technique11 BloomSimplePass1 <string RenderTarget="RenderTarget512";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -570,7 +558,7 @@ technique11 BloomSimplePass2 <string RenderTarget="RenderTarget512";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget1024,1024.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass3 <string RenderTarget="RenderTarget256";>
|
||||
technique11 BloomSimplePass2 <string RenderTarget="RenderTarget256";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -578,7 +566,7 @@ technique11 BloomSimplePass3 <string RenderTarget="RenderTarget256";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget512,512.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass4 <string RenderTarget="RenderTarget128";>
|
||||
technique11 BloomSimplePass3 <string RenderTarget="RenderTarget128";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -586,20 +574,28 @@ technique11 BloomSimplePass4 <string RenderTarget="RenderTarget128";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget256,256.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass4 <string RenderTarget="RenderTarget64";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget128,128.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass5
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget128,128.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget64,64.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass6 <string RenderTarget="RenderTarget128";>
|
||||
technique11 BloomSimplePass6 <string RenderTarget="RenderTarget64";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,3.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,64.0,3.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomSimplePass7
|
||||
|
|
@ -611,7 +607,7 @@ technique11 BloomSimplePass7
|
|||
}
|
||||
}
|
||||
|
||||
technique11 BloomPass <string UIName="MariENB Multi Bloom"; string RenderTarget="RenderTargetRGBA64F";>
|
||||
technique11 BloomPass <string UIName="MariENB Multi Bloom"; string RenderTarget="RenderTarget1024";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -619,15 +615,7 @@ technique11 BloomPass <string UIName="MariENB Multi Bloom"; string RenderTarget=
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_PrePass()));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass1 <string RenderTarget="RenderTarget1024";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTargetRGBA64F,0.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass2 <string RenderTarget="RenderTarget512";>
|
||||
technique11 BloomPass1 <string RenderTarget="RenderTarget512";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -635,7 +623,7 @@ technique11 BloomPass2 <string RenderTarget="RenderTarget512";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget1024,1024.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass3 <string RenderTarget="RenderTarget256";>
|
||||
technique11 BloomPass2 <string RenderTarget="RenderTarget256";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -643,7 +631,7 @@ technique11 BloomPass3 <string RenderTarget="RenderTarget256";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget512,512.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass4 <string RenderTarget="RenderTarget128";>
|
||||
technique11 BloomPass3 <string RenderTarget="RenderTarget128";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -651,7 +639,7 @@ technique11 BloomPass4 <string RenderTarget="RenderTarget128";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget256,256.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass5 <string RenderTarget="RenderTarget64";>
|
||||
technique11 BloomPass4 <string RenderTarget="RenderTarget64";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -659,7 +647,7 @@ technique11 BloomPass5 <string RenderTarget="RenderTarget64";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget128,128.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass6 <string RenderTarget="RenderTarget32";>
|
||||
technique11 BloomPass5 <string RenderTarget="RenderTarget32";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -667,23 +655,15 @@ technique11 BloomPass6 <string RenderTarget="RenderTarget32";>
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget64,64.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass6 <string RenderTarget="RenderTarget16";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget32,32.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass7
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget1024,1024.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass8 <string RenderTarget="RenderTarget1024";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,1024.0,0.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass9
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -691,15 +671,15 @@ technique11 BloomPass9
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget512,512.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass10 <string RenderTarget="RenderTarget512";>
|
||||
technique11 BloomPass8 <string RenderTarget="RenderTarget512";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,512.0,1.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,512.0,0.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass11
|
||||
technique11 BloomPass9
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -707,15 +687,15 @@ technique11 BloomPass11
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget256,256.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass12 <string RenderTarget="RenderTarget256";>
|
||||
technique11 BloomPass10 <string RenderTarget="RenderTarget256";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,256.0,2.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,256.0,1.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass13
|
||||
technique11 BloomPass11
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -723,15 +703,15 @@ technique11 BloomPass13
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget128,128.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass14 <string RenderTarget="RenderTarget128";>
|
||||
technique11 BloomPass12 <string RenderTarget="RenderTarget128";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,3.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,2.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass15
|
||||
technique11 BloomPass13
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -739,15 +719,15 @@ technique11 BloomPass15
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget64,64.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass16 <string RenderTarget="RenderTarget64";>
|
||||
technique11 BloomPass14 <string RenderTarget="RenderTarget64";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,64.0,4.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,64.0,3.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass17
|
||||
technique11 BloomPass15
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
|
|
@ -755,12 +735,28 @@ technique11 BloomPass17
|
|||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget32,32.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass18 <string RenderTarget="RenderTarget32";>
|
||||
technique11 BloomPass16 <string RenderTarget="RenderTarget32";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,32.0,5.0)));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,32.0,4.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass17
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget16,16.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass18 <string RenderTarget="RenderTarget16";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,16.0,5.0)));
|
||||
}
|
||||
}
|
||||
technique11 BloomPass19
|
||||
|
|
|
|||
|
|
@ -626,6 +626,163 @@ float edgevradius
|
|||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
bool edgevinv
|
||||
<
|
||||
string UIName = "Invert Edgevision";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
bool edgevblend
|
||||
<
|
||||
string UIName = "Blend Edgevision";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* use luma edge detection filter */
|
||||
string str_com = "Edge Detect";
|
||||
bool comenable
|
||||
<
|
||||
string UIName = "Enable Edge Detect";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
float compow
|
||||
<
|
||||
string UIName = "Edge Detect Contrast";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float commult
|
||||
<
|
||||
string UIName = "Edge Detect Intensity";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float comradius
|
||||
<
|
||||
string UIName = "Edge Detect Radius";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
bool cominv
|
||||
<
|
||||
string UIName = "Invert Edge Detect";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
bool comblend
|
||||
<
|
||||
string UIName = "Blend Edge Detect";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* use edge threshold filter aka "linevision" */
|
||||
string str_cont = "Linevision";
|
||||
bool contenable
|
||||
<
|
||||
string UIName = "Enable Linevision";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* factors */
|
||||
float contfadepow_n
|
||||
<
|
||||
string UIName = "Linevision Fade Contrast Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {2.0};
|
||||
float contfadepow_d
|
||||
<
|
||||
string UIName = "Linevision Fade Contrast Day";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {2.0};
|
||||
float contfadepow_i
|
||||
<
|
||||
string UIName = "Linevision Fade Contrast Interior";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {2.0};
|
||||
float contfademult_n
|
||||
<
|
||||
string UIName = "Linevision Fade Intensity Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {500.0};
|
||||
float contfademult_d
|
||||
<
|
||||
string UIName = "Linevision Fade Intensity Day";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {500.0};
|
||||
float contfademult_i
|
||||
<
|
||||
string UIName = "Linevision Fade Intensity Interior";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {500.0};
|
||||
float contpow
|
||||
<
|
||||
string UIName = "Linevision Contrast";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float contmult
|
||||
<
|
||||
string UIName = "Linevision Intensity";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {2.0};
|
||||
float contradius
|
||||
<
|
||||
string UIName = "Linevision Radius";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float contthreshold
|
||||
<
|
||||
string UIName = "Linevision Threshold";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {0.05};
|
||||
bool continv
|
||||
<
|
||||
string UIName = "Invert Linevision";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
bool contblend
|
||||
<
|
||||
string UIName = "Blend Linevision";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* fog filter */
|
||||
string str_fog = "Custom Fog Filter";
|
||||
bool fogenable
|
||||
<
|
||||
string UIName = "Enable Custom Fog";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
float fogpow
|
||||
<
|
||||
string UIName = "Fog Contrast";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float fogmult
|
||||
<
|
||||
string UIName = "Fog Intensity";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float fogbump
|
||||
<
|
||||
string UIName = "Fog Shift";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float3 fogcolor
|
||||
<
|
||||
string UIName = "Fog Color";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0,1.0,1.0};
|
||||
bool foglimbo
|
||||
<
|
||||
string UIName = "Limbo Mode";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* ssao filter */
|
||||
string str_ssao = "Ray Marching SSAO";
|
||||
bool ssaoenable
|
||||
|
|
@ -693,6 +850,11 @@ float ssaopow
|
|||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.5};
|
||||
float ssaobump
|
||||
<
|
||||
string UIName = "SSAO Shift";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float ssaoblend
|
||||
<
|
||||
string UIName = "SSAO Blending";
|
||||
|
|
@ -979,6 +1141,12 @@ static const float3x3 GY =
|
|||
0, 0, 0,
|
||||
-1,-2,-1
|
||||
};
|
||||
/* radius: 8, std dev: 3 */
|
||||
static const float gauss8[8] =
|
||||
{
|
||||
0.134598, 0.127325, 0.107778, 0.081638,
|
||||
0.055335, 0.033562, 0.018216, 0.008847
|
||||
};
|
||||
/* radius: 16, std dev: 13 */
|
||||
static const float gauss16[16] =
|
||||
{
|
||||
|
|
@ -988,18 +1156,42 @@ static const float gauss16[16] =
|
|||
0.026131, 0.024268, 0.022405, 0.020563
|
||||
};
|
||||
/* SSAO samples */
|
||||
static const float3 ssao_samples[16] =
|
||||
static const float3 ssao_samples[64] =
|
||||
{
|
||||
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),
|
||||
float3(-0.0097, 0.0275,-0.0092),float3(-0.0178,-0.0072, 0.0491),
|
||||
float3( 0.0227,-0.0431,-0.0681),float3( 0.1052, 0.0332,-0.0588),
|
||||
float3( 0.0997, 0.0056, 0.1473),float3(-0.1252, 0.2019, 0.0564),
|
||||
float3(-0.1054,-0.2072, 0.2271),float3(-0.0542, 0.3096, 0.2814),
|
||||
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)
|
||||
float3(-0.0051, 0.0021, 0.0146),float3(-0.0197,-0.0213,-0.0116),
|
||||
float3( 0.0005,-0.0432,-0.0182),float3(-0.0011,-0.0586,-0.0217),
|
||||
float3(-0.0549, 0.0461, 0.0309),float3(-0.0448,-0.0764,-0.0306),
|
||||
float3(-0.0366, 0.0758,-0.0699),float3(-0.0770,-0.0707,-0.0686),
|
||||
float3( 0.1181,-0.0340,-0.0683),float3(-0.0647, 0.0356, 0.1377),
|
||||
float3(-0.1167, 0.1262, 0.0024),float3(-0.1353,-0.0861, 0.0971),
|
||||
float3(-0.0096, 0.0936, 0.1800),float3( 0.1311,-0.1013,-0.1429),
|
||||
float3(-0.1186,-0.0653, 0.1913),float3( 0.1641, 0.0260, 0.1868),
|
||||
float3(-0.1225,-0.2319, 0.0424),float3( 0.1036,-0.2000, 0.1684),
|
||||
float3( 0.1656, 0.2022,-0.1408),float3(-0.1809,-0.1673, 0.1922),
|
||||
float3(-0.2485,-0.1236, 0.1750),float3( 0.1030,-0.0550, 0.3233),
|
||||
float3(-0.0405, 0.3068, 0.1827),float3(-0.0576, 0.1632, 0.3327),
|
||||
float3( 0.0392, 0.3583,-0.1505),float3( 0.0082, 0.2865, 0.2879),
|
||||
float3( 0.0055,-0.2835, 0.3124),float3(-0.2733, 0.1991,-0.2776),
|
||||
float3( 0.2667, 0.1127,-0.3486),float3(-0.3326, 0.2740,-0.1844),
|
||||
float3( 0.2887,-0.3838, 0.0630),float3( 0.1088, 0.1546, 0.4629),
|
||||
float3( 0.0977,-0.3565, 0.3595),float3(-0.4204, 0.0855, 0.3133),
|
||||
float3(-0.2237,-0.4932, 0.0759),float3( 0.4245, 0.3169,-0.1891),
|
||||
float3( 0.0084,-0.5682, 0.1062),float3(-0.1489,-0.5296,-0.2235),
|
||||
float3( 0.0014,-0.4153,-0.4460),float3( 0.0300,-0.4392, 0.4437),
|
||||
float3( 0.2627, 0.4518, 0.3704),float3(-0.4945, 0.3659, 0.2285),
|
||||
float3(-0.2550,-0.5311, 0.3230),float3(-0.4477, 0.0828,-0.5151),
|
||||
float3( 0.4682, 0.4531,-0.2644),float3(-0.1235,-0.0366, 0.7071),
|
||||
float3( 0.3545, 0.4559, 0.4536),float3(-0.1037,-0.2199,-0.7095),
|
||||
float3( 0.4269, 0.5299,-0.3510),float3( 0.7051,-0.1468,-0.3027),
|
||||
float3( 0.4590,-0.5669,-0.3208),float3( 0.2330, 0.1264, 0.7680),
|
||||
float3(-0.3954, 0.5619,-0.4622),float3( 0.5977,-0.5110, 0.3059),
|
||||
float3(-0.5800,-0.6306, 0.0672),float3(-0.2211,-0.0332,-0.8460),
|
||||
float3(-0.3808,-0.2238,-0.7734),float3(-0.5616, 0.6858,-0.1887),
|
||||
float3(-0.2995, 0.5165,-0.7024),float3( 0.5042,-0.0537, 0.7885),
|
||||
float3(-0.6477,-0.3691, 0.5938),float3(-0.3969, 0.8815, 0.0620),
|
||||
float3(-0.4300,-0.8814,-0.0852),float3(-0.1683, 0.9379, 0.3033)
|
||||
};
|
||||
/* For high quality DOF */
|
||||
/* For low quality DOF */
|
||||
static const float2 poisson32[32] =
|
||||
{
|
||||
float2( 0.7284430,-0.1927130),float2( 0.4051600,-0.2312710),
|
||||
|
|
@ -1042,7 +1234,7 @@ Texture2D RenderTargetR32F; /* for DOF */
|
|||
|
||||
Texture2D TextureNoise3
|
||||
<
|
||||
string ResourceName = "menbnoise2.png";
|
||||
string ResourceName = "menbnoise3.png";
|
||||
>;
|
||||
Texture2D TextureHeat
|
||||
<
|
||||
|
|
@ -1164,7 +1356,7 @@ float4 PS_SSAOPre( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
|||
float sdepth, so, delta;
|
||||
float sclamp = ssaoclamp/100000.0;
|
||||
float sclampmin = ssaoclampmin/100000.0;
|
||||
[unroll] for ( i=0; i<16; i++ )
|
||||
[unroll] for ( i=0; i<64; i++ )
|
||||
{
|
||||
sample = reflect(ssao_samples[i],rnormal);
|
||||
sample *= sign(dot(normal,sample));
|
||||
|
|
@ -1175,64 +1367,47 @@ float4 PS_SSAOPre( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
|||
if ( (delta > sclampmin) && (delta < sclamp) )
|
||||
occ += 1.0-delta;
|
||||
}
|
||||
float uocc = saturate(occ/16.0);
|
||||
float uocc = saturate(occ/64.0);
|
||||
float fade = 1.0-depth;
|
||||
uocc *= saturate(pow(max(0,fade),ssaofadepow)*ssaofademult);
|
||||
uocc = saturate(pow(max(0,uocc),ssaopow)*ssaomult);
|
||||
uocc = saturate(pow(max(0,uocc),ssaopow)*ssaomult+ssaobump);
|
||||
return saturate(1.0-(uocc*ssaoblend));
|
||||
}
|
||||
/*
|
||||
The blur passes use bilateral filtering to mostly preserve borders.
|
||||
The blur pass uses bilateral filtering to mostly preserve borders.
|
||||
An additional factor using difference of normals was tested, but the
|
||||
performance decrease was too much, so it's gone forever.
|
||||
*/
|
||||
float4 PS_SSAOBlurH( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
float4 PS_SSAOBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( !ssaoenable ) return 0.0;
|
||||
if ( !ssaobenable ) return TextureColor.Sample(Sampler1,coord);
|
||||
float bresl = ScreenSize.x;
|
||||
float bof = (1.0/bresl)*ssaobradius;
|
||||
float isd, sd, ds, sw, tw = 0;
|
||||
float res = 0.0;
|
||||
int i;
|
||||
isd = TextureDepth.Sample(Sampler1,coord).x;
|
||||
[unroll] for ( i=-15; i<=15; i++ )
|
||||
float4 res = TextureColor.Sample(Sampler1,coord);
|
||||
float mud = RenderTargetR16F.Sample(Sampler1,coord).x;
|
||||
if ( !ssaoenable ) return res;
|
||||
if ( !ssaobenable )
|
||||
{
|
||||
sd = TextureDepth.Sample(Sampler1,coord+float2(i,0)*bof).x;
|
||||
if ( ssaodebug ) return saturate(mud);
|
||||
return res*mud;
|
||||
}
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 bof = (1.0/bresl)*ssaobradius;
|
||||
float isd, sd, ds, sw, tw = 0;
|
||||
mud = 0.0;
|
||||
int i, j;
|
||||
isd = TextureDepth.Sample(Sampler1,coord).x;
|
||||
[unroll] for ( j=-7; j<=7; j++ ) [unroll] for ( i=-7; i<=7; i++ )
|
||||
{
|
||||
sd = TextureDepth.Sample(Sampler1,coord+float2(i,j)*bof).x;
|
||||
ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
|
||||
sw = ds;
|
||||
sw *= gauss16[abs(i)];
|
||||
sw *= gauss8[abs(i)]*gauss8[abs(j)];
|
||||
tw += sw;
|
||||
res += sw*TextureColor.Sample(Sampler1,coord+float2(i,0)
|
||||
mud += sw*RenderTargetR16F.Sample(Sampler1,coord+float2(i,j)
|
||||
*bof).x;
|
||||
}
|
||||
res /= tw;
|
||||
return res;
|
||||
}
|
||||
float4 PS_SSAOBlurV( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( !ssaoenable ) return 0.0;
|
||||
if ( !ssaobenable ) return TextureColor.Sample(Sampler1,coord);
|
||||
float bresl = ScreenSize.x*ScreenSize.w;
|
||||
float bof = (1.0/bresl)*ssaobradius;
|
||||
float isd, sd, ds, sw, tw = 0;
|
||||
float res = 0.0;
|
||||
int i;
|
||||
isd = TextureDepth.Sample(Sampler1,coord).x;
|
||||
[unroll] for ( i=-15; i<=15; i++ )
|
||||
{
|
||||
sd = TextureDepth.Sample(Sampler1,coord+float2(0,i)*bof).x;
|
||||
ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
|
||||
sw = ds;
|
||||
sw *= gauss16[abs(i)];
|
||||
tw += sw;
|
||||
res += sw*TextureColor.Sample(Sampler1,coord+float2(0,i)
|
||||
*bof).x;
|
||||
}
|
||||
res /= tw;
|
||||
return res;
|
||||
mud /= tw;
|
||||
if ( ssaodebug ) return saturate(mud);
|
||||
return res*mud;
|
||||
}
|
||||
|
||||
/* precalculate DOF factors */
|
||||
|
|
@ -1312,9 +1487,97 @@ float3 EdgeView( float3 res, float2 coord )
|
|||
mdy += GY[2][2]*depths[2][2];
|
||||
mud = pow(mdx*mdx+mdy*mdy,0.5);
|
||||
float fade = 1.0-TextureDepth.Sample(Sampler1,coord).x;
|
||||
mud *= saturate(pow(max(0,fade),edgevfadepow)*edgevfademult);
|
||||
mud = saturate(pow(max(0,mud),edgevpow)*edgevmult);
|
||||
return mud;
|
||||
mud *= clamp(pow(max(0,fade),edgevfadepow)*edgevfademult,0.0,1.0);
|
||||
mud = clamp(pow(max(0,mud),edgevpow)*edgevmult,0.0,1.0);
|
||||
if ( edgevblend ) return res-(edgevinv?1.0-mud:mud);
|
||||
return edgevinv?1.0-mud:mud;
|
||||
}
|
||||
|
||||
/* luminance edge detection */
|
||||
float3 EdgeDetect( float3 res, float2 coord )
|
||||
{
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
if ( fixed.x>0 && fixed.y>0 ) bresl = fixed;
|
||||
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*comradius;
|
||||
float mdx = 0, mdy = 0, mud = 0;
|
||||
float3x3 lums;
|
||||
float3 col;
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(-1,-1)*bof).rgb;
|
||||
lums[0][0] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(0,-1)*bof).rgb;
|
||||
lums[0][1] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(1,-1)*bof).rgb;
|
||||
lums[0][2] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(-1,0)*bof).rgb;
|
||||
lums[1][0] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(0,0)*bof).rgb;
|
||||
lums[1][1] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(1,0)*bof).rgb;
|
||||
lums[1][2] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(-1,1)*bof).rgb;
|
||||
lums[2][0] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(0,1)*bof).rgb;
|
||||
lums[2][1] = luminance(col);
|
||||
col = TextureOriginal.Sample(Sampler1,coord+float2(1,1)*bof).rgb;
|
||||
lums[2][2] = luminance(col);
|
||||
mdx += GX[0][0]*lums[0][0];
|
||||
mdx += GX[0][1]*lums[0][1];
|
||||
mdx += GX[0][2]*lums[0][2];
|
||||
mdx += GX[1][0]*lums[1][0];
|
||||
mdx += GX[1][1]*lums[1][1];
|
||||
mdx += GX[1][2]*lums[1][2];
|
||||
mdx += GX[2][0]*lums[2][0];
|
||||
mdx += GX[2][1]*lums[2][1];
|
||||
mdx += GX[2][2]*lums[2][2];
|
||||
mdy += GY[0][0]*lums[0][0];
|
||||
mdy += GY[0][1]*lums[0][1];
|
||||
mdy += GY[0][2]*lums[0][2];
|
||||
mdy += GY[1][0]*lums[1][0];
|
||||
mdy += GY[1][1]*lums[1][1];
|
||||
mdy += GY[1][2]*lums[1][2];
|
||||
mdy += GY[2][0]*lums[2][0];
|
||||
mdy += GY[2][1]*lums[2][1];
|
||||
mdy += GY[2][2]*lums[2][2];
|
||||
mud = pow(max(mdx*mdx+mdy*mdy,0.0),0.5);
|
||||
mud = clamp(pow(max(mud,0.0),compow)*commult,0.0,1.0);
|
||||
if ( comblend ) return res-(cominv?1.0-mud:mud);
|
||||
return cominv?1.0-mud:mud;
|
||||
}
|
||||
|
||||
/* linevision filter */
|
||||
float3 LineView( float3 res, float2 coord )
|
||||
{
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
if ( fixed.x>0 && fixed.y>0 ) bresl = fixed;
|
||||
float contfadepow = tod_ind(contfadepow);
|
||||
float contfademult = tod_ind(contfademult);
|
||||
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*contradius;
|
||||
float dep = depthlinear(coord);
|
||||
float cont = depthlinear(coord+float2(-1,-1)*bof);
|
||||
cont += depthlinear(coord+float2(0,-1)*bof);
|
||||
cont += depthlinear(coord+float2(1,-1)*bof);
|
||||
cont += depthlinear(coord+float2(-1,0)*bof);
|
||||
cont += depthlinear(coord+float2(1,0)*bof);
|
||||
cont += depthlinear(coord+float2(-1,1)*bof);
|
||||
cont += depthlinear(coord+float2(0,1)*bof);
|
||||
cont += depthlinear(coord+float2(1,1)*bof);
|
||||
cont /= 8.0;
|
||||
float mud = 0.0;
|
||||
if ( abs(cont-dep) > (contthreshold*0.00001) ) mud = 1.0;
|
||||
float fade = 1.0-TextureDepth.Sample(Sampler1,coord).x;
|
||||
mud *= clamp(pow(max(0.0,fade),contfadepow)*contfademult,0.0,1.0);
|
||||
mud = clamp(pow(max(0.0,mud),contpow)*contmult,0.0,1.0);
|
||||
if ( contblend ) return res-(continv?1.0-mud:mud);
|
||||
return continv?1.0-mud:mud;
|
||||
}
|
||||
|
||||
/* fog filter */
|
||||
float3 Limbo( float3 res, float2 coord )
|
||||
{
|
||||
float mud = clamp(pow(max(0.0,depthlinear(coord)),fogpow)*fogmult
|
||||
+fogbump,0.0,1.0);
|
||||
if ( foglimbo ) return fogcolor*mud;
|
||||
return lerp(res,fogcolor,mud);
|
||||
}
|
||||
|
||||
/* Colour grading based on depth */
|
||||
|
|
@ -1367,17 +1630,25 @@ float3 DepthGrade( float3 res, float2 coord )
|
|||
return res;
|
||||
}
|
||||
|
||||
/* apply SSAO to screen */
|
||||
float4 PS_SSAOApply( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
float4 PS_DepthGrade( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = TextureOriginal.Sample(Sampler1,coord);
|
||||
if ( edgevenable ) res.rgb = EdgeView(res.rgb,coord);
|
||||
float4 res = TextureColor.Sample(Sampler1,coord);
|
||||
res.rgb = DepthGrade(res.rgb,coord);
|
||||
if ( !ssaoenable ) return res;
|
||||
float mud = RenderTargetR16F.Sample(Sampler1,coord).x;
|
||||
if ( ssaodebug ) return saturate(mud);
|
||||
return res*mud;
|
||||
res.rgb = max(res.rgb,0.0);
|
||||
return res;
|
||||
}
|
||||
|
||||
float4 PS_PreFilters( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = TextureColor.Sample(Sampler1,coord);
|
||||
if ( edgevenable ) res.rgb = EdgeView(res.rgb,coord);
|
||||
if ( comenable ) res.rgb = EdgeDetect(res.rgb,coord);
|
||||
if ( contenable ) res.rgb = LineView(res.rgb,coord);
|
||||
if ( fogenable ) res.rgb = Limbo(res.rgb,coord);
|
||||
res.rgb = max(res.rgb,0.0);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Distant hot air refraction. Not very realistic, but does the job. */
|
||||
|
|
@ -1741,7 +2012,7 @@ technique11 Prepass <string UIName="MariENB";>
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOPre()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_PreFilters()));
|
||||
}
|
||||
}
|
||||
technique11 Prepass1
|
||||
|
|
@ -1749,7 +2020,7 @@ technique11 Prepass1
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurH()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_DepthGrade()));
|
||||
}
|
||||
}
|
||||
technique11 Prepass2 <string RenderTarget="RenderTargetR16F";>
|
||||
|
|
@ -1757,15 +2028,15 @@ technique11 Prepass2 <string RenderTarget="RenderTargetR16F";>
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurV()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOPre()));
|
||||
}
|
||||
}
|
||||
technique11 Prepass3 <string RenderTarget="RenderTargetR32F";>
|
||||
technique11 Prepass3
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_DoFPrepass()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Distortion()));
|
||||
}
|
||||
}
|
||||
technique11 Prepass4
|
||||
|
|
@ -1773,15 +2044,15 @@ technique11 Prepass4
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOApply()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlur()));
|
||||
}
|
||||
}
|
||||
technique11 Prepass5
|
||||
technique11 Prepass5 <string RenderTarget="RenderTargetR32F";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Distortion()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_DoFPrepass()));
|
||||
}
|
||||
}
|
||||
technique11 Prepass6
|
||||
|
|
@ -1814,7 +2085,7 @@ technique11 PrepassB <string UIName="MariENB (HQ Bokeh)";>
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOPre()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_PreFilters()));
|
||||
}
|
||||
}
|
||||
technique11 PrepassB1
|
||||
|
|
@ -1822,7 +2093,7 @@ technique11 PrepassB1
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurH()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_DepthGrade()));
|
||||
}
|
||||
}
|
||||
technique11 PrepassB2 <string RenderTarget="RenderTargetR16F";>
|
||||
|
|
@ -1830,15 +2101,15 @@ technique11 PrepassB2 <string RenderTarget="RenderTargetR16F";>
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurV()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOPre()));
|
||||
}
|
||||
}
|
||||
technique11 PrepassB3 <string RenderTarget="RenderTargetR32F";>
|
||||
technique11 PrepassB3
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_DoFPrepass()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Distortion()));
|
||||
}
|
||||
}
|
||||
technique11 PrepassB4
|
||||
|
|
@ -1846,15 +2117,15 @@ technique11 PrepassB4
|
|||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOApply()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlur()));
|
||||
}
|
||||
}
|
||||
technique11 PrepassB5
|
||||
technique11 PrepassB5 <string RenderTarget="RenderTargetR32F";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_Distortion()));
|
||||
SetPixelShader(CompileShader(ps_5_0,PS_DoFPrepass()));
|
||||
}
|
||||
}
|
||||
technique11 PrepassB6
|
||||
|
|
|
|||
|
|
@ -97,17 +97,17 @@ Edgevision Radius=1.0
|
|||
Enable SSAO=false
|
||||
SSAO Radius=0.05
|
||||
SSAO Noise=0
|
||||
SSAO Fade Contrast Night=0.6
|
||||
SSAO Fade Contrast Day=0.7
|
||||
SSAO Fade Contrast Interior=0.65
|
||||
SSAO Fade Contrast Night=0.95
|
||||
SSAO Fade Contrast Day=1.11
|
||||
SSAO Fade Contrast Interior=0.89
|
||||
SSAO Fade Intensity Night=10.5
|
||||
SSAO Fade Intensity Day=12.5
|
||||
SSAO Fade Intensity Interior=11.5
|
||||
SSAO Intensity=1.25
|
||||
SSAO Contrast=0.65
|
||||
SSAO Intensity=1.5
|
||||
SSAO Contrast=0.5
|
||||
SSAO Blending=0.8
|
||||
SSAO Blur=true
|
||||
SSAO Bilateral Factor=1500.0
|
||||
SSAO Bilateral Factor=2500.0
|
||||
SSAO Range=20.0
|
||||
SSAO Range Min=0.0
|
||||
SSAO Blur Radius=1.0
|
||||
|
|
@ -163,3 +163,33 @@ Grading Value Contrast Night=0.9
|
|||
Grading Value Contrast Day=0.92
|
||||
Grading Value Contrast Interior=0.95
|
||||
Colorize After HSV=true
|
||||
Invert Edgevision=false
|
||||
Blend Edgevision=false
|
||||
Enable Edge Detect=false
|
||||
Edge Detect Contrast=1.0
|
||||
Edge Detect Intensity=1.0
|
||||
Edge Detect Radius=1.0
|
||||
Invert Edge Detect=false
|
||||
Blend Edge Detect=false
|
||||
Enable Linevision=false
|
||||
Linevision Fade Contrast Night=2.0
|
||||
Linevision Fade Contrast Day=2.0
|
||||
Linevision Fade Contrast Interior=2.0
|
||||
Linevision Fade Intensity Night=500.0
|
||||
Linevision Fade Intensity Day=500.0
|
||||
Linevision Fade Intensity Interior=500.0
|
||||
Linevision Contrast=1.0
|
||||
Linevision Intensity=2.0
|
||||
Linevision Radius=1.0
|
||||
Linevision Threshold=0.05
|
||||
Invert Linevision=false
|
||||
Blend Linevision=false
|
||||
Enable Custom Fog=false
|
||||
Fog Contrast=1.0
|
||||
Fog Intensity=1.0
|
||||
Fog Shift=0.0
|
||||
Fog ColorX=1.0
|
||||
Fog ColorY=1.0
|
||||
Fog ColorZ=1.0
|
||||
Limbo Mode=false
|
||||
SSAO Shift=-0.5
|
||||
|
|
|
|||
|
|
@ -192,6 +192,33 @@ bool nbt
|
|||
string UIName = "Apply Grain Before Tone Mapping";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {true};
|
||||
/* old dirt filter */
|
||||
string str_dirt = "Screen Dirt";
|
||||
bool dirtenable
|
||||
<
|
||||
string UIName = "Enable Dirt";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
float dirtcfactor
|
||||
<
|
||||
string UIName = "Dirt Coord Factor";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.1};
|
||||
float dirtlfactor
|
||||
<
|
||||
string UIName = "Dirt Luminance Factor";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float dirtmc
|
||||
<
|
||||
string UIName = "Dirt Coord Zoom";
|
||||
string UIWidget = "Spinner";
|
||||
> = {3.0};
|
||||
float dirtml
|
||||
<
|
||||
string UIName = "Dirt Luminance Zoom";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* eye adaptation */
|
||||
string str_adaptation = "Eye Adaptation";
|
||||
bool aenable
|
||||
|
|
@ -536,29 +563,6 @@ float lutblend_i
|
|||
string UIName = "LUT Blend Interior";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
#ifdef LUTMODE_LEGACY
|
||||
int clut_n
|
||||
<
|
||||
string UIName = "LUT Preset Night";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = 0;
|
||||
int UIMax = 63;
|
||||
> = {1};
|
||||
int clut_d
|
||||
<
|
||||
string UIName = "LUT Preset Day";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = 0;
|
||||
int UIMax = 63;
|
||||
> = {1};
|
||||
int clut_i
|
||||
<
|
||||
string UIName = "LUT Preset Interior";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = 0;
|
||||
int UIMax = 63;
|
||||
> = {1};
|
||||
#endif
|
||||
/* technicolor shader */
|
||||
string str_tech = "Technicolor";
|
||||
bool techenable
|
||||
|
|
@ -654,48 +658,30 @@ Texture2D TextureColor;
|
|||
Texture2D TextureBloom;
|
||||
Texture2D TextureAdaptation;
|
||||
|
||||
Texture2D TextureNoise2
|
||||
Texture2D TextureNoise1
|
||||
<
|
||||
string ResourceName = "menbnoise1.png";
|
||||
>;
|
||||
Texture2D TextureNoise3
|
||||
Texture2D TextureNoise2
|
||||
<
|
||||
string ResourceName = "menbnoise2.png";
|
||||
>;
|
||||
#ifdef LUTMODE_LEGACY
|
||||
Texture2D TextureLUT
|
||||
Texture2D TextureNoise3
|
||||
<
|
||||
string ResourceName = "menblutpreset.png";
|
||||
string ResourceName = "menbnoise3.png";
|
||||
>;
|
||||
#else
|
||||
Texture2D TextureLUTN
|
||||
Texture3D TextureLUTN
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_night.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_night.png";
|
||||
#endif
|
||||
string ResourceName = "menblut_night.dds";
|
||||
>;
|
||||
Texture2D TextureLUTD
|
||||
Texture3D TextureLUTD
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_day.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_day.png";
|
||||
#endif
|
||||
string ResourceName = "menblut_day.dds";
|
||||
>;
|
||||
Texture2D TextureLUTI
|
||||
Texture3D TextureLUTI
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_interior.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_interior.png";
|
||||
#endif
|
||||
string ResourceName = "menblut_interior.dds";
|
||||
>;
|
||||
#endif
|
||||
Texture2D TextureTonemap
|
||||
<
|
||||
string ResourceName = "menbfilmlut.png";
|
||||
|
|
@ -727,30 +713,12 @@ SamplerState Sampler2
|
|||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
};
|
||||
|
||||
SamplerState SamplerLUT
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
MaxLOD = 0;
|
||||
MinLOD = 0;
|
||||
};
|
||||
SamplerState SamplerNoise2
|
||||
{
|
||||
Filter = MIN_LINEAR_MAG_MIP_POINT;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
MaxLOD = 0;
|
||||
MinLOD = 0;
|
||||
};
|
||||
SamplerState SamplerNoise3
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
MaxLOD = 0;
|
||||
MinLOD = 0;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
AddressW = Clamp;
|
||||
};
|
||||
|
||||
struct VS_INPUT_POST
|
||||
|
|
@ -914,58 +882,13 @@ float3 GradingHSV( float3 res )
|
|||
/* LUT colour grading */
|
||||
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 volume
|
||||
maps, but I think ENB can't load them.
|
||||
*/
|
||||
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);
|
||||
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 = TextureLUT.Sample(SamplerLUT,lc1
|
||||
+float2(0,clut_n/64.0)).rgb;
|
||||
float3 tcl2_n = TextureLUT.Sample(SamplerLUT,lc2
|
||||
+float2(0,clut_n/64.0)).rgb;
|
||||
/* day samples */
|
||||
float3 tcl1_d = TextureLUT.Sample(SamplerLUT,lc1
|
||||
+float2(0,clut_d/64.0)).rgb;
|
||||
float3 tcl2_d = TextureLUT.Sample(SamplerLUT,lc2
|
||||
+float2(0,clut_d/64.0)).rgb;
|
||||
/* interior samples */
|
||||
float3 tcl1_i = TextureLUT.Sample(SamplerLUT,lc1
|
||||
+float2(0,clut_i/64.0)).rgb;
|
||||
float3 tcl2_i = TextureLUT.Sample(SamplerLUT,lc2
|
||||
+float2(0,clut_i/64.0)).rgb;
|
||||
#else
|
||||
#ifdef LUTMODE_16
|
||||
float2 lc1 = float2(tcol.r,tcol.g/16.0+floor(tcol.b*16.0)/16.0);
|
||||
float2 lc2 = float2(tcol.r,tcol.g/16.0+ceil(tcol.b*16.0)/16.0);
|
||||
float dec = (ceil(tcol.b*16.0)==16.0)?(0.0):frac(tcol.b*16.0);
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
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
|
||||
/* night samples */
|
||||
float3 tcl1_n = TextureLUTN.Sample(SamplerLUT,lc1).rgb;
|
||||
float3 tcl2_n = TextureLUTN.Sample(SamplerLUT,lc2).rgb;
|
||||
/* day samples */
|
||||
float3 tcl1_d = TextureLUTD.Sample(SamplerLUT,lc1).rgb;
|
||||
float3 tcl2_d = TextureLUTD.Sample(SamplerLUT,lc2).rgb;
|
||||
/* interior samples */
|
||||
float3 tcl1_i = TextureLUTI.Sample(SamplerLUT,lc1).rgb;
|
||||
float3 tcl2_i = TextureLUTI.Sample(SamplerLUT,lc2).rgb;
|
||||
#endif
|
||||
float3 tcl1 = tod_ind(tcl1);
|
||||
float3 tcl2 = tod_ind(tcl2);
|
||||
tcol = lerp(tcl1,tcl2,dec);
|
||||
/* night sample */
|
||||
float3 tcl_n = TextureLUTN.Sample(SamplerLUT,res).rgb;
|
||||
/* day sample */
|
||||
float3 tcl_d = TextureLUTD.Sample(SamplerLUT,res).rgb;
|
||||
/* interior sample */
|
||||
float3 tcl_i = TextureLUTI.Sample(SamplerLUT,res).rgb;
|
||||
float3 tcol = tod_ind(tcl);
|
||||
float lutblend = tod_ind(lutblend);
|
||||
return lerp(res,tcol,lutblend);
|
||||
}
|
||||
|
|
@ -998,21 +921,21 @@ float3 FilmGrain( float3 res, float2 coord )
|
|||
*/
|
||||
if ( np )
|
||||
{
|
||||
n1 = TextureNoise2.Sample(SamplerNoise2,s1*nm1.x*nr).r;
|
||||
n2 = TextureNoise2.Sample(SamplerNoise2,s2*nm1.y*nr).g;
|
||||
n3 = TextureNoise2.Sample(SamplerNoise2,s3*nm1.z*nr).b;
|
||||
n1 = TextureNoise2.Sample(Sampler2,s1*nm1.x*nr).r;
|
||||
n2 = TextureNoise2.Sample(Sampler2,s2*nm1.y*nr).g;
|
||||
n3 = TextureNoise2.Sample(Sampler2,s3*nm1.z*nr).b;
|
||||
s1 = tcs+float2(ts+n1*nk,n2*nk);
|
||||
s2 = tcs+float2(n2,ts+n3*nk);
|
||||
s3 = tcs+float2(ts+n3*nk,ts+n1*nk);
|
||||
n1 = TextureNoise2.Sample(SamplerNoise2,s1*nm2.x*nr).r;
|
||||
n2 = TextureNoise2.Sample(SamplerNoise2,s2*nm2.y*nr).g;
|
||||
n3 = TextureNoise2.Sample(SamplerNoise2,s3*nm2.z*nr).b;
|
||||
n1 = TextureNoise2.Sample(Sampler2,s1*nm2.x*nr).r;
|
||||
n2 = TextureNoise2.Sample(Sampler2,s2*nm2.y*nr).g;
|
||||
n3 = TextureNoise2.Sample(Sampler2,s3*nm2.z*nr).b;
|
||||
}
|
||||
else
|
||||
{
|
||||
n1 = TextureNoise3.Sample(SamplerNoise3,s1*nm.x*nr).r;
|
||||
n2 = TextureNoise3.Sample(SamplerNoise3,s2*nm.y*nr).g;
|
||||
n3 = TextureNoise3.Sample(SamplerNoise3,s3*nm.z*nr).b;
|
||||
n1 = TextureNoise3.Sample(Sampler2,s1*nm.x*nr).r;
|
||||
n2 = TextureNoise3.Sample(Sampler2,s2*nm.y*nr).g;
|
||||
n3 = TextureNoise3.Sample(Sampler2,s3*nm.z*nr).b;
|
||||
}
|
||||
float n4 = (n1+n2+n3)/3;
|
||||
float3 ng = float3(n4,n4,n4);
|
||||
|
|
@ -1098,6 +1021,20 @@ float2 ScreenFrost( float2 coord )
|
|||
return coord+ofs;
|
||||
}
|
||||
|
||||
/* Old MariENB 0.x screen dirt filter, updated */
|
||||
float3 ScreenDirt( float3 res, float2 coord )
|
||||
{
|
||||
float2 nr = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w)/256.0;
|
||||
float3 ncolc = TextureNoise1.Sample(Sampler2,coord*dirtmc*nr).rgb;
|
||||
float2 ds = float2(res.r+res.g,res.g+res.b)/2.0;
|
||||
float3 ncoll = TextureNoise1.Sample(Sampler2,ds*dirtml).rgb;
|
||||
res = lerp(res,(ncolc.r+1.0)*res,dirtcfactor
|
||||
*saturate(1.0-(ds.x+ds.y)*0.25));
|
||||
res = lerp(res,(ncoll.r+1.0)*res,dirtlfactor
|
||||
*saturate(1.0-(ds.x+ds.y)*0.25));
|
||||
return res;
|
||||
}
|
||||
|
||||
float4 PS_Draw( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
||||
{
|
||||
float2 coord = IN.txcoord0.xy;
|
||||
|
|
@ -1105,41 +1042,28 @@ float4 PS_Draw( 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);
|
||||
float4 res, mud;
|
||||
[branch] if ( frostenable )
|
||||
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);
|
||||
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
|
||||
mud = float4(TextureBloom.Sample(Sampler1,coord+ofr).r,
|
||||
TextureBloom.Sample(Sampler1,coord+ofg).g,
|
||||
TextureBloom.Sample(Sampler1,coord+ofb).b,1.0);
|
||||
mud = float4(TextureBloom.Sample(Sampler1,coord+ofr).r,
|
||||
TextureBloom.Sample(Sampler1,coord+ofg).g,
|
||||
TextureBloom.Sample(Sampler1,coord+ofb).b,1.0);
|
||||
#else
|
||||
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);
|
||||
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);
|
||||
|
|
@ -1168,6 +1092,7 @@ float4 PS_Draw( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
|
|||
res.rgb += bcol;
|
||||
if ( aenable ) res.rgb *= adapt.x;
|
||||
if ( nbt && ne ) res.rgb = FilmGrain(res.rgb,coord);
|
||||
if ( dirtenable ) res.rgb = ScreenDirt(res.rgb,coord);
|
||||
res.rgb = Tonemap(res.rgb);
|
||||
if ( vgradeenable ) res.rgb = GradingGame(res.rgb,adapt.y);
|
||||
if ( gradeenable1 ) res.rgb = GradingRGB(res.rgb);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ 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 Strength=0.05
|
||||
Frost Radial Contrast=0.9
|
||||
Frost Radial Intensity=0.86
|
||||
Frost Radial Offset=-0.73
|
||||
Frost Radial Offset=-0.88
|
||||
Frost Texture Blend=2.23
|
||||
Frost Texture Blend Contrast=1.36
|
||||
Frost Texture Size=1.0
|
||||
|
|
@ -105,3 +105,8 @@ Vanilla Vibrance Blend=0.98
|
|||
Vanilla Contrast Blend=0.84
|
||||
Display Bloom=false
|
||||
Display Adaptation=false
|
||||
Enable Dirt=false
|
||||
Dirt Coord Factor=0.13
|
||||
Dirt Luminance Factor=0.0
|
||||
Dirt Coord Zoom=3.0
|
||||
Dirt Luminance Zoom=1.0
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ Dither Range=0.1
|
|||
Enable Chroma Key=false
|
||||
Chroma Key Red=0, 1, 0
|
||||
Chroma Key Depth=0.99
|
||||
Enable Blur=true
|
||||
Enable Blur=false
|
||||
Blur Sampling Range=0.2
|
||||
Enable Sharp=true
|
||||
Enable Sharp=false
|
||||
Sharp Sampling Range=0.41
|
||||
Sharpening Amount=1.76
|
||||
Enable Shift=false
|
||||
|
|
@ -41,3 +41,52 @@ Border Blur Contrast=1.0
|
|||
Border Blur Intensity=1.0
|
||||
Border Blur Shift=0.0
|
||||
Border Blur Radius=1.0
|
||||
Enable Oil Filter=false
|
||||
Enable FXAA=false
|
||||
FXAA Span Max=4.0
|
||||
FXAA Reduce Mul=16.0
|
||||
FXAA Reduce Min=128.0
|
||||
Enable SMAA=true
|
||||
SMAA Debugging=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 Curvature=false
|
||||
Curve Chromatic Aberration=0.0
|
||||
Curve Zooming=50.0
|
||||
Curve Distortion=0.0
|
||||
Enable Color Matrix=false
|
||||
Color Matrix Red Red=1.0
|
||||
Color Matrix Red Green=0.0
|
||||
Color Matrix Red Blue=0.0
|
||||
Color Matrix Green Red=0.0
|
||||
Color Matrix Green Green=1.0
|
||||
Color Matrix Green Blue=0.0
|
||||
Color Matrix Blue Red=0.0
|
||||
Color Matrix Blue Green=0.0
|
||||
Color Matrix Blue Blue=1.0
|
||||
Normalize Matrix=false
|
||||
Enable Hue-Saturation=false
|
||||
Overlap=0.0
|
||||
Global Hue=0.0
|
||||
Global Saturation=0.0
|
||||
Global Value=0.0
|
||||
Red Hue=0.0
|
||||
Red Saturation=0.0
|
||||
Red Value=0.0
|
||||
Yellow Hue=0.0
|
||||
Yellow Saturation=0.0
|
||||
Yellow Value=0.0
|
||||
Green Hue=0.0
|
||||
Green Saturation=0.0
|
||||
Green Value=0.0
|
||||
Cyan Hue=0.0
|
||||
Cyan Saturation=0.0
|
||||
Cyan Value=0.0
|
||||
Blue Hue=0.0
|
||||
Blue Saturation=0.0
|
||||
Blue Value=0.0
|
||||
Magenta Hue=0.0
|
||||
Magenta Saturation=0.0
|
||||
Magenta Value=0.0
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
|
@ -68,12 +68,12 @@
|
|||
#define NOISESIZE 256.0
|
||||
#define HEATSIZE 1024.0
|
||||
#define FROSTSIZE 1024.0
|
||||
/* LUT mode (use only one) - The 256px option was discarded for size reasons */
|
||||
//#define LUTMODE_LEGACY
|
||||
//#define LUTMODE_16
|
||||
#define LUTMODE_64
|
||||
/* some textures can be provided as DDS rather than PNG to save space */
|
||||
//#define HEAT_DDS
|
||||
//#define FROST_DDS
|
||||
//#define FROSTBUMP_DDS
|
||||
//#define VIGNETTE_DDS
|
||||
/* SMAA quality */
|
||||
//#define SMAA_PRESET_LOW
|
||||
//#define SMAA_PRESET_MEDIUM
|
||||
//#define SMAA_PRESET_HIGH
|
||||
#define SMAA_PRESET_ULTRA
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 16 KiB |
BIN
enbseries/menblut_day.dds
Normal file
BIN
enbseries/menblut_interior.dds
Normal file
BIN
enbseries/menblut_night.dds
Normal file
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 108 KiB |
BIN
enbseries/menbnoise3.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 509 KiB |
|
|
@ -53,3 +53,7 @@ FROST
|
|||
|
||||
2224b CommonwealthFoggyLight -
|
||||
25054 CommonwealthOvercastStormy -
|
||||
|
||||
Nuclear Winter Snow Only
|
||||
|
||||
80d - -
|
||||