Re: [filter-effects] Bug in feTurbulance random algorithm.

Changing

fGradient[k][i][0] /= s;
fGradient[k][i][1] /= s;

to

fGradient[k][i][0] = (fGradient[k][i][0] == 0 ? 0 : fGradient[k][i][0] / s);
fGradient[k][i][1] = (fGradient[k][i][1] == 0 ? 0 : fGradient[k][i][1] / s);

in the reference code would do it.

"For fractalSum, you get a turbFunctionResult that is aimed at a range of
-1 to 1"
"For turbulence, you get a turbFunctionResult that is aimed at a range of
0 to 1"

0 is in both of those ranges.

And some fun facts. There are 8,465,580 affected seeds. From 346 to
2,147,483,583

Received on Wednesday, 14 January 2015 04:13:41 UTC