News for hackers. Stuff that matters.
Re:Fractional Brownian Motion for Terrain Generation by notfashion on Monday October 07, 2019 @09:25PM (#21187781)
I think there's an error in the first bit of example code:

  float fbm( in vecN x, in float H )
  {    
      float t = 0.0;
      for( int i=0; i<numOctaves; i++ )
      {
          float f = pow( 2.0, float(i) );
          float a = pow( f, -H );
          t += a*noise(f*x);
      }
      return t;
  }
Shouldn't "float a = pow( f, -H );" be "float a = pow( i, -H );"?

There are no comments on this comment yet.