//do not delete the following comments! //none of your parameters can have the following names: //frames, canvas, groups, position, forward, right, pinhole, zoom, reset //pathtrace, epsilon, iterations, temp1, bounces, sunpos, floor, focallength //aperture, breakout //additionally, the following words cannot be used in code: //E, PI, seed, first, depth //put any uniforms here, in the format //name : type, //[input method] //valid input methods: [default value] or [default, min, max, step] //valid types: i32, f32, u32, vec[1,2,3,4] MI : i32, //[5, 0, 20, 1] Size : f32, //[1, 0, 2, .01] CSize : vec3, //[1, 0, 2, .01] C : vec3, //[0, -2, 2, .01] DEoffset : f32, //[0, 0, .01, .0001] Offset : vec3, //[0, -2, 2, .01] MnIterations : i32, //[2, 0, 20, 1] MnScale : f32, //[3, 0, 4, .01] MnOffset : vec3,//[1, 0, 2, .01] cutoff : f32,//[2.5, .5, 10., .01] //Code: //via https://github.com/Syntopia/Fragmentarium fn Menger(p : vec3) -> f32 { var r : f32; var n = 0; // Fold var z = abs(p); if (z.x(z.z, z.y, z.x);} if (z.y(z.z, z.y, z.x);} if (z.y) -> f32 { var p = z; var r2=dot(p,p); var DEfactor=1.; for(var i=0;i) -> f32 { return max(Thing2(p), length(p) - uniforms.cutoff); } fn getColor(z : vec3) -> vec3 { return (vec3(1.)); }