如何将压缩的 .dds 图像加载为 collada 纹理? [英] How to load compressed .dds images as collada textures?
问题描述
您知道如何将压缩的 .dds 图像用作 collada 纹理吗?
Do you have any idea how could I use compressed .dds images as collada textures?
应该更新库的哪个部分来执行此操作?
Which part of the library should be updated to do this?
任何帮助将不胜感激!
推荐答案
DDS
Three.js 已经可以读入 dds 文件了.
Three.js can already read in dds files.
只需调用 THREE.ImageUtils.loadCompressedTexture:
just call THREE.ImageUtils.loadCompressedTexture:
https://github.com/mrdoob/three.js/blob/master/src/extras/ImageUtils.js#L39
科拉达
需要更新这一行来检测文件是dds文件还是普通图像,并使用相应的方法读取该文件.
This line needs to be updated to detect wether the the file is a dds file or a normal image and use the corresponding method to read that file.
https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/ColladaLoader.js#L3116
这篇关于如何将压缩的 .dds 图像加载为 collada 纹理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!