Marc Gilleron
c13303b464
Fix material properties were listing unsupported types
2022-07-16 17:37:22 +01:00
Marc Gilleron
e7018dd0ef
Unused variable
2022-07-10 22:53:19 +01:00
Marc Gilleron
173ee3e198
Fix variable shadowing
2022-07-10 22:53:08 +01:00
Marc Gilleron
6327b31320
Improved LOD fading
...
- Cracks no longer appear at seams when transitions change
- Fading is no longer applied to blocks behind the camera
2022-07-10 16:57:09 +01:00
Marc Gilleron
f0da2d041e
Fixed lod_fade_duration
property was not accepting decimal numbers
2022-07-10 16:46:10 +01:00
Marc Gilleron
d7a2e4e5c5
Don't crash when a generator is assigned but no mesher
2022-07-04 20:14:49 +01:00
Marc Gilleron
e6ffc0ad77
Assign collision hint for VoxelLodTerrain mesh requests.
...
That wasn't required so far, but is for correctness.
2022-07-03 21:36:07 +01:00
Marc Gilleron
cc967105b2
apply_result
is optional
2022-07-03 21:13:56 +01:00
Marc Gilleron
ec24204ecc
Add override specifiers
2022-07-03 03:39:50 +01:00
Marc Gilleron
5321b0dc68
Fixed shapes not built properly when deferred collision is enabled
2022-07-03 03:26:31 +01:00
Marc Gilleron
dac0af3a04
Build mesh resource on the task thread now the Vulkan renderer supports it
2022-07-02 23:01:49 +01:00
Marc Gilleron
2b94c2968d
Missing return value in release builds
2022-06-26 19:51:18 +01:00
Marc Gilleron
01ce2e4fbd
Unused function
2022-06-26 19:33:00 +01:00
Marc Gilleron
a4722c4b12
Merge branch 'master' into transition_mesh_tweaks
2022-06-26 18:45:51 +01:00
Marc Gilleron
d9b74359f8
Provide a default material for VoxelMesherTransvoxel with variable-lod
2022-06-26 17:21:05 +01:00
Marc Gilleron
5a05854fde
Update include guards
2022-06-26 17:20:21 +01:00
Marc Gilleron
eaa40876b8
Don't generate transition meshes when VoxelMesherTransvoxel is used in a fixed-lod volume
2022-06-26 17:20:08 +01:00
Marc Gilleron
a7934b9e2c
Exposed debug drawing options on VoxelLodTerrain
2022-06-26 14:04:12 +01:00
Marc Gilleron
fd59ed7d2a
Fix unused variable
2022-06-26 01:00:48 +01:00
Marc Gilleron
8ee5d8f57f
Fix warning about shadowing
2022-06-26 01:00:40 +01:00
Marc Gilleron
c072ff4db5
Fix GCC warning about shadowing a previous local
2022-06-26 01:00:23 +01:00
Marc Gilleron
90a03d29e7
Added debug viewing of edit boxes (not exposed yet)
2022-06-26 00:34:43 +01:00
Marc Gilleron
392c335956
Fix crashing/not working edition in VoxelLodTerrain
2022-06-25 22:48:39 +01:00
Marc Gilleron
ff082c5f2b
Undo deferred transition mesh tasks, superseded by combined transitions
2022-06-25 20:44:41 +01:00
Marc Gilleron
ce91b3890c
Combine regular and transition meshes together.
...
- Less draw calls
- Much faster rendering updates (about 5x),
although colliders are still the biggest bottleneck so when collision is
enabled this improvement isn't noticeable
- A shader is now always required to render Transvoxel properly.
TODO: integrate a default one when no material is assigned?
2022-06-25 16:47:09 +01:00
Marc Gilleron
c7d8c2557c
Attempting to give priority to main mesh building over transition meshes.
...
This effectively creates them after ALL main meshes have been built,
resulting in a seemingly faster convergence of LOD, however when moving
around it causes some cracks to appear briefly. This can be bad if the
terrain is dark and the underlying skybox is bright. Might need to be
optional, or find a different approach.
2022-06-22 22:05:25 +01:00
Marc Gilleron
65e31f181b
Comment about optimization
2022-06-20 19:50:03 +01:00
Marc Gilleron
fdd8ff3889
Fix data block loading when no stream is assigned
2022-06-19 20:23:40 +01:00
Marc Gilleron
86ba74ce3a
Some changes and fixes related modifiers
...
- VoxelLodTerrain no longer caches generated voxels by default, so
generating on the fly is no longer exclusive to full load mode.
Might add an option later, but not for now (VoxelTerrain is still
unaffected and keeps caching them)
- The "Cached" state is represented with blocks having no voxel data,
so it needs extra checks in some areas to avoid null access
- Fix generate task was not including modifiers after the base generator
- The "save_generator_output" option on streams now means such blocks are
considered edited
- Modifying modifiers now clears cached generated blocks
intersecting with them.
- Fix "re-generate" was erasing the internal stack of modifiers
- Added docs
2022-06-18 23:14:18 +01:00
Marc Gilleron
0e12e6dbf1
Initial WIP for SDF non-destructive voxel modifiers. Support is incomplete.
...
Some voxel queries and operations will not take modifiers into account.
It needs to be worked on, might involve some refactoring.
2022-06-09 20:35:29 +01:00
Marc Gilleron
1e1b6904f3
Small scope change
2022-06-09 20:11:50 +01:00
Marc Gilleron
34b17ad162
Default to not showing mesh updates
2022-06-06 21:54:40 +01:00
Marc Gilleron
177d7a99c9
Added basic stack tracking for memory pool allocations
2022-06-06 21:54:20 +01:00
Marc Gilleron
2098ca36d9
Added debug gizmos to see mesh updates
2022-06-05 23:26:17 +01:00
Marc Gilleron
abdcb4c7d5
Storing position on VoxelDataBlock isn't necessary
2022-06-04 02:44:00 +01:00
Marc Gilleron
f34d87d305
Simplified data VoxelDataMap structure
2022-06-04 02:23:56 +01:00
Marc Gilleron
6ab6f4a8b6
Unnecessary includes
2022-06-03 19:02:03 +01:00
Marc Gilleron
2ce4b92225
Fix changing mesh size not remeshing the terrain
2022-06-03 18:30:42 +01:00
Marc Gilleron
1cb030ede6
Fix 32-voxel mesh block size in VoxelLodTerrain
2022-05-23 21:13:21 +01:00
Marc Gilleron
6fd56e2054
Removed intermediate struct
2022-05-22 22:00:21 +01:00
Marc Gilleron
863c9a81b6
Unused enum
2022-05-22 21:20:54 +01:00
Marc Gilleron
b9c9b2bcee
Schedule tasks more directly, remove VoxelServer data copies
2022-05-22 00:18:58 +01:00
Marc Gilleron
f899ae8fbb
Added option to show octree grid in editor, now off by default
2022-05-21 22:00:01 +01:00
Marc Gilleron
4f862722ae
Removed usages of Map
2022-05-17 19:44:58 +01:00
Marc Gilleron
12862a46d0
Changes to blocky materials
...
- They are now defined in each model
- VoxelTerrain no longer has material slots, except for a global override
- Models can have up to 2 materials instead of only one
2022-05-16 22:55:06 +01:00
Marc Gilleron
aad2f0df2d
Fix transition meshes not removed from the world
2022-05-16 22:07:57 +01:00
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