Texture bug on r137
See original GitHub issueDescribe the bug
DDS and PNG textures lose all color, I don’t know how to really explain, I attached screenshots bellow. Since I only use these 2 types of textures, I can’t test other types.
If the browser has DDS support, it will be used, otherwise fallback to PNG. This happens on all browsers and devices I tested.
To Reproduce
Steps to reproduce the behavior: Go to either of the live examples below and press on a weapon or amor icon, the differences will be visible.
Code
A code snippet of how I’m using it.
const manager = new THREE.LoadingManager(() => {
const loadingScreen = document.getElementById('loading-screen')
if (loadingScreen) {
loadingScreen.classList.add('fade-out')
loadingScreen!.addEventListener('transitionend', onTransitionEnd)
}
})
manager.addHandler(/\.dds$/i, new DDSLoader())
const mtlLoader = new MTLLoader(manager)
mtlLoader.setPath(url!)
mtlLoader.load(`${model}.mtl`, (materials) => {
materials.preload()
const objLoader = new OBJLoader(manager)
objLoader.setMaterials(materials)
objLoader.setPath(url!)
objLoader.load(`${model}.obj`, (object) => {
object.scale.setScalar(1 / 200)
object.traverse((child) => {
child.frustumCulled = false
if ((child as any).material instanceof THREE.MeshPhongMaterial) {
(child as any).material.side = THREE.DoubleSide
}
})
scene.add(object)
}, undefined, (error) => console.error(error))
})
Live example
Screenshots
Public version with r136:
Dev version with r137
Platform:
- Device: Desktop, Mobile
- OS: Windows, Android
- Browser: Tested on Vivaldi (both Desktop and Android), Chrome, Firefox and Edge
- Three.js version: r137
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Applying circle texture to point renders a square; behavior ...
Describe the bug When creating a new Three.PointsMaterial using a circle ... The behavior has changed from version r137.2 to version 137.3.
Read more >Does anyone else have this texture bug and/or know how to ...
Does anyone else have this texture bug and/or know how to fix it? I think it's a bug with the shadows : r/midnightsuns....
Read more >[MC-257089] Texture Bug minecraft 1.8 - Jira
Bug - A problem which impairs or prevents the functions of the product. MCL-22662 All textures are blank in older versions of Minecraft....
Read more >Hard Reset Texture Bug - YouTube
Hard Reset is one of the most bug -free PC games we've played in some time, but we did manage to encounter one...
Read more >Texture/Mesh issues - Bugs - Fatshark Forums
Have had this issue since closed beta, the textures dont load correctly on enviroment and weapons. Reticle on the gun And many more....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Correct, it’s working without alphaWrite. Thank you
As far as I can see the only issue of #18631 is that it broke this use case:
In this new world of
alpha: true
, I think I’m totally okay with breaking that use case.And then we’ll be able to get rid of
material.alphaWrite
.