improve VSM variance
parent
320e653558
commit
19eeeb4696
|
@ -29,7 +29,7 @@ float shadow_vsm(float distance, vec3 dir, int light_index) {
|
||||||
float variance = moments.y - (moments.x*moments.x);
|
float variance = moments.y - (moments.x*moments.x);
|
||||||
//variance = max(variance, 0.000002);
|
//variance = max(variance, 0.000002);
|
||||||
// variance = max(variance, 0.00002);
|
// variance = max(variance, 0.00002);
|
||||||
variance = max(variance, 0.002);
|
variance = max(variance, 0.0002);
|
||||||
|
|
||||||
float d = distance - moments.x;
|
float d = distance - moments.x;
|
||||||
float p_max = variance / (variance + d*d);
|
float p_max = variance / (variance + d*d);
|
||||||
|
|
Loading…
Reference in New Issue