WIP bases with emissive lighting on Serpulo

This commit is contained in:
Anuken
2025-05-28 19:04:33 -04:00
parent 00621dbc18
commit fcb5b42d58
13 changed files with 120 additions and 18 deletions

View File

@@ -2,6 +2,7 @@ package mindustry.maps.generators;
import arc.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.struct.ObjectIntMap.*;
@@ -25,6 +26,10 @@ 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){