diff --git a/manimlib/shaders/newton_fractal/frag.glsl b/manimlib/shaders/newton_fractal/frag.glsl index 8315f9ec..223f8556 100644 --- a/manimlib/shaders/newton_fractal/frag.glsl +++ b/manimlib/shaders/newton_fractal/frag.glsl @@ -75,7 +75,7 @@ vec2 seek_root(vec2 z, vec2[MAX_DEGREE + 1] coefs, int max_steps, out float n_it } z = z - step; } - n_iters -= clamp((threshold - curr_len) / (last_len - curr_len), 0.0, 1.0); + n_iters -= log(curr_len) / log(threshold); return z; } @@ -118,7 +118,7 @@ void main() { color = colors[i]; } } - color *= 1.0 + (0.01 * saturation_factor) * (n_iters - 5 * saturation_factor); + color *= 1.0 + (0.01 * saturation_factor) * (n_iters - 2 * saturation_factor); if(black_for_cycles > 0 && min_dist > CLOSE_ENOUGH){ color = vec4(0.0, 0.0, 0.0, 1.0);