oriel pattern

This commit is contained in:
spatialfree 2022-10-06 13:06:53 -04:00
parent a11fa2d17d
commit 1f01d02473
2 changed files with 56 additions and 0 deletions

56
app/dofs/oriel/⧉.txt Normal file
View file

@ -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