Unnecessary includes
This commit is contained in:
parent
072472bec5
commit
729b2a3391
@ -1,5 +1,6 @@
|
||||
#include "voxel_generator_graph.h"
|
||||
#include "../../storage/voxel_buffer_internal.h"
|
||||
#include "../../util/godot/funcs.h"
|
||||
#include "../../util/macros.h"
|
||||
#include "../../util/profiling.h"
|
||||
#include "../../util/profiling_clock.h"
|
||||
@ -1219,7 +1220,7 @@ VoxelSingleValue VoxelGeneratorGraph::generate_single(Vector3i position, unsigne
|
||||
Cache &cache = _cache;
|
||||
const VoxelGraphRuntime &runtime = runtime_ptr->runtime;
|
||||
runtime.prepare_state(cache.state, 1);
|
||||
runtime.generate_single(cache.state, position, nullptr);
|
||||
runtime.generate_single(cache.state, to_vec3f(position), nullptr);
|
||||
const VoxelGraphRuntime::Buffer &buffer = cache.state.get_buffer(runtime_ptr->sdf_output_buffer_index);
|
||||
ERR_FAIL_COND_V(buffer.size == 0, v);
|
||||
ERR_FAIL_COND_V(buffer.data == nullptr, v);
|
||||
@ -1466,7 +1467,7 @@ float VoxelGeneratorGraph::debug_measure_microseconds_per_voxel(bool singular) {
|
||||
for (uint32_t z = 0; z < cube_size; ++z) {
|
||||
for (uint32_t y = 0; y < cube_size; ++y) {
|
||||
for (uint32_t x = 0; x < cube_size; ++x) {
|
||||
runtime.generate_single(cache.state, Vector3i(x, y, z), nullptr);
|
||||
runtime.generate_single(cache.state, Vector3f(x, y, z), nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,10 @@
|
||||
#include "voxel_graph_runtime.h"
|
||||
#include "../../util/funcs.h"
|
||||
#include "../../util/godot/funcs.h"
|
||||
#include "../../util/macros.h"
|
||||
#include "../../util/noise/fast_noise_lite.h"
|
||||
#include "../../util/profiling.h"
|
||||
#include "image_range_grid.h"
|
||||
#include "range_utility.h"
|
||||
#include "voxel_generator_graph.h"
|
||||
#include "voxel_graph_node_db.h"
|
||||
|
||||
#include <core/math/math_funcs.h>
|
||||
#include <modules/opensimplex/open_simplex_noise.h>
|
||||
#include <scene/resources/curve.h>
|
||||
#include <unordered_set>
|
||||
|
||||
//#ifdef DEBUG_ENABLED
|
||||
@ -221,6 +214,8 @@ VoxelGraphRuntime::CompilationResult VoxelGraphRuntime::_compile(const ProgramGr
|
||||
continue;
|
||||
}
|
||||
|
||||
// Input nodes can appear multiple times in the graph, for convenience.
|
||||
// Multiple instances of the same node will refer to the same data.
|
||||
case VoxelGeneratorGraph::NODE_INPUT_X:
|
||||
_program.output_port_addresses[ProgramGraph::PortLocation{ node_id, 0 }] = _program.x_input_address;
|
||||
dg_node.is_input = true;
|
||||
@ -574,9 +569,7 @@ void VoxelGraphRuntime::generate_optimized_execution_map(
|
||||
}
|
||||
}
|
||||
|
||||
void VoxelGraphRuntime::generate_single(State &state, Vector3 position, const ExecutionMap *execution_map) const {
|
||||
// TODO Evaluate needs for double-precision in VoxelGraphRuntime
|
||||
Vector3f position_f = to_vec3f(position);
|
||||
void VoxelGraphRuntime::generate_single(State &state, Vector3f position_f, const ExecutionMap *execution_map) const {
|
||||
generate_set(state, Span<float>(&position_f.x, 1), Span<float>(&position_f.y, 1), Span<float>(&position_f.z, 1),
|
||||
false, execution_map);
|
||||
}
|
||||
|
@ -124,7 +124,8 @@ public:
|
||||
void prepare_state(State &state, unsigned int buffer_size) const;
|
||||
|
||||
// Convenience for set generation with only one value
|
||||
void generate_single(State &state, Vector3 position, const ExecutionMap *execution_map) const;
|
||||
// TODO Evaluate needs for double-precision in VoxelGraphRuntime
|
||||
void generate_single(State &state, Vector3f position_f, const ExecutionMap *execution_map) const;
|
||||
|
||||
void generate_set(State &state, Span<float> in_x, Span<float> in_y, Span<float> in_z, bool skip_xz,
|
||||
const ExecutionMap *execution_map) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user