Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBXLoader: Support loading DDS textures. #27204

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions examples/jsm/loaders/FBXLoader.js
Expand Up @@ -445,6 +445,22 @@ class FBXTreeParser {

}

} else if ( extension === 'dds' ) {

const loader = this.manager.getHandler( '.dds' );

if ( loader === null ) {

console.warn( 'FBXLoader: DDS loader not found, creating placeholder texture for', textureNode.RelativeFilename );
texture = new Texture();

} else {

loader.setPath( this.textureLoader.path );
texture = loader.load( fileName );

}

} else if ( extension === 'psd' ) {

console.warn( 'FBXLoader: PSD textures are not supported, creating placeholder texture for', textureNode.RelativeFilename );
Expand Down