如何将压缩的 .dds 图像加载为 collada 纹理? [英] How to load compressed .dds images as collada textures?

查看:33
本文介绍了如何将压缩的 .dds 图像加载为 collada 纹理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道如何将压缩的 .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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆