luft/render/tests.lisp
The old request remains independently executable, while a current oracle observes and closes the newly resident cross-chunk seam.
Model completion of the initial cohort; tickets already in the worker are harmless because the second scheduling supersedes every changed key with a newer ticket.
The direct row is blocked. The only short way around the north end crosses Y=5, proving the click produced a route rather than a velocity.
A same-height walking step translates the following camera without changing its orbit height.
A stair-sized vertical discrepancy belongs to the traveler, not the composition, and remains inside the camera's quiet zone.
A fall or teleport is well outside that zone and closes most of its error promptly instead of inheriting the gentle local response.
The next column is filled through the character's head. Axis separation leaves the player at the near edge instead of climbing or teleporting to its remote roof.
Two continuous courses stop the one-step walker; this even contour column also carries the alternating crenellation.
The low southern shore remains open rather than walling in the route.
The front curtain and both round keeps have continuous stone shoes where the procedural ridge can otherwise fall below their fixed base.
The stair arrives at a supported masonry threshold, while the gate opening itself remains clear at the sanctuary floor.
Terrain and inhabited architecture now continue well beyond the old 64-cell diorama, including the remote back-ridge beacon.
Each alternating stance interval holds one foot at one exact world coordinate while the root advances by a complete half-step.
The other foot clears the deck during transfer and lands at zero height; fourteen half-steps span the bridge's 10.5-cell half-route.
A fixed leg is shortest at double support and tallest over the planted foot at mid-stance, giving the body its non-arbitrary bob.
The height equation now uses the same hip and ankle centres as the rendered SDF. Its stance-leg reach is constant at the endpoints and over the support contact, rather than only looking approximately so.
Authored values survive exactly at semantic pose boundaries.
The planted boot accepts weight from heel to flat, stays flat through the ankle rocker, then rolls over its toe. Swing dorsiflexion clears the ground and returns continuously to the next heel contact.
Return minimum angle, maximum longest-edge/altitude ratio, and sliver count.
Contracting the medial T-junction may subdivide a neighbour, but it must not make triangle quality worse than the width-one topology witness from which the mixed surface was evaluated.
The diagnostic mesh omits zero-area triangles. Its defect is solely the long-edge/short-edge connectivity mismatch exposed by construction ink, not a retained degenerate primitive.
Looking into more light closes down quickly; opening into darkness is deliberately slower, matching Moppe's eye-adaptation architecture.
At yaw and pitch zero camera UP is world +Z. A pointer one quarter of the viewport below centre must therefore start five cells below the camera, not at the vertically mirrored point five cells above it.
Snapping is in the light plane: a tiny arbitrary world translation may cross no light-space texel boundary, and therefore leaves X/Y rows exact.
(&key (horizontal-bits 6) (origin-x 0) (origin-y 0))(builder x y z &key (solid-p t) architecture-p (material nil material-p))(scene &key (frames-per-load 15) (residency-radius 1) lod-radius merge-radius
(far-bevel-width 4))Wrap SCENE in bounded camera-driven chunk residency. When LOD-RADIUS is non-NIL, chunks beyond that Chebyshev distance use FAR-BEVEL-WIDTH. When MERGE-RADIUS is non-NIL, chunks beyond it additionally dissolve exactly coplanar edges without changing that bevel surface. FAR-BEVEL-WIDTH names the medial tier in…
(builder &key player-p)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.
(x y)(scene key bevel-width)Default bevel width in eighth-cell integer ticks (one quarter cell).
(request)Compute REQUEST on the production worker and return a transferable value.
(scene request)Logical negation of one test or raw truth value.
(scene key bevel-width)(scene request mesh)Multiplication and scalar scaling.
Test whether two compatible scalars are equal.
(scene focus-x focus-y)(&key (name "luv single CPU producer"))Make one sleeping SB-CONCURRENCY mailbox worker. There is intentionally no pool yet. One worker proves the ownership and publication protocol, prevents CPU oversubscription, and keeps completion order intelligible while taking expensive work out of an owner callback.
(scene production-system bevel-width world-x world-y)(system &key (timeout 10.0))(function chain)(x y z)A probe crossed into a chunk that is not resident in the probing field. The signaling probe offers USE-CHUNK (supply the chunk's chain), plus the TREAT-AS-AIR and TREAT-AS-SOLID boundary restarts for the whole chunk, so a streaming store answers with data, defers, or fills with a constant.
A cell probe left its box. The signaling probe offers the boundary restarts TREAT-AS-AIR, TREAT-AS-SOLID, and USE-VALUE, so the caller's handler decides what lies past the edge: a world treats it as air, a chunk store answers from the neighboring chunk or defers, a test refuses.
(chunk chunk-key
&key (stock-function (constantly 0))
(chamfer-stock-function (lambda (stocks) (first stocks)))
(bevel-width +mesh-bevel-width+)
planar-merge-p
coplanar-merge-p)Classify one chunk's solid CHUNK into the instance-stream ABI. CHUNK holds exactly the cells of the chunk named by CHUNK-KEY. Probes leaving the chunk signal MISSING-CHUNK once per neighboring chunk -- bind a handler that answers USE-CHUNK from a store, or TREAT-AS-AIR to fill in -- and probes past the world's box…
(mesh)Addition over compatible quantities.
Test whether one compatible scalar is less than another.
(left right)(x y size &key (seed 121))Height of the authored highland at X,Y. The invariant is that every reading is a pure function of X, Y, SIZE, and SEED. Low-frequency domain warping bends a zero-contour into mountain chains; independent fields add foothills, a basin, a river valley, and a terraced upland instead of repeating one periodic profile.
Test whether one compatible scalar is at least another.
Subtraction or unary negation.
The maximum of compatible quantities.
The minimum of compatible quantities.
(&key (horizontal-bits 9) (seed 121) (streaming-p t))Make a large varied landscape with mountain chains and sparse ruins. The default 512 by 512 world spans sixty-four LUFT chunks. STREAMING-P wraps it in a seven-by-seven camera-driven window: full bevel nearby, medial terrain in the middle ring, and exact coplanar compression in the outer ring.
(class key-name &key character modifiers repeat-p)(key-name &key character modifiers repeat-p)(key-name &key character modifiers)(bevel-width)(bevel-width)Absolute-pointer LUFT play: hover terrain, click a route, scroll zoom.
(viewer event)The original relative-pointer atelier orbit and direct keyboard mode.
(viewer direction)(&key
(position
(vec3:make-vec3 (+ +sanctuary-origin-x+ 29.5)
(+ +sanctuary-origin-y+ 24.5) 14.0))
(heading-x 0.0) (heading-y 1.0) (speed +walking-player-speed+))(x y z)(builder x0 x1 y0 y1 z0 z1
&key (solid-p t) architecture-p
(material (if architecture-p *sanctuary-material-placement*
*terrain-material-placement*)))(player source x y z)(site)Test whether one compatible scalar is greater than another.
(player camera)(&key (position
(vec3:make-vec3 (+ 70.0 +sanctuary-origin-x+)
(+ -18.0 +sanctuary-origin-y+) 50.0))
(yaw 2.2455373) (pitch -0.5165006)
(field-of-view 0.9599311))(player source camera forward right seconds &key maximum-distance)Logical disjunction of tests and raw truth values.
Division of two represented quantities.
(player)The componentwise absolute value of a raw value.
(site)Either :PERSPECTIVE or :ISOMETRIC. An isometric picture has no vanishing point, so two chamfers the same width are the same width on screen wherever they sit. That is what makes it the projection to judge a shape rule in.
How many world units of height an isometric frame spans.
(viewer timestamp)(viewer direction active-p)(camera player &key (distance 18.0) seconds)(solid x y z)Read SOLID for gameplay, treating its finite horizontal boundary as wall. Meshing and other world clients retain explicit OUTSIDE-DOMAIN semantics. Only physical occupants choose this restart, so walkers slide along the box and projectile terrain publication materializes nearby boundary colliders.
(player source axis amount)(player origin direction)(world handle)(player source seconds)A ball to throw. The hand never runs out: each throw is a new body.
(world handle)(source &key stock-function chamfer-stock-function
(bevel-width luft:+mesh-bevel-width+))()Three isolated singular-star fixtures for the manifold-sheet spike. The plots exercise an edge-touching pair, a corner-touching pair, and the four-sheet parity star. Nothing else in the scene can hide their junctions. #WSEK3C
The non-negative remainder of integer division.
(&key (beacon-placement *beacon-material-placement*)
(stair-boundary :low-wall))A broad Lonely-Mountains world carrying a bridge and walled sanctuary. This is the old Holm's architectural sentence with its material menagerie removed: rolling approaches, a channel and rising high rock; a diagonal processional way; a two-arched stone bridge; a gate, curtain wall, paired turrets, an arcaded hall…
()Build the wall-side stepped mountain used to judge mixed miters. #Z5NDTA The two L-shaped terraces retain five-, six-, and seven-cell vertex stars in one architectural context. Their back edges meet a continuous wall so the same view also retains the truncated wall miter preserved by #DJK8HW.
(domain x y z &optional (extent +vertex-extent+) (polarity 1))Pack a canonical site inside DOMAIN's box. No coordinate wraps: anchors range over [0, limit] per horizontal axis, and a site extending along an axis cannot begin on that axis's far boundary.
(chain)(chain x y z)Treat positive cubic-site occurrences in CHAIN as Boolean occupancy. Cells above and below the Z range are air; probes beyond the horizontal box signal OUTSIDE-DOMAIN with the boundary restarts.
(scene cell)(solid face)(scene cell)Logical conjunction of tests and raw truth values.
Test whether one compatible scalar is at most another.
Dynamically bindable witness for the cold semantic compilation boundary.
(assembly)(reading)(scene face)(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…
(offset)A coherent coordinate frame for natural fields or authored construction.
Authored cell meaning: substance, deliberate finish, frame, and role.
(&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…
Extract the unsigned bit field (BYTE SIZE POSITION) of one unsigned scalar.
(meshes)Canonicalize and concatenate MESHES into two fixed-arity instance runs. Every source template contains either one triangle or one quad. Templates are interned by their exact packed vertices, padded to a fixed six-vertex stride, and selected by the low sixteen bits of each remapped instance record. The returned…
The componentwise square root of a raw value.
(base-x base-y base-z packed vertices start count)(left right)(population)(&key (terrain-width 4) (architecture-width 1) (contact-width 2))(profile &optional (vocabulary *surface-assembly-vocabulary*))(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,…
(scene profile)(scene profile &key (contract-t-junctions-p t))Build one watertight mesh with a semantic material width at each site. The ordinary width-one mesher supplies one exact topology witness. PROFILE is compiled after that build into a dense stock-to-material-mask lane. Each canonical lattice vertex ORs the masks of all incident stocks: terrain-only,…
Raise a dimensionless value to a dimensionless power.
(function mesh)(left right)(left right)Convert one scalar float or unsigned value to a 32-bit float.
()Build the five-cell medial T-junction regression. #WSEK3C Two ascending architectural columns meet the corner of a two-cell terrain column. Widths one, two, and four occur in one tiny surface; the width-four medial collapse leaves exactly one long-edge/short-edge T-junction for the site-local contraction pass to…
(mesh split)Return only the triangles incident to the three points in SPLIT. SPLIT is (LEFT MIDDLE RIGHT), as reported in the :CANDIDATE-SPLITS bevel diagnostic. A triangle is retained when two or more of its vertices are split points, so the result is the smallest actual mesh patch that contrasts one long edge with its two…
(mesh)Return MESH's exact triangles with every primitive edge marked visible. The geometry, stock, ambient value, primitive class, and winding are retained. Only the three construction-mask bits change. This diagnostic realization exposes connectivity that the ordinary semantic edge mask intentionally hides; it must not…
(boundary)(stocks &optional material-program)Resolve one whole chamfer from its incident face STOCKS. The paper palette's terrain top is grass, terrain side is soil, and terrain underside is dark soil. A unanimous closure continues that face material; a mixed terrain chamfer exposes soil. Stone--terrain chamfers retain the deepest incident substrate, so the…
(mask normal)(specification &optional (target *metal-4-target*))(specification)(current average-luminance)(camera width height jitter)(view previous inspection-parameters ink-strength player
&optional (bevel-width luft:+mesh-bevel-width+) (exposure 1.0f0))Global construction-edge strength. The atelier toggles it between 0 and 1.
Resolution of LUFT's single sun-shadow map.
A native destination with a lifetime and frame clock.
(viewer)One inspectable environment light, packed into raw per-frame GPU lanes.
(light center)Return a texel-stable orthographic world-to-shadow transform. The first two rows map the square light plane to clip [-1,1]. The third maps the signed light depth around CENTER to [0,1]. CENTER is snapped in the light plane so camera translation cannot slide a shadow edge by a fraction of a texel.
(light center &optional (exposure 1.0f0))(&key (horizontal-bits 6)
(x-bits horizontal-bits)
(y-bits horizontal-bits))(domain &key (initial-capacity 0))(builder site)(builder)(source origin direction
&key (max-distance *inspection-reach*))Return the first outward LUFT face met by a continuous lattice ray. Tied edge and corner crossings advance together, so a ray never reports a cell it merely touches. The returned SITE-INSPECTION is the one sparse object boundary over the packed chain and dense face records.
(&key (code t))(site)(site)(site)(mask)One screenshot or film transaction around an application-owned frame. The object is control-plane state, allocated once per capture. TARGET and READBACK-BUFFER are dense GPU resources owned and destroyed by the shared capture implementation.
(application capture)Undo application-owned CAPTURE preparation on the calling thread. When shared GPU resources were created they are still alive and visible through CAPTURE-TARGET and CAPTURE-READBACK-BUFFER during this method. Applications with target-keyed GPU caches should synchronously evict those entries on their canvas thread…
(application)Close APPLICATION's capture admission without waiting for active work. This is safe on a canvas thread. Return true when this call closed admission, or NIL when shutdown had already been requested.
These cells share a face across the X chunk boundary.