fragplot (
?
)
GPL-3.0-or-later
Daniel Woodworth
const float itnum = 200.0; const vec4 col = vec4(.5, .5, .5, 1); vec4 color(vec2 c) { vec2 z = vec2(0, 0); for (int i = 0; i < int(itnum); ++i) { highp vec2 nz = vec2(z.x*z.x - z.y*z.y + c.x, 2.0*z.x*z.y + c.y); if (nz.x*nz.x + nz.y*nz.y >= 4.0) return vec4(col.rgb, float(i)/itnum*col.a); z = nz; } return col; }
Update fragment shader!