Commit Graph

42 Commits (0e48ee71a4fb72a4fcb20eb7ce099747afc4ae85)

Author SHA1 Message Date
Marc Gilleron 38baeae2d9 Namespaced VoxelBufferInternal 2022-01-08 22:49:59 +00:00
Marc Gilleron e20684ce69 Namespaced math funcs 2022-01-03 23:14:18 +00:00
Marc Gilleron 24e9e36434 Namespace SDF functions 2022-01-03 03:18:58 +00:00
Marc Gilleron 922f361cb0 Made it compile in Godot 4
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00
Marc Gilleron 6441d1b864 Deprecate Vector3i(Vector3) constructor, make conversions explicit
Some conversions were wrong/unintented.
This is also in prevision of using Godot 4 Vector3i,
which default behavior differs from this module.
2021-10-31 16:01:47 +00:00
Marc Gilleron 30db0c5193 Split VoxelBuffer in two, script-facing wrapper and internal.
The internal is the main use within the voxel engine,
and does not inherit Reference.
2021-09-26 04:14:50 +01:00
Marc Gilleron 979e5c9c47 VoxelTool.paste now only expects 0xffffffff to turn off masking.
Before it was 0xffffffffffffffff, which the GDScript parser no longer
accepts because it is greater than INT64_MAX.
In the future we may rework this API.
2021-09-24 02:09:58 +01:00
Marc Gilleron 2971334e85 Changed VoxelToolLodTerrain to use write_box
- Should be faster than get/set_voxel
- No longer expose internal data map
2021-09-17 20:01:15 +01:00
Marc Gilleron bd696b4caa Functions that should be const 2021-09-09 18:52:00 +01:00
Marc Gilleron df33a77f72 Unnecessary includes 2021-09-05 22:48:50 +01:00
Marc Gilleron 5fcd7f7363 Added mesh optimization option to Transvoxel, using MeshOptimizer 2021-07-11 16:19:49 +01:00
Marc Gilleron 1ee5bcb80d Renamed Rect3i -> Box3i 2021-05-31 17:12:04 +01:00
Marc Gilleron fbb39f6fcc Added `falloff` property to control sharpness of texture painting 2021-05-30 16:28:10 +01:00
Marc Gilleron d2d07904b8 Moved VoxelRaycastResult to its own file 2021-05-29 15:09:10 +01:00
Marc Gilleron 8b017f460f Basic VoxelTool function to paint textures on buffers 2021-04-25 20:23:14 +01:00
Marc Gilleron 2c6eb114b2 Fix order of SDF arguments 2021-04-07 00:05:38 +01:00
Marc Gilleron 30e33849fe Use SDF union and subtract in VoxelTool 2021-03-17 18:11:29 +00:00
Marc Gilleron 09c815e253 Implemented `copy` and `paste` for VoxelToolTerrain (untested) 2021-02-21 18:23:56 +00:00
Marc Gilleron b51897b8df Added voxel raycast to VoxelToolLodTerrain
- Made more precise with an option to use binary search (unoptimized)
- Distance along ray is now available in blocky terrains as well
2021-02-21 03:08:47 +00:00
Marc Gilleron 22471aafd0 Merge branch 'master' into instancing 2021-02-02 00:00:01 +00:00
Marc Gilleron 7682e8fbcc Comments 2021-01-30 01:39:28 +00:00
Marc Gilleron 99723cc006 Merge branch 'master' into instancing 2021-01-25 22:17:46 +00:00
Marc Gilleron 414f6cc305 Fix sdf_scale not defaulting according to the real default channel depth 2021-01-24 14:48:25 +00:00
Marc Gilleron 55a38957b5 Added SDF scale to VoxelTool. Default value should work best with default bit depth. 2021-01-24 13:54:38 +00:00
Marc Gilleron 629b79fc3d Fix subtract operation 2021-01-23 22:59:44 +00:00
Marc Gilleron 3e510d2e93 `get_voxel` may be `const` 2020-12-30 20:09:31 +00:00
Marc Gilleron 6c80da0425 Moved VoxelBuffer and VoxelMemoryPool under storage/ directory 2020-09-14 19:33:02 +01:00
Marc Gilleron 7a37770e84 Merge branch 'master' into threading_refactor
# Conflicts:
#	edition/voxel_tool_terrain.cpp
#	terrain/voxel_lod_terrain.cpp
2020-08-30 21:56:44 +01:00
Marc Gilleron b26fd944a8 Added `VoxelTool.copy` declaration, gonna need this in the future 2020-08-30 18:51:20 +01:00
Marc Gilleron d81ffb95f4 Detect usage of Tracy, add some profiler scopes 2020-08-30 04:00:01 +01:00
Marc Gilleron 88e6d83652 Comments and formatting 2020-08-29 22:58:33 +01:00
Marc Gilleron e30a3f51d6 Expose VoxelTool.is_area_editable() 2020-08-24 13:51:08 +01:00
Marc Gilleron d848da3a6f Formatting 2020-08-24 13:49:44 +01:00
Marc Gilleron 759bdb9de6 Merge branch 'master' of https://github.com/Zylann/godot_voxel 2020-08-10 19:03:17 +01:00
Marc Gilleron 1a551fc77d Added support for per-voxel and per-block metadata 2020-08-10 19:03:01 +01:00
Marc Gilleron 1c6404efa5 Allow to use collision mask when raycasting blocky voxels 2020-08-06 19:58:36 +01:00
Marc Gilleron 47a6426a12 Fix 64-bit usage in VoxelTool 2020-08-06 19:54:47 +01:00
Marc 7ed9d5525b
Merge pull request #172 from menip/DoBox
Implement VoxelTool::do_box(...)
2020-08-06 18:46:39 +01:00
menip aae5ad0320 Implement VoxelTool::do_box(...) 2020-08-05 17:21:33 -07:00
Marc Gilleron a14866c386 Implemented VoxelTool::paste for VoxelBuffer 2020-08-04 23:54:40 +01:00
Marc Gilleron 1a08cd31d6 Use a macro to print debug stuff only in verbose mode 2020-07-08 20:48:52 +01:00
Marc Gilleron 0ac1b7e6dc Moved edition-related classes to a sub-folder 2020-01-26 20:29:44 +00:00