Commit Graph

188 Commits (0bf72badbd3f129e6472c81f0ec5a4c0f5f19835)

Author SHA1 Message Date
Marc Gilleron 03d3016ecf Remove some pre-set resource properties to fix a Godot4 warning (sorry) 2021-12-16 01:30:31 +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 380e295d94 Merge branch 'master' into full_load_mode
# Conflicts:
#	meshers/transvoxel/transvoxel.h
#	server/voxel_server.cpp
#	terrain/voxel_lod_terrain.cpp
2021-12-11 22:59:24 +00:00
Marc Gilleron d5a69003c3 Add missing classes and run doctool (doctool has issues though)
VoxelGeneratorHeightmap.height_range is wrong in the doc.
VoxelTool lost all default values in doc.
These are likely Godot bugs...
2021-11-06 02:04:16 +00:00
Marc Gilleron ca7ac42cde Merge branch 'master' into full_load_mode
# Conflicts:
#	edition/voxel_tool_lod_terrain.cpp
#	generators/graph/voxel_generator_graph.cpp
#	terrain/voxel_lod_terrain.cpp
2021-10-31 16:17:27 +00:00
Marc Gilleron 6441d1b864 Deprecate Vector3i(Vector3) constructor, make conversions explicit
Some conversions were wrong/unintented.
This is also in prevision of using Godot 4 Vector3i,
which default behavior differs from this module.
2021-10-31 16:01:47 +00:00
Marc Gilleron 0fc9e6b313 Fix crash when given negative-size area 2021-10-29 18:25:52 +01: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 375c68b0de Merge branch 'master' into full_load_mode 2021-10-13 20:29:58 +01:00
Marc Gilleron a2096b2014 Fix heightmap generators when used with VoxelLodTerrain in blocky mode 2021-10-08 02:35:52 +01:00
Marc Gilleron e04091f3cb Added full load mode to VoxelLodTerrain
With this mode enabled, editing anywhere becomes possible.
All edited blocks are loaded at once when the stream is assigned.
The generator is used on the fly to fill the gaps, instead of being
pre-emptively cached only nearby the viewer to allow editing.
Editing is still on the main thread, so this can cause stalls if
the generator is complex. There is also no controlled limit on how
much data gets loaded, so if edited data is larger than RAM, it will
not be playable. The feature is already quite usable, but more work
may be done for wider viability.
2021-10-03 01:48:07 +01:00
Marc Gilleron 87f086b26e Fix enum comparisons 2021-09-26 17:21:44 +01:00
Marc Gilleron 30db0c5193 Split VoxelBuffer in two, script-facing wrapper and internal.
The internal is the main use within the voxel engine,
and does not inherit Reference.
2021-09-26 04:14:50 +01:00
Marc Gilleron b8f21f91fc Fix VoxelGeneratorGraph sub-resources not registered when duplicate() is used 2021-09-25 17:34:43 +01:00
Marc Gilleron 62c807fa71 Fix graph not recompiling after changing a subresource 2021-09-22 20:28:17 +01:00
Marc Gilleron 7f8eabe21f Don't change expected return value for generate() in scripts, until it is actually used 2021-09-21 19:18:59 +01:00
Marc Gilleron e602b9bffe Merge branch 'master' into octree_compression
# Conflicts:
#	tests/tests.cpp
2021-09-19 20:15:16 +01:00
Marc Gilleron 3cf2e92483 Optimized Curve range analysis by dividing it into monotonic sections 2021-09-19 18:20:54 +01:00
Marc Gilleron c9b1840e99 Added `max_lod_hint` return value to block generators 2021-09-16 20:33:45 +01:00
Marc Gilleron 968dd1fecd Make VoxelGeneratorNoise generate color 1 when told to use color channel 2021-08-07 23:06:52 +01:00
Marc Gilleron 5f84ceac39 Fix warning 2021-07-19 19:28:39 +01:00
Marc Gilleron 52aa4963ea Fixed some crashes occurring when giving invalid arguments to functions 2021-07-19 19:04:52 +01:00
Marc Gilleron b455fae34f Typo 2021-06-19 18:35:01 +01:00
Marc Gilleron b538a0beb8 Moved noise tests to tests folder 2021-06-19 18:34:50 +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 ee060176ab Fix initialization reordering, shadowing, signedness and unused vars 2021-05-31 02:29:21 +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 f943339f31 Researching tri-channel weights storage
- No changes made for now, but the code is there if we want to switch
- Renamed functions to be more explicit
2021-05-23 20:28:06 +01:00
Marc Gilleron 493579cefb Initialize voxel graph with default nodes when creating it in the editor 2021-05-03 01:04:04 +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 ee1169cc45 Merge branch 'master' into smooth_texturing 2021-04-30 22:15:27 +01:00
Marc Gilleron cc9e614b4a Fix Remap node 2021-04-30 22:07:26 +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 10683ccd15 Comments 2021-04-15 20:35:31 +01:00
Marc Gilleron 310386bde8 Merge branch 'master' into block_size_decoupling 2021-04-11 01:09:51 +01:00
Marc Gilleron 05dda25245 Fix several bugs when the graph has no operations 2021-04-10 01:36:49 +01:00
Marc Gilleron 2c6eb114b2 Fix order of SDF arguments 2021-04-07 00:05:38 +01:00
Marc Gilleron bcba1a8c0f Fix wrong condition in try_get_input 2021-04-07 00:05:00 +01:00
Marc Gilleron 0c830ded40 Fix wrong input used in sdf subtract node 2021-04-07 00:04:33 +01:00
Marc Gilleron 289da1d128 Add option to turn off XZ caching optimization 2021-04-03 21:39:22 +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 371b1edf2c Fix some shadowing GCC doesn't like 2021-03-27 21:51:39 +00:00
Marc Gilleron 7253308bf8 Remove unnecessary qualification 2021-03-27 19:48:33 +00:00
Marc Gilleron 29c5141dda Increase default clip threshold to reduce chance of artifacts 2021-03-27 16:39:21 +00:00
Marc Gilleron 5766bc8b94 Merge branch 'master' into lod_fade_v2
# Conflicts:
#	README.md
#	editor/about_window.cpp
2021-03-27 01:48:36 +00:00
Marc Gilleron 4e1442cb0b Added clipping debug option 2021-03-27 01:46:07 +00:00