mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-19 15:09:18 +00:00
add option to control the noise threshold for cave shapes
This commit is contained in:
@@ -104,7 +104,7 @@ public class IrisCave extends IrisRegistrant {
|
||||
CNG cng = shape.getNoise(base.nextParallelRNG(8131545), engine);
|
||||
KSet<IrisPosition> mask = shape.getMasked(rng, engine);
|
||||
writer.setNoiseMasked(points,
|
||||
girth, cng.noise(x, y, z), cng, mask, true,
|
||||
girth, shape.getNoiseThreshold() < 0 ? cng.noise(x, y, z) : shape.getNoiseThreshold(), cng, mask, true,
|
||||
(xf, yf, zf) -> yf <= h ? w : c);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.volmit.iris.engine.object;
|
||||
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import com.volmit.iris.engine.object.annotations.RegistryListResource;
|
||||
import com.volmit.iris.engine.object.annotations.Snippet;
|
||||
import com.volmit.iris.engine.object.annotations.*;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
import com.volmit.iris.util.math.M;
|
||||
@@ -25,6 +23,11 @@ public class IrisCaveShape {
|
||||
|
||||
@Desc("Noise used for the shape of the cave")
|
||||
private IrisGeneratorStyle noise = new IrisGeneratorStyle();
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The threshold for noise mask")
|
||||
private double noiseThreshold = -1;
|
||||
|
||||
@RegistryListResource(IrisObject.class)
|
||||
@Desc("Object used as mask for the shape of the cave")
|
||||
private String object = null;
|
||||
|
||||
Reference in New Issue
Block a user