Fix T93296: raycast node uses wrong domain for face corner attributes

This changes what domain is used by the raycast mode. This should fix the
behavior for face corner attributes (but may make it a bit slower for other
attributes). I think for 3.0 this is an acceptable trade off. For 3.1 we can do
what the comment suggests already.

Differential Revision: https://developer.blender.org/D13333
This commit is contained in:
Jacques Lucke 2021-11-23 14:37:10 +01:00
parent dab04bc053
commit 436ce22194
Notes: blender-bot 2023-02-14 09:44:56 +01:00
Referenced by issue #93296, Raycast Node uses wrong domain for Face Corner attributes
1 changed files with 4 additions and 4 deletions

View File

@ -205,10 +205,10 @@ class RaycastFunction : public fn::MultiFunction {
std::unique_ptr<FieldEvaluator> target_evaluator_;
const GVArray *target_data_ = nullptr;
/* Always evaluate the target domain data on the point domain. Eventually this could be
* exposed as an option or determined automatically from the field inputs in order to avoid
* losing information if the target field is on a different domain. */
const AttributeDomain domain_ = ATTR_DOMAIN_POINT;
/* Always evaluate the target domain data on the face corner domain because it contains the most
* information. Eventually this could be exposed as an option or determined automatically from
* the field inputs for better performance. */
const AttributeDomain domain_ = ATTR_DOMAIN_CORNER;
fn::MFSignature signature_;