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
Notes: blender-bot 2023-02-14 07:39:46 +01:00
Referenced by issue #63789, Generated noise texture is not infinite / looped
1 changed files with 3 additions and 1 deletions

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)