Menger Sponge Raymarching Engine --- GENERAL CONTROLS --- - Click and drag mouse to move the camera around the fractal and let go to begin rendering - Scroll wheel (when fullscreen) / up and down arrow / control menu to control the camera's zoom - Move mouse to the top of the screen to open the control menu --- CONTROL MENU --- - cameraDistance: controls the distance the camera is from the fractal - fractalOctaves: controls the level of detail of the fractal, the higher it is the more detail the fractal will have but the longer it will take to render - fractalSize: controls the size of the fractal - specularStrength: the fractal material's specular strength, the higher this is the more metallic / plastic like the surface will look, set to 0 for a non-reflective surface - fogDensity: controls how thick the fog is, set to 0 for no fog - showFloor: controls whether the floor underneath the fractal is enabled (1) or disabled (0) #all #art #fractal #raytrace #raymarch #3D #menger #sponge #mengersponge #gamedev46
Run on TurboWarp: https://turbowarp.org/1377541119 Stripped down the functions and math in ways intended to make it run slightly faster. Replaced the heavy square roots with approximation to save resources where I could, although i Added an FPS indicator as well, although it is a bit broken at the moment.