书接上回,这里讨论PBR材质!!!
// 创建天空盒/* */const createSkyBox = (scene:Scene):void=>{const envTex = CubeTexture.CreateFromPrefilteredData('./env/environment.env',scene)scene.environmentTexture = envTex;scene.createDefaultSkybox(envTex,true)}createSkyBox(scene);const ball = MeshBuilder.CreateSphere('ball',{diameter:1},scene)ball.position = new Vector3(0,1,0)// 创建PRB材质const ballMat = new PBRMaterial('pbr',scene)// 赋值ball.material = ballMat;