From 1f01d02473307791b57a63ba8c4c0195f80f236c Mon Sep 17 00:00:00 2001 From: spatialfree Date: Thu, 6 Oct 2022 13:06:53 -0400 Subject: [PATCH] oriel pattern --- app/{ => dofs/oriel}/Oriel.cs | 0 app/dofs/oriel/⧉.txt | 56 +++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) rename app/{ => dofs/oriel}/Oriel.cs (100%) create mode 100644 app/dofs/oriel/⧉.txt diff --git a/app/Oriel.cs b/app/dofs/oriel/Oriel.cs similarity index 100% rename from app/Oriel.cs rename to app/dofs/oriel/Oriel.cs diff --git a/app/dofs/oriel/⧉.txt b/app/dofs/oriel/⧉.txt new file mode 100644 index 0000000..fb75d30 --- /dev/null +++ b/app/dofs/oriel/⧉.txt @@ -0,0 +1,56 @@ +# 2019.03.14 -> 2022.10.06 -> + +# deprecated format +# // spatial culling shader code +# +# _matrix = Matrix.TR(oriel.pos, oriel.rot) +# _dim = oriel.dimensions +# MAX_STEPS = 256± +# MAX_DIST = 100± +# +# BoxSD(pos, dim): +# q = abs(pos) - dim +# step = length(max(q, 0.0)) +# step += min(max(q.x, max(q.y, q.z)), 0.0) +# +# return step +# +# +# Raymarch(origin, dir): +# origin = mul(origin, _matrix) +# dir = mul(dir, _matrix) +# dist = 0.0 +# for (0..MAX_STEPS): +# pos = origin + dist * dir +# step = BoxSD(pos, _dim / 2.0) +# if (step < 0.0001 or dist > MAX_DIST): +# then break loop +# dist += step +# +# return dist +# +# +# YourPixelShader(): +# pos = pixel.worldposition +# dir = normalize(pos - cam) +# +# // cull around +# dist = Raymarch(cam, dir) +# clip(100 - (dist + 1)) +# +# // cull between +# oriel = cam + dist * dir +# clip(dist(cam, pos) - dist(cam, oriel)) +# +# ... +# +# + +# new format *TODO +input + +data + +frame + +design