noise is good

Posted by in Uncategorized

I’ve added a new example to ToyShader, which does three-dimensional perlin-noise distortions of signed distance-fields (SDF). These SDF are used to model objects when doing rendering with the ray-marching approach. Also thanks to this noise-function, applying procedural textures becomes feasible. The whole scene is just described by a single GLSL-fragment-shader. External resources are not needed.

As cool as the distortion and bending of these SDF is, it tends to cause discontinuties, which in turn lead to artefacts in the shadow-calculation and the rendering around object-silhouettes. To fight this I’ve decreased the ray-marching step-size, making the shader a bit heavier unfortunately.

Despite that they are great to look at and have a demo-scene feel to them 🙂 You can grab the code from here. If you are to lazy to compile it yourself, I’ve a screencast:

Should you be reading this with a WebGL-capable browser, you can see the code in action for real right here, without the need to grab and compile the sources: