luft/render/materials.lisp
A reusable substance and its renderer-facing response.
A coherent coordinate frame for natural fields or authored construction.
Authored cell meaning: substance, deliberate finish, frame, and role.
One exposed face's derived interpretation of an authored placement.
An interned face, band, or fan material relation compiled for rendering.
Reinitialize current when it still has class, preserving live identity.
Seeding retains the first nine assembly identities as a rebuild oracle; any later placement receives the same semantic readings in its own frame.
Intern one face interpretation in placement's authored coordinate frame.
Geometry policy is semantic at this boundary and dense below it. The proof-of-concept profile compiles once to a stock-indexed byte lane; mesh instance partitioning never dispatches on material objects.
A semantic assignment of luft integer bevel widths to material relations.
Return the terrain/architecture bits represented by assembly.
A face is owned by its primary authored reading. Secondary soil readings on foundation faces describe weathering and therefore do not turn a homogeneous architectural site into a material contact. Bands and junctions retain every incident reading, so their mask records a genuine mixed relation.
Return the integer luft bevel width assigned to semantic assembly.
Compile profile to one unsigned-byte width per packed assembly stock.
Compile profile into dense stock masks and site widths.
The first value is one terrain/architecture bit mask per packed assembly
stock. The second is a four-entry byte table indexed by the or of every
incident stock mask: terrain-only, architecture-only, and mixed sites select
the profile's terrain, architecture, and contact widths respectively.
Compile the ordinary stock widths as the validation oracle. In
particular, a profile made without make-material-bevel-profile must not
smuggle an out-of-range width into the site table.
The first nine vocabulary members are the stable renderer ABI. The tests rebuild this exact prefix from the semantic objects, so these literals are available while this file itself is being compiled in a clean image.
Compile the intentionally closed shader-kernel ABI.
Compile the closed procedural-relief ABI shared by all surface kernels.
Compile vocabulary into fixed-stride float32 rows for direct GPU indexing.
Each assembly owns seven vec4 rows: primary/kernel, secondary/contact variant, tertiary/roughness, then frame origin/relief profile and its three axes (with relief amplitude beside X). The fixed stride is small enough for direct indexing while leaving material meaning on the CPU.
Return the authored placement vocabulary shared by one scene's cells.
Derive one exposed face reading from an authored material placement.
Intern a small semantic assembly at mesh-compilation time.
Resolve incident face readings as one current-width surface assembly.
Resolve an edge or fan closure without erasing incident assembly identity.
Fan construction may present assemblies already derived for surrounding bands; those are not interchangeable with their primary face readings. This resolver therefore preserves the legacy recursive decision exactly while expressing it in semantic identities rather than numeric ranges.
--------------------------------------------------------------------------- Scene material compilation
Scene-closed dense decisions consumed by face, band, and fan meshing.
Compile placement once into six oriented readings and one foundation row.
Intern the face result that the dense resolver may select for reading.
Bind semantic placement and assembly meaning once into dense stock tables.
This is the only material-kind generic dispatch in scene compilation.
A previous scene may have extended the renderer-global assembly ABI. Close those primaries too before fixing this program's array bounds.
Intern the cross-product of authored stone and earth readings once. A contact then retains both placements' tone and frame without a hot hash.
All assembly interning is complete before the arrays receive their size.
Capture program's dense lanes as one dispatch-free chamfer resolver.
Resolve stocks through a freshly captured program, for inspection/tests.
A reusable substance and its renderer-facing response.
A coherent coordinate frame for natural fields or authored construction.
Authored cell meaning: substance, deliberate finish, frame, and role.
An explicitly owned AVFrame.
One exposed face's derived interpretation of an authored placement.
An interned face, band, or fan material relation compiled for rendering.
(current class &rest initargs)Logical conjunction of tests and raw truth values.
(placement role name tone finish)Logical disjunction of tests and raw truth values.
(current name relation primary &key secondary tertiary kernel)(&key members limit)(assembly)(domain member &optional (intern-p t))(offset)(domain offset)A semantic assignment of LUFT integer bevel widths to material relations.
(&key (terrain-width 4) (architecture-width 1) (contact-width 2))Test whether one compatible scalar is at most another.
Division of two represented quantities.
(reading)(assembly)(assembly)Return the terrain/architecture bits represented by ASSEMBLY. A face is owned by its primary authored reading. Secondary soil readings on foundation faces describe weathering and therefore do not turn a homogeneous architectural site into a material contact. Bands and junctions retain every incident reading, so…
(profile assembly)Return the integer LUFT bevel width assigned to semantic ASSEMBLY.
(profile &optional (vocabulary *surface-assembly-vocabulary*))Test whether two compatible scalars are equal.
(profile &optional (vocabulary *surface-assembly-vocabulary*))Compile PROFILE into dense stock masks and site widths. The first value is one terrain/architecture bit mask per packed assembly stock. The second is a four-entry byte table indexed by the OR of every incident stock mask: terrain-only, architecture-only, and mixed sites select the profile's terrain, architecture,…
(kernel)(relief)(relief)(assembly)(&optional (vocabulary *surface-assembly-vocabulary*))Compile VOCABULARY into fixed-stride float32 rows for direct GPU indexing. Each assembly owns seven vec4 rows: primary/kernel, secondary/contact variant, tertiary/roughness, then frame origin/relief profile and its three axes (with relief amplitude beside X). The fixed stride is small enough for direct indexing while…
Multiplication and scalar scaling.
Addition over compatible quantities.
(kind placement scene cell axis side)Derive one exposed face reading from an authored material placement.
One authored solid and its vocabulary-closed material-placement field. The solid remains LUFT's topological truth. The sparse authored field stores only dense vocabulary offsets; semantic material objects remain at the scene boundary rather than being allocated per cell.
Logical negation of one test or raw truth value.
(scene cell)(relation primary secondary tertiary kernel)(relation primary &key secondary tertiary kernel name)(reading)(reading)(readings)(assemblies)Resolve an edge or fan closure without erasing incident assembly identity. Fan construction may present assemblies already derived for surrounding bands; those are not interchangeable with their primary face readings. This resolver therefore preserves the legacy recursive decision exactly while expressing it in…
Scene-closed dense decisions consumed by face, band, and fan meshing.
(kind placement)Compile PLACEMENT once into six oriented readings and one foundation row.
Dynamically bindable witness for the cold semantic compilation boundary.
(assembly)(reading)(placement-vocabulary)Headings, paragraphs, figures and their IDs, mentions, marks.
(program stocks)
Semantic material definitions live here, above scene storage and mesh realization. The objects are the inspectable vocabulary; cells and GPU instances carry only dense offsets closed by an owning vocabulary.