mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 12:29:20 +00:00
NV
This commit is contained in:
@@ -19,8 +19,7 @@ import lombok.Data;
|
||||
|
||||
@Desc("A biome decorator is used for placing flowers, grass, cacti and so on")
|
||||
@Data
|
||||
public class IrisBiomeDecorator
|
||||
{
|
||||
public class IrisBiomeDecorator {
|
||||
@DontObfuscate
|
||||
@Desc("The varience dispersion is used when multiple blocks are put in the palette. Scatter scrambles them, Wispy shows streak-looking varience")
|
||||
private NoiseStyle variance = NoiseStyle.STATIC;
|
||||
@@ -53,7 +52,7 @@ public class IrisBiomeDecorator
|
||||
@DontObfuscate
|
||||
@Desc("The zoom is for zooming in or out wispy dispersions. Makes patches bigger the higher this zoom value is")
|
||||
private double zoom = 1;
|
||||
|
||||
|
||||
@MinNumber(0.0001)
|
||||
@DontObfuscate
|
||||
@Desc("The zoom is for zooming in or out variance. Makes patches have more or less of one type.")
|
||||
@@ -82,78 +81,64 @@ public class IrisBiomeDecorator
|
||||
private transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
||||
private transient AtomicCache<KList<BlockData>> blockData = new AtomicCache<>();
|
||||
|
||||
public int getHeight(RNG rng, double x, double z)
|
||||
{
|
||||
if(stackMin == stackMax)
|
||||
{
|
||||
public int getHeight(RNG rng, double x, double z) {
|
||||
if (stackMin == stackMax) {
|
||||
return stackMin;
|
||||
}
|
||||
|
||||
return getHeightGenerator(rng).fit(stackMin, stackMax, x ,z);
|
||||
return getHeightGenerator(rng).fit(stackMin, stackMax, x / verticalZoom, z / verticalZoom);
|
||||
}
|
||||
|
||||
public CNG getHeightGenerator(RNG rng)
|
||||
{
|
||||
return heightGenerator.aquire(() ->
|
||||
{
|
||||
return heightVariance.create(rng.nextParallelRNG(getBlockData().size() + stackMax + stackMin)).scale(1D / verticalZoom);
|
||||
public CNG getHeightGenerator(RNG rng) {
|
||||
return heightGenerator.aquire(() -> {
|
||||
return heightVariance.create(rng.nextParallelRNG(getBlockData().size() + stackMax + stackMin));
|
||||
});
|
||||
}
|
||||
|
||||
public CNG getGenerator(RNG rng)
|
||||
{
|
||||
public CNG getGenerator(RNG rng) {
|
||||
long key = rng.nextParallelRNG(1).nextLong();
|
||||
|
||||
if(layerGenerators == null)
|
||||
{
|
||||
if (layerGenerators == null) {
|
||||
layerGenerators = new KMap<>();
|
||||
}
|
||||
|
||||
if(!layerGenerators.containsKey(key))
|
||||
{
|
||||
layerGenerators.put(key, dispersion.create(rng.nextParallelRNG((int) (getBlockData().size() + key))).scale(1D / zoom));
|
||||
if (!layerGenerators.containsKey(key)) {
|
||||
layerGenerators.put(key, dispersion.create(rng.nextParallelRNG((int) (getBlockData().size() + key))));
|
||||
}
|
||||
|
||||
return layerGenerators.get(key);
|
||||
}
|
||||
|
||||
public CNG getVarianceGenerator(RNG rng)
|
||||
{
|
||||
|
||||
public CNG getVarianceGenerator(RNG rng) {
|
||||
long key = rng.nextParallelRNG(4).nextLong();
|
||||
|
||||
if(layerVarianceGenerators == null)
|
||||
{
|
||||
if (layerVarianceGenerators == null) {
|
||||
layerVarianceGenerators = new KMap<>();
|
||||
}
|
||||
|
||||
if(!layerVarianceGenerators.containsKey(key))
|
||||
{
|
||||
layerVarianceGenerators.put(key, variance.create(rng.nextParallelRNG((int) (getBlockData().size() + key))).scale(1D / varianceZoom));
|
||||
if (!layerVarianceGenerators.containsKey(key)) {
|
||||
layerVarianceGenerators.put(key,
|
||||
variance.create(rng.nextParallelRNG((int) (getBlockData().size() + key))).scale(1D / varianceZoom));
|
||||
}
|
||||
|
||||
return layerVarianceGenerators.get(key);
|
||||
}
|
||||
|
||||
public KList<String> add(String b)
|
||||
{
|
||||
public KList<String> add(String b) {
|
||||
palette.add(b);
|
||||
return palette;
|
||||
}
|
||||
|
||||
public BlockData getBlockData(RNG rng, double x, double z)
|
||||
{
|
||||
if(getGenerator(rng) == null)
|
||||
{
|
||||
public BlockData getBlockData(RNG rng, double x, double z) {
|
||||
if (getGenerator(rng) == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(getBlockData() == null)
|
||||
{
|
||||
if (getBlockData() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(getBlockData().isEmpty())
|
||||
{
|
||||
if (getBlockData().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -162,10 +147,8 @@ public class IrisBiomeDecorator
|
||||
xx /= getZoom();
|
||||
zz /= getZoom();
|
||||
|
||||
if(getGenerator(rng).fitDoubleD(0D, 1D, xx, zz) <= chance)
|
||||
{
|
||||
if(getBlockData().size() == 1)
|
||||
{
|
||||
if (getGenerator(rng).fitDoubleD(0D, 1D, xx, zz) <= chance) {
|
||||
if (getBlockData().size() == 1) {
|
||||
return getBlockData().get(0);
|
||||
}
|
||||
|
||||
@@ -175,16 +158,12 @@ public class IrisBiomeDecorator
|
||||
return null;
|
||||
}
|
||||
|
||||
public KList<BlockData> getBlockData()
|
||||
{
|
||||
return blockData.aquire(() ->
|
||||
{
|
||||
public KList<BlockData> getBlockData() {
|
||||
return blockData.aquire(() -> {
|
||||
KList<BlockData> blockData = new KList<>();
|
||||
for(String i : palette)
|
||||
{
|
||||
for (String i : palette) {
|
||||
BlockData bx = B.getBlockData(i);
|
||||
if(bx != null)
|
||||
{
|
||||
if (bx != null) {
|
||||
blockData.add(bx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ import lombok.Data;
|
||||
|
||||
@Desc("A layer of surface / subsurface material in biomes")
|
||||
@Data
|
||||
public class IrisBiomePaletteLayer
|
||||
{
|
||||
public class IrisBiomePaletteLayer {
|
||||
@DontObfuscate
|
||||
@Desc("The style of noise")
|
||||
private NoiseStyle style = NoiseStyle.STATIC;
|
||||
@@ -51,52 +50,42 @@ public class IrisBiomePaletteLayer
|
||||
private transient AtomicCache<CNG> layerGenerator = new AtomicCache<>();
|
||||
private transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
||||
|
||||
public CNG getHeightGenerator(RNG rng)
|
||||
{
|
||||
return heightGenerator.aquire(() -> CNG.signature(rng.nextParallelRNG(minHeight * maxHeight + getBlockData().size())));
|
||||
public CNG getHeightGenerator(RNG rng) {
|
||||
return heightGenerator
|
||||
.aquire(() -> CNG.signature(rng.nextParallelRNG(minHeight * maxHeight + getBlockData().size())));
|
||||
}
|
||||
|
||||
public BlockData get(RNG rng, double x, double y, double z)
|
||||
{
|
||||
if(getBlockData().isEmpty())
|
||||
{
|
||||
public BlockData get(RNG rng, double x, double y, double z) {
|
||||
if (getBlockData().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(getBlockData().size() == 1)
|
||||
{
|
||||
if (getBlockData().size() == 1) {
|
||||
return getBlockData().get(0);
|
||||
}
|
||||
|
||||
return getLayerGenerator(rng).fit(getBlockData(), x, y, z);
|
||||
return getLayerGenerator(rng).fit(getBlockData(), x / zoom, y / zoom, z / zoom);
|
||||
}
|
||||
|
||||
public CNG getLayerGenerator(RNG rng)
|
||||
{
|
||||
return layerGenerator.aquire(() ->
|
||||
{
|
||||
public CNG getLayerGenerator(RNG rng) {
|
||||
return layerGenerator.aquire(() -> {
|
||||
RNG rngx = rng.nextParallelRNG(minHeight + maxHeight + getBlockData().size());
|
||||
return style.create(rngx);
|
||||
});
|
||||
}
|
||||
|
||||
public KList<String> add(String b)
|
||||
{
|
||||
public KList<String> add(String b) {
|
||||
palette.add(b);
|
||||
|
||||
return palette;
|
||||
}
|
||||
|
||||
public KList<BlockData> getBlockData()
|
||||
{
|
||||
return blockData.aquire(() ->
|
||||
{
|
||||
public KList<BlockData> getBlockData() {
|
||||
return blockData.aquire(() -> {
|
||||
KList<BlockData> blockData = new KList<>();
|
||||
for(String ix : palette)
|
||||
{
|
||||
for (String ix : palette) {
|
||||
BlockData bx = B.getBlockData(ix);
|
||||
if(bx != null)
|
||||
{
|
||||
if (bx != null) {
|
||||
blockData.add(bx);
|
||||
}
|
||||
}
|
||||
@@ -105,8 +94,7 @@ public class IrisBiomePaletteLayer
|
||||
});
|
||||
}
|
||||
|
||||
public IrisBiomePaletteLayer zero()
|
||||
{
|
||||
public IrisBiomePaletteLayer zero() {
|
||||
palette.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -24,47 +24,243 @@ public enum NoiseStyle {
|
||||
|
||||
@Desc("Wispy Perlin-looking simplex noise. The 'iris' style noise.")
|
||||
@DontObfuscate
|
||||
IRIS(rng -> CNG.signature(rng)),
|
||||
IRIS(rng -> CNG.signature(rng).scale(1)),
|
||||
|
||||
@Desc("Wispy Perlin-looking simplex noise. The 'iris' style noise.")
|
||||
@DontObfuscate
|
||||
IRIS_DOUBLE(rng -> CNG.signatureDouble(rng).scale(1)),
|
||||
|
||||
@Desc("Wispy Perlin-looking simplex noise. The 'iris' style noise.")
|
||||
@DontObfuscate
|
||||
IRIS_THICK(rng -> CNG.signatureThick(rng).scale(1)),
|
||||
|
||||
@Desc("Wispy Perlin-looking simplex noise. The 'iris' style noise.")
|
||||
@DontObfuscate
|
||||
IRIS_HALF(rng -> CNG.signatureHalf(rng).scale(1)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise.")
|
||||
@DontObfuscate
|
||||
SIMPLEX(rng -> new CNG(rng, 1D, 1).scale(0.04)),
|
||||
SIMPLEX(rng -> new CNG(rng, 1D, 1).scale(1)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 1)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 1)),
|
||||
|
||||
@Desc("Billow Fractal Iris Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_BILLOW_IRIS(rng -> CNG.signature(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX)),
|
||||
|
||||
@Desc("FBM Fractal Iris Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_FBM_IRIS(rng -> CNG.signature(rng, NoiseType.FRACTAL_FBM_SIMPLEX)),
|
||||
|
||||
@Desc("Billow Fractal Iris Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_BILLOW_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX)),
|
||||
|
||||
@Desc("FBM Fractal Iris Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_FBM_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.FRACTAL_FBM_SIMPLEX)),
|
||||
|
||||
@Desc("Billow Fractal Iris Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_BILLOW_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX)),
|
||||
|
||||
@Desc("FBM Fractal Iris Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_FBM_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.FRACTAL_FBM_SIMPLEX)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. Single octave.")
|
||||
@DontObfuscate
|
||||
FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 1)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 2 octaves.")
|
||||
@DontObfuscate
|
||||
BIOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 2)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 2 octaves.")
|
||||
@DontObfuscate
|
||||
BIOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 2)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 2 octaves.")
|
||||
@DontObfuscate
|
||||
BIOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 2)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 3 octaves.")
|
||||
@DontObfuscate
|
||||
TRIOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 3)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 3 octaves.")
|
||||
@DontObfuscate
|
||||
TRIOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 3)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 3 octaves.")
|
||||
@DontObfuscate
|
||||
TRIOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 3)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 4 octaves.")
|
||||
@DontObfuscate
|
||||
QUADOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 4)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 4 octaves.")
|
||||
@DontObfuscate
|
||||
QUADOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 4)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 4 octaves.")
|
||||
@DontObfuscate
|
||||
QUADOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 4)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 5 octaves.")
|
||||
@DontObfuscate
|
||||
QUINTOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 5)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 5 octaves.")
|
||||
@DontObfuscate
|
||||
QUINTOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 5)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 5 octaves.")
|
||||
@DontObfuscate
|
||||
QUINTOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 5)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 6 octaves.")
|
||||
@DontObfuscate
|
||||
SEXOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 6)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 6 octaves.")
|
||||
@DontObfuscate
|
||||
SEXOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 6)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 6 octaves.")
|
||||
@DontObfuscate
|
||||
SEXOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 6)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 7 octaves.")
|
||||
@DontObfuscate
|
||||
SEPTOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 7)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 7 octaves.")
|
||||
@DontObfuscate
|
||||
SEPTOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 7)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 7 octaves.")
|
||||
@DontObfuscate
|
||||
SEPTOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 7)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 8 octaves.")
|
||||
@DontObfuscate
|
||||
OCTOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 8)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 8 octaves.")
|
||||
@DontObfuscate
|
||||
OCTOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 8)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 8 octaves.")
|
||||
@DontObfuscate
|
||||
OCTOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 8)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 9 octaves.")
|
||||
@DontObfuscate
|
||||
NONOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 9)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 9 octaves.")
|
||||
@DontObfuscate
|
||||
NONOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 9)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 9 octaves.")
|
||||
@DontObfuscate
|
||||
NONOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 9)),
|
||||
|
||||
@Desc("Rigid Multi Fractal Simplex Noise. 10 octaves.")
|
||||
@DontObfuscate
|
||||
VIGOCTAVE_FRACTAL_RM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_RIGID_MULTI_SIMPLEX, 1D, 10)),
|
||||
|
||||
@Desc("Billow Fractal Simplex Noise. 10 octaves.")
|
||||
@DontObfuscate
|
||||
VIGOCTAVE_FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 10)),
|
||||
|
||||
@Desc("FBM Fractal Simplex Noise. 10 octaves.")
|
||||
@DontObfuscate
|
||||
VIGOCTAVE_FRACTAL_FBM_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 10)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 2 octaves")
|
||||
@DontObfuscate
|
||||
BIOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 2).scale(0.04)),
|
||||
BIOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 2).scale(1D / 2D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 3 octaves")
|
||||
@DontObfuscate
|
||||
TRIOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 3).scale(0.04)),
|
||||
TRIOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 3).scale(1D / 3D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 4 octaves")
|
||||
@DontObfuscate
|
||||
QUADOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 4).scale(0.04)),
|
||||
QUADOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 4).scale(1D / 4D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 5 octaves")
|
||||
@DontObfuscate
|
||||
QUINTOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 5).scale(0.04)),
|
||||
QUINTOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 5).scale(1D / 5D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 6 octaves")
|
||||
@DontObfuscate
|
||||
SEXOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 6).scale(0.04)),
|
||||
SEXOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 6).scale(1D / 6D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 7 octaves")
|
||||
@DontObfuscate
|
||||
SEPTOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 7).scale(0.04)),
|
||||
SEPTOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 7).scale(1D / 12D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 8 octaves")
|
||||
@DontObfuscate
|
||||
OCTOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 8).scale(0.04)),
|
||||
OCTOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 8).scale(1D / 25D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 9 octaves")
|
||||
@DontObfuscate
|
||||
NONOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 9).scale(0.04)),
|
||||
NONOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 9).scale(1D / 50D)),
|
||||
|
||||
@Desc("Basic, Smooth & Fast Simplex noise. Uses 10 octaves")
|
||||
@DontObfuscate
|
||||
VIGOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 10).scale(0.04)),
|
||||
VIGOCTAVE_SIMPLEX(rng -> new CNG(rng, 1D, 10).scale(1D / 100D)),
|
||||
|
||||
@Desc("Glob noise is like cellular, but with globs...")
|
||||
@DontObfuscate
|
||||
GLOB(rng -> new CNG(rng, NoiseType.GLOB, 1D, 1)),
|
||||
|
||||
@Desc("Glob noise is like cellular, but with globs...")
|
||||
@DontObfuscate
|
||||
GLOB_IRIS(rng -> CNG.signature(rng, NoiseType.GLOB)),
|
||||
|
||||
@Desc("Glob noise is like cellular, but with globs...")
|
||||
@DontObfuscate
|
||||
GLOB_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.GLOB)),
|
||||
|
||||
@Desc("Glob noise is like cellular, but with globs...")
|
||||
@DontObfuscate
|
||||
GLOB_IRIS_DOUBLE(rng -> CNG.signatureDouble(rng, NoiseType.GLOB)),
|
||||
|
||||
@Desc("Glob noise is like cellular, but with globs...")
|
||||
@DontObfuscate
|
||||
GLOB_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.GLOB)),
|
||||
|
||||
@Desc("Cubic Noise")
|
||||
@DontObfuscate
|
||||
LAVALAMP(rng -> new CNG(rng, NoiseType.CUBIC, 1D, 1).scale(256)),
|
||||
|
||||
@Desc("Cubic Noise")
|
||||
@DontObfuscate
|
||||
LAVALAMP_IRIS(rng -> CNG.signature(rng, NoiseType.CUBIC).scale(256)),
|
||||
|
||||
@Desc("Cubic Noise")
|
||||
@DontObfuscate
|
||||
LAVALAMP_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.CUBIC).scale(256)),
|
||||
|
||||
@Desc("Cubic Noise")
|
||||
@DontObfuscate
|
||||
LAVALAMP_IRIS_DOUBLE(rng -> CNG.signatureDouble(rng, NoiseType.CUBIC).scale(256)),
|
||||
|
||||
@Desc("Cubic Noise")
|
||||
@DontObfuscate
|
||||
LAVALAMP_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.CUBIC).scale(256)),
|
||||
|
||||
@Desc("Cellular noise creates the same noise level for cells, changes noise level on cell borders.")
|
||||
@DontObfuscate
|
||||
@@ -74,13 +270,37 @@ public enum NoiseStyle {
|
||||
@DontObfuscate
|
||||
CELLULAR_IRIS(rng -> CNG.signature(rng, NoiseType.CELLULAR)),
|
||||
|
||||
@Desc("Cellular noise creates the same noise level for cells, changes noise level on cell borders. Cells are distorted using Iris styled wispy noise.")
|
||||
@DontObfuscate
|
||||
CELLULAR_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.CELLULAR)),
|
||||
|
||||
@Desc("Cellular noise creates the same noise level for cells, changes noise level on cell borders. Cells are distorted using Iris styled wispy noise.")
|
||||
@DontObfuscate
|
||||
CELLULAR_IRIS_DOUBLE(rng -> CNG.signatureDouble(rng, NoiseType.CELLULAR)),
|
||||
|
||||
@Desc("Cellular noise creates the same noise level for cells, changes noise level on cell borders. Cells are distorted using Iris styled wispy noise.")
|
||||
@DontObfuscate
|
||||
CELLULAR_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.CELLULAR)),
|
||||
|
||||
@Desc("Inverse of vascular, height gets to 1.0 as it approaches the center of a cell")
|
||||
@DontObfuscate
|
||||
PERTERB(rng -> new CNG(rng, NoiseType.CELLULAR_HEIGHT, 1D, 1)),
|
||||
CELLULAR_HEIGHT(rng -> new CNG(rng, NoiseType.CELLULAR_HEIGHT, 1D, 1)),
|
||||
|
||||
@Desc("Inverse of vascular, height gets to 1.0 as it approaches the center of a cell, using the iris style.")
|
||||
@DontObfuscate
|
||||
PERTERB_IRIS(rng -> CNG.signature(rng, NoiseType.CELLULAR_HEIGHT)),
|
||||
CELLULAR_HEIGHT_IRIS(rng -> CNG.signature(rng, NoiseType.CELLULAR_HEIGHT)),
|
||||
|
||||
@Desc("Inverse of vascular, height gets to 1.0 as it approaches the center of a cell, using the iris style.")
|
||||
@DontObfuscate
|
||||
CELLULAR_HEIGHT_IRIS_DOUBLE(rng -> CNG.signatureDouble(rng, NoiseType.CELLULAR_HEIGHT)),
|
||||
|
||||
@Desc("Inverse of vascular, height gets to 1.0 as it approaches the center of a cell, using the iris style.")
|
||||
@DontObfuscate
|
||||
CELLULAR_HEIGHT_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.CELLULAR_HEIGHT)),
|
||||
|
||||
@Desc("Inverse of vascular, height gets to 1.0 as it approaches the center of a cell, using the iris style.")
|
||||
@DontObfuscate
|
||||
CELLULAR_HEIGHT_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.CELLULAR_HEIGHT)),
|
||||
|
||||
@Desc("Vascular noise gets higher as the position nears a cell border.")
|
||||
@DontObfuscate
|
||||
@@ -90,6 +310,18 @@ public enum NoiseStyle {
|
||||
@DontObfuscate
|
||||
VASCULAR_IRIS(rng -> CNG.signature(rng, NoiseType.VASCULAR)),
|
||||
|
||||
@Desc("Vascular noise gets higher as the position nears a cell border. Cells are distorted using Iris styled wispy noise.")
|
||||
@DontObfuscate
|
||||
VASCULAR_IRIS_DOUBLE(rng -> CNG.signatureDouble(rng, NoiseType.VASCULAR)),
|
||||
|
||||
@Desc("Vascular noise gets higher as the position nears a cell border. Cells are distorted using Iris styled wispy noise.")
|
||||
@DontObfuscate
|
||||
VASCULAR_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.VASCULAR)),
|
||||
|
||||
@Desc("Vascular noise gets higher as the position nears a cell border. Cells are distorted using Iris styled wispy noise.")
|
||||
@DontObfuscate
|
||||
VASCULAR_IRIS_HALF(rng -> CNG.signatureHalf(rng, NoiseType.VASCULAR)),
|
||||
|
||||
;
|
||||
private CNGFactory f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user