mirror of
https://github.com/3b1b/manim.git
synced 2025-11-13 16:07:47 +00:00
Slight tweaks to how saturation_factor works on newton-fractal
This commit is contained in:
parent
ed3d44120c
commit
8b454fbe93
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue