Jordan Peck edited this page Sep 7, 2017 · 10 revisions

Getting Started

Setup Compiler Settings

Since SIMD functions work by processing multiple values at once this library functions by returning sets of data rather than single values. A set is returned in the form of a pointer to an array of floats.

Example of how to generate a set of data, process it, then free it.

#include "FastNoiseSIMD.h"

...

FastNoiseSIMD* myNoise = FastNoiseSIMD::NewFastNoiseSIMD();

// Get a set of 16 x 16 x 16 Simplex Fractal noise
float* noiseSet = myNoise->GetSimplexFractalSet(0, 0, 0, 16, 16, 16);    
int index = 0;

for (int x = 0; x < 16; x++)
{
    for (int y = 0; y < 16; y++)
    {
        for (int z = 0; z < 16; z++)
        {
            ProcessVoxelData(x, y, z, noiseSet[index++]);			
        }			
    }
}

FastNoiseSIMD::FreeNoiseSet(noiseSet);

Note: If the size of the Z dimension is a multiple of 8 there is a slight performance boost

Noise settings documentation

Clone this wiki locally
You can’t perform that action at this time.
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.
Press h to open a hovercard with more details.