diff --git a/src/webgl/material.js b/src/webgl/material.js index 18ec2d1b7f..849e901a63 100644 --- a/src/webgl/material.js +++ b/src/webgl/material.js @@ -152,21 +152,21 @@ p5.prototype.loadShader = function( * // the fragment shader is called for each pixel * let fs = ` * precision highp float; - * uniform vec2 p; - * uniform float r; - * const int I = 500; + * uniform vec2 p; + * uniform float r; + * const int I = 500; * varying vec2 vTexCoord; - * void main() { - * vec2 c = p + gl_FragCoord.xy * r, z = c; - * float n = 0.0; - * for (int i = I; i > 0; i --) { - * if(z.x*z.x+z.y*z.y > 4.0) { - * n = float(i)/float(I); - * break; - * } - * z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c; - * } - * gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0); + * void main() { + * vec2 c = p + gl_FragCoord.xy * r, z = c; + * float n = 0.0; + * for (int i = I; i > 0; i --) { + * if(z.x*z.x+z.y*z.y > 4.0) { + * n = float(i)/float(I); + * break; + * } + * z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c; + * } + * gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0); * }`; * * let mandel;