提交 76e286ac 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10951 from sunag/85dev-mirror

mirror rtt only
THREE.MirrorRTT = function ( width, height, options ) {
THREE.Mirror.call( this, width, height, options );
this.geometry.setDrawRange( 0, 0 ); // avoid rendering geometry
};
THREE.MirrorRTT.prototype = Object.create( THREE.Mirror.prototype );
......@@ -37,6 +37,7 @@
<script src="../build/three.js"></script>
<script src="js/libs/dat.gui.min.js"></script>
<script src="js/Mirror.js"></script>
<script src="js/MirrorRTT.js"></script>
<script src="js/controls/OrbitControls.js"></script>
<!-- NodeLibrary -->
......@@ -152,8 +153,7 @@
var planeGeo = new THREE.PlaneBufferGeometry( 100.1, 100.1 );
// MIRROR planes
var groundMirror = new THREE.Mirror( 100, 100, { clipBias: 0.003, textureWidth: WIDTH, textureHeight: HEIGHT } );
groundMirror.geometry.setDrawRange( 0, 0 ); // avoid rendering geometry
var groundMirror = new THREE.MirrorRTT( 100, 100, { clipBias: 0.003, textureWidth: WIDTH, textureHeight: HEIGHT } );
var mask = new THREE.SwitchNode( new THREE.TextureNode( decalDiffuse ), 'w' );
var maskFlip = new THREE.Math1Node( mask, THREE.Math1Node.INVERT );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册