Include the TGALoader for TGA loading in Three.js.
// Excerpts only from affected parts
var loader;
vartgaLoader = new THREE.TGALoader (this.manager);
loader = tgaLoader;
varmaterialLoader = new THREE.MaterialLoader (this.manager);
var texture=loader.load(fullPath, function(t){
t.flipY=false;
t.wrapS = THREE.RepeatWrapping;
t.wrapT = THREE.RepeatWrapping;
if(isPhysicalReflectionMapping===true){
t.mapping = THREE.SphericalReflectionMapping;
}
} );
Yes, but
WebGL:drawArrays:texture bound to texture unit 1 is not rendersable.It may be non-power-of-2 and have compatible texture filtering or is not 'texture complete'.Or the texture is Float or Half Float type with linear filtering while OES_float_linear_extension.
The error did not display.We have verified that changing the TGALoader to DefaultLoader and changing the resources will load correctly.
Three.js sample site (http://threejs.org/examples/webgl_materials_texture_tga.html) does not load TGA files with similar errors in my environment.
© 2025 OneMinuteCode. All rights reserved.