use of rtg.api.util.noise.ISimplexData2D in project Realistic-Terrain-Generation by Team-RTG.
the class JitterEffect method added.
@Override
public final float added(RTGWorld rtgWorld, float x, float y) {
ISimplexData2D jitterData = SimplexData2D.newDisk();
rtgWorld.simplexInstance(1).multiEval2D(x / wavelength, y / wavelength, jitterData);
int pX = (int) Math.round(x + jitterData.getDeltaX() * amplitude);
int pY = (int) Math.round(y + jitterData.getDeltaY() * amplitude);
return jittered.added(rtgWorld, pX, pY);
}
Aggregations