Commit Graph

426 Commits (3ec2275ffb09ec3d578da7e2c07fb87e5d28794c)

Author SHA1 Message Date
Cory Petkovsek 3b7dccefb2 Revert some castings 2019-06-22 22:14:27 +09:00
Cory Petkovsek 1dff1f3e50 Fix gdscript emerge bug 2019-06-18 18:53:32 +09:00
Cory Petkovsek f6a9c5761a Fix gcc sign comparison warnings 2019-06-18 14:24:56 +09:00
Cory Petkovsek 5ad555c439 Fix gcc multiline comments, uninitialized vars, unused vars warnings 2019-06-18 12:38:44 +09:00
Cory Petkovsek 0b854725f0 Fix gcc Wparentheses warnings 2019-06-18 12:13:44 +09:00
Cory Petkovsek 67bdcbd048 Gcc compiling fixes 2019-06-18 11:27:55 +09:00
Cory Petkovsek 2562aefc24 Fix voxel_name set/get bug 2019-06-14 17:36:58 +09:00
Marc Gilleron 3feb32e194 Fix a crash when a VoxelTerrain is created and deleted without ever entering the tree. Was caused by Godot creating dummy instances of VoxelTerrain just to call `get_property_list` when I open the inspector... 2019-06-02 02:30:22 +01:00
Marc Gilleron 5ecd449acc Fixed VXB saving so that it actually works for lod0-only terrain:
- Don't rely on ERR_FILE_NOT_FOUND, Godot never returns that from FileAccess...
- Fix LOD not used in block coordinates conversion
- Fix block size saved as u8 but read as u32 in meta file
- Fix block file path not being prepended directory path
- Fix negative coord block file path containing overflowed uint
- Fix VoxelDataLoader processor not being assigned block size in some cases
- Fix VoxelDataLoader not processing save requests properly
- Fix VoxelTerrain not actually sending save requests on destruction
2019-06-02 01:59:39 +01:00
Marc Gilleron 76d3dcf737 Added `dropped_count` to block thread manager stats 2019-06-02 01:57:19 +01:00
Marc Gilleron 439e5d9964 Fix sort heuristic being wrong on pending blocks surviving more than one thread_sync(), we really have to overwrite it 2019-06-02 01:54:17 +01:00
Marc Gilleron 6515ac2c94 Fix udiv(), negative values were giving wrong results 2019-06-02 01:46:41 +01:00
Marc Gilleron 94c5d5a78c Merge branch 'master' into persistence
# Conflicts:
#	voxel_buffer.h
2019-06-01 19:53:16 +01:00
Marc Gilleron 04bbfcd182 Fix VoxelStreamImage.channel property inconsistency 2019-05-30 00:46:08 +01:00
Marc Gilleron a36322842a Reorganize SCons script 2019-05-30 00:45:19 +01:00
Marc Gilleron f831d03cf5 Merge branch 'master' into persistence
# Conflicts:
#	terrain/voxel_data_loader.cpp
2019-05-28 01:17:28 +01:00
Marc Gilleron 2c81db52f8 Rename remaining occurences of "provider" => stream 2019-05-28 01:10:50 +01:00
Marc Gilleron 82502d3397 Simple file-per-block saving WIP. Compiles but didn't test. 2019-05-28 00:40:09 +01:00
Marc Gilleron 4a90ca10a5 Rename "provider" files to "stream" 2019-05-25 16:16:03 +01:00
Marc Gilleron 2e1b13ffea Rename VoxelProvider* => VoxelStream* 2019-05-25 16:07:38 +01:00
Marc Gilleron 9d2c491fe9 Remove some comments 2019-05-25 15:53:36 +01:00
Marc Gilleron 2eb093e76b Rename VoxelBuffer.optimize() => compress_uniform_channels 2019-05-25 15:52:35 +01:00
Marc Gilleron 75cffa7d59 Rename VoxelBlock.pos => position 2019-05-25 15:50:01 +01:00
Marc Gilleron 15ae1b99ba Rename voxel_provider_thread.h => voxel_data_loader.h to match class name 2019-05-25 15:07:16 +01:00
Marc Gilleron d01b00a29b Renamed VoxelMesherDMC::OctreeMode => SimplifyMode 2019-05-25 15:00:22 +01:00
Marc Gilleron d15d54eb95 Renamed HermiteValue.value => sdf 2019-05-25 14:53:43 +01:00
Marc Gilleron cae44985a8 Comments 2019-05-25 14:34:09 +01:00
Marc Gilleron 34653341cf Turn block loading duplicate rejection back on 2019-05-25 14:31:01 +01:00
Marc Gilleron 5a7d0b6f1b Added optional code to debug-draw unexpected block drops 2019-05-20 20:49:46 +01:00
Marc Gilleron d8cab2d32b Use generic block manager for loading and fix bugs:
- VoxelProviderThread is now VoxelDataLoader and uses generic block manager
- Fixed threads locking up, input mutex was not always unlocked due to for loop exiting early
- Fixed blocks failing to load, region rejection was using invalid pointer
- Fixed block shifting in region rejection, was replacing wrong index in `block_indexes`
- Fixed block region rejection missing blocks, was not stepping back the loop after shifting blocks
- Added output message to notify of block rejection
2019-05-20 20:48:58 +01:00
Marc Gilleron ceb7f47fa1 Don't bother calling `remove_positions_outside_box`, it's not doing anything currently 2019-05-20 20:34:41 +01:00
Marc Gilleron 2b3b3e9488 Take lod factor into account for view direction in the block sorting heuristic 2019-05-20 20:30:08 +01:00
Marc Gilleron e242950cb2 Increased a bit marching squares skirts threshold 2019-05-20 20:25:52 +01:00
Marc Gilleron e47afabe49 Sort blocks using a heuristic, take look direction into account 2019-05-19 21:04:26 +01:00
Marc Gilleron b9add5d671 Allow more than one thread for mesh updates, also made it generic 2019-05-19 18:27:49 +01:00
Marc Gilleron 38062b32fe Code style 2019-05-19 18:24:03 +01:00
Marc Gilleron d5236239bf Added sort time to provider stats 2019-05-16 23:05:06 +01:00
Marc Gilleron efe58f1af6 Added exclusive area parameter to block processors so they can remove blocks from their queue 2019-05-12 16:33:25 +01:00
Marc Gilleron 561f95a506 Added stats for dropped block loads and meshs 2019-05-12 16:30:45 +01:00
Marc Gilleron 8126d732b6 Fix block processors' sorting function 2019-05-12 16:19:08 +01:00
Marc Gilleron 1065aa40ef Useless comment 2019-05-12 16:17:57 +01:00
Marc Gilleron 960236b155 Remove commented function I never used 2019-05-12 16:17:43 +01:00
Marc Gilleron 017f64ddb9 Optimized VoxelProviderNoise with a noise buffer so it does less OpenSimplex calculations 2019-05-11 17:42:56 +01:00
Marc Gilleron a521501add Move both meshing and loading sheduling to LodOctree polling 2019-05-10 18:56:48 +01:00
Marc Gilleron 29298958e7 Fix mistake in previous commit about missing binding argument 2019-05-10 00:57:09 +01:00
Marc Gilleron 255acbb739 Remove wrong CRASH_COND, also use get/setters for VoxelBlock properties 2019-05-09 22:00:54 +01:00
Marc Gilleron 96183e0c51 Fix missing argument in voxel/block conversion functions 2019-05-09 21:59:03 +01:00
Marc Gilleron 81eeb48ac6 Reduce amount of marching squares generated as skirts 2019-05-09 19:11:40 +01:00
Marc Gilleron cf7ece7a58 Remove BlockState and replace it with loading_blocks set and enum inside VoxelBlock 2019-05-09 19:11:17 +01:00
Marc Gilleron 73d5d9993c Load blocks on demand instead of speculatively, it's faster 2019-05-08 20:53:51 +01:00