Commit Graph

1021 Commits (2c6eb114b220d81348163c9cbe3385bd03887513)

Author SHA1 Message Date
Marc Gilleron 8a0d2983c4 Update readme with new docs 2021-01-21 19:04:28 +00:00
Marc Gilleron dc7550114f Fix typo in .md link 2021-01-21 01:23:50 +00:00
Marc Gilleron aff0844812 Add readthedocs file 2021-01-21 00:44:02 +00:00
Marc Gilleron 1bb6eb79fa New documentation (some things left to do but most of it is updated) 2021-01-21 00:37:01 +00:00
Marc Gilleron 8bdd862262 Fix ambiguous type deduction 2021-01-18 22:45:41 +00:00
Marc Gilleron fc51984f7f Use unsigned integer to fix signed/unsigned comparison warnings 2021-01-18 22:21:44 +00:00
Marc Gilleron 41600e4226 Fix shadowed variable 2021-01-18 22:20:57 +00:00
Marc Gilleron 89d1979a73 Remove forgotten locks 2021-01-18 22:20:19 +00:00
Marc Gilleron 493dbf26dd Fix use of enum returns instead of boolean 2021-01-18 19:42:28 +00:00
Marc Gilleron 68a8acac73 Updated code guidelines 2021-01-18 18:58:41 +00:00
Marc Gilleron 23765f7c20 Merge branch 'master' into multithreaded_generators 2021-01-18 18:55:18 +00:00
Marc Gilleron e6e7fb8b70 Update changelog 2021-01-18 18:55:12 +00:00
Marc Gilleron 699aeeac90 Added RonanZe 2021-01-18 18:53:55 +00:00
Marc Gilleron 24c2d88e8e Comments 2021-01-18 18:47:37 +00:00
Marc Gilleron 46d1b78724 Added region file debug checks 2021-01-17 22:22:42 +00:00
Marc Gilleron 3a0ebc73a7 Request saving of generated blocks if the option is enabled in VoxelStream 2021-01-17 22:22:10 +00:00
Marc Gilleron a3bad1af64 Register `VoxelToolBuffer` because otherwise it gets initialized lazily, causing crashes in threads 2021-01-17 22:18:41 +00:00
Marc Gilleron fcd9284edf Fix SphereHeightmap node 2021-01-17 20:02:40 +00:00
Marc Gilleron f54b152e2d Reduce locking of VoxelGeneratorGraph.
Generation hold its own shared pointer. If the user recompiles the graph,
the runtime is replaced with a new one, while the generator can finish
its current block with the old runtime without locking.
2021-01-17 20:02:06 +00:00
Marc Gilleron 67b1a2b86f Fixed image locking 2021-01-17 19:59:20 +00:00
Marc Gilleron 6075476fd8 Fix wrong variable, caused null access 2021-01-17 18:27:38 +00:00
Marc Gilleron a90e520416 Formatting 2021-01-17 17:23:49 +00:00
Marc Gilleron 4ec60074bb Refactor generators and streams
- VoxelGenerator no longer inherit VoxelStream
- VoxelStream is now more focused on files
- Nodes have separate stream and generator properties
- Generators use 2 dedicated threads instead of sharing a single one with streams
- TODO Image.lock() is problematic for multithreading
- TODO Voxel graph can cause RWLock contention if edited while it runs
- TODO Saving generator output no longer works, need to put it back
2021-01-17 17:18:05 +00:00
Marc Gilleron fb1442e444 Fix constants not reset between two prepares, caused broken terrain after changing the generator 2021-01-17 16:58:56 +00:00
Marc Gilleron aca2c2cb94 Fix missing RWLock creation in VoxelGeneratorWaves 2021-01-16 23:19:54 +00:00
Marc Gilleron 7940b3b761 Made VoxelGeneratorGraph thread-safe 2021-01-16 13:51:01 +00:00
Marc Gilleron a0941cea83 Made all simple generators thread-safe 2021-01-16 13:41:46 +00:00
Marc Gilleron 082cdf3e16 Allow ArraySlices to be empty 2021-01-16 13:37:41 +00:00
Marc Gilleron 89750a20f8 Made file streams thread-safe (but still won't be used in more than one thread)
- Added a global file locker so threads can synchronize when accessing files
- Added mutexes to serialize access to file streams (i.e to call in series)
- VoxelStream API now expects implementations to be thread-safe
- Did some logic/data separation in RegionFile in case we need an
  in-memory implementation, however I might just use SQLite in the
  future instead
2021-01-16 13:34:45 +00:00
Marc Gilleron 94810f4d04 Rename statistic property back to its old name, I think it didnt need to change 2021-01-16 13:05:50 +00:00
Marc Gilleron 029e364007 Update changelog 2021-01-16 13:00:55 +00:00
Marc Gilleron 66141be0b3 Fix one more GCC warning 2021-01-09 20:33:39 +00:00
Marc Gilleron a96a377953 Fix reference to temporary I guess, detected by GCC only 2021-01-09 20:23:51 +00:00
Marc Gilleron 22bd0d5091 Fix shadowing issue, also inlined function used in only one place 2021-01-09 20:22:37 +00:00
Marc Gilleron 93b4e6803a Remove unused variables 2021-01-09 20:21:51 +00:00
Marc Gilleron 3a7f99643d Fix more signed/unsigned warnings 2021-01-09 20:21:09 +00:00
Marc Gilleron 4686735f00 Fix pseudo-shadowing detected by GCC 2021-01-09 19:51:58 +00:00
Marc Gilleron cf83aca282 Fix signed/unsigned comparisons 2021-01-09 19:49:11 +00:00
Marc Gilleron 494512a424 Fix initialization order 2021-01-09 19:34:03 +00:00
Marc Gilleron 348618d605 Fix wrong variable name 2021-01-09 19:33:48 +00:00
Marc Gilleron 1bb3d19e03 Use buffers to generate previews 2021-01-09 18:35:53 +00:00
Marc Gilleron b2ca66e714 Fix Smoothstep node, params were not initialized 2021-01-09 16:36:09 +00:00
Marc Gilleron 973cf729cd Added FastNoise2 for SIMD noise, but it won't be integrated yet.
It requires C++17, while Godot uses C++14. I was unable to override it,
and I'm not sure how compatible this will be with the runtime.
At least this would be doable in Godot 4.
2021-01-09 16:35:40 +00:00
Marc Gilleron 1e95374ccb The graph runtime now suports arbitrary position buffers, instead of an XZ rectangle 2021-01-08 21:04:49 +00:00
Marc Gilleron 04c1d61cd2 Quick cleanup, also patch preview nodes 2021-01-07 23:36:14 +00:00
Marc Gilleron e00ed9b538 Move all node logic to function pointers, each combined into one place 2021-01-07 22:19:06 +00:00
Marc Gilleron 2cfa46bf0d Removed wrong bound estimation for value cubic noise, it caused rare but ugly gliches in the terrain 2021-01-07 21:02:24 +00:00
Marc Gilleron 4a290f27c0 Removed bounds support, it not really relevant anymore 2021-01-05 22:24:13 +00:00
Marc Gilleron 825fa4147b Main graph generator now uses buffers for blocks 2021-01-05 18:59:52 +00:00
Marc Gilleron 15fe9ecdeb Fix Wrong position buffer when stride is 1 2021-01-05 18:57:30 +00:00