Explorar o código

never use Alpha blendmode for JPG images

ncannasse %!s(int64=8) %!d(string=hai) anos
pai
achega
1f08e2c1e6
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      hxd/fmt/fbx/HMDOut.hx

+ 4 - 2
hxd/fmt/fbx/HMDOut.hx

@@ -497,9 +497,11 @@ class HMDOut extends BaseLibrary {
 				if( transp != null ) {
 					var path = transp.get("FileName").props[0].toString();
 					if( path != "" ) {
-						if( texture != null && path.toLowerCase() == texture.get("FileName").props[0].toString().toLowerCase() ) {
+						path = path.toLowerCase();
+						var ext = path.split(".").pop();
+						if( texture != null && path == texture.get("FileName").props[0].toString().toLowerCase() ) {
 							// if that's the same file, we're doing alpha blending
-							if( mat.blendMode == null ) mat.blendMode = Alpha;
+							if( mat.blendMode == null && ext != "jpg" && ext != "jpeg" ) mat.blendMode = Alpha;
 						} else
 							throw "TODO : alpha texture";
 					}