luvcraft/arithmetic.lisp
Fog has explicit near/far semantics: no attenuation before near, full fog at far, and quadratic shaping between. This is a world law rather than a shader helper, so both production targets realize this one definition.
Voxel light loses one attenuation step per cell entered plus the entered cell's own opacity, except that a direct transmission (sky light continuing straight down) pays only the opacity. This is the one local law shared by the legacy solver, the seeds, and the compiled frontier kernel, which inlines the checked definition rather than calling this function. #53Q1II
(name parameters &body body)Subtraction or unary negation.
Constrain a quantity between compatible bounds.
Division of two represented quantities.
Construct a meaningful literal.
Name a compatible derived quantity.
Multiplication and scalar scaling.
(name parameters &body body)Addition over compatible quantities.
The proposed frontier language is a DSL compiler, not a generic worklist framework whose inner loop depends on accidental devirtualization. A live, inspectable program definition remains open to Common Lisp development; one compilation closes that definition over particular fields, domains, neighborhoods,…
Arithmetic laws shared by luvcraft's CPU and GPU realizations.