Doesn't sorting the objects based on Material.Transparency contradicts with onBeforeRender of Object3D?
See original GitHub issueI have 100 meshes and only one material for all the meshes. I have to make the objects transparent  based on user interaction. What i have done is, i changed the material transparency in onBeforeRender of the mesh and changed it again in onAfterRender. But since objects gets sorted based on the Material.Transparent, it does not work properly.
So if we can change the transparency in onBeforeRender, shouldn’t we sort the object based on something other than Material.Transparent?
Three.js version
- Dev
 - r82
 - …
 
Browser
- All of them
 - Chrome
 - Firefox
 - Internet Explorer
 
OS
- All of them
 - Windows
 - Linux
 - Android
 - IOS
 
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
 - Created 7 years ago
 - Comments:5 (2 by maintainers)
 
Top Results From Across the Web
three.js transparent material: object not always transparent
As far as I know, this happens in 2 occasions: 1) When you have more than 1 facet set on the same position...
Read more >ThreeJS and the transparent problem - Questions
I create some mesh objects with a simple transparent material. ... sorting issues it to explicitly define the rendering order via Object3D.
Read more >Transparency Sorting - OpenGL Wiki
This process involves disabling writes to the depth buffer and sorting transparent objects and/or polygons based on distance to the camera.
Read more >Sorting out Problems with Transparency - Mozilla Hubs
This is often referred to as an 'alpha sorting problem'. The renderer doesn't know what order to sort each surface so it can't...
Read more >Three.js, transparency bug or limitation or what? - 3D
In a game I am developing there is an odd issue where rotating the player character the water plane looses it's transparent state...
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 Free
Top 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

Hehe. You beat me by 8 sec…
Why not set
material.transparent = trueandmaterial.opacity = 1to begin with?