On a different forum, I got clarity on how I should render the noise, this is the code I was provided that actually worked.
void write_noise_2d(int w, int h, int channels_num)
{
fnl_state noise = fnlCreateState();
noise.noise_type = FNL_NOISE_OPENSIMPLEX2;
noise.octaves = 8;
float* noise_data = malloc(w * h * channels_num * sizeof(float));
int index = 0;
for(int x=0; x<w; x++)
{
for(int y=0; y<h; y++)
{
noise_data[index++] = (1 + fnlGetNoise2D(&noise, x, y)) * 127.999;
}
}
stbi_write_jpg("textures/noisemap.jpg", w, h, channels_num, noise_data, w * channels_num);
free(noise_data);
}
write_noise_2d(512, 512, 1);
Quick little update for future readers, it turns out that I didn't even need to do any of that other stuff in the noise calculuations, I just needed to use a bmp, the whole
noise_data[index++] = (1 + fnlGetNoise2D(&noise, x, y)) * 127.999;
Was unnecesssary