Fix bug with variant-rotation not beeing applied correctly for lowres coloring

This commit is contained in:
Lukas Rieger (Blue) 2023-03-04 18:43:28 +01:00
parent f3f609c573
commit 22ed75c513
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 3 additions and 3 deletions

View File

@ -322,9 +322,8 @@ public class ResourceModelBuilder {
faceDirVector.getY(),
faceDirVector.getZ()
);
makeRotationRelative(faceRotationVector);
faceRotationVector.rotateAndScale(element.getRotation().getMatrix());
if (variant.isRotated()) faceRotationVector.transform(variant.getRotationMatrix());
makeRotationRelative(faceRotationVector);
float a = faceRotationVector.y;
if (a > 0 && texturePath != null){
@ -375,7 +374,8 @@ public class ResourceModelBuilder {
}
private void makeRotationRelative(VectorM3f direction){
direction.transform(variant.getRotationMatrix());
if (variant.isRotated())
direction.transform(variant.getRotationMatrix());
}
private float testAo(VectorM3f vertex, Direction dir){