Commit Graph

126 Commits (43588cae17aadc65ba01fe915a3c8c2f25b01949)

Author SHA1 Message Date
Marc Gilleron 76ec90fe34 Moved constants and tables under a folder 2021-02-21 23:58:00 +00:00
Marc Gilleron 71384e25bc Moved sdf functions to their own file 2021-02-21 18:18:01 +00:00
Marc Gilleron 8b2278a2d6 Profiling scopes 2021-02-20 00:36:26 +00:00
Marc Gilleron f1e2ea9ad4 Update to latest Godot's threading primitives 2021-02-19 01:30:22 +00:00
Marc Gilleron 6208699281 Added smooth union and subtraction 2021-02-18 23:29:00 +00:00
Marc Gilleron fa2efcf75a Fix missing bindings 2021-02-18 21:17:52 +00:00
Marc Gilleron d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron 0b4363135a Fix shadowed vars 2021-02-01 23:55:31 +00:00
Marc Gilleron 84181a9560 Implement buffer processing on sphere map functions 2021-02-01 23:40:17 +00:00
Marc Gilleron 7682e8fbcc Comments 2021-01-30 01:39:28 +00:00
Marc Gilleron 55a38957b5 Added SDF scale to VoxelTool. Default value should work best with default bit depth. 2021-01-24 13:54:38 +00:00
Marc Gilleron 5e6c034e94 Don't compile on duplicate 2021-01-23 23:00:26 +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 24c2d88e8e Comments 2021-01-18 18:47:37 +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 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 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 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 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
Marc Gilleron dafb4f39ff First WIP to try per-buffer processing instead of per-voxel 2021-01-04 22:19:13 +00:00
Marc Gilleron 3364748fef Integrate FastNoiseLite to voxel graph generator 2021-01-03 20:23:45 +00:00
Marc Gilleron 3e31140ed8 Bind missing constant for the Normalize3D node 2021-01-02 00:58:01 +00:00
Marc Gilleron 394a123bb7 Fixed Clamp node, it was using parameters as adresses 2021-01-01 01:43:46 +00:00
Marc Gilleron d64340aa73 Small optimization in Remap node 2020-12-29 22:12:31 +00:00
Marc Gilleron edfc96e4a5 Fixed crash when hiding terrain while selected in editor 2020-12-27 15:51:03 +00:00
Marc Gilleron 57fac6c5b1 Fix GCC warning 2020-12-26 19:01:49 +00:00
Marc Gilleron e462cd788a Optimized range analysis for images and spherical map lookups 2020-12-26 18:58:16 +00:00
Marc Gilleron 9e423a58f7 Voxel graph optimizations:
- Dynamically adjust SDF scaling to reduce terracing caused by storage resolution
- Optimize range analysis more aggressively
2020-12-24 23:16:34 +00:00