diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-07 14:53:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-07 14:53:09 +0400 |
commit | 022d12a721b04799423edf646b2a08bd48edfe6a (patch) | |
tree | d5eb7265e0a142708f8de1d05b6e4f4ec34e5604 /intern/cycles/util/util_transform.h | |
parent | 69fc654f94cc16176248aeeef89dddd03ffebdc8 (diff) |
Fix most of #31307: cycles panorama camera not working correct with speed
vectors and window texture coordinates. Only for Fisheye Equisolid it's
still not working correct yet. Patch from Dalai with modifications.
Diffstat (limited to 'intern/cycles/util/util_transform.h')
-rw-r--r-- | intern/cycles/util/util_transform.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h index 7136c185d04..e4897ee6787 100644 --- a/intern/cycles/util/util_transform.h +++ b/intern/cycles/util/util_transform.h @@ -253,7 +253,7 @@ __device_inline bool transform_uniform_scale(const Transform& tfm, float& scale) /* the epsilon here is quite arbitrary, but this function is only used for surface area and bump, where we except it to not be so sensitive */ Transform ttfm = transform_transpose(tfm); - float eps = 1e-7f; + float eps = 1e-6f; float sx = len_squared(float4_to_float3(tfm.x)); float sy = len_squared(float4_to_float3(tfm.y)); @@ -261,7 +261,7 @@ __device_inline bool transform_uniform_scale(const Transform& tfm, float& scale) float stx = len_squared(float4_to_float3(ttfm.x)); float sty = len_squared(float4_to_float3(ttfm.y)); float stz = len_squared(float4_to_float3(ttfm.z)); - + if(fabsf(sx - sy) < eps && fabsf(sx - sz) < eps && fabsf(sx - stx) < eps && fabsf(sx - sty) < eps && fabsf(sx - stz) < eps) { |