Merge branch 'master' into octree_compression
commit
8e53fbaa47
|
@ -71,5 +71,6 @@ Jakub Buriánek (Buri)
|
|||
Justin Swanhart (Greenlion)
|
||||
Sebastian Clausen (sclausen)
|
||||
MrGreaterThan
|
||||
baals
|
||||
```
|
||||
|
||||
|
|
|
@ -38,12 +38,14 @@ Ongoing development - `master`
|
|||
- `VoxelBuffer`: `copy_voxel_metadata_in_area` was checking the source box incorrectly
|
||||
- `VoxelMesherTransvoxel`: no longer crashes when the input buffer is not cubic
|
||||
- `VoxelLodTerrain`: fixed errors and crashes when editing voxels near loading borders
|
||||
- `VoxelLodTerrain`: fixed crash occurring after a few edits when LOD count is set to 1
|
||||
- `VoxelTool` channel no longer defaults to 7 when using `get_voxel_tool` from a terrain with a stream assigned. Instead it picks first used channel of the mesher (fallback order is mesher, then generator, then stream).
|
||||
- `VoxelInstancer`: fixed error when node visibility changes
|
||||
- `VoxelInstancer`: fixed no instances generated when density is 1 in vertex emission mode
|
||||
- `VoxelTerrain`: fixed materials shown under the wrong inspector category
|
||||
- `VoxelStreamRegionFiles`: fixed errors caused by meta file being sometimes written with wrong depth values
|
||||
- Fix some crashes occurring when all PoolVector allocs are in use (Godot 3.x limitation), it will print errors instead
|
||||
- `VoxelStreamBlockFiles`: fixed warning about channels always shown in the scene tree
|
||||
- Fix some crashes occurring when all PoolVector allocs are in use (Godot 3.x limitation). It will print errors instead, but crashes can still occur inside Godot's code as it's not often checking for this
|
||||
|
||||
|
||||
09/05/2021 - `godot3.3`
|
||||
|
|
|
@ -55,7 +55,8 @@ VoxelAboutWindow::VoxelAboutWindow() {
|
|||
"Jakub Buriánek (Buri)\n"
|
||||
"Justin Swanhart (Greenlion)\n"
|
||||
"Sebastian Clausen (sclausen)\n"
|
||||
"MrGreaterThan\n";
|
||||
"MrGreaterThan\n"
|
||||
"baals\n";
|
||||
{
|
||||
Dictionary d;
|
||||
// TODO Take version from somewhere unique
|
||||
|
|
|
@ -52,14 +52,6 @@ public:
|
|||
return _needs_lodding;
|
||||
}
|
||||
|
||||
inline void set_max_lod_hint(bool max_lod_hint) {
|
||||
_max_lod_hint = max_lod_hint;
|
||||
}
|
||||
|
||||
inline bool is_max_lod_hint() const {
|
||||
return _max_lod_hint;
|
||||
}
|
||||
|
||||
private:
|
||||
VoxelDataBlock(Vector3i bpos, Ref<VoxelBuffer> buffer, unsigned int p_lod_index) :
|
||||
position(bpos), lod_index(p_lod_index), _voxels(buffer) {}
|
||||
|
|
|
@ -26,7 +26,6 @@ VoxelStreamBlockFiles::VoxelStreamBlockFiles() {
|
|||
|
||||
VoxelStream::Result VoxelStreamBlockFiles::emerge_block(
|
||||
Ref<VoxelBuffer> out_buffer, Vector3i origin_in_voxels, int lod) {
|
||||
|
||||
ERR_FAIL_COND_V(out_buffer.is_null(), RESULT_ERROR);
|
||||
|
||||
if (_directory_path.empty()) {
|
||||
|
@ -158,6 +157,11 @@ void VoxelStreamBlockFiles::immerge_block(Ref<VoxelBuffer> buffer, Vector3i orig
|
|||
}
|
||||
}
|
||||
|
||||
int VoxelStreamBlockFiles::get_used_channels_mask() const {
|
||||
// Assuming all, since that stream can store anything.
|
||||
return VoxelBuffer::ALL_CHANNELS_MASK;
|
||||
}
|
||||
|
||||
String VoxelStreamBlockFiles::get_directory() const {
|
||||
return _directory_path;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ public:
|
|||
Result emerge_block(Ref<VoxelBuffer> out_buffer, Vector3i origin_in_voxels, int lod) override;
|
||||
void immerge_block(Ref<VoxelBuffer> buffer, Vector3i origin_in_voxels, int lod) override;
|
||||
|
||||
int get_used_channels_mask() const override;
|
||||
|
||||
String get_directory() const;
|
||||
void set_directory(String dirpath);
|
||||
|
||||
|
|
|
@ -1918,6 +1918,10 @@ void VoxelLodTerrain::flush_pending_lod_edits() {
|
|||
src_lod.blocks_pending_lodding.clear();
|
||||
}
|
||||
|
||||
// Make sure LOD0 has its list cleared, because in case there is only 1 LOD,
|
||||
// the chain of updates above will not be entered
|
||||
lod0.blocks_pending_lodding.clear();
|
||||
|
||||
// uint64_t time_spent = profiling_clock.restart();
|
||||
// if (time_spent > 10) {
|
||||
// print_line(String("Took {0} us to update lods").format(varray(time_spent)));
|
||||
|
|
|
@ -24,6 +24,9 @@ public:
|
|||
pos(other.pos),
|
||||
size(other.size) {}
|
||||
|
||||
// Creates a box centered on a point, specifying half its size.
|
||||
// Warning: if you consider the center being a 1x1x1 box which would be extended, instead of a mathematical point,
|
||||
// you may want to add 1 to extents.
|
||||
static inline Box3i from_center_extents(Vector3i center, Vector3i extents) {
|
||||
return Box3i(center - extents, 2 * extents);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue