Border
Description
This class wraps another rectangular heightmap (see (w|h)
below), pads it to the size (s|s)
and adds a smooth border falloff towards the right and bottom heightmap edges:
(0|0) +---------+----+-----+ Y- | | | | | | | | | X- --O-- X+ | | | | | +---------+ | | Y+ | (w|h) | | |--------------+ | w := heightmap width, minus one | (w+f|h+f) | h := height height, minus one | | s := 1 + 2^ceiling(log2(max(w + f,h + f))) +--------------------+ f := border fallof (s|s)
This is to avoid sharp edges at the heightmap border which would cause unnecessary triangles during tessellation.