mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 13:11:33 +00:00
fix significant oversights in noise & random
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
|
||||
public struct SimplexNoise<Scalar: BinaryFloatingPoint & SIMDScalar>: CoherentNoise2D, CoherentNoise3D, CoherentNoise4D, CoherentNoiseRandomInit {
|
||||
public struct SimplexNoise<Scalar: BinaryFloatingPoint & SIMDScalar>: CoherentNoise2D, CoherentNoise3D, CoherentNoise4D, CoherentNoiseRandomInit, CoherentNoiseTableInit {
|
||||
private let p: [Int16], pMod12: [Int16]
|
||||
|
||||
private let grad3: [SIMD3<Scalar>] = [
|
||||
@ -19,10 +19,6 @@ public struct SimplexNoise<Scalar: BinaryFloatingPoint & SIMDScalar>: CoherentNo
|
||||
.init(-1, 1, 1, 0), .init(-1, 1, -1, 0), .init(-1, -1, 1, 0), .init(-1, -1, -1, 0)
|
||||
]
|
||||
|
||||
public init() {
|
||||
self.init(permutation: defaultPermutation)
|
||||
}
|
||||
|
||||
public init(permutation: [Int16]) {
|
||||
assert(permutation.count == 0x100)
|
||||
self.p = permutation
|
||||
|
Reference in New Issue
Block a user