added raymarching demo for testing

This commit is contained in:
Piotrek
2021-04-14 15:42:31 +02:00
parent 70bb7a3e6e
commit 8094d8168d
10 changed files with 174 additions and 30 deletions
+14
View File
@@ -0,0 +1,14 @@
float sdSphere(in vec3 pos)
{
return length(pos) - 1.0;
}
float sdPlane(in vec3 pos)
{
return pos.y;
}
vec2 sdUnion(vec2 a, vec2 b)
{
return (a.x < b.x) ? a : b;
}