Kaynağa Gözat

Fixed normal to RGB

Bc. Jan Kaláb 13 yıl önce
ebeveyn
işleme
2cfbee04f2
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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;