mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-04 00:46:08 +00:00
Merge pull request #960 from CocoTheOwner/render-continent
Continent (i.e. heightmap + ocean/land division) render
This commit is contained in:
commit
f5c64c7480
@ -49,6 +49,14 @@ public class IrisRenderer {
|
|||||||
colorFunction = (x, z) -> renderer.getComplex().getCaveBiomeStream().get(x, z).getColor(renderer, currentType).getRGB();
|
colorFunction = (x, z) -> renderer.getComplex().getCaveBiomeStream().get(x, z).getColor(renderer, currentType).getRGB();
|
||||||
case HEIGHT ->
|
case HEIGHT ->
|
||||||
colorFunction = (x, z) -> Color.getHSBColor(renderer.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB();
|
colorFunction = (x, z) -> Color.getHSBColor(renderer.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB();
|
||||||
|
case CONTINENT -> {
|
||||||
|
double fluidHeight = renderer.getComplex().getFluidHeight();
|
||||||
|
int deltaHeight = renderer.getMaxHeight() - renderer.getMinHeight();
|
||||||
|
colorFunction = (x, z) -> {
|
||||||
|
double h = renderer.getComplex().getHeightStream().get(x, z);
|
||||||
|
return new Color((int) (h * 255d / deltaHeight), 128, h > fluidHeight ? 0 : 255).getRGB();
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double x, z;
|
double x, z;
|
||||||
|
@ -19,5 +19,5 @@
|
|||||||
package com.volmit.iris.core.gui.components;
|
package com.volmit.iris.core.gui.components;
|
||||||
|
|
||||||
public enum RenderType {
|
public enum RenderType {
|
||||||
BIOME, BIOME_LAND, BIOME_SEA, REGION, CAVE_LAND, HEIGHT, OBJECT_LOAD, DECORATOR_LOAD, LAYER_LOAD
|
BIOME, BIOME_LAND, BIOME_SEA, REGION, CAVE_LAND, HEIGHT, OBJECT_LOAD, DECORATOR_LOAD, CONTINENT, LAYER_LOAD
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user