Learn how to get Free YouTube subscribers, views and likes
Get Free YouTube Subscribers, Views and Likes

Perfect Pistons in Shadertoy

Follow
Blackle Mori

In this tutorial I describe how to create a signed distance function like the one featured in the shader "WhackAMole Pistons." I describe how you can make signed distance functions with repeated objects such that each object can differ in its own unique way, without experiencing glitches.

Errata:
At the end I say "the worst possible SDF is the convex hull of the SDF" when the correct thing to say is "the worst possible SDF is the union of all possible configurations of the SDF." The use of the term "convex hull" is inaccurate.

Shaders in this video:
WhackAMole Pistons https://www.shadertoy.com/view/WtXcWB
Perfect Pistons Example 1 https://www.shadertoy.com/view/3t3BD2
Perfect Pistons Example 2 https://www.shadertoy.com/view/3lcBD2
Perfect Pistons Example 3 https://www.shadertoy.com/view/Wl3fD2

An article explaining erot and the hash function:
https://suricrasia.online/demoscene/f...

posted by gjaldinum48