Fix non-power-of-two scaling on models and textures
This commit is contained in:
parent
c958da0ae0
commit
a91060dc95
2 changed files with 4 additions and 3 deletions
|
|
@ -133,6 +133,7 @@ public class HDBlockModels {
|
|||
}
|
||||
else { /* Else, see how much is in first one */
|
||||
weights[idx] = (offsets[idx] + res) - v;
|
||||
weights[idx] = (offsets[idx]*res + res) - v;
|
||||
}
|
||||
}
|
||||
/* Now, use weights and indices to fill in scaled map */
|
||||
|
|
@ -182,7 +183,7 @@ public class HDBlockModels {
|
|||
weights[idx] = res;
|
||||
}
|
||||
else { /* Else, see how much is in first one */
|
||||
weights[idx] = (offsets[idx] + nativeres) - v;
|
||||
weights[idx] = (offsets[idx]*nativeres + nativeres) - v;
|
||||
}
|
||||
}
|
||||
/* Now, use weights and indices to fill in scaled map */
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ public class TexturePack {
|
|||
weights[idx] = nativeres;
|
||||
}
|
||||
else { /* Else, see how much is in first one */
|
||||
weights[idx] = (offsets[idx] + res) - v;
|
||||
weights[idx] = (offsets[idx]*res + res) - v;
|
||||
}
|
||||
}
|
||||
/* Now, use weights and indices to fill in scaled map */
|
||||
|
|
@ -328,7 +328,7 @@ public class TexturePack {
|
|||
weights[idx] = res;
|
||||
}
|
||||
else { /* Else, see how much is in first one */
|
||||
weights[idx] = (offsets[idx] + nativeres) - v;
|
||||
weights[idx] = (offsets[idx]*nativeres + nativeres) - v;
|
||||
}
|
||||
}
|
||||
int accum_red[] = new int[res*res];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue