Parcourir la source

Fixed NormalToComponent function (it was over saturated).

Mr.doob il y a 15 ans
Parent
commit
7b58b806d3
4 fichiers modifiés avec 2 ajouts et 2 suppressions
  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

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/Three.js


Fichier diff supprimé car celui-ci est trop grand
+ 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 );
 
 	}
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff