native-scene: decode k_32_32_32_FLOAT texcoords
decode_uv handled vertex formats 25, 26, 31, 37 and 38 and fell through to "default: break" for anything else, leaving the UV at (0,0). Community custom maps (ArenaBuilder-built worlds) declare their texcoord as k_32_32_32_FLOAT (xenos enum 57), so every vertex of every world surface got a zero UV, every pixel sampled one texel, and the map rendered as flat untextured colour - the "custom maps have no textures on the native renderer" report. The emulated renderer is unaffected: it replays the guest's own vertex fetch and never re-decodes. x is at +0 and y at +4 exactly as for the other 32-bit float pairs, so 57 joins the existing 37/38 case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
d486b5b217
commit
14371ab94a
1 changed files with 8 additions and 0 deletions
|
|
@ -856,6 +856,14 @@ bool DecodeMesh(nrhi::Device* device, uint8_t* base, const DrawItem& item,
|
||||||
break;
|
break;
|
||||||
case 37: // k_32_32_FLOAT (hair strand-alpha UV; xenos enum 37)
|
case 37: // k_32_32_FLOAT (hair strand-alpha UV; xenos enum 37)
|
||||||
case 38: // k_32_32_32_32_FLOAT (use xy)
|
case 38: // k_32_32_32_32_FLOAT (use xy)
|
||||||
|
case 57: // k_32_32_32_FLOAT (use xy). Community custom maps
|
||||||
|
// (ArenaBuilder-built worlds) declare their texcoord this
|
||||||
|
// way; without this case the decode fell through to the
|
||||||
|
// default and left the UV at (0,0), so every pixel sampled
|
||||||
|
// one texel and the whole surface rendered as a single flat
|
||||||
|
// colour - the "custom maps have no textures on the native
|
||||||
|
// renderer" report. x is at +0 and y at +4 exactly as for
|
||||||
|
// the other float pairs.
|
||||||
u = std::bit_cast<float>(SwapU32(*reinterpret_cast<const uint32_t*>(q)));
|
u = std::bit_cast<float>(SwapU32(*reinterpret_cast<const uint32_t*>(q)));
|
||||||
w = std::bit_cast<float>(SwapU32(*reinterpret_cast<const uint32_t*>(q + 4)));
|
w = std::bit_cast<float>(SwapU32(*reinterpret_cast<const uint32_t*>(q + 4)));
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue