mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-27 23:29:58 -04:00
Fix Indigo UV rotation (#1945)
* Fix Indigo UV rotation * Update MutableQuadView bakeFlags javadocs
This commit is contained in:
parent
0a73a6c22b
commit
b0b66fc386
2 changed files with 5 additions and 3 deletions
fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh
fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/helper
|
@ -45,7 +45,7 @@ public interface MutableQuadView extends QuadView {
|
|||
int BAKE_ROTATE_NONE = 0;
|
||||
|
||||
/**
|
||||
* Causes texture to appear rotated 90 deg. relative to nominal face.
|
||||
* Causes texture to appear rotated 90 deg. clockwise relative to nominal face.
|
||||
* Pass in bakeFlags parameter to {@link #spriteBake(int, Sprite, int)}.
|
||||
*/
|
||||
int BAKE_ROTATE_90 = 1;
|
||||
|
@ -57,7 +57,7 @@ public interface MutableQuadView extends QuadView {
|
|||
int BAKE_ROTATE_180 = 2;
|
||||
|
||||
/**
|
||||
* Causes texture to appear rotated 270 deg. relative to nominal face.
|
||||
* Causes texture to appear rotated 270 deg. clockwise relative to nominal face.
|
||||
* Pass in bakeFlags parameter to {@link #spriteBake(int, Sprite, int)}.
|
||||
*/
|
||||
int BAKE_ROTATE_270 = 3;
|
||||
|
|
|
@ -91,7 +91,9 @@ public class TextureHelper {
|
|||
}
|
||||
}
|
||||
|
||||
private static final VertexModifier[] ROTATIONS = new VertexModifier[] { null, (q, i, t) -> q.sprite(i, t, q.spriteV(i, t), q.spriteU(i, t)), //90
|
||||
private static final VertexModifier[] ROTATIONS = new VertexModifier[] {
|
||||
null,
|
||||
(q, i, t) -> q.sprite(i, t, q.spriteV(i, t), 1 - q.spriteU(i, t)), //90
|
||||
(q, i, t) -> q.sprite(i, t, 1 - q.spriteU(i, t), 1 - q.spriteV(i, t)), //180
|
||||
(q, i, t) -> q.sprite(i, t, 1 - q.spriteV(i, t), q.spriteU(i, t)) // 270
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue