Skip to content

Commit f679794

Browse files
committed
Improved webgl_decals ilumination.
1 parent 2a8a4e3 commit f679794

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

examples/webgl_decals.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,16 @@
102102
controls.minDistance = 50;
103103
controls.maxDistance = 200;
104104

105-
var light = new THREE.HemisphereLight( 0xffddcc, 0x111122 );
105+
scene.add( new THREE.AmbientLight( 0x443333 ) );
106+
107+
var light = new THREE.DirectionalLight( 0xffddcc, 1 );
106108
light.position.set( 1, 0.75, 0.5 );
107109
scene.add( light );
108110

111+
var light = new THREE.DirectionalLight( 0xccccff, 1 );
112+
light.position.set( -1, 0.75, -0.5 );
113+
scene.add( light );
114+
109115
var geometry = new THREE.Geometry();
110116
geometry.vertices.push( new THREE.Vector3(), new THREE.Vector3() );
111117

@@ -223,10 +229,12 @@
223229
loader.load( 'obj/leeperrysmith/LeePerrySmith.js', function( geometry ) {
224230

225231
var material = new THREE.MeshPhongMaterial( {
232+
specular: 0x111111,
226233
map: THREE.ImageUtils.loadTexture( 'obj/leeperrysmith/Map-COL.jpg' ),
227234
specularMap: THREE.ImageUtils.loadTexture( 'obj/leeperrysmith/Map-SPEC.jpg' ),
228235
normalMap: THREE.ImageUtils.loadTexture( 'obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg' ),
229-
shininess: 10
236+
normalScale: new THREE.Vector2( 0.75, 0.75 ),
237+
shininess: 25
230238
} );
231239

232240
mesh = new THREE.Mesh( geometry, material );

0 commit comments

Comments
 (0)