627 Commits

Author SHA1 Message Date
Marc Gilleron
f5b54defab Missing enum bindings 2022-08-22 19:04:07 +01:00
Marc Gilleron
8449449745 Support setting a scene on multimesh instance items which is converted at runtime 2022-08-21 01:12:20 +01:00
Marc Gilleron
f8883966db Split Godot utilities in their own files 2022-08-20 18:25:23 +01:00
Marc Gilleron
d09380d918 Constify 2022-08-20 18:24:43 +01:00
Marc Gilleron
31a56f2c51 Fix default lod material not applied correctly 2022-08-19 21:33:52 +01:00
Marc Gilleron
a18ade364f Merge branch 'master' into smooth_normalmaps 2022-08-19 20:24:11 +01:00
Marc Gilleron
1eaf25680f Optimize ShaderMaterial allocations 2022-08-19 19:48:05 +01:00
Marc Gilleron
9cdaf1fd45 Switch to 2D textures instead of texture arrays due to layer count limitation 2022-08-18 21:29:09 +01:00
Marc Gilleron
a28a172763 Fix wrong block coordinate systems when computing normalmaps and a few other things 2022-08-17 22:23:13 +01:00
Marc Gilleron
4cbfaf3df7 Moved Shader helpers to their own file 2022-08-15 21:22:59 +01:00
Marc Gilleron
abc7653b88 Fixed wrong condition 2022-08-15 21:07:06 +01:00
Marc Gilleron
4034734c5c Workaround shader uniforms incorrectly reported as missing 2022-08-15 21:06:28 +01:00
Marc Gilleron
83d2facf13 Fix configuration warning formatting issues 2022-08-15 20:50:04 +01:00
Marc Gilleron
5943b1d549 Moved VirtualTextureOutput out of VoxelMesher 2022-08-14 22:34:27 +01:00
Marc Gilleron
92b3c25292 Moved distance_normalmaps to engine/ since it doesn't depend on meshers 2022-08-14 21:53:59 +01:00
Marc Gilleron
54ffc240ba Added basic UI to VoxelInstancer to see how many instances exist 2022-08-14 20:57:41 +01:00
Marc Gilleron
bab04748b3 Make normalmap baking more independent
- The baking code no longer depends on Transvoxel
- Moved usage out of the Transvoxel mesher, but still uses its fastpath
  for cells. There is still no "generic" path because there is no need yet.
- Moved settings on VoxelLodTerrain.
2022-08-14 19:15:55 +01:00
Marc Gilleron
a930a6ae11 Only update virtual textures if they are not updating already 2022-08-13 21:59:46 +01:00
Marc Gilleron
dbbab6a81d Separate normalmap baking from meshing, so meshes don't have to wait.
- The option for having it separate is hardcoded and both code paths still
  exist. Not sure if that will be exposed or removed entirely.
- Still need to limit the frequency at which normalmaps are updated
- Would be nice to make this mesher-independent,
  Transvoxel is just a fastpath
- Task priority might need improvement, it's a bit messy. Maybe use bands?
2022-08-13 16:40:46 +01:00
Marc Gilleron
4f5b0b6983 Added a bunch of configuration warnings related to shader 2022-08-10 20:02:36 +01:00
Marc Gilleron
2d2c9d7951 Comments 2022-08-09 23:50:38 +01:00
Marc Gilleron
d7994dfd4d More occurrences of shader_param renamed to shader_uniform 2022-08-07 23:43:26 +01:00
Marc Gilleron
d7642599c6 Merge branch 'master' into smooth_normalmaps 2022-08-07 23:32:37 +01:00
Marc Gilleron
a9752362cd shader_param occurrences were renamed shader_uniform 2022-08-07 23:31:20 +01:00
Marc Gilleron
af324c7d9f Added configuration warning when using distance normals with an incompatible generator 2022-08-07 17:58:38 +01:00
Marc Gilleron
c15ded67f6 Vary tile size with LOD and integrate to VoxelLodTerrain 2022-08-07 16:40:27 +01:00
Marc Gilleron
b1f4aee78b ResourceSaver::save arguments were swapped 2022-08-01 00:08:21 +01:00
Marc Gilleron
62ac840375 Fix release build 2022-07-24 14:25:40 +01:00
Marc Gilleron
970e81734d Make transform_cache thread-local instead of per instancer 2022-07-24 04:11:51 +01:00
Marc Gilleron
1f128a7803 Fix some issues with persistent instance positions
- Scene instances were not made relative to their block
- Saving a block while mesh size is 16 and loading it back while mesh size
  is increased to 32 should now work. Before, positions were saved
  relative to render block instead of data block, which forced to
  keep mesh and data sizes the same
- Fixed incorrect octant_index in save_block, Z shift was 1 instead of 2
2022-07-24 01:00:02 +01:00
Marc Gilleron
0e7fe5f4e3 Exposed debug draw methods on VoxelInstancer 2022-07-24 00:48:03 +01:00
Marc Gilleron
9cde2e94ac Bound check 2022-07-24 00:44:24 +01:00
Marc Gilleron
1c8ecc1b89 Fix debug drawing of edited data blocks showing non-edited data blocks 2022-07-23 00:05:25 +01:00
Marc Gilleron
01328fb905 Allow to configure debug draw while the terrain is not in the tree 2022-07-22 23:08:43 +01:00
Marc Gilleron
f77e570b68 Fix uninitialized channel variable in blocky editing 2022-07-18 21:14:02 +01:00
Marc Gilleron
7004ce5816 Auto-assign a mesher in editor for convenience 2022-07-17 20:24:49 +01:00
Marc Gilleron
5ca09d712e Renamed VoxelServer => VoxelEngine 2022-07-16 23:59:06 +01:00
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
bf6fe0acb7 Merge branch 'master' of https://github.com/Zylann/godot_voxel 2022-07-04 20:15:15 +01:00
Marc Gilleron
d7a2e4e5c5 Don't crash when a generator is assigned but no mesher 2022-07-04 20:14:49 +01:00
Aaron Franke
8dd25ce242
Make density calculation performed with doubles instead of 32-bit floats 2022-07-03 18:11:44 -05: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
06b3cbf20d Fix error spam when loading meshes in VoxelTerrain with material override 2022-07-02 23:02:38 +01:00