Browse Source

Improved webgl_materials_skin example. Still broken in Chrome though.

Mr.doob 10 years ago
parent
commit
f78545531b
1 changed files with 7 additions and 6 deletions
  1. 7 6
      examples/webgl_materials_skin.html

+ 7 - 6
examples/webgl_materials_skin.html

@@ -104,11 +104,12 @@
 
 
 				// LIGHTS
 				// LIGHTS
 
 
-				ambientLight = new THREE.AmbientLight( 0x222222 );
-				scene.add( ambientLight );
+				directionalLight = new THREE.DirectionalLight( 0xffeedd, 2 );
+				directionalLight.position.set( 1, 0.5, 1 ).normalize();
+				scene.add( directionalLight );
 
 
-				directionalLight = new THREE.DirectionalLight( 0xffeedd, 1 );
-				directionalLight.position.set( 1, -1, 1 ).normalize();
+				directionalLight = new THREE.DirectionalLight( 0xddddff, 0.5 );
+				directionalLight.position.set( -1, 0.5, -1 ).normalize();
 				scene.add( directionalLight );
 				scene.add( directionalLight );
 
 
 				// MATERIALS
 				// MATERIALS
@@ -122,7 +123,7 @@
 				var uniformsUV = THREE.UniformsUtils.clone( shader.uniforms );
 				var uniformsUV = THREE.UniformsUtils.clone( shader.uniforms );
 
 
 				uniformsUV[ "tNormal" ].value = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg" );
 				uniformsUV[ "tNormal" ].value = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Infinite-Level_02_Tangent_SmoothUV.jpg" );
-				uniformsUV[ "uNormalScale" ].value = 0.75;
+				uniformsUV[ "uNormalScale" ].value = -1.5;
 
 
 				uniformsUV[ "tDiffuse" ].value = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Map-COL.jpg" );
 				uniformsUV[ "tDiffuse" ].value = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Map-COL.jpg" );
 
 
@@ -132,7 +133,7 @@
 				uniformsUV[ "specular" ].value.setHex( specular );
 				uniformsUV[ "specular" ].value.setHex( specular );
 
 
 				uniformsUV[ "uRoughness" ].value = 0.185;
 				uniformsUV[ "uRoughness" ].value = 0.185;
-				uniformsUV[ "uSpecularBrightness" ].value = 0.8;
+				uniformsUV[ "uSpecularBrightness" ].value = 0.7;
 
 
 
 
 				var uniforms = THREE.UniformsUtils.clone( uniformsUV );
 				var uniforms = THREE.UniformsUtils.clone( uniformsUV );