Marc Gilleron
dff7386186
Moved conversions to conv.h
2022-05-07 20:34:06 +01:00
Marc Gilleron
adbfd3b584
floor_to_int
to emphasize the return value converts to int
2022-05-02 14:49:40 +01:00
Marc Gilleron
a5e429de6f
Moved some Vector3i function specializations to math:: namespace
2022-04-29 23:25:37 +01:00
Marc Gilleron
4e3d4d4ed8
Threading classes wrappers
2022-04-19 00:32:37 +01:00
Marc Gilleron
8aec9cf777
VoxelBufferInternal doesnt depend on Image
2022-04-16 16:07:45 +01:00
Marc Gilleron
3f9faad0cd
Remove unnecessary TTR, it's not a message printed in an editor dialog
2022-04-16 15:25:11 +01:00
Marc Gilleron
54c10d4902
Fix signedness warning
2022-04-16 02:26:32 +01:00
Marc Gilleron
fcab8aab6f
Fix unused variable warnings
2022-04-16 02:25:13 +01:00
Marc Gilleron
0ebf8f764e
Use UniquePtr
2022-04-14 23:35:26 +01:00
Marc Gilleron
9fef29442f
Use STL containers
2022-04-14 22:32:34 +01:00
Marc Gilleron
bfa24402ac
Renamed util/funcs.h => container_funcs.h
2022-04-14 21:43:45 +01:00
Marc Gilleron
87d98e9162
Engine-agnostic error macros
2022-04-11 02:10:44 +01:00
Marc Gilleron
0cc3801655
Define smart pointers default allocator in a single place
2022-04-10 20:10:33 +01:00
Marc Gilleron
a3e3140cd9
Fix missing header
2022-04-10 16:31:31 +01:00
Marc Gilleron
19a69b059e
VoxelInstancer supports VoxelTerrain, although Godot 4 multimeshes are buggy
...
See https://github.com/godotengine/godot/issues/56357
2022-04-09 20:40:03 +01:00
Marc Gilleron
219c7bfda3
Changed prefix of profiling macros
2022-04-09 15:33:08 +01:00
Marc Gilleron
adb2cd2fe9
Return a ref, pointer must not be null
2022-04-09 15:15:22 +01:00
Marc Gilleron
ab5d3a22d3
Abstract logging for verbose print
2022-04-09 15:00:34 +01:00
Marc Gilleron
ca83c720ff
Return reference, pointer must not be null
2022-04-08 23:54:04 +01:00
Marc Gilleron
7517ec9a10
Merge branch 'expression_node'
...
# Conflicts:
# server/load_all_blocks_data_task.cpp
2022-04-07 20:18:20 +01:00
Marc Gilleron
c4dddaa528
Remove unused function, use & references instead of Ref<T>
2022-04-07 19:44:29 +01:00
Marc Gilleron
5519054c01
Unify macro prefixes
2022-04-06 23:26:54 +01:00
Marc Gilleron
15bf2a6980
One more unused variable
2022-04-06 01:37:47 +01:00
Marc Gilleron
c9aa295b03
Fix unused variables
2022-04-06 01:31:51 +01:00
Marc Gilleron
e0008d3335
Fix compilation now Godot comes with its own FastNoiseLite.
...
The version shipped with the module is now prefixed.
Removed usages of OpenSimplexNoise.
2022-04-03 20:07:17 +01:00
Marc Gilleron
ee64ce28cb
Remove redundant pre-declaration
2022-03-31 22:49:25 +01:00
Marc Gilleron
61b27491f9
Initial implementation of binary search in Transvoxel.
...
It is very slow but seems to be working. It affines vertex positions,
but normals are not improved. Maybe more work will be done in the future
if that technique becomes more relevant.
Partly based on a prior experiment:
11f716f79d0ade59c0e9547a2333183e96b17b43
2022-03-27 21:36:30 +01:00
Marc Gilleron
297e2b3f92
Changing a material now updates existing meshes instead of only new ones (VoxelTerrain only)
2022-03-26 22:28:18 +00:00
Marc Gilleron
d2120155ab
Don't update octrees every frame.
...
- Update when some nodes did not finish subdividing
- Update when viewer position changes by a large enough distance
- Update when LOD settings change
- Update when the terrain is reset
2022-03-26 15:59:03 +00:00
Marc Gilleron
3c1e4e2ab3
Reverted prefetch as the current code doesn't support editing LOD0 if upper lods aren't loaded.
...
This part needs to be designed before we can do things like that.
2022-03-24 00:25:51 +00:00
Marc Gilleron
3d747f6525
Schedule tasks in batches to reduce locking when many are sent
2022-03-22 20:51:56 +00:00
Marc Gilleron
8db923a75f
Added experimental octree pre-fetching to speedup initial loading.
...
Unfortunately, the major bottleneck remains tasks on the main thread.
2022-03-22 19:37:00 +00:00
Marc Gilleron
f53856f2c3
Made LodOctree update recursively.
...
If subdivision conditions are fulfilled, it no longer needs to be
updated several times to reach its target shape.
2022-03-22 19:35:52 +00:00
Marc Gilleron
c8a15602bb
Removed unused variable
2022-03-20 23:13:07 +00:00
Marc Gilleron
8d8d8b336d
Moved VoxelLodTerrain and VoxelTerrain stuff to their own folders
2022-03-20 22:57:53 +00:00
Marc Gilleron
f764fe7f1a
Switch to unordered_map
2022-03-20 22:32:33 +00:00
Marc Gilleron
e96f9ff562
Separate mesh block classes to remove unnecessary data in each
...
# Conflicts:
# terrain/voxel_lod_terrain.cpp
2022-03-20 22:04:53 +00:00
Marc Gilleron
ee60e0556e
Fix mesh blocks created by edition not visible
2022-03-20 22:03:19 +00:00
Marc Gilleron
cef16f670a
Use refs in VoxelDataBlock iteration, no null should be found
2022-03-20 19:28:50 +00:00
Marc Gilleron
d6203a917a
Use refs in VoxelMeshBlock iteration, no null should be found
2022-03-20 19:16:58 +00:00
Marc Gilleron
99e688e52c
Detect and log an error when a script tries to set the same data block on different positions
2022-03-20 18:47:51 +00:00
Marc Gilleron
669e5230ed
Update VoxelLodTerrain stats
2022-03-20 18:30:18 +00:00
Marc Gilleron
3c3822b019
Fix warning method name
2022-03-20 14:49:46 +00:00
Marc Gilleron
bf946db0ef
Fix setting mesher and stream of VoxelLodTerrain
2022-03-19 22:43:57 +00:00
Marc Gilleron
7964887aef
Fix iterator
2022-03-19 20:56:13 +00:00
Marc Gilleron
e99ffd64ea
Fix required typename
2022-03-19 20:22:35 +00:00
Marc Gilleron
79b1ebdaa0
Fix invalid member
2022-03-19 20:11:39 +00:00
Marc Gilleron
48670d9a8e
Separate mesh map data structures between updating and final
2022-03-19 19:43:33 +00:00
Marc Gilleron
775300c0f4
Remove old code
2022-03-19 19:39:39 +00:00
Marc Gilleron
a5d0f16430
Rename _on_data_block_enter => _on_data_block_entered
2022-03-19 19:39:24 +00:00