miepzerino
2025-04-06 89ffa9ea09da478852ebe24f2ae2348c6b145edd
Assets/Scripts/Jobs/GenerateGroundJob.cs
@@ -22,6 +22,7 @@
    [WriteOnly]
    public NativeArray<bool> groundTiles;
    [ReadOnly] public NativeArray<float> perlinNoiseCache;
    public void Execute(int index)
    {
@@ -34,10 +35,6 @@
            return;
        }
        float xPerlin = ((float)x / maxWidth) * scale + offsetX;
        float yPerlin = ((float)math.abs(y) / groundDepth) * scale + offsetY;
        float perlinNoise = noise.cnoise(new float2(xPerlin, yPerlin));
        groundTiles[index] = perlinNoise <= 0.7f;
        groundTiles[index] = perlinNoiseCache[x * groundDepth + Mathf.Abs(y)] <= 0.7f;
    }
}