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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-12 18:29:52 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-12 18:29:52 +0400
commitfc42a6185ddeb6a24ec92287dfa7b89beb059716 (patch)
treecdd34b01d77f6c104ed38c30719426c11c01a96e /intern/cycles/util/util_transform.h
parent817b6cb9a8990483a2bfce7a11e690c829e75ddc (diff)
Cycles:
* Fix object scaling update issue with interactive rendering + static BVH. * Fix negative scaling issue with static BVH. * Fix #29217: excessive fireflies in first sample.
Diffstat (limited to 'intern/cycles/util/util_transform.h')
-rw-r--r--intern/cycles/util/util_transform.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index c43736fb2e4..8f4e2b46616 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -234,6 +234,15 @@ __device_inline bool transform_uniform_scale(const Transform& tfm, float& scale)
return false;
}
+__device_inline bool transform_negative_scale(const Transform& tfm)
+{
+ float3 c0 = transform_get_column(&tfm, 0);
+ float3 c1 = transform_get_column(&tfm, 1);
+ float3 c2 = transform_get_column(&tfm, 2);
+
+ return (dot(cross(c0, c1), c2) < 0.0f);
+}
+
#endif
CCL_NAMESPACE_END