I have a group of sprites, as well as some other meshes, and in front of them I've printed some text as a texture on a mesh. Everything is viewable through the text, except for the sprites which disappear whenever the text's tranparency is printed over them. Any ideas?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Sprites are rendered last, so they will not work well with other transparent objects.
Your work-around is to set
renderer.autoClear = false;
and then to place the transparent text into scene2
, and implement two render passes like so:
renderer.render( scene, camera );
renderer.clearDepth(); // optional, depending on use case
renderer.render( scene2, camera );
three.js r.68