Auburn / FastNoiseLite

Fast Portable Noise Library - C# C++ C Java HLSL GLSL JavaScript Rust Go
http://auburn.github.io/FastNoiseLite/
MIT License
2.79k stars 327 forks source link

missing paremeter in for loop in line on line 954? HLSL #85

Closed gaiastellar closed 1 year ago

gaiastellar commented 2 years ago

does look correct : ( line 954) in HLSL port - missing paremeter in middle of for loop?

i = PRIME_X; j = PRIME_Y; k *= PRIME_Z;

float value = 0;
float a = (0.6f - x0 * x0) - (y0 * y0 + z0 * z0);

for (int l = 0;  ; l++)                                          /////////////    this line //////////////////////////////
{
    if (a > 0)
    {
        value += (a * a) * (a * a) * _fnlGradCoord3D(seed, i, j, k, x0, y0, z0);
    }

    float b = a + 1;
    int i1 = i;
    int j1 = j;
    int k1 = k;
    float x1 = x0;
    float y1 = y0;
    float z1 = z0;
    if (ax0 >= ay0 && ax0 >= az0)
Auburn commented 2 years ago

There is a break inside the loop, below the code you posted, to exit the loop.

Is this causing you issues?