Eevee: Noise Texture: try to fix floating point accuracy issue

Cycles check for infinity and return 0.0 otherwise.
This commit is contained in:
Clément Foucault
2019-04-26 18:37:17 +02:00
parent 941575b1f7
commit 1fa7d51f34

View File

@@ -2771,7 +2771,9 @@ float noise_perlin(float x, float y, float z)
noise_v[1] = noise_nerp(v, noise_u[0], noise_u[1]);
return noise_scale3(noise_nerp(w, noise_v[0], noise_v[1]));
float r = noise_scale3(noise_nerp(w, noise_v[0], noise_v[1]));
return (isinf(r)) ? 0.0 : r;
}
float noise(vec3 p)