Emissive planet system upgrades / Indexed vertices for planets

This commit is contained in:
Anuken
2025-05-28 21:21:21 -04:00
parent fcb5b42d58
commit 43fb2e7cdc
15 changed files with 193 additions and 82 deletions

View File

@@ -2,7 +2,6 @@ package mindustry.maps.generators;
import arc.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.struct.ObjectIntMap.*;
@@ -26,10 +25,6 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
protected @Nullable Sector sector;
public static float packAlpha(float albedo, float emissive){
return emissive > 0 ? 1f + 1f/255f - 0.5f * Mathf.clamp(emissive) : Mathf.clamp(albedo) * 0.5f;
}
/** Should generate sector bases for a planet. */
public void generateSector(Sector sector){