garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/adr/018-prim-texture-surface-params.md

raw

ADR-018: Prim Texture Surface Parameters


Metadata:


Context

Problem: The prim edit dialog's Texture tab only exposed base color and a texture pick. Authoring parity with Second Life's Texture tab needs per-prim surface controls: transparency, glow, full-bright, repeats per face (+ flip), texture rotation, repeats per meter, and offset.

Requirements:

Decision

Add a single shared PrimSurface value type (cartopolis_core) carrying alpha, glow, full_bright, repeat_u/v, flip_u/v, rotation, offset_u/v, threaded through the Prim component, PrimDto, the UpdatePrim message, both SQLite schemas, and the edit dialog.

Approach:

Rationale

Primary Reasoning:

  1. One grouped value type keeps ~20 construction/threading sites to a single field each.
  2. StandardMaterial already exposes every needed property in 0.19 — no shader work.
  3. Following the existing warp-param pattern minimizes reviewer surprise.

Alternatives Considered:

AlternativeProsConsRejected Because
Ten flat fields on every structexplicit~200 lines of threading churngrouped struct is far smaller
Custom material/shader for UV + glowfull controlnew pipeline, more maintenanceStandardMaterial suffices
Carry full PrimDto in UpdatePrimfuture-prooflarge test/handler churnsurface + geometry value types are enough

Notes / Limitations