[0]drawMeshInstance 合批渲染无法使用Scene的环境光
单个建立plane mesh,使用材质mat后,加入到scene里,可以被scene里设置的Ambient环境光影响,颜色显示是正常的。
但是批量渲染只用到了camera,没有使用到scene, 渲染出来全是黑色的,没有光照。
let instanceCMD = buf.drawMeshInstance( Laya.PrimitiveMesh.createPlane(100, 100),
0, matrixs_block_, mat_, 0, materialBlock, length_);
camera.addCommandBuffer(Laya.CameraEventFlags.BeforeTransparent,buf);
但是批量渲染只用到了camera,没有使用到scene, 渲染出来全是黑色的,没有光照。
let instanceCMD = buf.drawMeshInstance( Laya.PrimitiveMesh.createPlane(100, 100),
0, matrixs_block_, mat_, 0, materialBlock, length_);
camera.addCommandBuffer(Laya.CameraEventFlags.BeforeTransparent,buf);
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
phhh
赞同来自: