Minor optimization
This commit is contained in:
@@ -217,9 +217,10 @@ public class TileableLogicDisplay extends LogicDisplay{
|
|||||||
processCommands();
|
processCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw.z(Layer.block + 0.001f);
|
float offset = 0.001f + (rootDisplay.buffer == null ? 0f : (rootDisplay.buffer.hashCode() % 1_000_000) / 1_000_000f * 0.01f);
|
||||||
|
|
||||||
|
Draw.z(Layer.block + offset);
|
||||||
|
|
||||||
//TODO this is slow, many texture switches
|
|
||||||
Draw.blend(Blending.disabled);
|
Draw.blend(Blending.disabled);
|
||||||
Draw.draw(Draw.z(), () -> {
|
Draw.draw(Draw.z(), () -> {
|
||||||
if(rootDisplay.buffer != null){
|
if(rootDisplay.buffer != null){
|
||||||
@@ -232,7 +233,7 @@ public class TileableLogicDisplay extends LogicDisplay{
|
|||||||
});
|
});
|
||||||
Draw.blend();
|
Draw.blend();
|
||||||
|
|
||||||
Draw.z(Layer.block + 0.002f);
|
Draw.z(Layer.block + 0.02f);
|
||||||
|
|
||||||
Draw.rect(tileRegion[bitmasks[bits]], x, y);
|
Draw.rect(tileRegion[bitmasks[bits]], x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user