babylon PBR debugLayer 简单总结

544 阅读1分钟
  • 初始设置
var light = new BABYLON.PointLight("light1", new BABYLON.Vector3(0, 30, 0), scene); //直接光照
var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene); //模型
pbr.reflectionTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/textures/environment.dds", scene); //间接光照prefiler图
pbr.metallicTexture = new BABYLON.Texture("/textures/mr.jpg", scene); //金属流
pbr.reflectivityTexture = new BABYLON.Texture("/textures/sg.png", scene);//高光流
  • 打开debugLayer
scene.debugLayer.show();