You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FastNoise::SmartNode<FastNoise::FractalFBm>` m_noiseGenerator;
m_noiseGenerator = FastNoise::New<FastNoise::FractalFBm>();
auto fnSimplex = FastNoise::New<FastNoise::Simplex>();
m_noiseGenerator->SetSource(fnSimplex);
m_noiseGenerator->SetOctaveCount(4);
m_noiseGenerator->SetGain(2);
m_noiseGenerator->SetLacunarity(2);
m_noiseGenerator->SetOctaveCount(3);
// ... do some work, call m_noiseGenerator->GenUniformGrid2D a bunch of times
The second call to SetGain seems to not be working correctly. I see the correct value go in and populate mGain. But then the noise it generates acts as if the value is 0, even though it was never set to that value
The text was updated successfully, but these errors were encountered:
There is, but I only call these Set functions from the main thread. and make sure that none of my worker threads are doing anything while the main thread is calling them. I just tried adding a lock around any calls to m_noiseGenerator (both Set's and Gen's) and I still have the same issue.
Hmm i think this might have been some weird C++ nonsense. I had the node as a static variable in the global namespace, and setting the values there didn't work. I made one of my classes own the node and now its working. Sorry to waste your time :(
I have some code along these lines
The second call to SetGain seems to not be working correctly. I see the correct value go in and populate mGain. But then the noise it generates acts as if the value is 0, even though it was never set to that value
The text was updated successfully, but these errors were encountered: