Formatting due to update of Godot's clang-format
parent
67965a8b9a
commit
c17914b2c8
|
@ -66,8 +66,8 @@ void build_voxel_mesh_as_simple_cubes(
|
|||
Color_F color_func) {
|
||||
//
|
||||
ERR_FAIL_COND(block_size.x < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.y < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.z < static_cast<int>(2 * VoxelMesherCubes::PADDING));
|
||||
block_size.y < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.z < static_cast<int>(2 * VoxelMesherCubes::PADDING));
|
||||
|
||||
const Vector3i min_pos = Vector3i(VoxelMesherCubes::PADDING);
|
||||
const Vector3i max_pos = block_size - Vector3i(VoxelMesherCubes::PADDING);
|
||||
|
@ -98,8 +98,8 @@ void build_voxel_mesh_as_simple_cubes(
|
|||
pos[za] = d;
|
||||
|
||||
const unsigned int voxel_index = pos[Vector3i::AXIS_Y] +
|
||||
pos[Vector3i::AXIS_X] * row_size +
|
||||
pos[Vector3i::AXIS_Z] * deck_size;
|
||||
pos[Vector3i::AXIS_X] * row_size +
|
||||
pos[Vector3i::AXIS_Z] * deck_size;
|
||||
|
||||
const Voxel_T raw_color0 = voxel_buffer[voxel_index];
|
||||
const Voxel_T raw_color1 = voxel_buffer[voxel_index + neighbor_offset_d_lut[za]];
|
||||
|
@ -200,8 +200,8 @@ void build_voxel_mesh_as_greedy_cubes(
|
|||
Color_F color_func) {
|
||||
//
|
||||
ERR_FAIL_COND(block_size.x < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.y < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.z < static_cast<int>(2 * VoxelMesherCubes::PADDING));
|
||||
block_size.y < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.z < static_cast<int>(2 * VoxelMesherCubes::PADDING));
|
||||
|
||||
struct MaskValue {
|
||||
Voxel_T color;
|
||||
|
@ -252,8 +252,8 @@ void build_voxel_mesh_as_greedy_cubes(
|
|||
pos[za] = d;
|
||||
|
||||
const unsigned int voxel_index = pos[Vector3i::AXIS_Y] +
|
||||
pos[Vector3i::AXIS_X] * row_size +
|
||||
pos[Vector3i::AXIS_Z] * deck_size;
|
||||
pos[Vector3i::AXIS_X] * row_size +
|
||||
pos[Vector3i::AXIS_Z] * deck_size;
|
||||
|
||||
const Voxel_T raw_color0 = voxel_buffer[voxel_index];
|
||||
const Voxel_T raw_color1 = voxel_buffer[voxel_index + neighbor_offset_d_lut[za]];
|
||||
|
@ -395,8 +395,8 @@ void build_voxel_mesh_as_greedy_cubes_atlased(
|
|||
//
|
||||
VOXEL_PROFILE_SCOPE();
|
||||
ERR_FAIL_COND(block_size.x < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.y < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.z < static_cast<int>(2 * VoxelMesherCubes::PADDING));
|
||||
block_size.y < static_cast<int>(2 * VoxelMesherCubes::PADDING) ||
|
||||
block_size.z < static_cast<int>(2 * VoxelMesherCubes::PADDING));
|
||||
|
||||
struct MaskValue {
|
||||
uint8_t side;
|
||||
|
@ -452,8 +452,8 @@ void build_voxel_mesh_as_greedy_cubes_atlased(
|
|||
pos[za] = d;
|
||||
|
||||
const unsigned int voxel_index = pos[Vector3i::AXIS_Y] +
|
||||
pos[Vector3i::AXIS_X] * row_size +
|
||||
pos[Vector3i::AXIS_Z] * deck_size;
|
||||
pos[Vector3i::AXIS_X] * row_size +
|
||||
pos[Vector3i::AXIS_Z] * deck_size;
|
||||
|
||||
const Voxel_T raw_color0 = voxel_buffer[voxel_index];
|
||||
const Voxel_T raw_color1 = voxel_buffer[voxel_index + neighbor_offset_d_lut[za]];
|
||||
|
|
|
@ -547,7 +547,7 @@ void build_regular_mesh(
|
|||
secondary = get_secondary_position(primaryf, normal, 0, block_size_scaled);
|
||||
border_mask |= (get_border_mask(p0, block_size_scaled) &
|
||||
get_border_mask(p1, block_size_scaled))
|
||||
<< 6;
|
||||
<< 6;
|
||||
}
|
||||
|
||||
cell_vertex_indices[vertex_index] =
|
||||
|
@ -1032,7 +1032,7 @@ void build_transition_mesh(
|
|||
secondary = get_secondary_position(primaryf, normal, 0, block_size_scaled);
|
||||
border_mask |= (get_border_mask(p0, block_size_scaled) &
|
||||
get_border_mask(p1, block_size_scaled))
|
||||
<< 6;
|
||||
<< 6;
|
||||
|
||||
} else {
|
||||
// If the vertex is on the half-res side (in our implementation,
|
||||
|
|
|
@ -1355,7 +1355,7 @@ void VoxelLodTerrain::_process(float delta) {
|
|||
CRASH_COND(_blocks_pending_transition_update.size() != 0);
|
||||
|
||||
const bool stream_enabled = (_stream.is_valid() || _generator.is_valid()) &&
|
||||
(Engine::get_singleton()->is_editor_hint() == false || _run_stream_in_editor);
|
||||
(Engine::get_singleton()->is_editor_hint() == false || _run_stream_in_editor);
|
||||
|
||||
// Find which blocks we need to load and see, within each octree
|
||||
if (stream_enabled) {
|
||||
|
|
Loading…
Reference in New Issue