Skip to content

Instantly share code, notes, and snippets.

@andybak
Created September 4, 2017 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andybak/9f1866b3965ddc7be2705538ed72f3c9 to your computer and use it in GitHub Desktop.
Save andybak/9f1866b3965ddc7be2705538ed72f3c9 to your computer and use it in GitHub Desktop.
inline float DistanceFunction(float3 pos)
{
float d1 = Sphere(Repeat(pos, 2), 1);
float d2 = Sphere(Repeat(pos + float3(1,1,1), 2), (_SinTime+1)/1.2);
return max(d1, -d2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment