Browse Source

Fixed normal to RGB

Bc. Jan Kaláb 13 năm trước cách đây
mục cha
commit
2cfbee04f2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
 
 				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 + 3 ] = 255;