Batch optimizations

This commit is contained in:
Anuken
2024-07-23 11:31:34 -04:00
parent 995014cbe4
commit a594d796ad
8 changed files with 12 additions and 10 deletions

View File

@@ -480,7 +480,7 @@ public class Drawf{
/** Draws a sprite that should be light-wise correct, when rotated. Provided sprite must be symmetrical in shape. */
public static void spinSprite(TextureRegion region, float x, float y, float r){
float a = Draw.getColor().a;
float a = Draw.getColorAlpha();
r = Mathf.mod(r, 90f);
Draw.rect(region, x, y, r);
Draw.alpha(r / 90f*a);

View File

@@ -70,7 +70,7 @@ public class LightRenderer{
float rot = Mathf.angleExact(x2 - x, y2 - y);
TextureRegion ledge = Core.atlas.find("circle-end"), lmid = Core.atlas.find("circle-mid");
float color = Draw.getColor().toFloatBits();
float color = Draw.getColorPacked();
float u = lmid.u;
float v = lmid.v2;
float u2 = lmid.u2;