[英]Disappearing Objects - Three.js CanvasRenderer
I am very stuck, I do not understand why my objects are disappearing with canvas renderer. 我很困难,我不明白为什么我的对象会随着画布渲染器而消失。 While it works exactly as expected with webGL renderer, I need to display this on mobile devices and as such do not have access to a webGL renderer
虽然它与webGL渲染器完全一样,但我需要在移动设备上显示它,因此无法访问webGL渲染器
I have tried overdraw:true but this does not seem to make the missing objects disappear 我尝试过度绘制:但是这似乎并没有使丢失的对象消失
http://jsfiddle.net/xH9GD/3/ http://jsfiddle.net/xH9GD/3/
When I comment out the room the boxes remain but they get very mangled on my iPhone. 当我在房间里发表评论时,盒子仍然存在,但是我的iPhone上却出现了严重损坏。
I understand the concept of Z-fighting however I don't think this is occurring as the zPosition of each of the faces should be seperate to the others 我理解Z战斗的概念然而我不认为这是因为每个面的zPosition应该与其他人分开
floor = drawTopFacingWall(room.width, room.length );
wall1 = drawLeftFacingWall( room.length, room.depth );
wall2 = drawFrontFacingWall( room.width, room.depth );
wall3 = drawRightFacingWall( room.length, room.depth );
roof = drawBottomFacingWall( room.width, room.length );
wall4 = drawBackFacingWall( room.width, room.depth );
The "disappearing" geometry is caused by a limitation of CanvasRenderer
due to the way it handles depth-sorting. “消失”的几何体是由
CanvasRenderer
的限制引起的,因为它处理深度排序。
While WebGLRenderer
sorts at the pixel level, CanvasRenderer
sorts at the polygon level. 当
WebGLRenderer
在像素级别CanvasRenderer
排序时, CanvasRenderer
在多边形级别进行排序。
The best you can do is to increase the tessellation of your geometry. 您可以做的最好的事情是增加几何体的细分。
var geometry = new THREE.PlaneGeometry( width, height, 10, 10 );
three.js r.66 three.js r.66
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.