clojure2d.extra.raymarching
(ABANDONED) Raymarching helper.
ao
(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)
camera
(camera ro ch rot)
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
material
(material conf)
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
(op-interpolate f1 f2 amount lerp)
(op-interpolate f1 f2 amount)
(op-interpolate f1 f2)
ray-marching
(ray-marching scene background tmin tmax steps stepf precision)
(ray-marching scene background tmin tmax steps)
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