Skip to main content

Crate primase_core

Crate primase_core 

Source
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) and place-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 with PassLog::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 every Component and Resource core implements.
opening
Portable alternative read requests produced by readers or registered selection passes.
parallel
The threads a run may use (core.threads): Threads is primase_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 declares THREADS in its crate::pass::Pass::settings and reads the world’s statement with threads.
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 a PbrMaterial on the same material entity, which keeps its dialect components.
print
Printing the world around passes (DESIGN.md §4 print-world-after): WorldPrinter is an Instrument that 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) is iridia_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 directional core.light of 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 None when the source states none (or a lowering has not established its meaning). A scene-wide fact, kept by every part of a split world as core.environment’s ambient is.
AutoExposure
The camera’s automatic exposure: the frame’s light is metered (ExposureMeter), compared with middle grey, and the exposure moved from stops against the difference, by at most max stops down and -min stops up, approaching those bounds smoothly (AutoExposure::correction). The scene is shown at 2^(stops - correction) times its light before any tone curve (AutoExposure::scale).
ClipEffects
core.clip_effects, on a clip.
ClipEvent
ClipEvents
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 a core.asset member with Role::Clip without core.clip. Its source descriptor belongs to the reader; loading preserves this entity and key.
ClipLength
core.clip_length: seconds, present only when the listing knows the length. Absence means unknown, not zero. Once loaded, core.clip.duration is authoritative.
ClipSpawn
One system a clip starts.
Collider
core.collider: a collision shape in the entity’s own space, placed like core.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.
ColourLut
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.
ContentNote
core.content_note: what a reader or pass says a consumer should show about an entity’s content. unsupported says something is not drawn; its stable key and human reason come from the lowering. at is 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.
ControllerBinding
core.controller_binding: a controller driving a rig occurrence, not a skeleton definition.
ControllerLayer
ControllerParameter
ControllerState
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. Without tangents it 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 runs flatten-curves.
DirectionalLightUnit
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 times lux_per_unit, so color * intensity / lux_per_unit is 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.
DisplayName
core.display_name: a source id’s human name, credited independently of the entity’s stable name/id.
DrawGroupDefaults
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.
DrawGroups
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 exact scope. Group numbers are 0..64, indexing the occurrence’s DrawGroupDefaults::shown mask. A lowering resolves a source’s group vocabulary.
DrawOrder
core.draw_order: where a material’s surfaces come in the source’s draw sequence. queue is that sequence across every layer, lower first, on core’s own scale: DrawOrder::OPAQUE 2000, DrawOrder::CUTOUT 2450, DrawOrder::SKY 2900 and DrawOrder::TRANSPARENT 3000 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.
DropOptional
drop-optional{max=N}: every placement more optional than max (its Priority above it) is despawned with everything it holds, counted per priority; the others are untouched. Without options max is 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.
DropUnreferencedTextures
drop-unreferenced-textures: every texture entity (one holding core.texture or core.texture_file) that no component in the world refers to and nothing places (no core.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.
EffectBlend
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 directional core.light the source names as its sun (a scene setting naming one light, not the brightest light a writer picks); None when 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); None when 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.
EnvironmentProbeBlend
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.
EventValue
Exposure
The camera’s exposure: scene light is scaled by 2^stops before 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 d metres from the camera is mixed with colour by the fraction the FogFalloff gives 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: columns x rows samples along +X and +Z from the origin, spacing metres apart (x, z), each a height along +Y. Cells are split into two triangles along diagonal. A terrain’s drawn surface and its collision are the same grid: drawing it is a later pass; colliding with it is a Collider of shape Shape::Heightfield on the same entity.
IncomingTransition
A source pass’s timing override for transitions into a clip. None retains the caller’s authored duration; a refusal must never be treated as an absent override.
IrradianceVolume
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.
LightFalloff
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 as crate::Light.
LightTranslucency
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.
LightUnit
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 times candela_per_unit, so colour * intensity / candela_per_unit is 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 + 1 begins at border (times LodSwitch::scale), and play is 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 with core.instance). Distances are in the world’s units, from the camera to the placement’s world box, scaled by LodSwitchView::factor. boundaries[k] is the boundary between levels k and k + 1, in order (a border that is never reached, such as a source’s 9999 m, is stated as it is).
LodSwitchView
The view the distances of every LodSwitch are stated for (core.lod_switch_view, a world resource): a camera of vertical field of view reference_fov_y measures 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 level detail (0 the finest, larger coarser, 0 high to 3 very low in one source); forms are 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’s Transform (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 but Marker::ground. Name: the entity’s core.name.
MaskedJoint
One joint’s weight in a layer’s mask, named as core.clip names 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.
MaterialParameters
core.material_parameters, on a material: named rest values, one to four finite floats each. A ClipTarget::MaterialParameter channel 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.
PlaceSpawn
place-spawn{at=centre | east=E,north=N}[,yaw=DEGREES]}: a core.marker of kind spawn at a ground position (its height left to the consumer, which snaps it), facing yaw (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 by PlaceSpawn::centre or PlaceSpawn::at_ground, facing PlaceSpawn::with_yaw; from options by the same calls.
PostProcessingStatus
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.
PostStageStatus
One source-provided explanation. Consumers show the explanation without interpreting source records.
PrimitiveKeys
core.primitive_keys, on a mesh: one u32 per primitive for every named field. A shader::VariantKey::field names 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.
ProbeState
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 use crate::kind_is_valid’s vocabulary, as markers do. Events need no fake transform.
ReflectionProbeRegion
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.
ReinhardCurve
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.
SelectLod
select-lod{form=finest|default|N} (form required: which level of detail is drawn is the program’s choice): every prototype with Lods is left with the one form Lods::choose takes (with default, 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_file and 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 and core.lods removed. 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.
SelectTextureForm
select-texture-form{form=finest|N} (form required: which stored form is drawn is the program’s choice): every texture with TextureForms is left with the one form TextureForms::choose takes. Another form than its own replaces the texture’s core.texture and core.texture_file with every component the form holds (World::move_components), except the form’s own core.name and core.source, which are left behind, counted: the bindings and the name stay the texture’s. The other forms are despawned and core.texture_forms removed. The whole selection is checked before anything changes: an invalid one is an error and leaves the world as it was.
SpotFrustum
A spot light whose volume is a rectangular pyramid with a near plane: from its apex it opens by horizontal_half_angle about its local +X and vertical_half_angle about its local +Y (radians, from the beam), and it lights only past near along the beam (metres), to its Light::range. Attached to the same entity as a spot Light, 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.
StepBinding
One draw of the frame’s scene steps that draws a material, and the program it draws it through.
StepBindings
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.
StepDraws
core.step_draws, on a placement (a core.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.
TextureForm
One other form of a texture: its level and the entity holding it.
TextureForms
A texture’s other stored forms (core.texture_forms), on the texture entity materials bind. Its own texture is one form, at level detail (0 the finest, larger coarser); forms are its other forms, as the source stores them.
TextureLayers
Pixels or encoded blocks of a texture with several images (TextureShape).
TextureSwitch
When a placement draws its textures’ level-1 forms (core.texture_switch), on the placement (an entity with core.instance). Distances are in the world’s units, measured from the camera to the placement’s world box (box_distance) and scaled by TextureSwitchView::factor. The level starts at TEXTURE_SWITCH_START and moves with hysteresis: from 0 to 1 at a distance of (border + play) * scale * load or more, from 1 to 0 below (border - play) * scale * load * ramp, otherwise it stays (load and ramp the view’s TextureSwitchState).
TextureSwitchState
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.
TextureSwitchView
The view the distances of every TextureSwitch are stated for, and the state they are evaluated in (core.texture_switch_view, a world resource): a camera of vertical field of view reference_fov_y measures them as they are, a narrower one as nearer; with a reference_height, a view taller than it as nearer too. A world with texture switches has it.
TimeOfDay
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 as crate::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.
VolumetricFog
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, and directional_light_bank names a light bank of the source, not a core light. Nothing here is converted, so a consumer must not draw it as Fog: 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 is None (a later file of a map stores only what it changes).
WaterBody
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 whose crate::MaterialUsage is water. What the surface itself reflects stays crate::pbr::PbrMaterial’s; this is what lies under it and how the surface moves.
WaveLayer
One moving normal map of a WaterBody.

Enums§

AmbientLight
How Ambient’s light varies with the direction a surface faces.
ColourMatrix
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.
ControllerParameterKind
Diagonal
Which corners a heightfield cell’s two triangles share.
DrawLayer
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).
EventValueData
ExposureMeter
How a frame’s light is metered for AutoExposure.
FogFalloff
How much of a surface’s light the fog replaces, by its distance d from the camera in metres.
LayerBlending
The layer’s source-stated composition. Unknown values stay explicit, not guessed as override.
LayerMask
Which joints a layer drives, and how strongly (see the module documentation).
LodBand
What a boundary’s play is.
LodChoice
Which form SelectLod takes of each prototype.
MaterialUsage
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.
NameOrigin
Where a human-readable name comes from. The source’s own ids remain separate from display names.
PostStage
A display-processing operation, independent of a source’s settings vocabulary.
PostStageStatusKind
Whether a source could not establish an operation or supplied a stated approximation.
ProbeMipPolicy
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 in crate::DrawLayer::Sky) that the source moves with the view every frame, and how. Its core.transform is 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 PlaceSpawn puts the spawn.
StepProgram
The program a draw draws a material through.
TextureChoice
Which form SelectTextureForm keeps of each texture.
TextureShape
What the layers of a TextureLayers are.
VertexColor
core.vertex_color: what a material does with COLOR_0 as a colour. Core’s convention is glTF’s: a material multiplies its base colour by COLOR_0, and a material without this component does. A reader whose source shaders do not (one engine’s opaque shaders) marks their materials VertexColor::Ignored from 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 drops COLOR_0 per drawn primitive. Only COLOR_0 as 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 point to the axis-aligned box min..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 index of prototype’s mesh reads COLOR_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-9 and _. 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 material reads COLOR_0: as a colour (it is not VertexColor::Ignored) or as a layered material’s weights.
world_box
The world-space axis-aligned box of the local boxes boxes (min, max) placed by t: the union of the eight transformed corners of each. None when boxes is empty.