Diagnose or repair LunCoSim terrain appearance, albedo, shadows, lighting, material bindings, color flicker, overbright terrain, or missing visual layers while preserving image quality and authored rendering settings.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Render Quality?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/luncosim-render-quality)
---
name: render-quality
description: Diagnose or repair LunCoSim terrain appearance, albedo, shadows, lighting, material bindings, color flicker, overbright terrain, or missing visual layers while preserving image quality and authored rendering settings.
---
# Terrain and render-quality diagnosis
Read [`geo-assets`](../geo-assets/SKILL.md),
[`docs/architecture/50-usd-driven-visuals.md`](../../docs/architecture/50-usd-driven-visuals.md),
and the target scene's composed USD before changing a shader or asset. The
authored USD Material/Shader network and its assets own visual intent; the
runtime binder projects that intent to Bevy.
Before comparing lighting, check **Fixed viewport exposure** in Settings →
General and **Fixed color exposure** in the camera's **Image controls…**.
Disable both to inspect the scene's exposure calibration. A feed has its own
**Fixed color exposure** in **Style**.
Make authored scene and material edits through the USD document tools: open the
exact source, inspect the composed value and edit target, apply typed
`ApplyUsdOp(s)` (or the owning schema-aware command), save, and read back. Do
not patch `.usd*` text directly, including for visual test scenes. When an
authoring operation is missing, add it at the owning USD API before changing
the scene.
For lunar-specific terrain data, regolith reflectance, multiscale detail, and
LOD approaches, consult the source-linked
[`lunar surface rendering research note`](../../docs/research/lunar-surface-rendering.md).
Check `RuntimeDiagnostics` for producer `render-recovery` before accepting a
rendered result. `presentation-stopped` rejects graphics evidence even if
`EnginePerformance` still returns numeric application-frame FPS.
`shadow-resource-degraded` means a shadow-map allocation OOM was recovered by
reducing that map's effective resolution; the Error remains in Recent Events,
while the saved Graphics setting stays unchanged. Check both requested and
effective sizes before accepting quality evidence. Other persistent failures
stop presentation after the configured grace period; inspect the native cause
and available GPU memory.
Use a task-owned `LUNCOSIM_CONFIG` directory for visual acceptance so restored
workbench documents cannot change the fixture. `LUNCOSIM_EPHEMERAL_SETTINGS=1`
alone does not isolate workbench restoration. Confirm physical viewport size
through `SceneCameraAudit` before comparing screenshots or FPS. Read the settled
active camera pose through `QueryEntity` before and after an FPS window; startup
view restoration can replace an early camera command.
For apparent motion of stationary geometry, freeze both the physical pose and
celestial epoch, then vary the render origin and compare the fractional shadow
coordinates of the same physical points. Repeat at advancing celestial time.
Compare GPU and uninstrumented frame times at the same quality and camera pose.
For sharpness, capture the same ground edge with the Sun shadow enabled,
disabled and restored. Report edge width and scalloping separately. Include
a second camera opened after a cell crossing, an off-axis horizon handoff
and a scoped fill beside the Sun. `test_directional_light_response.py`
checks the fill’s independent native response. The `shadow_cache_sampling`
graphics gate exercises the horizon handoff and finite-disc boundary.
See [directional shadow reference frames](../../docs/architecture/render-decoupling.md#directional-shadow-reference-frames).
For instrument shade, run the `terrain_solar_visibility` production scene gate.
It checks available electrical power for DEM shade and a moving compound blocker.
Directional shadow raster bounds are owned by `lunco-render-bevy`; see
[the receiver contract](../../docs/architecture/render-decoupling.md#directional-shadow-receiver-raster-bounds).
Only sources satisfying that complete contract declare
`//!@capability lunco.shadow-receiver.surface.v1`. Unknown consumers keep native
full-map rendering. Source reload retires the proof for the Shader asset's
lifetime, so restart the owned app for performance acceptance after shader
editing. Inspect camera `DirectionalShadowRaster` facts through typed reflection;
these describe projected admission, not GPU acceptance. Run
`scripts/api/test_shadow_receiver_crop.py --port <free-port> --output <dir>`
for Rhai admission, negative source, pixel and retirement checks. Native shadow
attachments clear the full map; receiver bounds restrict draws, not clearing.
Editor inspection uses a neutral studio rig, camera-local ambient fill and one
view-sized shadow cascade. Verify those cameras separately from physical scene
lighting; the mission sky and Sun calibration must not replace the CAD preview
background or its fill. Check front, back and underside views when tuning it.
Ambient authoring reads native composed DomeLights, including references,
schema defaults, exposure and activity. The dedicated runtime fill is excluded
from the sum; connected or time-varying inputs reject document authoring before
any edits. Run `scenarios/tests/native_ambient_authoring.rhai` through
`RunScenarioAsset` on the settled replacement fixture to verify that contract.
Use native WESL (`.wesl`) imports and conditional attributes. Headless
`ValidateAsset` checks syntax with the shared WESL frontend; full pipeline and
GPU acceptance still require the rendered fixture and a clean process log.
## Diagnose in order
1. Confirm the terrain prim, `material:binding`, Material surface connection,
shader `info:wesl:sourceAsset`, and authored `inputs:albedo_map`/
`inputs:normal_map`/weights in the composed stage. A composed-stage read is
the runtime truth; do not open layers from a tutorial.
2. Inspect the actual asset role and color space. An illumination-bearing
orthophoto is not intrinsic albedo: it must be processed with
`kind = "albedo"`, which removes its broad source-light field and emits a
stable linear material colour before PNG encoding. A calibrated reflectance
raster may use the `texture` pipeline when its colour contract is known.
`kind = "map"`, hillshade, slope, elevation colour, and mineral diagnostics
are not direct albedo substitutes. Keep role-aware filtering and mip
generation intact.
For regular grain ripples, verify that DEM UVs and their derivatives use
`terrain_half_extent`, independently of the shadow heightfield's `hf_size`.
Compare settled frames with procedural relief and native shadow reception
isolated separately. High uses 4096-pixel directional maps, the four-comparison 3×3 tent filter,
a 0.005 m depth bias and a 2.0-texel normal bias.
The normal offset must cover the selected filter footprint; test grazing
sunlight for acne and wheel/ground separation before changing it.
The 2 GiB logical ceiling covers all declared caster limits (including
spot layers at directional-map resolution), not an unconditional GPU
allocation or a measure of free VRAM. Keep physical solar angle, direction
and terrain unchanged. On shadow-map OOM, the renderer retries at a lower
power-of-two resolution and records the effective size in Recent Events; it
does not rewrite the saved setting.
Balanced uses the same filter with a smaller map budget. Existing custom
saved values remain authoritative; select High to apply the new defaults.
Inspect the live light bias as well as the preset: saved Graphics values
override changed preset defaults. For diagonal boundaries in close grain,
isolate the raw procedural noise from lighting and geometry. Shared lattice
corners must be identical; run the `noise_continuity` graphics fixture for
the GPU value/gradient contract. Reload shader libraries with `ReloadShader`
using an empty path so imported modules and their consumers refresh together.
3. Check the authored light and shadow contract, GPU shadow-resource status,
and `primvars:doNotCastShadows` before changing material brightness. A
renderer fallback that silently removes shadows is a failure to surface,
not a quality setting to hide.
For terrain shadows that separate at LOD transitions, verify that the
authored vertex stage runs in both forward and `PREPASS_PIPELINE` variants.
Use Bevy's `lod_view_world_position` for morph distance in shadow views;
their ordinary view origin belongs to the light. Keep the shared material
uniform bound in depth-only passes. Run the `vertex_shadow_alignment`
graphics fixture: both lit-vacated and shadowed-displaced probes must appear,
with no red disagreement pixels.
For displaced crater-rim shadows or jumps during fast Sun motion, verify
Bevy's view-uniform camera lookup uses retained `MainEntity` identity, not a
main-world ID as a render-world entity. Run
`scripts/api/test_shadow_lod_origin.py --output <evidence-dir>` to check
camera-dependent deformation with an inactive camera and changing Sun
directions. The native camera index is shared by all cascades each frame;
increasing shadow resolution cannot repair mismatched terrain geometry.
For LOD transition pops, check interior morph targets against the parent's
indexed triangles, not just its grid postings or boundary edges. Run the
pure `morphed_child_matches_every_parent_triangle` test in
`lunco-terrain-surface`; changes to bake math also require a tile-cache
version bump and a settled production camera traversal.
If a crater remains irregular with native shadows disabled, inspect albedo
and geometric normals separately. Missing orthophoto coverage can coincide
with stereo-DEM voids. Follow `skills/geo-assets/SKILL.md` to regenerate those
gaps through the native processor; shadow bias cannot repair source heights.
For point/spot shared shadow roots, retain native uniform allocation before
bin unpacking. Run the `shared_shadow_allocation` graphics fixture: its point
light, two differently sized caster meshes and all camera prepasses must
produce both positive probes without red pixels. A valid directional-shadow
image does not cover the separate shared-light schedule.
Enable `DepthPrepass`, `NormalPrepass`, and `MotionVectorPrepass` through the
existing reflected `add` interface when checking optional camera passes.
Declare the camera dependency in the scenario. The terrain appearance and
vertex-shadow fixtures exercise these variants; shader compilation errors
fail the graphics gate. Motion-vector view flags occur on forward pipelines
too, so previous-position varyings/bindings need the prepass guard as well.
Include the separate diagnostic material: run
`scripts/api/test_terrain_overlay_prepasses.py --output <evidence-dir>`
(add `--windowed` for a desktop view). It exercises slope, LOD-depth, and
restored production rendering with all prepasses active. Both vertex stages
use the shared `terrain_morph_weight` law and the viewing camera's LOD origin.
Reject GPU validation errors in the process log even when domain
`RuntimeDiagnostics` is clear; a new screenshot can contain a retained frame
after GPU submission fails.
For scaled terrain lighting, run `terrain_normal_transform`: world-to-local
normals use the transpose of the local-to-world linear transform, rather
than the inverse used for positions.
For measured shadow cost, use the diagnostics-enabled render owner's four
`lunco_shadow_*` GPU spans described in `performance-profiling`. Confirm
timestamp coverage and keep profiler attribution separate from unprofiled
visual acceptance before changing shadow preparation or rendering.
Static and streamed terrain remain native CSM casters and receivers so
terrain shades objects and objects shade ground. The heightfield cache
supplies ground self-shadow; cached tiles use `csm_far = 0` to avoid a
fragment march at every distance. The `shadow_cache_sampling` fixture checks
the GPU cache's endpoint-inclusive grid, including fractional interpolation
and border clamping, plus the current below-horizon gate inside CSM range.
Keep a committed cache bound across night; run the `sunrise_shadow_cache`
editor fixture to verify repeated crossings, upload acknowledgements and one
resident GPU allocation. Pending bakes retain a sampled presentation value;
they must not block fixed physics. CPU light/cache agreement alone does not
prove shader uniform freshness. Run `scripts/api/test_sun_material_precision.py`
with an isolated `--output` directory; repeat for
`--scene assets/scenes/tests/sun_material_precision_dem.usda` to cover streamed
materials. `--windowed` uses the same gate in a desktop view. The GPU compares
horizon signs with the native light and tests zero/positive angular radius.
Retain daytime coalescing while always publishing local horizon crossings;
static `HorizonMap` owners must enter the same material feed as DEM owners.
Cache UVs must map
the CPU bake nodes to texel centres before filtering.
For panel power, read the wired probe's `sun_visibility`,
`sun_irradiance_w_m2` and panel `available_power_w`.
Physical samples use the f64 terrain oracle and selected optical proxies.
See `docs/architecture/terrain-layered-rendering.md` for the production
gates. Do not infer whole-body night occlusion from a finite DEM.
The layered shader keeps measured landform normals and adds filtered
sub-metre clump/grain normals. Each noise octave fades independently between
two and four pixels per period, and its removed slope variance contributes
to roughness. Inspect the fine-grain band as well as broad clumps in close
views; a whole-stack cutoff can hide resolvable grain while leaving blobs.
Relief remaps have continuous slopes at their clipping thresholds. The
DEM normal-map weight selects the landform band without erasing the grain
tangent slope. For authored normal rasters on streamed terrain, the pixel
footprint and actual texture dimensions fade the raster normal out where
the mesh resolves finer relief, and back in as the view becomes coarser.
Rapid per-pixel mesh-normal variation blends partially toward the raster;
verify small-motion stability and retained crater rims together.
Check crater rims and LOD motion at the authored map's texel scale as well
as far-view landforms; an authored weight of one must not flatten geometry
below the raster resolution.
The layered material allows filtered `micro_albedo` grain only below an authored
raster's texel size; broad procedural colour is suppressed by raster weight.
Check the clump, micro and fine colour bands independently: each reuses its
relief sample and filters against both pixel footprint and raster spacing.
Lunar powder uses diffuse scattering without a separate smooth dielectric
lobe; a bright grazing sheen can hide a correctly loaded colour map. Verify
with a temporary raw-albedo diagnostic, then restore production lighting and
compare the same camera/exposure. Inspect both Sun-facing and opposite views.
Match the Moon globe material's authored `reflectance` to the diffuse local
terrain; an exterior dielectric lobe can leave a bright horizon.
`inputs:roughness` owns the base, with centred procedural variation.
Scatter boulder reflectance is linear, and shared boulders cast shadows.
For close terrain breakup, inspect the High profile's first-cascade bound
separately from its maximum shadow distance. Keep sub-DEM synthetic crater
geometry within the terrain tile's resolved sampling; measured orthophoto
albedo and footprint-filtered shader detail provide stable close texture.
Compare `TerrainLodStatus.stream.focus_wanted` with `focus_resident`: a fully
resident cover can still leave the active camera outside the DEM crop, where
the near-field detail floor cannot refine the viewed ground. Verify the
camera's terrain-local position against the authored DEM window before
raising LOD budgets. The cover selector biases the continuous near-detail region
toward the centre-view ground hit, sampled at the cover-position quantum so
finer crater detail cannot jitter the focus. A camera within the near-detail radius
reserves its finest patch and edge and diagonal neighbours during movement.
On exit, only already-requested nodes within the three-dimensional retention
band remain, including near a DEM edge; a replacement camera or terrain
source cannot inherit them.
Inspect each view's effective maximum depth and metric spacing when a regional
domain is present: root extent growth must preserve the local finest spacing.
Visual posting counts must be odd so nested parent lattices align. Refused
splits are an unsatisfied visual-quality request, not completed detail.
Compare settled views and camera pans, including the horizon, and check both
camera coverage and frame time before changing that selection. For the
`overzoom` layer, density zero disables synthetic craterlets and leaves only
FBM relief; choose feature radii and density with High tile spacing in mind.
Treat packed surface-map AO as indirect-light visibility: it belongs in
Bevy's PBR diffuse-occlusion input, not in authored albedo or direct-sun
multiplication. If broad terrain colour patches match a low-frequency AO
map, inspect that channel routing before touching assets or exposure.
The continuation must apply the same authored-versus-derived AO transfer
as the site surface before fading its contribution into the globe.
For tile-shaped holes with a fully resident/prepared cover, inspect native GPU
output-buffer stride before changing material lighting. `UninitBufferVec`
allocates by `ShaderSize::SHADER_SIZE`, not Rust `size_of`; enhanced-determinism
scalar math changes the host mesh layout. Keep the pinned renderer patch,
native GPU culling and physics scalar math intact.
Terrain selection uses nearest 3D distance to each node's sampled height
envelope, including the near-detail/retention rules. Resolve camera and terrain
through the existing shared-grid `big_space` path; ground clearance beneath
the camera is not the elevation of every tile.
For accelerated celestial failures, inspect the terminal solar diagnostic and
run `celestial_terrain_clock.rhai` with the settled probe ID. Preserve physical
fixed-step semantics and conservative bounds; do not raise quotas or fabricate
sunlight to hide a traversal/certificate failure.
For wheels moving over terrain, inspect physical support through
`TerrainLodStatus.contacts` and visual fidelity through each `camera_cover` row.
Physical rows report the authored lattice and readiness; they do not require
render tiles. Compare native wheel contacts and source/visual height error at
triangle interiors, rims and seams against the scene's declared tolerance.
Camera detail comes from the consumed output's pose, projection and pixels.
Exercise the main avatar view, selected mounted rover camera and a visible rover
feed simultaneously. Inactive cameras must withdraw demand. A distant main view
keeps its own cover while the feed resolves nearby crater relief.
Use `camera_terrain_view_fidelity.rhai` for bounded per-view status checks after
the driver has positioned both views and moved the physical body. Inspect GPU
images and all prepasses/shadows separately; status is not image proof.
Keep route and wheel-mark annotations registered through view/LOD changes.
Scene replacement must retire view demand, queued work, cover caches and camera
retention by exact scene/source/output identity. Check restart and close/reopen
with work in flight; report each observed result.
4. Compare a settled frame sequence, not one screenshot. Fast color changes
usually indicate changing inputs, repeated derived bakes, missing asset
readiness, or unstable lighting—not a reason to clamp the image in a
shader. Find the owner and gate the work by asset/revision events. Camera-
driven terrain cover selection runs at 30 Hz wall-clock cadence and uses
shared bounded background admission on native visual hosts; changes to the
consumed output, source and quality revisions wake it immediately. Finalized
camera/output snapshots and view cover publication run in `PostUpdate` after
camera pose and viewport binding. Tile-mesh work uses shared bounded admission. Offline capture lockstep bypasses the cadence and runs
selection synchronously for each captured frame. Profile remaining frame
hitches before changing LOD budgets.
For black flashes during loading or cover changes, verify that newly keyed
materials receive the cached `ShaderSchemas` layout before binding. A later
asset-event reflection sweep cannot protect a handle extracted this frame.
Run `newly_keyed_material_uses_loaded_layout_before_binding` in
`lunco-render-bevy`, then check production loading and camera traversal.
Standard `UsdPreviewSurface` input edits travel through
`UsdSceneChangeBatch`; the visual owner refreshes the bound `PbrLook` in place
and the renderer rebinds its material. If the authored value changes but the
surface stays stale, inspect that owner path before adding a scene rebuild.
Analytic primitives may carry `SharedMeshAsset` and share immutable mesh handles.
An entity-specific UV or geometry edit must detach before writing; quality
retessellation replaces keyed assets and point instances follow inherited handle
changes. Verify both the edited entity and an unchanged peer. Use the
[mesh ownership contract](../../docs/architecture/render-decoupling.md#immutable-primitive-mesh-assets)
when diagnosing cross-entity geometry changes or stale instance meshes.
For celestial globes, verify the installed Earth/Moon imagery dataset, composed
USD body look, and generated shell's shadow intent. Globe tiles and their
shared-surface DEM collars disable casting and receiving via `ShaderLook`; the
material binder alone applies the Bevy markers. DEM terrain and scene objects
retain their shadows, and shell surfaces retain normal sunlight shading.
The physical globe/collar cover uses the same f64 geometry and datum with
body-driven residency; camera LOD and shadow flags cannot remove ground contact.
For offscreen captures, the explicitly bound `SceneViewport.active_camera`
must drive globe LOD even when it renders to an image. A window-target filter
would omit the Moon and show the local DEM as an isolated square in space.
A body shader look may add shader parameters, but it must retain the installed
dataset albedo unless USD supplies an explicit
albedo layer or `AuthoredBodyAlbedo`. Body frames, globe tiles, stations,
terrain, links, sky, and lighting share `CelestialTime`, a child of `WorldTime`.
The ordinary render interpolation sample drives unbound USD time-sampled
animation. Use the body's single physical body-fixed grid for site and globe
content; do not align a parallel presentation hierarchy or copy a surface
marker into another frame. Modelica and Avian keep their ordinary fixed-step
cadence; physical celestial inputs evaluate that same affine domain at exact
communication boundaries through `CelestialClock`, independently of the render
solve gate.
Procedural sky materials opt into the live Sun disc by declaring both
`sun_dir_world` and `sun_tan_radius` as engine inputs; no shader filename selects
the behavior. Radius comes from the selected light's authored `inputs:angle`,
shared with terrain penumbra. Opaque scene depth clips the disc independently
of terrain shadow visibility; run `sun_disc_occlusion` for authored radius and
half-disc occlusion. `SunRenderState` supplies one world-space direction after
the scene light is finalized through BigSpace. Each view transforms its own
sky ray into world space. Camera movement cannot mutate the shared sky or
another camera's Sun position. `SunState` supplies irradiance only; do not add
a second ephemeris calculation for sky materials. Continuous renderer data
stays in Rust; author the background and material binding in USD.
The globe's resident mesh cap defaults to 72 MiB. A Twin can override it in
`twin.toml` with the positive integer byte setting
`[settings] "celestial.globe_lod.max_resident_mesh_bytes" = 100663296`.
The application applies the override when the active Twin settings change,
not in the frame loop. An invalid value is reported and holds globe LOD
reconciliation; correct the Twin setting before diagnosing a coverage failure.
A geodetic site frame without an authored local surface uses the body terrain
directly and requests no local handoff. Validate this and duplicate-surface
diagnostics with `scenarios/tests/site_frame_without_local_terrain.rhai` on a
settled site-only scene, passing its exact `root` path.
For a terrain-to-globe join, use the crop that already backs the local terrain.
Its retained DEM data stays unchanged, and its border datum sets the render-only
globe shell radius; celestial placement and physics keep the canonical radius.
Keep the composed terrain exact throughout the crop. One worker-prepared visual
collar starts on the measured crop boundary and blends its edge profile to the
matching sphere outside the crop. Derive its width from measured crop-edge
relief and one-sided slope, using a 0.60 relief-grade sizing target.
Continue the slope over one posting and fade the single nearest boundary
signal toward the sphere over at least one full crop width. A narrow exterior
can turn broad edge relief into a steep artificial dark rim. Check the
`terrain_surface_continuation` graphics verdict and ground views with the
physical Sun and shadow settings unchanged. Geometry and material fade share
one width sized from crop scale and maximum edge relief;
each corner contributes once. Preserve the native inner posting lattice, then
reduce exterior ring density to the outer boundary with at least 32 segments per side. Queries and colliders remain bounded to the DEM, whose samples
stay unchanged. Globe tiles clip against the collar's outer boundary with
bounded edge sampling. Add a camera-independent LOD floor only in the band
between the crop and the outer cutout, sized from the handoff footprint; keep
the rest of camera-driven globe LOD independent of DEM posting density. The
sphere beyond the crop is visual closure, not measured regional terrain. The
collar reads local maps from the DEM prim and appearance from the body's
USD-selected `material:binding`. Its shader asset path remains in USD. A
continuation shader declares matching WESL and USD
`lunco.lunar-surface-continuation.v1` interfaces; `RunLint` compares the authored
declaration with loaded WESL. Rhai holds simulation for incompatible sources.
Only the compositor admits a DEM collar's visibility after its composed look
is bound; globe cutout admission consumes that readiness and visibility.
Keep body curvature publication before the authoritative DEM build. Run the
DEM-to-globe handoff and globe LOD in
`RuntimeCycleSet::Visualization` after terrain builds and UI commands.
Raster loading and mesh generation stay off the visualization and physics
threads. Visualization keeps one keyed collar preparation per globe, polls
without waiting, rejects stale results, and installs current handoffs. Globe
meshes commit in stable coordinate order under count and byte budgets. Worker
timing may affect visual arrival, never the simulation oracle.
## High-profile near detail
For a fully prepared DEM screenshot or performance window, read
`TerrainLodStatus.derived` alongside `stream`: require `active == false`,
`pending == 0`, and `ready == total`, as well as a resident selected cover with
no pending stream work. Derived-map preparation is separate from simulation
readiness; a usable viewport alone does not prove that preparation has finished.
Query `TerrainLodStatus` and inspect `max_depth`, `tile_budget`, and
`budget_refused` before changing the High LOD. A resident count close to the
budget does not by itself prove that detail was refused. High currently uses
depth 9 with a 256-tile budget and 65 vertices per tile (about 3 cm per
interval at the deepest level over a 1 km crop). The shared terrain kernel
evaluates bump gradients analytically, filters each octave by its pixel
footprint, and transfers unresolved slope variance into roughness. The
`noise_continuity` GPU fixture checks fully resolved, partially resolved, and
unresolved spectra in both 2D and 3D, and equality of the planar terrain slice
across five octave counts and four footprints. Native UV-backed terrain uses
that same planar field without computing unused Y corners. Apply lunar
photometry to the engine-selected Sun contribution only; putting it in
`base_color` also changes fill and earthshine.
For live terrain changes, trace the committed `TerrainSurfaceChange` record
from the replaced `SurfaceOracle` into the shared visual invalidator, collider
ring, static-collider debounce, and derived maps. Bounded reuse requires the
consumer's cached source key to match the record's previous key; the collider
ring also requires the immediately preceding revision. Reject static-collider
jobs whose oracle key is stale. Physics owns its contact sampling and residency;
visual products sample their own bands per consumed camera. Keep visual caches
independent from collider residency and never make physics wait for presentation.
Use `inspect-simulation`, `record-video`, or the API screenshot surface for
visual evidence. Preserve authored DEM resolution, shadow ranges, BigSpace,
and physics settings while tuning render LOD through its quality profile. If an
asset is missing, report the owning cache or manifest error visibly instead of
adding a procedural fallback.
Authored RGBA8/RGBA16 shader rasters use `lunco-materials::ShaderTexture` typed prepared
sources. Retain their source handles for native reloads; the worker publishes a
complete native child before the renderer binds it. Its render-only usage moves
pixels through native GPU extraction while retaining main-world metadata; reload
the source to publish new texels or sampler settings. Generated derived maps use
complete native images directly. `load_raster` admits physical sources and rejects
container labels; bind imported labeled images through their owner's native
handle. Preserve native image/glTF loader settings and
validated request-time anisotropy. Preserve 16-bit decoded UNORM precision and
prepare its complete role-aware mip chain too; a single-level 16-bit normal map
aliases in distant views. For CPU-built RGBA8/RGBA16 mip chains, preserve the
role-aware filtering above while
using the GPU texture extent rule `max(1, floor(size / 2))` independently on
each axis. Never use ceil-halving or silently clamp an oversized mip count:
the level data would no longer match the texture's legal subresources.
For DEM continuation colour seams, compare the site base colour and authored
raster weight with the exterior composition. Source reflection owns omitted
parameter defaults; the exterior must compose that site colour and lunar
photometry before fading to the body appearance. Preserve the DEM material
inside the crop. Inspect from above beyond the crop: exterior map sampling
must use the shared distance-growing mip footprint before the spatial fade,
so the last row and column do not stretch into stripes. The continuation
contains no measured regional relief; do not describe it as a regional DEM.
Enable depth, normal and motion-vector prepasses on a scene containing the
globe as well as the DEM: the globe vertex shader shares its source with the
forward fragment, whose lighting imports must be excluded from prepass builds.
For finite DEM joins, compare the collar native perimeter and the rendered DEM
boundary/morph vertices using bounded `TerrainLodStatus` pages. Inspect each
corner obliquely with shadows enabled. `ShaderLook` owns shadow intent and the
material binder owns Bevy cast markers; geometry systems must not compete with
that reader. Removing a shadow artifact is not proof of geometric continuity.
Exterior smoothing preserves the first native posting and filters only the
continuation in its preparation worker. Geometry and material fades multiply
the two axial weights, keeping corner diagonals smooth. The existing bounded
ring tessellator accounts for the product fade's curvature. Keep
the DEM appearance visibly distinct. See [the geometry contract](../../docs/architecture/60-curvature-elevation-and-gravity.md)
for ownership and sampling.
Verify omitted and DEM-authored coordinates through the
[automatic-registration fixture procedure](../geo-assets/SKILL.md#verify-automatic-lunar-dem-registration).
USD light values, including colour, temperature controls, dimensions, and
normalization, come from native schema resolution. Change
scene photometry through authored USD, and use `editor_preview_illuminance`
only for editor helper lights. Quality updates preserve USD photometry and the
preview fill/key ratio. The focused production gate is
`lunco://scenarios/tests/native_light_schema_defaults.rhai`, attached through
`RunScenarioAsset` to the settled replacement fixture; its negative input must
produce a terminal command rejection without changing the document.
## Engine volumes and thermal metal
Read `docs/architecture/propulsion-plume.md`. The plume has one bound and one
additive material per emitter; `steps` limits the entire ray. Preserve both
normalized radial components, simulation-clock phase, stable authored seeds and
opaque-depth clipping. Native GPU field coverage is in
`scripts/api/test_plume_field_contract.py`; use its red control as well as green.
Hot nozzle metal uses the shared generated Planck/CIE approximation after
interpolating temperature. Check its generator and the production thermal gate;
wall cooling continues after delivered thrust reaches zero. Measure actual
engine close-ups separately from whole-scene FPS.
## Camera navigation near the surface
Use the typed terrain sphere-sweep result from the full composed source for camera
movement, scroll transit and follow booms, independently of rover collider residency.
Distinguish clear motion, first contact, initial overlap and unavailable work.
Conservative bounds prune work; an uncertain upper bound is not a hit.
Sphere sweeps use the source's `HeightEnclosure` scalar and affine residual bounds
to retain slope correlation, including analytic modifier gradients. Do not substitute an enclosure height for a contact witness or raise
the work budget to hide ineffective pruning. Native prop
collision stays active while the separate native terrain realization is excluded
from the camera's terrain resolution. Lateral input must not trigger automatic lift.
Movement casts the physical sphere and applies skin as a directional pullback
from approaching contact; it does not collide with an enlarged skin shell.
The source-safe movement is also checked against the solid heightfield represented
by the meshes currently drawn for
that camera, including stitch and morph state with correlated camera/triangle time
intervals. Coarse approximation or preparation
uncertainty holds the pose and requests refinement along the path. A
current finest static visual contact joins the same bounded contact-plane
projection loop as source terrain and props. Recast every projected segment and
keep a normal-space tolerance margin at grazing incidence; do not add positional
depenetration or an upward step. A pending follow corridor survives render frames and orientation damping while its camera
position, source, output and projection remain valid. Cover capacity refusal must
remain visible and retain their exact request until input or admission changes.
Refused counts must belong to current committed requirements. A pending scroll keeps its exact target/source lease and retries on draw revision changes;
it must cancel on new input, pose, mode, source or frame changes. Explicit upward
recovery from source-certified initial overlap remains user-controlled.
Rendered initial overlap may permit explicit separating input only through the
actual convex contact plane and with all later terrain columns still checked.
Never treat a camera below a rendered triangle as clear merely because its sphere
does not touch the top surface.
Cover publication must separately certify the full candidate geometry, morph and
stitch state against the admitted camera. Keep replacements hidden and retain the
published cover until that transaction is safe. `presentation_pending` withdraws
latest-view readiness without holding physics. Do not mutate a resident tile's
morph/stitch material ahead of publication admission.
The sphere envelope must account for camera clearance and its projection footprint.
The shared interactive lunar camera authors a 0.01 m near clipping plane through
standard `UsdGeomCamera.clippingRange`; inspect composed lens overrides when an
envelope remains unexpectedly large. Author lens changes through document tools.
Perspective-avatar celestial adaptation preserves those authored clipping floors;
fixed and mounted cameras retain their authored projection.
Read the current `CameraCollisionEnvelope.radius_m`, `.skin_m` and
`.sweep_tolerance_m` reflected fields on the navigating camera before measuring
achieved clearance. Flat-ground target clearance is radius plus skin; allow only
the declared geometric tolerance. Run
`camera_freeflight_terrain.rhai` with explicit `clearance_m`,
`clearance_tolerance_m`, `maximum_lateral_altitude_drift_m`,
`source_half_extent_m`, `minimum_support_distance_m`, and driver-resolved
`avatar_id`/`support_id` parameters. The production driver uses the repository's
flat DEM fixture and waits for the selected camera's current cover to settle.
Its 11 checks include separation from the physical body and absence of native
terrain support under the camera. Check both achieved clearance
bounds and altitude drift. The driver also runs `camera_terrain_capacity.rhai`
against the authored dig fixture, requiring a stable refusal and recovery after
capacity restoration, stationary unsafe coarsening and publication recovery.
Use the reflected camera sweep tolerance for cross-frame pose comparisons;
raw camera/source identities remain exact equality-only values. It also runs
`camera_terrain_rebase.rhai` across both directions of a
native floating-origin cell boundary near the ground. Rebase checks compare
continuous terrain coordinates with the actual native render-transform jump.
Then inspect steep slopes, off-path ridges, initial
penetration, thin features/high speed, ring-boundary crossing, paused navigation and
props through authored production scenarios. Mounted cameras retain their authored
mounts; inspect their reported terrain-local clearance. Current integration evidence is tracked
in [the camera terrain review](../../docs/reviews/2026-11-12-camera-terrain-architecture.md).
Use `scripts/api/test_camera_terrain_views.py` with explicit scene/body/avatar/mounted
camera paths, main eye/look-at coordinates in the active physics frame, and independent
metric spacing bounds for main/feed views. It records the stationary main cover before
a real rover drive and feed creation, checks that this cover is unchanged, verifies
native wheel-mark production, retires a temporary feed and checks demand removal, and
captures both final images. Its 14-check authored status verdict requires separate
visual inspection of the captured geometry, seams, crater relief and render passes.
The same driver runs six authored rejection checks for invalid lattice sizes and
atomic quality batches through `camera_terrain_quality_rejection.rhai`.
Perspective detail follows distance, FOV and output pixels. Orthographic detail
follows zoom and output pixels within its admitted footprint; moving along its
viewing axis must preserve LOD. Both projections retain a projected posting-size
floor at every range and clip against conservative full-source heights. Retained
view envelopes use projected angular tolerances and hysteresis for both clipping
and invalidation; verify that microscopic mounted-camera jitter can settle while
meaningful telephoto pan/roll changes wake selection. Positive homogeneous
rescaling of a constant far plane must preserve its selection identity. Test zoom
and lateral footprint changes separately. The motion driver also compares two
otherwise identical distant-crater scenes with wide/telephoto focal lengths using
`camera_terrain_zoom.rhai`; require finer visible postings without changing physical
support, and inspect both captured images. Its scratch-Twin policy gate verifies
that explicit through-soil traversal withdraws collision participation from both
navigation and publication, then restores default collision and upward recovery.
Orthographic covers use static edge stitching and discrete zoom transitions,
without camera-distance morphing. Read `TerrainLodStatus.visual_foci` for the actual
projection metric. Custom projections require a metric provider and reject
unsupported metrics visibly.