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:
Hans Goudey
2023-06-08 16:26:11 -04:00
parent 38833a20a6
commit 65d294c385

View File

@@ -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 &params, const eCustomDataType data_type)