我在three.js示例中使用了dds文件的示例,尽管它没有使其透明化,但似乎正在发生。只是幻觉吗?
我尝试了这个dds文件。 envMap▽ https://threejs.org/examples/textures/compressed/Mountains.dds
地图▽ https://threejs.org/examples/textures/compressed/disturb_dxt1_nomip.dds
var loader = new THREE.DDSLoader();
var map1 = loader.load( 'imgs/disturb_dxt1_nomip.dds' );
map1.minFilter = map1.magFilter = THREE.LinearFilter;
map1.anisotropy = 4;
var cubemap1 = loader.load( 'imgs/Mountains.dds', function ( texture ) {
texture.magFilter = THREE.LinearFilter;
texture.minFilter = THREE.LinearFilter;
texture.mapping = THREE.CubeReflectionMapping;
sphere.material.needsUpdate = true;
} );
var geometry = new THREE.SphereBufferGeometry(5, 32, 32);
geometry.computeVertexNormals();
sphere = new THREE.Mesh(
geometry,
new THREE.MeshBasicMaterial({
envMap: cubemap1
})
);
scene.add(sphere);
我不知道为什么结果会这样显示。有人可以解释吗? https://imgur.com/a/2EG0aCs