1
Fork 0

MariENB 1.2015.9.30

This commit is contained in:
Marisa the Magician 2019-04-07 17:24:07 +02:00
commit a5626ec457
3 changed files with 15 additions and 19 deletions

View file

@ -249,12 +249,12 @@ float4 PS_SSAOBlurH( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
res.a = 0.0; res.a = 0.0;
int i; int i;
isd = tex2D(SamplerDepth,coord).x; isd = tex2D(SamplerDepth,coord).x;
[unroll] for ( i=-31; i<=31; i++ ) [unroll] for ( i=-15; i<=15; i++ )
{ {
sd = tex2D(SamplerDepth,coord+float2(i,0)*bof).x; sd = tex2D(SamplerDepth,coord+float2(i,0)*bof).x;
ds = abs(isd-sd)*ssaobfact+0.5; ds = abs(isd-sd)*ssaobfact+0.5;
sw = 1.0/(ds+1.0); sw = 1.0/(ds+1.0);
sw *= gauss32[abs(i)]; sw *= gauss16[abs(i)];
tw += sw; tw += sw;
res.a += sw*tex2D(SamplerColor,coord+float2(i,0)*bof).a; res.a += sw*tex2D(SamplerColor,coord+float2(i,0)*bof).a;
} }
@ -277,12 +277,12 @@ float4 PS_SSAOBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
res.a = 0.0; res.a = 0.0;
int i; int i;
isd = tex2D(SamplerDepth,coord).x; isd = tex2D(SamplerDepth,coord).x;
[unroll] for ( i=-31; i<=31; i++ ) [unroll] for ( i=-15; i<=15; i++ )
{ {
sd = tex2D(SamplerDepth,coord+float2(0,i)*bof).x; sd = tex2D(SamplerDepth,coord+float2(0,i)*bof).x;
ds = abs(isd-sd)*ssaobfact+0.5; ds = abs(isd-sd)*ssaobfact+0.5;
sw = 1.0/(ds+1.0); sw = 1.0/(ds+1.0);
sw *= gauss32[abs(i)]; sw *= gauss16[abs(i)];
tw += sw; tw += sw;
res.a += sw*tex2D(SamplerColor,coord+float2(0,i)*bof).a; res.a += sw*tex2D(SamplerColor,coord+float2(0,i)*bof).a;
} }

View file

@ -20,23 +20,19 @@ static const float3x3 GY =
-1,-2,-1 -1,-2,-1
}; };
/* gaussian kernels */ /* gaussian kernels */
/* radius: 8, std dev: 3 */ /* radius: 8, std dev: 6 */
static const float gauss8[8] = static const float gauss8[8] =
{ {
0.134598, 0.127325, 0.107778, 0.081638, 0.084247, 0.083085, 0.079694, 0.074348,
0.055335, 0.033562, 0.018216, 0.008847 0.067460, 0.059533, 0.051099, 0.042657
}; };
/* radius: 32, std dev: 12 */ /* radius: 16, std dev: 13 */
static const float gauss32[32] = static const float gauss16[16] =
{ {
0.033535, 0.033419, 0.033073, 0.032503, 0.040012, 0.039893, 0.039541, 0.038960,
0.031723, 0.030747, 0.029595, 0.028288, 0.038162, 0.037159, 0.035969, 0.034612,
0.026853, 0.025314, 0.023698, 0.022031, 0.033109, 0.031485, 0.029764, 0.027971,
0.020340, 0.018649, 0.016980, 0.015353, 0.026131, 0.024268, 0.022405, 0.020563
0.013787, 0.012294, 0.010887, 0.009575,
0.008362, 0.007252, 0.006247, 0.005343,
0.004538, 0.003828, 0.003207, 0.002668,
0.002204, 0.001808, 0.001473, 0.001192
}; };
/* SSAO samples */ /* SSAO samples */
static const float3 ssao_samples_lq[16] = static const float3 ssao_samples_lq[16] =

View file

@ -133,7 +133,7 @@ Edgevision Contrast=0.25
Edgevision Intensity=4.0 Edgevision Intensity=4.0
Edgevision Radius=1.0 Edgevision Radius=1.0
Enable SSAO=true Enable SSAO=true
SSAO Radius=0.05 SSAO Radius=0.15
SSAO Noise=0 SSAO Noise=0
SSAO Fade Contrast Night=0.16 SSAO Fade Contrast Night=0.16
SSAO Fade Contrast Day=0.18 SSAO Fade Contrast Day=0.18
@ -147,7 +147,7 @@ SSAO Intensity=1.0
SSAO Contrast=1.0 SSAO Contrast=1.0
SSAO Blending=1.0 SSAO Blending=1.0
SSAO Blur=true SSAO Blur=true
SSAO Bilateral Factor=2500.0 SSAO Bilateral Factor=5000.0
SSAO Range=0.25 SSAO Range=0.25
SSAO Blur Radius=1.0 SSAO Blur Radius=1.0
Debug SSAO=false Debug SSAO=false