9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-25 01:59:15 +00:00

Compat fixes

This commit is contained in:
Daniel Mills
2020-10-31 19:28:44 -04:00
parent 736deca1fc
commit f97cd10bf6
2 changed files with 13 additions and 2 deletions

View File

@@ -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();
}
}