Skip to content

Commit

Permalink
Fixed the damned fractal
Browse files Browse the repository at this point in the history
  • Loading branch information
Raikiri committed Oct 20, 2024
1 parent 7447c52 commit 86766c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ const initialContent = `void ColorPass(
float i = gl_FragCoord.x;
float j = gl_FragCoord.y;
vec2 s = res;
int n = int(s.x * 0.5);
ivec2 n = ivec2(s * 0.5);
vec2 c = vec2(-0.8, cos(2. * p));
vec2 z = vec2(i / float(n) - 1., j / float(n) - 1.0) * 2.;
vec2 z = (vec2(i, j) - s / 2.0) / min(s.x, s.y) * 2.0;
int iterations = 0;
while (sqrt(dot(z, z)) < 20. && iterations < 50) {
z = complex_sqr(z) + c;
Expand Down

0 comments on commit 86766c2

Please sign in to comment.