# LibreMetaverse simple renderer

`libremetaverse-rendering-simple` is the small, deterministic reference
pipeline for geometry that is already represented by a `Primitive` or a
decoded sculpt map. It has no windowing, GPU, Skia, voice, RLV, or LSL
dependency. The only geometry backend is the workspace's checked native
`libremetaverse-prim-mesher` crate.

## Supported inputs and output

`SimpleRenderer` implements both its concrete C#-mapped methods and the shared
`IRendering` trait. It supports:

- linear and flexible paths, plus circular prim paths;
- square, circular, half-circle, and all three triangular profiles;
- profile/path cuts, hollow profiles, shear, taper, twist, skew, radius offset,
  and revolutions at all four `DetailLevel` values;
- plane, cylinder, sphere, and torus sculpt maps supplied as `ManagedImage`;
- faceted output grouped by prim face, and flattened simple output that keeps
  each face's independent vertex/normal/UV domain;
- per-face texture-entry inheritance, including texture, legacy material, and
  render-material UUIDs; and
- default and planar texture transforms with repeat, offset, rotation, and
  primitive scale.

Positions are emitted in prim-local coordinates. Every face contains finite
positions, normals, and UVs, in-range triangle indices, its local bounds and
center, and its effective texture-entry face. Identical inputs produce
byte-for-byte-identical floating-point and index sequences; the compatibility
suite pins a golden high-detail box.

## Bounds and errors

Each face and flattened mesh is limited to the 16-bit index domain (65,536
vertices), and aggregate vertex/index growth uses checked arithmetic before
allocation or conversion. Non-finite construction data, malformed mesher
domains, invalid indices, unsupported topology, and budget overflow return
`Error::Rendering`. That error includes the source primitive UUID and a static
operation context so callers can identify the object that failed. Invalid
standalone texture-transform arguments return `Error::Argument` because that
API has no primitive parameter from which to derive source context.

## Deliberate boundary

A sculpt whose type is `Mesh` names an encoded mesh asset rather than a sculpt
height map. `SimpleRenderer` does not fetch or decode assets, so that input
returns a typed `mesh sculpt requires a decoded mesh asset` error. Mesh-asset
decoding, skin weights, secondary UVs, and rigged-mesh metadata belong to the
separate MeshFoundry renderer. The simple renderer also performs no world
transform, scene traversal, material shading, texture download, or drawing.

Run the focused implementation gates with:

```console
python3 tools/check_milestone_10_issue_76.py
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-compat-tests --test rendering_shims --locked -j1
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-rendering-simple --locked -j1
```
