- Project samples on triangles to make cells more seamless,
instead of a box of samples on a quad. Requires 2x more samples.
- Don't sample when there is no triangle for a given pixel
- Dilate normalmaps to reduce artifacts on edge of triangles
- Moved math functions about triangles in their own file
Adds enough stuff to test the approach. It is not correct at the
moment, probably needs to project to triangles to make cells line up,
currently it's using planes. There might be incorrect coordinates too,
did that with bit of guessing. A grid-like pattern is also showing, so
might have to make tiles a bit larger to account for filtering.
- 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?
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.
- 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
As suggested in https://github.com/Zylann/godot_voxel/issues/387
This allowed 2 full Mac builds using these commands:
```
scons platform=osx arch=x86_64 --jobs=$(sysctl -n hw.logicalcpu) warnings=all tools=yes tests=no target=release_debug production=yes
```
```
scons platform=osx arch=arm64 --jobs=$(sysctl -n hw.logicalcpu) warnings=all tools=yes tests=no target=release_debug production=yes voxel_fast_noise_2=false
```
-
( Also after having the VulkanSDK like mentioned here[1] and after deleting the `denoise` module which doesn't like ARM64)
[1]: https://github.com/godotengine/godot/issues/57622#issuecomment-1120486153
- 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