Auburn / FastNoise2

Modular node graph based noise generation library using SIMD, C++17 and templates
MIT License
1.02k stars 107 forks source link

Does this support ARM64 v8 w/ ASIMD? Can I use this within my game itself? #75

Open einthusan opened 3 years ago

einthusan commented 3 years ago

See title. Thanks.

Auburn commented 3 years ago

It's on the roadmap, but there is no support currently

einthusan commented 3 years ago

Maybe you can use any of these libraries? If you don't mind, can you give me your opinion of these libraries even if you don't end up using it ... because I am thinking about using them in my game engine w/ vulkan but I am not sure which one to use, its all confusing lol. My game engine is specifically dedicated for ARM64 v8-A (low-end mobile phones) which is what most people in a developing country can afford.

https://github.com/projectNe10/Ne10 https://github.com/xtensor-stack/xsimd https://github.com/simd-everywhere/simde https://github.com/DLTcollab/sse2neon https://github.com/JishinMaster/simd_utils

Auburn commented 3 years ago

https://github.com/Auburn/FastNoiseSIMD supports ARM64 NEON if you want something to tide you over till it is supported here.

FastNoise2 used it's own SIMD abstraction already so using another library doesn't solve the issue.

Not sure what you're looking to do with SIMD in your game engine, but you likely want something to handle vector/matrix math? The libraries you listed are more suited towards data manipulation through SIMD.

einthusan commented 3 years ago

@Auburn Yes, I do need an ARM64 ASIMD "NEON" library to handle vector/matrix math. I saw a performance comparison between using C intrinsic vs. ARM assembly code (both version are implemented in https://github.com/projectNe10/Ne10). The ARM assembly was 2x to 4x faster compared to the C version.

With the rise of ARM processors, i hope you'd consider writing ARM assembly for FastNoise2.

I am also not clear about why you're developing a successor to FastNoiseSIMD ... ? Was the code base becoming unmaintainable? not fast enough? or needed better GUI/UX? what exactly was the motive?

So if I understood you clearly, the other libraries I showed in my previous post are NOT going to help in mobile game development? And your new library can be used for "dynamic" in-game procedural generation OR it can be used as an offline noise generator tool? is this correct?

Thanks! Is there any way I can donate funds towards the development of ARM64 support in this library?

Auburn commented 3 years ago

Hi, the Ne10 project you linked does seem to provide the vector/matrix math you would want, but it seems it is using ARM32 not ARM64, so I'm not sure the assembly code would work for you.

FastNoise2 provides several benefits over FastNoiseSIMD, modular node based noise tree, included 2D/3D visual editor for noise trees. And as you stated, the code for FastNoiseSIMD is unmaintainable, I designed the code structure in FastNoise2 to be more readable and expandable.

And your new library can be used for "dynamic" in-game procedural generation OR it can be used as an offline noise generator tool?

Correct

If you want to support the FastNoise project you can sponsor me on Github. I'm currently working on a new SIMD backend for FastNoise2 which will include ARM support, but I can't guarantee any timeframes for completion.

einthusan commented 3 years ago

Hi @Auburn,

I've went ahead and sponsored your effort! Good luck. Do you have a moment to give your feedback on this? (https://github.com/ARM-software/ComputeLibrary)

Thanks!

Auburn commented 3 years ago

Thank You!

The Compute Library describes itself as a "set of computer vision and machine learning functions" I don't think that is very relevant to a game engine?

I don't know anything about computer vision or machine learning so I can't comment much on the library

Of the libraries you linked previously Ne10 looks to be the most relevant to you given a quick skim over them all.

Zylann commented 2 years ago

Until SIMD is properly supported, is there a way to build this library for ARM still (or any other unsupported architecture), by only compiling Scalar level? It seems however that it wouldn't even be possible, because neither of the following headers exist on ARM: https://github.com/Auburn/FastNoise2/blob/73c6e582052275cd073ebae7790f8874b9c194ba/src/FastSIMD/FastSIMD.cpp#L6-L10