[LayaAir 2.0]unity导出的场景不显示实时阴影
如题,unity导出的场景不显示实时阴影,以下是样例
unity中的效果:
unity插件预览效果:
实际加载效果
unity版本是2018.4.7,laya引擎版本是 LayaBox 2.3.0 beta,插件版本与laya引擎版本一致
unity中的效果:
unity插件预览效果:
实际加载效果
unity版本是2018.4.7,laya引擎版本是 LayaBox 2.3.0 beta,插件版本与laya引擎版本一致
没有找到相关结果
已邀请:
要回复问题请先登录
4 个回复
白珞琰
赞同来自: 182*****532
let light: Laya.DirectionLight = scene.addChild(new Laya.DirectionLight) as Laya.DirectionLight;
light.transform.rotate(new Laya.Vector3(-120, 0, 0), false, false);
light.shadow = true;
light.shadowDistance = 150;
light.shadowResolution = 2048;
light.shadowPSSMCount = 1;
light.shadowPCFType = 3;
let plane: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createPlane(10, 10))) as Laya.MeshSprite3D;
plane.meshRenderer.material = Laya.loader.getRes('sences/Assets/Scenes/TestPro/Materials/Dana.lmat');
plane.meshRenderer.receiveShadow = true;
plane.transform.translate(new Laya.Vector3(0, 0.1, 0), false);
let test: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(Laya.loader.getRes('sences/Assets/Scenes/TestPro/Models/215_qijiashe-215_qijiashe.lm'))) as Laya.MeshSprite3D;
test.meshRenderer.material = Laya.loader.getRes('sences/Assets/Scenes/TestPro/Materials/215_qijiashe.lmat');
test.meshRenderer.castShadow = true;
test.transform.translate(new Laya.Vector3(0, 0.5, -1), false);
test.transform.rotate(new Laya.Vector3(-90, 0, 0), false, false);
效果图:
白珞琰
赞同来自: 竹丶哩
Aar0n
赞同来自:
IN
赞同来自: