(ABANDONED) Raymarching helper.
(ABANDONED) Raymarching helper. * http://www.iquilezles.org/www/index.htm * http://mercury.sexy/hg_sdf/
(ao k falloff steps)
f - distance field p - current position n - normal k - scaling factor (0.01-1.0) falloff - 0.5-0.95 steps - how many steps (2-10)
f - distance field p - current position n - normal k - scaling factor (0.01-1.0) falloff - 0.5-0.95 steps - how many steps (2-10)
(camera ro ch rot)
create camera function.
create camera function. * ro - ray origin * ch - camera heading * rot - camera rotation returns function which should be used to determine ray direction, based on pixel position
(interpolate-material m1 m2 amt)
(interpolate-material m1 m2 amt f)
(material conf)
Create material information:
Create material information: - color - Vec3 with RGB: 0.0-1.0 - diffusion - diffusion ratio: 0.0 - 1.0 - specular - specular ratio: 0.0 - 1.0 - specularf0 - f0, intensity ratio: 0.0 - 1.0 - specularpow - strength of specular: 1.0 - 10k - reflection - reflection ratio: 0.0 - 1.0
(op-interpolate f1 f2)
(op-interpolate f1 f2 amount)
(op-interpolate f1 f2 amount lerp)
(ray-marching scene background tmin tmax steps)
(ray-marching scene background tmin tmax steps stepf precision)
depth field ray marching tmin - starting distance > 0.005 tmax - final distance steps - how many steps stepf - step factor (0.1-1.0) precision - how close is enough (0.0001 - 0.01) background - background material returns vector, where index:
depth field ray marching tmin - starting distance > 0.005 tmax - final distance steps - how many steps stepf - step factor (0.1-1.0) precision - how close is enough (0.0001 - 0.01) background - background material returns vector, where index: - 0 - HitData - 1 - fake AO based on steps made
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close