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

DDSLoader: Fix incorrect alpha when loading 24-bit uncompressed textures. #30598

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/jsm/loaders/DDSLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class DDSLoader extends CompressedTextureLoader {
byteArray[ dst ] = r; dst ++; //r
byteArray[ dst ] = g; dst ++; //g
byteArray[ dst ] = b; dst ++; //b
byteArray[ dst ] = 1.0; dst ++; //a
byteArray[ dst ] = 255; dst ++; //a

}

Expand Down
Binary file modified examples/screenshots/webgl_loader_texture_dds.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/webgl_loader_texture_dds.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
const material10 = new THREE.MeshBasicMaterial( { map: map8 } );
const material11 = new THREE.MeshBasicMaterial( { map: map9 } );
const material12 = new THREE.MeshBasicMaterial( { map: map10 } );
const material13 = new THREE.MeshBasicMaterial( { map: map11 } );
const material13 = new THREE.MeshBasicMaterial( { map: map11, transparent: true } );

let mesh = new THREE.Mesh( new THREE.TorusGeometry(), material1 );
mesh.position.x = - 10;
Expand Down
Loading