What does Material.alphaTest mean?

孤街浪徒 提交于 2019-12-22 04:04:25

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!