Fix T40692, Checker Texture derivation on very large scales (1k).

It might still have a derivation on larger scales (10k or more), but we need some offset to avoid precision issues on unit coordinates.
This commit is contained in:
Thomas Dinges
2014-06-20 09:03:00 +02:00
parent 84e8cabac6
commit ead83a48f1
2 changed files with 6 additions and 6 deletions

View File

@@ -21,9 +21,9 @@
float checker(point p)
{
p[0] = (p[0] + 0.00001) * 0.9999;
p[1] = (p[1] + 0.00001) * 0.9999;
p[2] = (p[2] + 0.00001) * 0.9999;
p[0] = (p[0] + 0.000001) * 0.999999;
p[1] = (p[1] + 0.000001) * 0.999999;
p[2] = (p[2] + 0.000001) * 0.999999;
int xi = (int)fabs(floor(p[0]));
int yi = (int)fabs(floor(p[1]));