mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 21:25:46 +01:00
Fix non-power-of-two scaling on models and textures
This commit is contained in:
parent
c958da0ae0
commit
a91060dc95
@ -133,6 +133,7 @@ public class HDBlockModels {
|
|||||||
}
|
}
|
||||||
else { /* Else, see how much is in first one */
|
else { /* Else, see how much is in first one */
|
||||||
weights[idx] = (offsets[idx] + res) - v;
|
weights[idx] = (offsets[idx] + res) - v;
|
||||||
|
weights[idx] = (offsets[idx]*res + res) - v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Now, use weights and indices to fill in scaled map */
|
/* Now, use weights and indices to fill in scaled map */
|
||||||
@ -182,7 +183,7 @@ public class HDBlockModels {
|
|||||||
weights[idx] = res;
|
weights[idx] = res;
|
||||||
}
|
}
|
||||||
else { /* Else, see how much is in first one */
|
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 */
|
/* Now, use weights and indices to fill in scaled map */
|
||||||
|
@ -279,7 +279,7 @@ public class TexturePack {
|
|||||||
weights[idx] = nativeres;
|
weights[idx] = nativeres;
|
||||||
}
|
}
|
||||||
else { /* Else, see how much is in first one */
|
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 */
|
/* Now, use weights and indices to fill in scaled map */
|
||||||
@ -328,7 +328,7 @@ public class TexturePack {
|
|||||||
weights[idx] = res;
|
weights[idx] = res;
|
||||||
}
|
}
|
||||||
else { /* Else, see how much is in first one */
|
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];
|
int accum_red[] = new int[res*res];
|
||||||
|
Loading…
Reference in New Issue
Block a user