我在使用 Three.js 渲染 Sprite 时遇到问题,为了使问题进一步复杂化,我正在使用游戏引擎 voxel.js管理实例。
示例:http://christopherdebeer.com/sandbox/voxeljs/
我尝试过搞乱深度{write|test}:
material = new game.THREE.SpriteMaterial({
map: spriteB,
useScreenCoordinates: false,
alignment: game.THREE.SpriteAlignment.bottomCenter,
color: 0xffffff,
fog: true,
depthWrite: true,
depthTest: false
});
示例左侧的半透明网格。
我需要的是一个透明的网格或体素,为空间体积提供一些物质,同时在该位置显示 2d Sprite 。
我该如何解决这个问题,或者我做错了什么?
最佳答案
这几乎是您需要它之后的一年,但是 @WestLangley 描述了 Sprite 是如何最后渲染的,因此不能很好地处理透明对象。他提供了一些解决此问题的技巧。
three.js - cannot view a sprite through a mesh with transparency?
关于three.js - Threejs Sprite 排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15590738/