Browse Source

Fixed NormalToComponent function (it was over saturated).

Mr.doob 14 years ago
parent
commit
7b58b806d3
4 changed files with 2 additions and 2 deletions
  1. 0 0
      build/Three.js
  2. 0 0
      build/ThreeDebug.js
  3. 1 1
      src/renderers/CanvasRenderer.js
  4. 1 1
      src/renderers/SVGRenderer.js

File diff suppressed because it is too large
+ 0 - 0
build/Three.js


File diff suppressed because it is too large
+ 0 - 0
build/ThreeDebug.js


+ 1 - 1
src/renderers/CanvasRenderer.js

@@ -844,7 +844,7 @@ THREE.CanvasRenderer = function () {
 
 		// https://gist.github.com/665829
 
-		return normal < 0 ? Math.min( 1 + normal, 0.5 ) : 0.5 + Math.min( normal, 0.5 );
+		return normal < 0 ? Math.min( ( 1 + normal ) * 0.5, 0.5 ) : 0.5 + Math.min( normal * 0.5, 0.5 );
 
 	}
 

+ 1 - 1
src/renderers/SVGRenderer.js

@@ -476,7 +476,7 @@ THREE.SVGRenderer = function () {
 
 		// https://gist.github.com/665829
 
-		return normal < 0 ? Math.min( 1 + normal, 0.5 ) : 0.5 + Math.min( normal, 0.5 );
+		return normal < 0 ? Math.min( ( 1 + normal ) * 0.5, 0.5 ) : 0.5 + Math.min( normal * 0.5, 0.5 );
 
 	}
 

Some files were not shown because too many files changed in this diff