Increase the maximum number of octaves in OpenSimplexNoise to 9

An error message is now printed when trying to set the number of octaves
above the maximum allowed value.

The magic constant was also replaced with a define that can be
easily changed.

This closes #28714.
This commit is contained in:
Hugo Locurcio
2020-01-30 23:49:17 +01:00
parent 3c3ed67c39
commit 13622d40fc
3 changed files with 14 additions and 5 deletions

View File

@@ -117,7 +117,8 @@
Difference in period between [member octaves].
</member>
<member name="octaves" type="int" setter="set_octaves" getter="get_octaves" default="3">
Number of OpenSimplex noise layers that are sampled to get the fractal noise.
Number of OpenSimplex noise layers that are sampled to get the fractal noise. Higher values result in more detailed noise but take more time to generate.
[b]Note:[/b] The maximum allowed value is 9.
</member>
<member name="period" type="float" setter="set_period" getter="get_period" default="64.0">
Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance).