问题
I've been having major issues with transparency of non-intersecting objects for the last few days. I've come across the suggestion to set the alphaTest
of the material to 0.5, which solved the problem.
That's great, but I'd like to understand better what it means and how come it solved the issues so elegantly. Can anyone advise?
回答1:
From a brief experiment: it appears to be a threshold for rendering.
Meshes disappear abruptly when opacity
falls below alphaTest
.
If an object is not turning transparent, first ensure transparent = true
.
回答2:
The answer can be found here:
The alpha test discards a fragment conditional on the outcome of a comparison between the incoming fragment's alpha value and a constant value.
来源:https://stackoverflow.com/questions/19305917/what-does-material-alphatest-mean