tron-room-demo: fix missing box top faces

The face table drew the 'top' quad from corners 0-3, which sit at z0
(the base), while the real top face (corners 4-7 at z1) was backface
culled against the overhead camera — every box rendered open-topped.
Swap the two entries so the top face uses the z1 corners; the top-rim
highlight and face-center backface cull both key off face 0 and now
refer to the true top.
This commit is contained in:
Dejvino
2026-11-16 22:36:42 +01:00
parent d69c387f29
commit 4ed0bc4a51
@@ -214,9 +214,10 @@ struct Box {
};
// Face corner indices into an 8-corner box, and world normals.
// Corners 0-3 sit at z0 (bottom), corners 4-7 at z1 (top).
static const int FACES[6][4] = {
{0,1,2,3}, // top (+Z)
{4,5,6,7}, // bottom (-Z, rarely seen)
{4,5,6,7}, // top (+Z) — corners at z1
{0,1,2,3}, // bottom (-Z) — corners at z0
{0,1,5,4}, // -Y side
{2,3,7,6}, // +Y side
{1,2,6,5}, // +X side