Commit graph

18 commits

Author SHA1 Message Date
Casey Foote 97c8d9f348 Add support for generating noise images with an offset. 2021-05-20 08:20:23 -07:00
Rafał Mikrut f7209b459b Initialize class/struct variables with default values in modules/ 2021-02-08 10:57:18 +01:00
Aaron Franke 1d5042c9e2
Use Math_TAU and deg2rad/rad2deg in more places and optimize code 2021-01-09 03:47:14 -05:00
Rémi Verschelde 55e876777c
Merge pull request #44832 from nathansmith339/opensimplex-optimization
OpenSimplex data optimization
2021-01-07 10:51:30 +01:00
nevarek 041fe20f64 Optimize data format for OpenSimplex images
The previous RGBA format included unused RGB data. Using the LA8 format
removes the need to store the extra data.

The Docs have been updated to reflect the format changes.
2021-01-06 19:01:21 -08:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Sacha Waked 7e2b88a7eb Updated open-simplex to have const noise functions
"open-simplex-noise-in-c" now updated to master and "opensimplex" module refactored accordingly
2020-12-04 11:26:05 +01:00
RaphaelHunter 00cac6e9b6 Fix OpenSimplexNoise get_image() swap axes 2020-07-01 11:40:14 +08:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Hugo Locurcio 13622d40fc
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.
2020-01-30 23:55:38 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
2017A7PS0002G a3ecfb7a82 Added get_noise_1d 2019-03-05 20:58:58 +05:30
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
santouits 2694053be3 Renaming SimplexNoise refs to OpenSimplexNoise
Because I think github doesn't show history of renamed files
- The original work is done in commit f12a1b8
by JFonS
- Improved Documentation in commit a386af6
- Last change on the files was in commit 463af5b
- and Fixed compiler warnings in commit e5bbcb8bcf
2018-09-28 14:31:36 +03:00
Renamed from modules/opensimplex/simplex_noise.cpp (Browse further)