Commit 6c90583
committed
bugfix(w3d): Draw missing textures untextured where the pixels are read
A texture that fails to load is a 128x128 fill of half-transparent magenta.
Binding the white fallback instead only covers the draw path, and the terrain
does not take it: it composites its tile textures by reading their contents, so
the magenta lands in the terrain atlas itself. What renders after that is an
ordinary, valid texture that happens to contain magenta, which no missing-texture
check at bind time can catch - the reason the earlier fix left the terrain pink
while models came out clean.
Retail data references terrain tiles it never shipped - trstrtholecvr.tga - so on
the web that washed magenta across the ground wherever those tiles were used. It
is the "pink" this port was reported with, and it is absent from the branch the
port came from only because that branch never built the placeholder at all.
Hand out white on the web at the source instead, which covers the composite and
the draw path alike. Diagnosis does not suffer: every failure still writes
"Missing texture <reason>: <file>" to stderr, which on the web shows up in the
browser console - that is how the offending asset was identified. Other platforms
keep the magenta.1 parent 8afc4e5 commit 6c90583
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
88 | 101 | | |
| 102 | + | |
89 | 103 | | |
90 | 104 | | |
91 | 105 | | |
| |||
0 commit comments