Context
The Amazon Lumberyard Bistro FBX references .dds (DirectX Texture) files for its texture maps. Our texture loading pipeline uses stb_image which does not support DDS. As a result, all Bistro textures fall back to the hot-pink fallback and the scene renders untextured.
Options
Option A — Add a DDS decoder
Add stb_dds or DirectXTex (MIT) as a dependency. During RenderResourceManager::SubmitTextureFile, detect .dds extension and decode via the DDS library before uploading to the GPU.
Pros: minimal pipeline change, textures load at runtime.
Cons: DirectXTex is Windows-only; need a cross-platform option.
Option B — Convert DDS → PNG during import
In FbxImporter::CopyTextureFiles and AssimpImporter::CopyTextureFiles, detect .dds source files and transcode them to .png before copying to the project's texture directory. Store the PNG path in AssetTexture.Path. The existing stb_image pipeline handles the rest unchanged.
Pros: no runtime change, portable, PNG compresses better for disk.
Cons: DDS→PNG conversion adds import time; BC-compressed DDS blocks need a BC decoder (e.g. bcdec.h — single header, public domain).
Recommended: Option B + bcdec
bcdec.h (https://github.com/iOrange/bcdec) — single-header, public domain, decodes all BC1–BC7 compressed DDS formats. Add to dependencies.cmake the same way as ufbx/meshoptimizer. Wire into CopyTextureFiles to detect .dds → decode blocks → encode as PNG via stb_image_write.
Impact
Required to render textured scenes from FBX sources that use DDS (Bistro, many Unreal Engine exports).
Related
Context
The Amazon Lumberyard Bistro FBX references
.dds(DirectX Texture) files for its texture maps. Our texture loading pipeline usesstb_imagewhich does not support DDS. As a result, all Bistro textures fall back to the hot-pink fallback and the scene renders untextured.Options
Option A — Add a DDS decoder
Add stb_dds or DirectXTex (MIT) as a dependency. During
RenderResourceManager::SubmitTextureFile, detect.ddsextension and decode via the DDS library before uploading to the GPU.Pros: minimal pipeline change, textures load at runtime.
Cons: DirectXTex is Windows-only; need a cross-platform option.
Option B — Convert DDS → PNG during import
In
FbxImporter::CopyTextureFilesandAssimpImporter::CopyTextureFiles, detect.ddssource files and transcode them to.pngbefore copying to the project's texture directory. Store the PNG path inAssetTexture.Path. The existing stb_image pipeline handles the rest unchanged.Pros: no runtime change, portable, PNG compresses better for disk.
Cons: DDS→PNG conversion adds import time; BC-compressed DDS blocks need a BC decoder (e.g.
bcdec.h— single header, public domain).Recommended: Option B + bcdec
bcdec.h(https://github.com/iOrange/bcdec) — single-header, public domain, decodes all BC1–BC7 compressed DDS formats. Add todependencies.cmakethe same way as ufbx/meshoptimizer. Wire intoCopyTextureFilesto detect.dds→ decode blocks → encode as PNG viastb_image_write.Impact
Required to render textured scenes from FBX sources that use DDS (Bistro, many Unreal Engine exports).
Related