three.js-地面/地板上的反射

three.js - Reflection on ground / floor

本文关键字:反射 js- 地面 three      更新时间:2024-04-27

我想做同样的事情:(whithout replicate spheres)

http://people.mozilla.org/~sicking/webgl/ray.html

我做到了,它有效,但反射太大:/

var groundTexture = THREE.ImageUtils.loadTexture( "files/checkerboard.jpg" );
groundTexture.wrapS = groundTexture.wrapT = THREE.RepeatWrapping;
groundTexture.repeat.set( 25, 25 );
groundTexture.anisotropy = 16;
mirrorGroundCamera = new THREE.CubeCamera( 0.1, 5000, 512 );
scene.add( mirrorGroundCamera );
var mirrorGroundMaterial = new THREE.MeshBasicMaterial( { map: groundTexture,  side: THREE.DoubleSide, envMap: mirrorGroundCamera.renderTarget } );
mirrorGround = new THREE.Mesh( groundGeometry, mirrorGroundMaterial );
mirrorGround.position.y = -0.5;
mirrorGround.rotation.x = - Math.PI / 2;
mirrorGroundCamera.position = mirrorGround.position;
scene.add(mirrorGround);

three.js中的环境映射是一种近似,并假设环境"无限"遥远。

请参阅http://threejs.org/examples/webgl_mirror.html有关如何在three.js.中处理镜像反射的示例

three.js r.70