mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-19 15:20:55 +00:00
Use Seismic function for perf
This commit is contained in:
+2
-2
@@ -82,8 +82,8 @@ public class PipelineBiomeProvider implements BiomeProvider {
|
||||
|
||||
public Biome getBiome(int x, int z, long seed) {
|
||||
|
||||
x += mutator.getSample(seed + 1, x, z) * noiseAmp;
|
||||
z += mutator.getSample(seed + 2, x, z) * noiseAmp;
|
||||
x += (int) (mutator.getSample(seed + 1, x, z) * noiseAmp);
|
||||
z += (int) (mutator.getSample(seed + 2, x, z) * noiseAmp);
|
||||
|
||||
x /= resolution;
|
||||
z /= resolution;
|
||||
|
||||
+3
-1
@@ -2,6 +2,8 @@ package com.dfsek.terra.addons.biome.pipeline.pipeline;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.seismic.math.floatingpoint.FloatingPointFunctions;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.BiomeChunk;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Expander;
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
|
||||
@@ -98,7 +100,7 @@ public class BiomeChunkImpl implements BiomeChunk {
|
||||
// chunk samples points on the same overall grid.
|
||||
// Without this, shared chunk borders (required because of adjacent cell reads) will not be identical
|
||||
// because points would be sampled on grids at different offsets, resulting in artifacts at borders.
|
||||
return (int) Math.ceil((double) finalGridOrigin / initialGridInterval) * initialGridInterval;
|
||||
return FloatingPointFunctions.ceil((double) finalGridOrigin / initialGridInterval) * initialGridInterval;
|
||||
}
|
||||
|
||||
private static int calculateFinalGridOrigin(int totalExpanderCount, List<Stage> stages) {
|
||||
|
||||
Reference in New Issue
Block a user