浏览代码

Fixed normal to RGB

Bc. Jan Kaláb 13 年之前
父节点
当前提交
2cfbee04f2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/extras/ImageUtils.js

+ 1 - 1
src/extras/ImageUtils.js

@@ -134,7 +134,7 @@ THREE.ImageUtils = {
 				var idx = ( y * width + x ) * 4;
 				var idx = ( y * width + x ) * 4;
 
 
 				output[ idx ] = ( ( normal[ 0 ] + 1.0 ) / 2.0 * 255 ) | 0;
 				output[ idx ] = ( ( normal[ 0 ] + 1.0 ) / 2.0 * 255 ) | 0;
-				output[ idx + 1 ] = ( ( normal[ 1 ] + 1.0 / 2.0 ) * 255 ) | 0;
+				output[ idx + 1 ] = ( ( normal[ 1 ] + 1.0 ) / 2.0 * 255 ) | 0;
 				output[ idx + 2 ] = ( normal[ 2 ] * 255 ) | 0;
 				output[ idx + 2 ] = ( normal[ 2 ] * 255 ) | 0;
 				output[ idx + 3 ] = 255;
 				output[ idx + 3 ] = 255;