Clarify Indigo TextureHelper BAKE_NORMALIZED use

This commit is contained in:
Player 2022-06-24 05:50:11 +02:00
parent 16d6ef959a
commit d005b03a4c

View file

@ -39,7 +39,7 @@ public class TextureHelper {
if (quad.nominalFace() != null && (MutableQuadView.BAKE_LOCK_UV & bakeFlags) != 0) {
// Assigns normalized UV coordinates based on vertex positions
applyModifier(quad, spriteIndex, UVLOCKERS[quad.nominalFace().getId()]);
} else if ((MutableQuadView.BAKE_NORMALIZED & bakeFlags) == 0) {
} else if ((MutableQuadView.BAKE_NORMALIZED & bakeFlags) == 0) { // flag is NOT set, UVs are assumed to not be normalized yet as is the default, normalize through dividing by 16
// Scales from 0-16 to 0-1
applyModifier(quad, spriteIndex, (q, i, t) -> q.sprite(i, t, q.spriteU(i, t) * NORMALIZER, q.spriteV(i, t) * NORMALIZER));
}