Proper asteroid albedo

This commit is contained in:
Anuken
2021-09-16 10:33:15 -04:00
parent a8fd047cd6
commit ad425f322c
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -408,6 +408,7 @@ public class Blocks implements ContentList{
iceWall = new StaticWall("ice-wall"){{ iceWall = new StaticWall("ice-wall"){{
iceSnow.asFloor().wall = this; iceSnow.asFloor().wall = this;
albedo = 0.6f;
}}; }};
snowWall = new StaticWall("snow-wall"); snowWall = new StaticWall("snow-wall");
+4 -2
View File
@@ -78,6 +78,7 @@ public class Planets implements ContentList{
startSector = 10; startSector = 10;
atmosphereRadIn = -0.01f; atmosphereRadIn = -0.01f;
atmosphereRadOut = 0.3f; atmosphereRadOut = 0.3f;
alwaysUnlocked = true;
}}; }};
serpulo = new Planet("serpulo", sun, 1, 3){{ serpulo = new Planet("serpulo", sun, 1, 3){{
@@ -118,19 +119,20 @@ public class Planets implements ContentList{
cgen.get((AsteroidGenerator)generator); cgen.get((AsteroidGenerator)generator);
meshLoader = () -> { meshLoader = () -> {
Color tinted = tint.mapColor.cpy().a(1f - tint.mapColor.a);
Seq<GenericMesh> meshes = new Seq<>(); Seq<GenericMesh> meshes = new Seq<>();
Color color = base.mapColor; Color color = base.mapColor;
Rand rand = new Rand(id + 2); Rand rand = new Rand(id + 2);
meshes.add(new NoiseMesh( meshes.add(new NoiseMesh(
this, 0, 2, radius, 2, 0.55f, 0.45f, 14f, this, 0, 2, radius, 2, 0.55f, 0.45f, 14f,
color, tint.mapColor, 3, 0.6f, 0.38f, tintThresh color, tinted, 3, 0.6f, 0.38f, tintThresh
)); ));
for(int j = 0; j < pieces; j++){ for(int j = 0; j < pieces; j++){
meshes.add(new MatMesh( meshes.add(new MatMesh(
new NoiseMesh(this, j + 1, 1, 0.022f + rand.random(0.039f) * scale, 2, 0.6f, 0.38f, 20f, new NoiseMesh(this, j + 1, 1, 0.022f + rand.random(0.039f) * scale, 2, 0.6f, 0.38f, 20f,
color, tint.mapColor, 3, 0.6f, 0.38f, tintThresh), color, tinted, 3, 0.6f, 0.38f, tintThresh),
new Mat3D().setToTranslation(Tmp.v31.setToRandomDirection(rand).setLength(rand.random(0.44f, 1.4f) * scale))) new Mat3D().setToTranslation(Tmp.v31.setToRandomDirection(rand).setLength(rand.random(0.44f, 1.4f) * scale)))
); );
} }