Expand description
primase core: the world store, the core components, the frame, the pass manager and gates.
See docs/DESIGN.md §3-4 and CONTRIBUTING.md for the conventions every crate follows.
Game-independent animation descriptions (events, draw groups, material parameters and
controllers) are data only. Readers retain source facts; programs select lowering passes,
and toolkit evaluators supply time-dependent behavior. JSON contracts are in docs/FORMAT.md.
Re-exports§
pub use particles::ParticleSystem;pub use asset::Asset;pub use asset::AssetField;pub use asset::PARTITION_BY_ASSET;pub use asset::PLACE_ASSETS;pub use asset::PartitionByAsset;pub use asset::PlaceAssets;pub use asset::Role;pub use asset::SELECT_ASSETS;pub use asset::SelectAssets;pub use clip::AdditiveReference;pub use clip::Channel;pub use clip::Clip;pub use clip::ClipBinding;pub use clip::ClipTarget;pub use clip::Extrapolation;pub use clip::Interpolation;pub use clip::Property;pub use clip::RootMotion;pub use clip::RootSpace;pub use morphs::Deltas;pub use morphs::Frame as MorphFrame;pub use morphs::MorphId;pub use morphs::Morphs;pub use morphs::Target as MorphTarget;pub use provenance::Origin;pub use provenance::Provenance;pub use rig::Attachment;pub use rig::JointMap;pub use rig::JointOffset;pub use rig::JointPlacement;pub use rig::MorphWeights;pub use rig::RigInstance;pub use rig::RigPose;pub use rig::SkinInstance;pub use rig::Socket;pub use rig::SocketId;pub use rig::Sockets;pub use skeleton::AssemblyReference;pub use skeleton::Joint;pub use skeleton::JointId;pub use skeleton::Rest;pub use skeleton::Skeleton;pub use skin::Binding;pub use skin::BindingId;pub use skin::Deformation;pub use skin::Influences;pub use skin::Skin;pub use skin::Slot;pub use skin::WeightRule;pub use detail::DetailedMaterial;pub use json::JsonError;pub use layered::Layer;pub use layered::LayerWeights;pub use layered::LayeredMaterial;pub use layered::WeightMapping;pub use texformat::TexFormat;pub use world::Column;pub use world::ColumnMut;pub use world::Component;pub use world::ComponentJson;pub use world::ComponentJsonError;pub use world::Dropped;pub use world::Entity;pub use world::Geometry;pub use world::IdError;pub use world::Linearity;pub use world::NameClash;pub use world::Opaque;pub use world::OpaqueData;pub use world::Part;pub use world::Resource;pub use world::VertexBlend;pub use world::World;pub use world::remap_list;pub use components::*;
Modules§
- asset
- One asset read by itself (
core.asset): a root entity naming what the asset is made of, and the passes that work by asset:select-assets(keep some assets of a read world),partition-by-asset(one output part per asset) andplace-assets(place an asset a source did not place). - clip
- An animation clip (
core.clip) and what binds one to occurrences (core.clip_binding). - components
- The core components: what every reader, pass and writer agrees on. Small and versioned; everything game- or
target-specific is a dialect component owned by its crate (
<dialect>.*,pbr.*). - convert
- Convert: one reader, the program’s passes, one writer, and the loop that drives them (
convert_parts,convert). - detail
- A material’s surface as its base and tiled detail textures combine (component
pbr.detail), for a target that composites detail at draw time instead of taking it baked. - frame
- The world frame: metres, right-handed, +Y up, -Z north (glTF’s frame, and one consumer’s); +X is east.
- json
- JSON views of components that never lose a value.
- layered
- A material blend evaluated per pixel from weight channels.
- ledger
- What a pass leaves out on purpose, by name: the measures a drop is counted in (
Measure) and the helper that despawns an entity declaring what it held (despawn). A pass records a drop withPassLog::dropped; a conversion reports every drop as a selection notice (crate::convert::ConvertReport::notices). - morphs
- A mesh’s morph targets (
core.morphs, blend shapes): per-vertex deltas of its primitives, on the entity holding the mesh, so every edit of the geometry carries them. - names
- Every component and resource core declares, by the name each declares for itself (
Component::NAME,Resource::NAME): what a coverage report lists, whether or not a reader, pass or writer mentions it. The types are listed once here; an architecture test holds the list to everyComponentandResourcecore implements. - opening
- Portable alternative read requests produced by readers or registered selection passes.
- parallel
- The threads a run may use (
core.threads):Threadsisprimase_foundations::parallel’s, a run setting the program states on its pass manager (crate::pass::Settings,crate::pass::PassManager::with_settings), which states it in each world it runs. A pass that runs on them declaresTHREADSin itscrate::pass::Pass::settingsand reads the world’s statement withthreads. - particles
core.particles: a particle effect as a source states it, in game-neutral terms.- pass
- The pass manager (DESIGN.md §4): passes that transform the world, the pipelines a program states, the targets writers declare, and the verifier that runs between every step.
- pbr
- The
pbr.*dialect: a baked metal-rough material, glTF 2.0’s material model. The common lowering target for the glTF and USD writers and a destination’s: a pass lowers a source’s material (layered_material, …) to aPbrMaterialon the same material entity, which keeps its dialect components. - Printing the world around passes (DESIGN.md §4
print-world-after):WorldPrinteris anInstrumentthat makes one text per pass: what the world holds after it (entities, components and resources by name), what the pass spawned, despawned and changed, the pass’s own counts, and optionally the components of chosen entities. - provenance
- Provenance (
core.provenance): where an entity’s content came from, down to the primitive, and which passes derived it, so a glitch in an output traces back to the archive, the file and the part of the file it was read from (DESIGN.md §4: passes that merge entities merge their provenance). - read_
scope - Caller-stated reader scopes: declarations reuse pass options, never introduce reader defaults.
- render_
graph core.render_graph: the frame a source’s renderer draws, as data (a world resource): the images it makes and the passes that make them, in order, each a program of the source’s with the role of everything it reads and writes. A consumer runs it with generic machinery: it allocates the targets, runs each pass’s programs with the bindings the pass states, and gives each role its value; it knows no game. Where a renderer’s meaning has no core role, the pass states the source’s own words (ConstantRole::Material) that the source’s lowering computed from its data.- report_
card - Display-only structured read reports. Programs render the fields generically and do not infer game semantics.
- rig
- Rig occurrences: a skeleton placed and posed, and the meshes, weights and objects that follow it. Definitions
(
core.skeleton,core.skin,core.morphs,core.sockets) are shared; an occurrence holds what is its own, so two placed characters sharing one mesh, skin and clips never share a pose. - shader
- Shader programs and materials’ bindings to them, as components, and what each thing a program reads and writes
stands for: the roles of its inputs, constants, textures, buffers and outputs (
roles), how an output stores a value (encoding), and the one reading of a pixel program’s outputs as a lit surface (surface). The program’s own vocabulary (its interface, resources and render state) isiridia_interface’s. - skeleton
- A skeleton (
core.skeleton): the joints that skins bind to and clips animate, each with its parent and its local rest transform as the source authors it. A definition: a skeleton is shared by every mesh bound to it and every occurrence that poses it, and holds no pose of its own beyond its rest. - skin
- A mesh’s skin (
core.skin): how its vertices are bound to joints, on the entity holding the mesh (a prototype or one of its level-of-detail forms), so every edit of the geometry carries it. - state
- World state: variables a level can be in (a game’s event flags, a door’s open state, a level’s instance group, an
object’s active flag) and what depends on them, resolved to one concrete world by
ResolveState. - summary
- Summaries and decisions: what a conversion in parts knows of the whole of what it writes.
- texformat
TexFormat: the one enum for how a texture’s bytes are laid out, for every game and target.- translate
translate-world{by=X,Y,Z}: the whole world moved by a stated offset (core’s frame, metres), as a program does to bring an area far from its source’s origin near a destination’s (a region several kilometres out, for an engine whose precision or bounds want it near zero). What moves is core’s world-space data: every entity’s transform and every transform a state override gives, every curve’s points and handles, every ground marker’s position, and a partition plan’s ground areas (crate::convert::PartitionPlan, so its parts still read where their content is); local geometry (prototypes’ meshes, collision, colliders) stays as it is. A dialect component that holds world positions isn’t core’s to move: lower it first.- vector
- Three-component vectors in f64, as plain arrays: the one set of the arithmetic every crate’s geometry in f64 shares
(f32 meshes have
primase_meshops::Vec3). Each operation is one fixed order of operations, so any two crates computing the same thing get the same bits. - world
- The world store: entities, typed components, opaque (unknown) components and world resources.
Structs§
- Ambient
- Ambient light: light every surface receives from no particular place, by the direction it faces alone, unshadowed.
Its colours are linear RGB, each scaled by
intensity: a colour of 1 at intensity 1 lights a surface as a directionalcore.lightof intensity 1 (lux) shining straight onto it does. A source whose ambient is relative (to its sun, say) states it at that scale and reports the approximation; this is not a measured illuminance. - Atmosphere
- Fog and exposure as the source authored them; each
Nonewhen the source states none (or a lowering has not established its meaning). A scene-wide fact, kept by every part of a split world ascore.environment’s ambient is. - Auto
Exposure - The camera’s automatic exposure: the frame’s light is metered (
ExposureMeter), compared with middle grey, and the exposure moved fromstopsagainst the difference, by at mostmaxstops down and-minstops up, approaching those bounds smoothly (AutoExposure::correction). The scene is shown at2^(stops - correction)times its light before any tone curve (AutoExposure::scale). - Clip
Effects core.clip_effects, on a clip.- Clip
Event - Clip
Events core.clip_events, on a clip. Refusals name source records a lowering could not interpret; the lowering must not emit a partial behavior timeline for those records.- ClipKey
core.clip_key: the reader’s opaque stable identity, on a listed or loaded clip. A listed clip is acore.assetmember withRole::Clipwithoutcore.clip. Its source descriptor belongs to the reader; loading preserves this entity and key.- Clip
Length core.clip_length: seconds, present only when the listing knows the length. Absence means unknown, not zero. Once loaded,core.clip.durationis authoritative.- Clip
Spawn - One system a clip starts.
- Collider
core.collider: a collision shape in the entity’s own space, placed likecore.collision(on a prototype, by its instances; else by the entity’s transform). The geometry is exact under the entity’s full transform: a sphere under a non-uniform scale is an ellipsoid. A source whose physics treats scale otherwise (PhysX scales a sphere’s radius by its largest axis) has its lowering pass choose the shape and transform that collide as the game does.- Colour
Lut - A cubic RGB lookup, red fastest, then green, then blue. Before lookup, raise RGB to
input_power; sample with trilinear filtering at texel centres, clamping to the cube’s edges. The values and filtered result are sRGB-encoded display RGB. Decode after filtering when writing to a target that encodes sRGB on write. - Content
Note core.content_note: what a reader or pass says a consumer should show about an entity’s content.unsupportedsays something is not drawn; its stablekeyand humanreasoncome from the lowering.atis a canonical world position in metres, useful where the entity has no transform.- Controller
core.controller: states and the clip motions their parameters choose. Transitions and body/skeleton masks remain in the source dialect until a lowering can represent their semantics. Layer blending and default weights are retained even where a consumer cannot evaluate them.- Controller
Binding core.controller_binding: a controller driving a rig occurrence, not a skeleton definition.- Controller
Layer - Controller
Parameter - Controller
State - Curve
core.curve: an author-placed curve in world space: a grind rail, a ledge, a coping, a path, a chairlift’s cable. Points in order, metres;closed: the last point joins the first. Withouttangentsit is the polyline through them; with them each pair of consecutive points is a cubic Bezier segment from a point by its out handle and the next point’s in handle (Catmull-Rom, Hermite and auto tangents convert to these handles exactly). A consumer that needs a polyline runsflatten-curves.- Directional
Light Unit - What one unit of the source’s own value of a directional light (its sun) is in lux: the calibration the lowering that
made the scene’s sun (
core.environment’s) chose. The sun’s intensity is its source value timeslux_per_unit, socolor * intensity / lux_per_unitis the value the source stored, the one a program of the source reads its sun in (crate::shader::FrameParameter::LightColour). The lowering that makes the sun writes it; a world whose sun no lowering made has none. - Display
Name core.display_name: a source id’s human name, credited independently of the entity’s stable name/id.- Draw
Group Defaults core.draw_group_defaults, on a drawn occurrence or rig: visibility with no clip, or when a channel inherits. Bit n states whether group n is shown. Defaults belong to the occurrence, so two occurrences of one mesh may have different defaults without duplicating its groups.- Draw
Groups core.draw_groups, on a mesh: the group of each primitive, or none (unaffected by group channels). A clip addresses only groups of the same exactscope. Group numbers are 0..64, indexing the occurrence’sDrawGroupDefaults::shownmask. A lowering resolves a source’s group vocabulary.- Draw
Order core.draw_order: where a material’s surfaces come in the source’s draw sequence.queueis that sequence across every layer, lower first, on core’s own scale:DrawOrder::OPAQUE2000,DrawOrder::CUTOUT2450,DrawOrder::SKY2900 andDrawOrder::TRANSPARENT3000 are where a layer’s surfaces come by default (the sky has no alpha mode that implies it: a source states it), and a lowering places a source’s own sequence on this scale (a source whose numbers are already on it keeps them). One scale for every layer, so a source can order a surface of one layer among another’s. Within one queue, surfaces draw in entity order, then primitive order: the source order readers keep.- Drop
Optional drop-optional{max=N}: every placement more optional thanmax(itsPriorityabove it) is despawned with everything it holds, counted per priority; the others are untouched. Without optionsmaxis 255 and nothing is dropped: leaving placements out is always a pipeline’s explicit choice. A dropped entity that a kept one refers to (a self-placed mesh other placements use as their prototype) is refused, and nothing is dropped.- Drop
Unreferenced Textures drop-unreferenced-textures: every texture entity (one holdingcore.textureorcore.texture_file) that no component in the world refers to and nothing places (nocore.transform) is despawned with everything it holds, counted, with the bytes of its loaded levels. A texture no material, binding or form names is reached by no writer that writes what materials bind; one a program writes on its own (a texture export) is not this pass’s to drop, so the pass is the program’s statement, never a writer’s default.- Effect
Blend - A caller’s authored duration and the optional source override that resolved it.
- Environment
- The scene’s environment as the source authored it.
sun: the entity whose directionalcore.lightthe source names as its sun (a scene setting naming one light, not the brightest light a writer picks);Nonewhen the source names none, or in a part of a world that does not hold the sun (a subset or a cell).ambient: the scene’s ambient light (Ambient);Nonewhen the source states none or a lowering has not stated its meaning. Sky and fog are not here until their meaning and units are established for a source. - Environment
Probe Blend - The caller or source has selected both states and the interpolation factor explicitly. State identifiers and clock/quality selection remain source concerns. A consumer blends sampled linear radiance and decoded irradiance as A + (B - A) * factor. It must preserve both original states when a source program performs this blend itself.
- Event
Value - Exposure
- The camera’s exposure: scene light is scaled by
2^stopsbefore any tone curve. 0 leaves it as it is. This is a relative setting, not a measured camera: a source whose exposure is another quantity (a multiplier, an EV at ISO 100) converts it and reports the approximation. - Fog
- Distance fog: the light of a surface at distance
dmetres from the camera is mixed withcolourby the fraction theFogFalloffgives along the camera ray. This does not describe scattering towards the sun. - Heightfield
core.heightfield: a regular grid of heights in the entity’s space:columnsxrowssamples along +X and +Z from the origin,spacingmetres apart (x, z), each a height along +Y. Cells are split into two triangles alongdiagonal. A terrain’s drawn surface and its collision are the same grid: drawing it is a later pass; colliding with it is aColliderof shapeShape::Heightfieldon the same entity.- Incoming
Transition - A source pass’s timing override for transitions into a clip.
Noneretains the caller’s authored duration; a refusal must never be treated as an absent override. - Irradiance
Volume - Four 3D coefficient textures, in X/Y/Z/constant order. For each sampled RGBA value,
decode RGB as
(rgb - 0.5) * 2 * exp2((a - 0.5) * 20), then dot the four terms with(dot(n,basis[0]), dot(n,basis[1]), dot(n,basis[2]), 1)and take max(0). The entity’s transform maps the unit box [-1,1] to its blend region in world metres. Regions blend in increasing priority; their interior excludes lower-priority regions, while their fade shell blends over them. Equal-priority ordering is source-defined. - Light
Falloff - The normalization distance of a punctual light’s source-defined falloff: a source program evaluates its
distance-dependent diffuse wrap and specular width using
distance / self.distance. This states the input, not an attenuation function; the source shader defines the function. It is neither the emitter’s physical radius nor the range where lighting stops. Attached to the same entity ascrate::Light. - Light
Translucency - A light shader’s transmission contribution: an amplitude and a multiplier of its angular exponent.
The source shader defines the angular function and reference exponent. These parameters neither select a
particular lighting model nor change opaque material transmission. Attached to the same entity as
crate::Light. - Light
Unit - What one unit of the source’s own value of a point or spot light is in candela: the calibration the lowering that
made the world’s point and spot
core.lights chose (a directional light’s intensity, in lux, is not in it). Such a light’s intensity is its source value timescandela_per_unit, socolour * intensity / candela_per_unitis the value the source stored, the one a program of the source reads its lights in (crate::shader::LightValue::Colour). The lowering that makes the lights writes it; a world whose lights no lowering made (a scene read in candela) has none, and a light table’s colours have no value there. - LodBoundary
- One boundary between two neighbouring levels: level
k + 1begins atborder(timesLodSwitch::scale), andplayis a band past it (LodBand), not scaled. - LodForm
- One other form of a prototype: its level and the entity holding it.
- LodSwitch
- When a placement draws each level of its prototype’s levels of detail (
core.lod_switch), on the placement (an entity withcore.instance). Distances are in the world’s units, from the camera to the placement’s world box, scaled byLodSwitchView::factor.boundaries[k]is the boundary between levelskandk + 1, in order (a border that is never reached, such as a source’s 9999 m, is stated as it is). - LodSwitch
View - The view the distances of every
LodSwitchare stated for (core.lod_switch_view, a world resource): a camera of vertical field of viewreference_fov_ymeasures them as they are, a narrower one as nearer. A world with level switches has it. - Lods
- A prototype’s levels of detail (
core.lods), on the prototype. Its own mesh is one form, at leveldetail(0 the finest, larger coarser, 0 high to 3 very low in one source);formsare its other forms, as the source lists them (finest first by convention; nothing depends on it). - Marker
core.marker: an author-placed point of interest: a spawn, a fast-travel stop, a trainer, an effect emitter, a waypoint. Where: the entity’sTransform(position, and orientation when the source gives one: the marker faces its local +Z). A source that leaves the height to be found (snapped to the ground by its consumer) gives no transform butMarker::ground. Name: the entity’score.name.- Masked
Joint - One joint’s weight in a layer’s mask, named as
core.clipnames a joint channel’s target: by the skeleton and the joint’s identity in it (never by name). A controller may therefore be bound to any rig whose skeleton an entry names; the entries of another skeleton do not apply to it. - Material
Parameters core.material_parameters, on a material: named rest values, one to four finite floats each. AClipTarget::MaterialParameterchannel replaces a named value at its declared width. With no driving channel the material retains this default. Core assigns no visibility, colour-space, buffer-address or event-layout meaning to a name; the game’s lowering states those separately.- Place
Spawn place-spawn{at=centre | east=E,north=N}[,yaw=DEGREES]}: acore.markerof kindspawnat a ground position (its height left to the consumer, which snaps it), facingyaw(Marker::yaw). The caller states where; a world whose source already places a spawn is refused (the source’s own stands). It runs as a selection pass, on the world a writer plans from, so one spawn serves every part of a conversion; the marker is content of its own (PassLog::place). Made byPlaceSpawn::centreorPlaceSpawn::at_ground, facingPlaceSpawn::with_yaw; from options by the same calls.- Post
Processing Status - Source-pass status for display processing, separate from the numerical operations in
super::Atmosphere. An empty or absent resource makes no claim about an unread source’s support. - Post
Stage Status - One source-provided explanation. Consumers show the explanation without interpreting source records.
- Primitive
Keys core.primitive_keys, on a mesh: one u32 per primitive for every named field. Ashader::VariantKey::fieldnames one of these exact keys; core does not interpret its namespace.- Priority
- How optional a placement is (
core.priority): 0 is required and higher values are more optional. Absence uses the required-placement behavior. - Probe
State - One authored environment state. Its diffuse field is the existing irradiance-volume entity, including that entity’s transform and coefficient sampling domain.
- Record
core.record: a retained source record, with or without a position. Its lower-case category and kind usecrate::kind_is_valid’s vocabulary, as markers do. Events need no fake transform.- Reflection
Probe Region - An environment probe’s spatial influence. The entity’s transform maps the unit box [-1,1] to world metres. Regions blend in increasing priority; equal-priority order belongs to the source graph. The fade shell is measured in authored box metres.
- Reinhard
Curve - A 1024-entry R16F curve: at texel i, u=(i+.5)/1024, z=(.2*u/(1-u)*white_balance)^contrast, output=(z/(1+z))^(1/gamma). Positive values are quantized towards zero to binary16. HDR is sampled through the table at HDR/(HDR+.2), linearly with edge clamping.
- Select
Lod select-lod{form=finest|default|N}(formrequired: which level of detail is drawn is the program’s choice): every prototype withLodsis left with the one formLods::choosetakes (withdefault, the finest where the source authored no default, counted as an approximation). Another form than its own takes the prototype’s own geometry away with everything that describes it (World::remove_mesh:core.mesh,core.mesh_fileand every per-primitive component, dialect data included, so nothing describing the discarded form stays behind when the chosen form lacks it), then every component the form holds replaces the prototype’s of that name (World::move_components), so the form’s dialect data travels with it without the pass knowing it, except what stays with the prototype (core.name,core.source,core.collision: the form’s own are left behind, counted); a form that draws nothing leaves the prototype without a mesh. The other forms are despawned andcore.lodsremoved. The whole selection is checked before anything changes: an invalid one (a prototype drawn with another form while it holds an opaque component, which can’t be told to follow, among them) is an error and leaves the world as it was.- Select
Texture Form select-texture-form{form=finest|N}(formrequired: which stored form is drawn is the program’s choice): every texture withTextureFormsis left with the one formTextureForms::choosetakes. Another form than its own replaces the texture’score.textureandcore.texture_filewith every component the form holds (World::move_components), except the form’s owncore.nameandcore.source, which are left behind, counted: the bindings and the name stay the texture’s. The other forms are despawned andcore.texture_formsremoved. The whole selection is checked before anything changes: an invalid one is an error and leaves the world as it was.- Spot
Frustum - A spot light whose volume is a rectangular pyramid with a near plane: from its apex it opens by
horizontal_half_angleabout its local +X andvertical_half_angleabout its local +Y (radians, from the beam), and it lights only pastnearalong the beam (metres), to itsLight::range. Attached to the same entity as a spotLight, by a lowering whose source states such a spot (the source’s angles and near plane, exactly). The light’s own cone (LightKind::Spot) is then the portable approximation the lowering states (glTF’s circle has one angle and no near plane); a consumer that does not read this component takes that cone. - Step
Binding - One draw of the frame’s scene steps that draws a material, and the program it draws it through.
- Step
Bindings core.step_bindings, on a material entity: the draws of the frame’s scene steps that draw it and the program each draws it through: a draw once, or once for each pass of the material it draws, in the order it draws them.- Step
Draws core.step_draws, on a placement (acore.instance) or an entity that draws its own mesh: the draws of the scene steps that pick their placements one by one (ScenePlacements::Listed) that draw it, each once. A step whose placements are listed draws no placement without it.- Texture
Form - One other form of a texture: its level and the entity holding it.
- Texture
Forms - A texture’s other stored forms (
core.texture_forms), on the texture entity materials bind. Its own texture is one form, at leveldetail(0 the finest, larger coarser);formsare its other forms, as the source stores them. - Texture
Layers - Pixels or encoded blocks of a texture with several images (
TextureShape). - Texture
Switch - When a placement draws its textures’ level-1 forms (
core.texture_switch), on the placement (an entity withcore.instance). Distances are in the world’s units, measured from the camera to the placement’s world box (box_distance) and scaled byTextureSwitchView::factor. The level starts atTEXTURE_SWITCH_STARTand moves with hysteresis: from 0 to 1 at a distance of(border + play) * scale * loador more, from 1 to 0 below(border - play) * scale * load * ramp, otherwise it stays (loadandrampthe view’sTextureSwitchState). - Texture
Switch State - The source’s factors on a
TextureSwitch’s thresholds, which its own runtime may move: the state a renderer evaluates the switch in, stated by the source with what it stands for. - Texture
Switch View - The view the distances of every
TextureSwitchare stated for, and the state they are evaluated in (core.texture_switch_view, a world resource): a camera of vertical field of viewreference_fov_ymeasures them as they are, a narrower one as nearer; with areference_height, a view taller than it as nearer too. A world with texture switches has it. - Time
OfDay - The hour of the day the scene shows (
core.time_of_day, a world resource), 0 to 24 (24 is midnight again): the hour a lowering chose for a scene whose source varies over the day (its environment stored at several hours, a program’s material keyed by the hour), the program’s hour where it chose one, else the source’s stated default, counted where it is a default. A program of the source reads it ascrate::shader::FrameParameter::TimeOfDay. A world no lowering chose an hour for has none, and a consumer gives such a program no hour. - ToneMap
- Display processing after exposure and bloom. Values describe operations, independent of a source’s settings files.
- Volumetric
Fog - A source’s volumetric (froxel) fog, every field as the source stores it and named as the source names it. The units
are the source’s: the densities are not established as per metre (the source states a
game_scale), the colours are not established as linear light at core’s scale, anddirectional_light_banknames a light bank of the source, not a core light. Nothing here is converted, so a consumer must not draw it asFog: a renderer draws no fog from it until a source has established its unit, and a lowering that states it says so in its notices. A field the source file does not store isNone(a later file of a map stores only what it changes). - Water
Body core.water_body: the optics of the water a material’s surface covers, in the world’s units (metres, seconds, linear RGB), on a material entity whosecrate::MaterialUsageis water. What the surface itself reflects stayscrate::pbr::PbrMaterial’s; this is what lies under it and how the surface moves.- Wave
Layer - One moving normal map of a
WaterBody.
Enums§
- Ambient
Light - How
Ambient’s light varies with the direction a surface faces. - Colour
Matrix - Three rows applied to (R, G, B, 1), with negative results clamped to zero. Placement matters: a tone curve is nonlinear, so a colour transform of HDR before the curve is a different operation from a transform after it.
- Controller
Parameter Kind - Diagonal
- Which corners a heightfield cell’s two triangles share.
- Draw
Layer - What a surface is, for the draw order: it drives depth bias, shadows and a target’s material class, not the
sequence (that is
DrawOrder::queue). - Event
Value Data - Exposure
Meter - How a frame’s light is metered for
AutoExposure. - FogFalloff
- How much of a surface’s light the fog replaces, by its distance
dfrom the camera in metres. - Layer
Blending - The layer’s source-stated composition. Unknown values stay explicit, not guessed as override.
- Layer
Mask - Which joints a layer drives, and how strongly (see the module documentation).
- LodBand
- What a boundary’s
playis. - LodChoice
- Which form
SelectLodtakes of each prototype. - Material
Usage core.material_usage: what the surfaces drawn with a material are, as the source states it (its shader family), for consumers that treat them differently whatever their shading: a target’s material class, a viewer’s wind or two-sided lighting. A reader’s lowering sets it from the source through a named table and counts what it does not map; it is never guessed from names. A material without it is ordinary. Further kinds are added with a source that states them, as a new VERSION.- Motion
- A selected state’s motion. Blend thresholds are finite and strictly increasing, one or more children. A lowering keeps an unsupported tree as a named refusal instead of selecting a child.
- Name
Origin - Where a human-readable name comes from. The source’s own ids remain separate from display names.
- Post
Stage - A display-processing operation, independent of a source’s settings vocabulary.
- Post
Stage Status Kind - Whether a source could not establish an operation or supplied a stated approximation.
- Probe
MipPolicy - How surface roughness selects the mip of a stored reflection cube. LODs refer to the cube’s stored mip chain; synthesizing a different chain is a separate render-graph operation.
- Shape
- A collider’s shape, in the entity’s space, metres.
- SkyAnchor
core.sky_anchor: a placement of the sky (its materials incrate::DrawLayer::Sky) that the source moves with the view every frame, and how. Itscore.transformis where it stands for a view at the world’s origin; a consumer computes, every frame and for every view (each eye of a stereo view), the transform it draws it with (SkyAnchor::placed). A consumer that does not move it draws it where its transform puts it, which is right for a view at the origin only.- SpawnAt
- Where
PlaceSpawnputs the spawn. - Step
Program - The program a draw draws a material through.
- Texture
Choice - Which form
SelectTextureFormkeeps of each texture. - Texture
Shape - What the layers of a
TextureLayersare. - Vertex
Color core.vertex_color: what a material does withCOLOR_0as a colour. Core’s convention is glTF’s: a material multiplies its base colour byCOLOR_0, and a material without this component does. A reader whose source shaders do not (one engine’s opaque shaders) marks their materialsVertexColor::Ignoredfrom a named shader table in its lowering, counting what the table does not map; it is never guessed from names. The stream itself stays on the mesh: one prototype can be drawn with several materials (MaterialVariants), and a consumer dropsCOLOR_0per drawn primitive. OnlyCOLOR_0as a colour: a layered material’s weights read their own attribute (uses_color0). Further kinds are added with a source that states them, as a new VERSION.
Constants§
- DROP_
OPTIONAL drop-optional’s declaration (crate::pass::PassRegistry::add).- DROP_
UNREFERENCED_ TEXTURES drop-unreferenced-textures’ declaration (crate::pass::PassRegistry::add): no options.- PLACE_
SPAWN place-spawn’s declaration (crate::pass::PassRegistry::add): where the spawn goes is the program’s, no default.- SELECT_
LOD select-lod’s declaration (crate::pass::PassRegistry::add).- SELECT_
TEXTURE_ FORM select-texture-form’s declaration (crate::pass::PassRegistry::add).- TEXTURE_
SWITCH_ START - The level a placement’s textures start at, before the first evaluation: the coarser form.
Functions§
- box_
distance - The distance from
pointto the axis-aligned boxmin..max: to its nearest point, 0 inside. - centre_
ground - The per-axis median of the placements’ ground positions (east, north): a few placements far from the rest do not
move it off the map. A placement without a transform has no place, so it is refused (naming
pass) rather than counted as the origin. - color0_
drawn - Whether some drawing of primitive
indexofprototype’smeshreadsCOLOR_0: with its own material or a variant’s (MaterialVariants). A primitive without a material is drawn with the consumer’s default material, which takes its vertex colour (glTF). - kind_
is_ valid - A kind is a nonempty word of
a-z,0-9and_. The known ones are listed in the format documentation; any other is a source’s own. - register
- Register core’s generic passes by their declarations, as every crate registers its own: a program builds its
registry from these. What each takes:
pass::PassRegistry::describe, or the declaration (SELECT_LOD,SELECT_TEXTURE_FORM,DROP_OPTIONAL,DROP_UNREFERENCED_TEXTURES,PLACE_SPAWN,PLACE_ASSETS,SELECT_ASSETS,PARTITION_BY_ASSET,state::RESOLVE_STATE,state::SELECT_OUTFIT,shader::SELECT_VARIANT,translate::TRANSLATE_WORLD). - uses_
color0 - Whether drawing with
materialreadsCOLOR_0: as a colour (it is notVertexColor::Ignored) or as a layered material’s weights. - world_
box - The world-space axis-aligned box of the local boxes
boxes(min, max) placed byt: the union of the eight transformed corners of each.Nonewhenboxesis empty.