Game4all / vx_bevy

🧊 Voxel engine prototype made with the bevy game engine. Serves as a playground for experimenting with voxels, terrain generation, and bevy.
MIT License
279 stars 32 forks source link

Simdnoise doesn't support non-x86 #3

Closed merlinfuchs closed 1 year ago

merlinfuchs commented 2 years ago

For anyone trying to get the world generation to work on a non-x86-target, you need to patch the 3.1.6 version of simdnoise with this commit https://github.com/jackmott/rust-simd-noise/commit/23c690578a2ce2bc5f9d6eb7faf730ea909baa47 .

I made a fork of simdnoise which does the trick for me:

simdnoise = { git = "https://github.com/merlinfuchs/rust-simd-noise", branch = "3.1.6-patch" }

Feel free to close this, just leaving this here if anyone runs into the same problem.

merlinfuchs commented 2 years ago

Btw. the master of https://github.com/jackmott/rust-simd-noise doesn't work because the noise functions seem to produce different results.

Game4all commented 2 years ago

I thought simd stuff in the crate was platform-gated and that it would simply fallback to scalar on non-x86, that's unfortunate. I think opening a PR upstream for fixing this would be nice. In the mean-time maintaining a fork sounds good. read a bit fast. What do you mean by master doesn't work ? Otherwise i guess we could just switch to use master while waiting for a crates.io release

merlinfuchs commented 2 years ago

I haven't looked into what has changed exactly on master, but the results are very different. You will see what I mean when you run vx_bevy with the master branch of simdnoise.

Game4all commented 2 years ago

Checked out rust-simd-noise master branch, problem is due to the value scale of noise that changed, scaling it back to [-1.0, 1.0] should fix things. image

Game4all commented 1 year ago

22