beardgame / utilities

General C# (game) utilities library, containing a variety of useful types and algorithms
MIT License
28 stars 14 forks source link

Allow noise map precalculation #224

Open tomrijnbeek opened 3 years ago

tomrijnbeek commented 3 years ago

🆙 Improvement proposal

Noise maps are always calculated when needed, without caching. For expensive to evaluate noise, you may want to turn this generic function into a pre-calculated "texture" so that querying becomes significantly cheaper.

Context

223 introduces a method to potentially create complex composite noise maps. If you want to read from these maps often, you may want to precalculate the values.

tomrijnbeek commented 3 years ago

Note that while the easiest method of doing this is by turning the noise map quite literally in a texture by dividing the space in a square grid. However, one could also consider using other methods to subdivide the space, e.g. by triangulating or even adaptive subdivisions.