提交 c58b634a 编写于 作者: A alteredq

Fixed dynamic terrain demo.

上级 bf6b6d3c
......@@ -238,7 +238,7 @@
heightMap, normalMap,
quadTarget;
var spotLight, pointLight;
var directionalLight, pointLight;
var terrain;
......@@ -309,10 +309,9 @@
scene.add( new THREE.AmbientLight( 0x111111 ) );
spotLight = new THREE.SpotLight( 0xffffff, 1.15 );
spotLight.position.set( 500, 2000, 0 );
spotLight.castShadow = true;
scene.add( spotLight );
directionalLight = new THREE.DirectionalLight( 0xffffff, 1.15 );
directionalLight.position.set( 500, 2000, 0 );
scene.add( directionalLight );
pointLight = new THREE.PointLight( 0xff4400, 1.5 );
pointLight.position.set( 0, 0, 0 );
......@@ -699,7 +698,7 @@
renderer.setClearColor( scene.fog.color, 1 );
spotLight.intensity = THREE.Math.mapLinear( valNorm, 0, 1, 0.1, 1.15 );
directionalLight.intensity = THREE.Math.mapLinear( valNorm, 0, 1, 0.1, 1.15 );
pointLight.intensity = THREE.Math.mapLinear( valNorm, 0, 1, 0.9, 1.5 );
uniformsTerrain[ "uNormalScale" ].value = THREE.Math.mapLinear( valNorm, 0, 1, 0.6, 3.5 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册