未验证 提交 5c98448a 编写于 作者: M michael8090 提交者: GitHub

avoid the delayed updating of cube cameras

- we can update the unattached cube camera just before attaching it to avoid the unnessary delay
- we don't need to hide the sphere temporarily as we're using single sided materials
上级 22ed6755
......@@ -178,26 +178,22 @@
camera.lookAt( scene.position );
sphere.visible = false;
// pingpong
if ( count % 2 === 0 ) {
cubeCamera1.update( renderer, scene );
material.envMap = cubeCamera1.renderTarget.texture;
cubeCamera2.update( renderer, scene );
} else {
cubeCamera2.update( renderer, scene );
material.envMap = cubeCamera2.renderTarget.texture;
cubeCamera1.update( renderer, scene );
}
count ++;
sphere.visible = true;
renderer.render( scene, camera );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册