Hausputz: UV-Doppel-Flip raus, tga::load → Result, hide_object entfernt

UVs laufen jetzt durchgehend in glTF-/tga-Konvention (der Flip-Hin-und-
Zurück stammte vom gelöschten OBJ-Pfad). Kaputte Welt-Texturen fallen auf
den Platzhalter statt zu panicken. Player::eye() statt vierfacher
Augenpunkt-Rechnung. hide_object war ein irl3d-Demo-Relikt ohne
Konsument.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 20:37:18 +02:00
co-authored by Claude Fable 5
parent 31e1942870
commit 01f299aa4f
11 changed files with 46 additions and 48 deletions
+3 -7
View File
@@ -139,10 +139,6 @@ fn append_mesh(
o.verts.push(transform(world, *p));
o.uvs.push(*uv);
}
// glTF-UVs haben den Ursprung oben links — auf die Modell-Konvention
// (unten links, wie OBJ) spiegeln, damit der Render-Konsument beide
// Pfade gleich behandelt.
for uv in &mut o.uvs[base..] { uv[1] = 1.0 - uv[1]; }
let idxs: Vec<usize> = match prim["indices"].as_u64() {
Some(a) => read_indices(doc, bin, a as usize)?,
@@ -410,10 +406,10 @@ mod tests {
}
#[test]
fn uv_origin_is_flipped_to_model_convention() {
// glTF-UV (1,1) (oben-links-Ursprung) → Modell-Konvention (1,0).
fn uvs_pass_through_unchanged() {
// glTF-UVs (Ursprung oben links) sind die Modell-Konvention — kein Flip.
let m = parse_glb(&sample_glb()).unwrap();
assert_eq!(m.objects[0].uvs[2], [1.0, 0.0]);
assert_eq!(m.objects[0].uvs[2], [1.0, 1.0]);
}
#[test]