Commit Graph

85 Commits (7aa33267a8874385728f38b442615400a7ce3877)

Author SHA1 Message Date
Marc Gilleron 0ac1b7e6dc Moved edition-related classes to a sub-folder 2020-01-26 20:29:44 +00:00
Marc Gilleron a751b0ca63 Fix edited block producing a hole when going away from it 2020-01-23 23:20:23 +00:00
Marc Gilleron 73491cd1ff Fix LOD getting stuck if you teleport far away
Now the octree is always allowed to merge nodes even if the parent block isn't available.
Also removed unused userdata from LodOctree::Node,
merged callbacks into one struct,
removed some old debug code
2020-01-23 00:37:13 +00:00
Marc Gilleron e76e4d2b49 Fix bad discarding code when block management threads are told to exit
In short, std::remove_if does NOT remove anything
2020-01-19 18:13:00 +00:00
Marc Gilleron c493aec343 Use StringNames when applicable 2020-01-17 20:43:28 +00:00
Marc Gilleron 0b4860b40d Use MAX_LOD global constant 2020-01-15 21:40:35 +00:00
Marc Gilleron 87afb8f96c Fix split scale not being clamped properly. Also reorganized debug functions a bit 2020-01-15 21:04:23 +00:00
Marc Gilleron 9e87a522d7 Merge branch 'visibility_as_being_in_world' 2020-01-09 23:46:59 +00:00
Marc Gilleron 9dc09618be ZProfiler is now usable from anywhere including threads 2020-01-07 20:32:36 +00:00
Marc Gilleron badf3876c3 When a block is not visible, remove it from world instead 2020-01-07 02:04:24 +00:00
Marc Gilleron 051034fc51 Improve transition mask calculation on world borders.
It fixes a case where a block at world border would remain with
a transition mask of 0 when a neighbor block of lower LOD becomes visible.
Now a block side bordered by an empty area will assume transition.
2020-01-07 00:22:58 +00:00
Marc Gilleron dacd18b772 Added function to debug pointed blocks 2020-01-05 23:27:43 +00:00
Marc Gilleron 462e453cf4 Fix thin cracks caused by pooled material params not being reset when reused 2020-01-05 04:57:40 +00:00
Marc Gilleron a11a95bcce Renamed CHANNEL_ISOLEVEL => CHANNEL_SDF 2020-01-02 21:03:44 +00:00
Marc Gilleron d8677cd663 Fix heavy stuttering caused by ShaderMaterial 2020-01-02 20:29:40 +00:00
Marc Gilleron 31f588c1a1 Add profiling scopes to VoxelLodTerrain, also fix usage in VoxelStream 2020-01-02 20:29:02 +00:00
Marc Gilleron ebc6be35d1 Implement LOD transitions in VoxelLodTerrain
- VoxelBlock contains 6 optional transition meshes
- VoxelLodTerrain calculates transition masks when block visibility changes
- VoxelMesher can now specify different min and max paddings
- Fix Cube::SIDE_POSITIVE/NEGATIVE_X/Y/Z enum not matching Cube::g_side_normals
- Convert transition masks to make up for the Cube:: inconsistency for now
2019-12-31 16:48:46 +00:00
Marc Gilleron a9952179a7 Transition meshes WIP and bug fixes
- Allow meshers to specify compression flags
- Use uncompressed COLOR to fit extra vertex data for transition meshes
- Simplify a few interpolations
- Fix a few buffer overruns which were not detected by the debugger
- Use array wrappers to better detect overrun mistakes
2019-12-26 20:29:55 +00:00
Cory Petkovsek 9a06cdd3ef Fix mono build warnings 2019-10-04 02:17:44 +08:00
Marc Gilleron 2b15ca6457 Remove `for_all_blocks` from header, it causes compilation error due to `map` not being fully defined. Move logic to .cpp file to keep it forward-declared. 2019-10-03 18:55:13 +01:00
Marc Gilleron 13e909fb0d Remove old comment 2019-09-08 19:49:33 +01:00
Marc Gilleron 1680516ea0 Optimize LOD propagation a bit 2019-09-07 22:59:09 +01:00
Marc Gilleron b687909806 Save modified blocks, remove some debug code 2019-09-07 21:19:12 +01:00
Marc Gilleron 17c6b1f557 Fixed and tweaked a bunch of things, first working editing with LOD 2019-09-06 23:24:56 +01:00
Marc Gilleron b284541219 Cleanup includes 2019-09-05 19:43:25 +01:00
Marc Gilleron bee83ecbe9 Merge branch 'master' into lod_editing 2019-09-05 02:24:41 +01:00
Marc Gilleron 4ab688c9be Barebones edition, untested WIP 2019-09-05 02:24:16 +01:00
Marc Gilleron fec6e624f6 Tweaked octree region loading to better center it on the viewer 2019-09-04 20:59:08 +01:00
Marc Gilleron 1ad71c5d9c Fix VoxelLodTerrain view distance property, it was using inconsistent type in getter and setter 2019-09-03 22:56:57 +01:00
Marc Gilleron f8a3cd0503 Implement `get_view_distance()` properly 2019-09-02 21:32:05 +01:00
Marc Gilleron a24e6d1b5a Use Rect3i::difference, remove check_cell_enters_and_exits for clarity 2019-09-02 20:08:33 +01:00
Marc Gilleron ff51d83e55 Use better algorithm for blocks falling out of range 2019-09-02 00:45:20 +01:00
Marc Gilleron aad7ecf9a6 Make octree region work under a bit more kinds of runtime changes 2019-09-02 00:44:28 +01:00
Marc Gilleron ebe91427c3 #ifdef out debug boxes 2019-09-01 22:52:38 +01:00
Marc Gilleron 8060978126 Some cleanup 2019-09-01 21:49:58 +01:00
Marc Gilleron 98299f2b3c Optimize octree further by taking out children pointers. Nodes are only 5 bytes now. 2019-09-01 21:07:38 +01:00
Marc Gilleron 0ee054dc3c Took out position from octree nodes 2019-09-01 17:11:28 +01:00
Marc Gilleron bd10e89dea Implement proper box difference 2019-09-01 16:10:01 +01:00
Marc Gilleron 6369985b74 Fix problems with MinGW 2019-09-01 01:47:45 +01:00
Marc Gilleron d0275b29ee Apply split_scale to newly created octrees 2019-08-31 21:47:00 +01:00
Marc Gilleron 0e6d3873c7 Properly implement hiding of the terrain node, for LOD it was showing all blocks of all LODs at once 2019-08-31 21:46:40 +01:00
Marc Gilleron 8574655c18 Re-enabled request dropping through exclusive region, except for last lod 2019-08-30 01:08:06 +01:00
Marc Gilleron 6a540a8720 Remove old code 2019-08-30 00:04:20 +01:00
Marc Gilleron eb01f99c2c First WIP at paging LOD 2019-08-29 22:55:02 +01:00
Marc Gilleron d4ed6372b7 Optimize collision shapes, doubles build speed 2019-08-25 22:59:55 +01:00
Marc Gilleron 8fc1e40230 Line up statistics variable names 2019-08-25 18:47:43 +01:00
Marc Gilleron a0c7201fcd Rename `get_stats()` => `get_statistics()` 2019-08-25 17:40:19 +01:00
Marc Gilleron c13c0fbf20 Fix `remaining_main_thread_blocks` stat, it wasn't reported 2019-08-25 17:23:25 +01:00
Marc Gilleron 4ec82928b4 Remove redundant VoxelTerrain::BlockDirtyState 2019-08-25 15:14:10 +01:00
Marc Gilleron 4ff5f91e6f Add optional physics collision through node-less static bodies 2019-08-25 13:04:49 +01:00