Puxtril / Warframe-Exporter

Converts Warframe's custom file formats into standard formats
37 stars 0 forks source link

Wrong RGB bit masks for uncompressed textures #5

Closed sehnryr closed 1 year ago

sehnryr commented 1 year ago

This issue concerns only uncompressed textures. https://github.com/Puxtril/Warframe-Exporter/blob/0cee69add254e3260ee6b0ebfabc6c6a3c2246c6/include/texture/TextureInfo.h#L16

The masks currently are set as 0x000000FF 0x0000FF00 0x00FF0000 for the respectively R, G and B bit masks but should be 0x00FF0000 0x0000FF00 0x000000FF. See the texture for /Lotus/Weapons/Tenno/Zariman/LongGuns/SemiAutoRifle/ZarimanRifle_n.png for example.

Puxtril commented 1 year ago

You're right, that's the correct bitmask. I loaded that texture in real-time and saw the format set to B8G8R8A8_UNORM, which makes sense. I will update the DXGIFormat in TextureInfos.cpp for uncompressed textures.

I will note, the cursors in /Lotus/Interface/Graphics/Cursors seem to have the Alpha and Blue channels swapped, so A8G8R8B8 (if that format existed). However I don't think these cursors exist in-game, so perhaps they are encoded incorrectly and noone at DE cares to fix them (or remove them, for that matter). https://twitter.com/PlayWarframe/status/1264632337523978252