Răsfoiți Sursa

added the maya blendmode support for the add, multiply and over

Asad M. Zaman 20 ani în urmă
părinte
comite
5703d49669
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      pandatool/src/mayaegg/mayaToEggConverter.cxx

+ 3 - 2
pandatool/src/mayaegg/mayaToEggConverter.cxx

@@ -2308,8 +2308,9 @@ set_shader_attributes(EggPrimitive &primitive, const MayaShader &shader,
           // from the texture file. But the top textures may have to strip the alpha
           if (i!=shader._color.size()-1) {
             // read the _alpha_is_luminance to figure out env_type
-            if (!shader._alpha_is_luminance)
-              tex.set_env_type(EggTexture::ET_decal);
+            //if (!shader._alpha_is_luminance)
+              //tex.set_env_type(EggTexture::ET_decal);
+            tex.set_env_type((EggTexture::EnvType)shader._blend_type);
             // multitexture modulate mode may specify, desired alpha on/off
             if (!color_def->_alpha_is_luminance)
               tex.set_alpha_mode(EggRenderMode::AM_off);  // Force alpha to be 'off'