58 Commits

Author SHA1 Message Date
Marc Gilleron
a9476227cb Namespaced Interval 2022-01-03 22:29:39 +00:00
Marc Gilleron
4259ea5b80 Namespaced VoxelGraphRuntime 2022-01-03 04:29:53 +00:00
Marc Gilleron
e68f59643b Namespaced VoxelGraphNodeDB 2022-01-03 03:55:44 +00:00
Marc Gilleron
922f361cb0 Made it compile in Godot 4
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00
Marc Gilleron
38ec2f43d1 Align program memory of VoxelGraphRuntime 2021-10-28 19:32:38 +01:00
Marc Gilleron
97f6765831 Fix memory leak in VoxelGraphRuntime (one leak per thread that ran any) 2021-10-26 20:41:28 +01:00
Marc Gilleron
62c807fa71 Fix graph not recompiling after changing a subresource 2021-09-22 20:28:17 +01:00
Marc Gilleron
411be94559 Renamed ArraySlice -> Span 2021-05-31 16:48:49 +01:00
Marc Gilleron
35de0883d2 Fix shadowing 2021-05-31 03:32:50 +01:00
Marc Gilleron
8975a93c9b Fixed bad buffer adresses when multiple outputs are used
This was mainly apparent when optimization was enabled.
It caused outputs to be left uninitialized and either work by chance
or provide the wrong values.
2021-05-31 00:05:42 +01:00
Marc Gilleron
80c2a0b702 Fix warning 2021-05-02 19:17:21 +01:00
Marc Gilleron
264b77ac21 Moved hardcoded output types outside the runtime.
For simplicity I chose to just give output nodes output ports,
like regular ones, and hide them in the editor.
It required to change a bit how output nodes are detected,
and backing output buffers are no longer required from callers.
This will allow to more easily implement custom outputs as well.
2021-05-02 01:22:44 +01:00
Marc Gilleron
32f9006b75 Added initial support for texture weights in graph generators (not optimal) 2021-04-30 22:04:38 +01:00
Marc Gilleron
05dda25245 Fix several bugs when the graph has no operations 2021-04-10 01:36:49 +01:00
Marc Gilleron
18f211822f Fix ignored buffers still being used when optimized execution map is used 2021-04-03 20:44:48 +01:00
Marc Gilleron
c38989f57b Unnecessary reference 2021-03-27 22:09:57 +00:00
Marc Gilleron
03bfc09e99 Implemented execution map to optimize out nodes locally
- Added optional optimization of execution map
- Added visualization of skipped nodes in the editor debug tool
2021-03-21 18:48:00 +00:00
Marc Gilleron
9188ae619b Optimized several range analysis functions
- square, cube and polynomials are more precise
- lerp() is more precise
- smooth union and subtract are more precise
- fallback on simple min/max if smoothness is zero
2021-03-17 18:11:00 +00:00
Marc Gilleron
826e104024 Added tool to inspect range analysis 2021-03-14 18:44:46 +00:00
Marc Gilleron
d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron
41600e4226 Fix shadowed variable 2021-01-18 22:20:57 +00:00
Marc Gilleron
67b1a2b86f Fixed image locking 2021-01-17 19:59:20 +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
7940b3b761 Made VoxelGeneratorGraph thread-safe 2021-01-16 13:51:01 +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
1bb3d19e03 Use buffers to generate previews 2021-01-09 18:35:53 +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
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
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
e462cd788a Optimized range analysis for images and spherical map lookups 2020-12-26 18:58:16 +00:00
Marc Gilleron
d009049d4f Added experimental functions to bake sphere maps from the generator
- The runtime API now works with float positions
- Fixed XZ optimization, cached positions were not assigned
2020-12-22 02:13:46 +00:00
Marc Gilleron
7c6bfe0dbc Added Normalize node to voxel graph 2020-12-21 20:06:20 +00:00
Marc Gilleron
ae9abb0248 Added SdfSphereHeightmap node to graph generator 2020-12-21 02:00:31 +00:00
Marc Gilleron
44a1af2043 Don't crash if graph resources are null 2020-10-26 19:58:54 +00:00
Marc Gilleron
b672013f00 Fix an occurrence of Variant uint64_t ambiguity for Mac builds 2020-10-25 20:27:09 +00:00
Marc Gilleron
d158a92f57 Show bounds and octrees of VoxelLodTerrain with debug drawing 2020-10-24 00:08:14 +01:00
Marc Gilleron
23ce65d789 Show terrain in editor, with option to turn it off. A scripted stream will turn it off by default. 2020-08-14 20:33:09 +01:00
Marc Gilleron
bc7ec0c966 Use last found SDF output and don't crash when there isn't any 2020-07-11 17:03:58 +01:00
Marc Gilleron
56aee87615 Added Select node to "conditionally" switch between two values 2020-07-11 17:03:09 +01:00
Marc Gilleron
0cac00e501 Fix preview nodes not working if they are the only output from their ancestor 2020-07-11 17:01:34 +01:00
Marc Gilleron
1cd0a491bb Fix graph not working if there is more than one terminal node (preview nodes) 2020-07-11 16:56:37 +01:00
Marc Gilleron
38aeb6959d Use C++ limits to be consistent with Interval 2020-07-11 03:24:32 +01:00