Geometry Nodes: Use smaller grain size for sampe nearest surface node
This increases the framerate in a production file from about 2.3 to 2.5 FPS, and reduces gaps in a profile where the CPU was waiting for just a few threads to finish the BVH tree lookups. If BVH lookups become faster in the future, this grain size could be increased.
This commit is contained in:
@@ -140,6 +140,13 @@ class SampleNearestSurfaceFunction : public mf::MultiFunction {
|
||||
const Mesh &mesh = *source_.get_mesh_for_read();
|
||||
get_closest_mesh_looptris(mesh, positions, mask, triangle_index, {}, sample_position);
|
||||
}
|
||||
|
||||
ExecutionHints get_execution_hints() const override
|
||||
{
|
||||
ExecutionHints hints;
|
||||
hints.min_grain_size = 512;
|
||||
return hints;
|
||||
}
|
||||
};
|
||||
|
||||
static GField get_input_attribute_field(GeoNodeExecParams ¶ms, const eCustomDataType data_type)
|
||||
|
||||
Reference in New Issue
Block a user