SSAO: Clamp to 0.

This commit is contained in:
Vincent Lejeune 2014-04-22 18:22:39 +02:00
parent 6f16831d00
commit da15aebcda
2 changed files with 3 additions and 3 deletions

View File

@ -66,5 +66,5 @@ void main(void)
bl += isOccluded ? samplePoints[i].z * smoothstep(5 * radius, 0, distance(samplePos, FragPos)) : 0.;
}
AO = 1.0 - bl * invSamples;
AO = max(1.0 - bl * invSamples, 0.);
}

View File

@ -9,8 +9,8 @@ out vec4 FragColor;
vec3 getCIEYxy(vec3 rgbColor);
vec3 getRGBFromCIEXxy(vec3 YxyColor);
float exposure = .18;
float Lwhite = 1.;
float exposure = .045;
float Lwhite = 100.;
float delta = .0001;
float saturation = 1.;