# scena v1.2.0 Release Notes

Published: 2026-05-17.

Crates.io: <https://crates.io/crates/scena/1.2.0>.

docs.rs: <https://docs.rs/scena/1.2.0/scena/>.

## Scope

`scena` v1.2.0 is a browser digital-twin reliability release. It keeps the
shared wgpu/naga WebGPU and WebGL2 renderer introduced in v1.1.0, then closes
the silent external-texture and depth-prepass failure families found while
rendering downstream trust-twin scenes.

This release adds a small public diagnostics surface for hosts that need
strict asset loading and visible material-preparation diagnostics.

## Install

```bash
cargo add scena
```

Equivalent `Cargo.toml` entry:

```toml
[dependencies]
scena = "1.2"
```

## Added

- `AssetLoadOptions` with `with_strict_textures(true)`.
- `Assets::load_scene_with_options` and
  `Assets::load_scene_with_report_options`.
- `DiagnosticCode::MaterialTextureMissingDecodedPixels`.
- `RendererStats::material_textures_missing_decoded_pixels`.
- Browser visual proof for manual `SceneAsset` construction using
  `mesh.geometry()` + `mesh.material()` on the dense Khronos WaterBottle glTF
  with external relative PBR textures.

## Fixed

- Missing external glTF images are no longer silent in browser workflows:
  normal loads still preserve the existing degraded-load behavior, but
  `load_scene_with_report` records `AssetLoadWarning::ExternalImageMissing`,
  browser fetch failures emit `console.warn`, strict loads return the original
  `AssetError`, and `prepare_with_assets` reports material texture handles that
  have no decoded pixels.
- Mixed triangle/helper scenes no longer lose depth prepass coverage just
  because a stroke/line helper primitive is present. The renderer now reports
  and renders only eligible depth-prepass draws.
- The GPU depth prepass and color pass now share the same
  `clip_from_world * world_position` clip-space transform.

## Regression coverage

- `cargo test -p scena m8_prepare_reports_material_texture_handles_without_decoded_pixels --test m8_assets_materials_ecosystem`
  passes.
- `cargo test -p scena m8_strict_scene_load_promotes_missing_external_image_to_error --test m8_assets_materials_ecosystem`
  passes.
- `cargo test depth_prepass --lib` passes.
- `cargo test -p xtask m8_assets_materials_contracts_are_source_enforced`
  passes.
- `wasm-pack build --dev --target web --out-dir target/m6-browser-pkg .
  --features browser-probe` builds the browser probe package.
- `SCENA_BROWSER_BACKENDS=webgl2 node tests/browser/m6_rust_wasm_renderer_probe.js`
  passes with the `source-gltf-materials` workflow rendering WaterBottle
  source glTF materials, `source_texture_bindings: 5`,
  `material_texture_bindings: 5`, and
  `material_textures_missing_decoded_pixels: 0`.
- `SCENA_BROWSER_BACKENDS=webgpu node tests/browser/m6_rust_wasm_renderer_probe.js`
  passes the same WaterBottle source-material workflow on the shared wgpu path.

## Compatibility

Backward-compatible with v1.1.0. The new APIs are additive. Existing
`Assets::load_scene` behavior remains tolerant of missing external images so
existing hosts keep loading degraded assets unless they opt into strict texture
loading.
