map to 255 range

This commit is contained in:
Sjoerd van de Goor 2023-02-15 12:55:43 +01:00
parent 3ce832583c
commit c15d4a349f

View File

@ -54,7 +54,7 @@ public class IrisRenderer {
int deltaHeight = renderer.getMaxHeight() - renderer.getMinHeight();
colorFunction = (x, z) -> {
double h = renderer.getComplex().getHeightStream().get(x, z);
return new Color((int) (h / deltaHeight), 128, fluidHeight > h ? 0 : 255).getRGB();
return new Color((int) (h * 255d / deltaHeight), 128, fluidHeight > h ? 0 : 255).getRGB();
};
}
}