FastNoiseLite noise;
noise.SetNoiseType(FastNoiseLite::NoiseType_Cellular);
noise.SetFrequency(0.02f);
PictureB aBmp(128, 128);
// Gather noise data
for (int y = 0; y < 128; y++)
{
for (int x = 0; x < 128; x++)
{
aBmp.SetPixel(x,y,noise.GetNoise((float)x, (float)y)*255,0,0);
}
}
The texture coord is form 0 to 1, go through it. I mul it with 100 to match the size as the cpp one.
The result of cpp is as expectation, a noise like reflection on water suface. However in HLSL, there are only a little highlights scattering on the surface, other most field of the surface is black, which indicates the value after sampling is 0. The default noiseType, FNL_NOISE_OPENSIMPLEX2 in HLSL is running good. I tried to change the other parameters , simulating the setting in Readme.md of the homepage, but get the same result.
I used follwing parameters: cpp:
HLSL:
The texture coord is form 0 to 1, go through it. I mul it with 100 to match the size as the cpp one.
The result of cpp is as expectation, a noise like reflection on water suface. However in HLSL, there are only a little highlights scattering on the surface, other most field of the surface is black, which indicates the value after sampling is 0. The default noiseType, FNL_NOISE_OPENSIMPLEX2 in HLSL is running good. I tried to change the other parameters , simulating the setting in Readme.md of the homepage, but get the same result.
I use Directx11. The version of HLSL is 5.0 .