luvcraft/player-body-shaders.lisp
--------------------------------------------------------------------- Shared field vocabulary and the complete avatar.
--------------------------------------------------------------------- The first-person slice of the same limb vocabulary.
The thumb is part of the hand-size vocabulary, not a fixed bead: tuning the palm in the metabar preserves a recognizable hand.
--------------------------------------------------------------------- Lower-screen proxy and marcher.
In this projection positive clip y is down the presented image. The arms never need the top fifth of the screen.
Radius of the player's SDF forearms in view-space cells.
Overall radius of the player's SDF hands.
Fraction of shoulder-to-palm reach covered by the sleeve.
Half the separation between the viewmodel shoulders.
Width of the soft SDF weld between each wrist and hand.
Construct a meaningful literal.
Compare compatible quantities and produce dimensionless values.
(name (&key label (group :grading) documentation
(class ''scalar-knob)
quantity (type 'single-float)
unit-label minimum maximum step)
place)Define NAME as a knob of CLASS over the setf-able PLACE. PLACE may refer to SESSION, so a knob can live on the session -- its sky clock, its player -- as well as in a special. QUANTITY is a quantity plist as DEFINE-QUANTITY-CONSTANT takes, (:quantity ... :unit ...); it and TYPE make the knob's declaration, which…
(name parameters &body body)Define a reusable typed shader expression with ordinary source syntax. The body is parsed at each call site, so argument types and quantity meanings flow through the same operator protocol as handwritten shader expressions. LET* is lexical inside the function. The definition macro records source; its body does not…
The componentwise square root of a raw value.
The maximum of compatible quantities.
The inner product of two vectors.
Constrain a quantity between compatible bounds.
Addition over compatible quantities.
Multiplication and scalar scaling.
Division of two represented quantities.
Subtraction or unary negation.
Interpolate compatible quantities by a scalar amount.
The componentwise absolute value of a raw value.
Select and reorder vector components by a designator such as :XYZ or :RGB.
The minimum of compatible quantities.
Normalize a dimensionless vector.
(generic-function name specialized-lambda-list options &body body)Define a shader-producing method with ordinary DEFMETHOD identity. Calling the method reparses its small source form so changes to source-level abstractions participate in live rebuilding. Method replacement remains the role/stage identity watched by the MOP; abstraction revisions are tracked separately by live…
(role stage)Return the current durable shader specification for ROLE and STAGE.
Expose a quantity's raw representation.
Test whether one compatible scalar is less than another.
Test whether one compatible scalar is greater than another.
Raise a dimensionless value to a dimensionless power.
The player's body as an analytic field.
The complete neutral avatar below is the same kind of object as an SDF cat or gnome: torso, head, limbs, and hands are one smooth signed-distance field. First person normally sees only the view-local arm slice of that body. Its palms still come from BODY.LISP, so walking bob, breathing, and holding a phone remain authored once; a lower-screen proxy merely launches the rays which find the round sleeves, wrists, and hands.