diff --git a/pom.xml b/pom.xml index 7e66bb3a9..da005332e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 bytecode.ninja Iris - 1.0.31 + 1.0.32 Iris false diff --git a/src/main/java/com/volmit/iris/object/IrisCarveLayer.java b/src/main/java/com/volmit/iris/object/IrisCarveLayer.java index 0f9f13ea5..3879d912a 100644 --- a/src/main/java/com/volmit/iris/object/IrisCarveLayer.java +++ b/src/main/java/com/volmit/iris/object/IrisCarveLayer.java @@ -61,6 +61,17 @@ public class IrisCarveLayer return false; } + double opacity = Math.pow(IrisInterpolation.sinCenter(M.lerpInverse(getMinHeight(), getMaxHeight(), y)), 4); + return cng.aquire(() -> getStyle().create(rng.nextParallelRNG(-2340 * getMaxHeight() * getMinHeight()))).fitDouble(0D, 1D, x, y, z) * opacity > getThreshold(); + } + + public boolean isCarved2(RNG rng, double x, double y, double z) + { + if(y > getMaxHeight() || y < getMinHeight()) + { + return false; + } + double innerRange = fullPercent * (maxHeight - minHeight); double opacity = 1D; @@ -73,7 +84,7 @@ public class IrisCarveLayer { opacity = IrisInterpolation.bezier(1D - M.lerpInverse(maxHeight-innerRange, getMaxHeight(), y)); } - + return cng.aquire(() -> getStyle().create(rng.nextParallelRNG(-2340 * getMaxHeight() * getMinHeight()))).fitDouble(0D, 1D, x, y, z) * opacity > getThreshold(); } }