BGE: Fix for bug #34377 "Multi UV mesh's materials not backwards compatible and Odd UV Coord behavior" reported by Alex Mairs (ctbm). The problem was the unused texture slot was still trying to be used. Now unused texture slots' mappings are set to DISABLE so they don't mess up the rest of the conversion process.
This commit is contained in:
@@ -691,6 +691,10 @@ static bool ConvertMaterial(
|
||||
#endif
|
||||
/// --------------------------------
|
||||
// mapping methods
|
||||
if (mat->septex & (1 << i)) {
|
||||
// If this texture slot isn't in use, set it to disabled to prevent multi-uv problems
|
||||
material->mapping[i].mapping = DISABLE;
|
||||
} else {
|
||||
material->mapping[i].mapping |= ( mttmp->texco & TEXCO_REFL )?USEREFL:0;
|
||||
|
||||
if (mttmp->texco & TEXCO_OBJECT) {
|
||||
@@ -729,6 +733,7 @@ static bool ConvertMaterial(
|
||||
material->mapping[i].projplane[0] = mttmp->projx;
|
||||
material->mapping[i].projplane[1] = mttmp->projy;
|
||||
material->mapping[i].projplane[2] = mttmp->projz;
|
||||
}
|
||||
/// --------------------------------
|
||||
|
||||
switch (mttmp->blendtype) {
|
||||
|
Reference in New Issue
Block a user