amethyst / amethyst/bracket-lib

Cellular distance noise computation is independent from cell distances

Đang mở
#260 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
1.7k
Fork
126
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The function `single_cellular` is used to compute 'cellular' noise for `CellularReturnType::CellValue` and `CellularReturnType::Distance`. However, most of the code in the function is essentially dead - the return value is currently only determined by the input coordinates and the RNG seed (code copied from https://github.com/amethyst/bracket-lib/blob/master/bracket-noise/src/fastnoise.rs#L3857-L3862):
```rust
match self.cellular_return_type {
CellularReturnType::CellValue => {
self.val_coord_2d(self.seed as i32, x as i32, y as i32)
}
_ => 0.0,
}
```

Intuitively, I expect that when writing `distance` to a new 'minimal' value, also the corresponding coordinates `xi` and `yi` should be remembered and passed to `val_coord_2d`. Something entirely different from `return 0.0` is likely necessary for other values of `CellularReturnType`. Looking at the original source in https://github.com/Auburn/FastNoiseLite/blob/master/C/FastNoiseLite.h#L1402 seems to confirm this.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.