SSAO: tweak fade distance.

This commit is contained in:
Vincent Lejeune 2014-03-01 22:48:43 +01:00
parent d954fc6c72
commit da4896c3d8

View File

@ -43,7 +43,7 @@ void main(void)
vec3 norm = normalize(DecodeNormal(2. * texture(ntex, uv).xy - 1.));
// Workaround for nvidia and skyboxes
float len = dot(vec3(1.0), abs(cur.xyz));
if (len < 0.2 || curdepth > 0.999) discard;
if (len < 0.2 || curdepth > 0.9955) discard;
// Make a tangent as random as possible
vec3 randvect = rand(uv);
vec3 tangent = normalize(cross(norm, randvect));