Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-11-23 16:37:10 +0300
committerJacques Lucke <jacques@blender.org>2021-11-23 16:38:02 +0300
commit436ce221941403dd8a3f9ec3740d22f70f4c2ad8 (patch)
treef1cfd842161d8c421ea10932cb52ebd6bfe4f901
parentdab04bc0536feb37140d7644ba5bc6ba8588699c (diff)
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
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_raycast.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
index 34946b1115c..42924a46667 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
@@ -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_;