瀏覽代碼

Fixed bug with parallalx bump and uv scaling

David Catuhe 9 年之前
父節點
當前提交
b6d580827b

文件差異過大導致無法顯示
+ 6 - 6
dist/preview release/babylon.core.js


文件差異過大導致無法顯示
+ 3015 - 3015
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 6 - 6
dist/preview release/babylon.js


文件差異過大導致無法顯示
+ 5 - 1
dist/preview release/babylon.max.js


文件差異過大導致無法顯示
+ 6 - 6
dist/preview release/babylon.noworker.js


+ 4 - 0
src/Materials/Textures/babylon.texture.js

@@ -172,6 +172,8 @@ var BABYLON;
             newTexture.wrapV = this.wrapV;
             newTexture.coordinatesIndex = this.coordinatesIndex;
             newTexture.coordinatesMode = this.coordinatesMode;
+            newTexture.anisotropicFilteringLevel = this.anisotropicFilteringLevel;
+            newTexture.getAlphaFromRGB = this.getAlphaFromRGB;
             // Texture
             newTexture.uOffset = this.uOffset;
             newTexture.vOffset = this.vOffset;
@@ -194,6 +196,8 @@ var BABYLON;
             serializationObject.uAng = this.uAng;
             serializationObject.vAng = this.vAng;
             serializationObject.wAng = this.wAng;
+            serializationObject.anisotropicFilteringLevel = this.anisotropicFilteringLevel;
+            serializationObject.getAlphaFromRGB = this.getAlphaFromRGB;
             return serializationObject;
         };
         // Statics

+ 4 - 0
src/Materials/Textures/babylon.texture.ts

@@ -229,6 +229,8 @@
             newTexture.wrapV = this.wrapV;
             newTexture.coordinatesIndex = this.coordinatesIndex;
             newTexture.coordinatesMode = this.coordinatesMode;
+            newTexture.anisotropicFilteringLevel = this.anisotropicFilteringLevel;
+            newTexture.getAlphaFromRGB = this.getAlphaFromRGB;
 
             // Texture
             newTexture.uOffset = this.uOffset;
@@ -256,6 +258,8 @@
             serializationObject.uAng = this.uAng;
             serializationObject.vAng = this.vAng;
             serializationObject.wAng = this.wAng;
+            serializationObject.anisotropicFilteringLevel = this.anisotropicFilteringLevel;
+            serializationObject.getAlphaFromRGB = this.getAlphaFromRGB;
 
             return serializationObject;
         }

+ 0 - 7
src/Shaders/ShadersInclude/bumpFragment.fx

@@ -17,13 +17,6 @@
 
 	diffuseUV += uvOffset;
 	bumpUV += uvOffset;
-
-	// Note from Loic: won't be nice with wrapping textures...
-	#ifdef PARALLAXOCCLUSION
-		if (diffuseUV.x > 1.0 || diffuseUV.y > 1.0 || diffuseUV.x < 0.0 || diffuseUV.y < 0.0) {
-			discard;
-		}
-	#endif
 #endif
 
 #ifdef BUMP