[Bf-blender-cvs] [41d817f] master: Fix T44548: Cycles Tube Mapping off / not compatible with BI
Sergey Sharybin
noreply at git.blender.org
Thu Apr 30 11:27:34 CEST 2015
Commit: 41d817f15da2bfb0423612d6ba1d464e8a983bb9
Author: Sergey Sharybin
Date: Thu Apr 30 14:21:32 2015 +0500
Branches: master
https://developer.blender.org/rB41d817f15da2bfb0423612d6ba1d464e8a983bb9
Fix T44548: Cycles Tube Mapping off / not compatible with BI
Was a typo in original implementation, probably a result of some code reshuffle
happened for optimization reasons.
===================================================================
M intern/cycles/util/util_math.h
===================================================================
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index f48625e..2262f8f 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -1472,7 +1472,7 @@ ccl_device_inline float2 map_to_tube(const float3 co)
len = sqrtf(co.x * co.x + co.y * co.y);
if(len > 0.0f) {
u = (1.0f - (atan2f(co.x / len, co.y / len) / M_PI_F)) * 0.5f;
- v = (co.x + 1.0f) * 0.5f;
+ v = (co.z + 1.0f) * 0.5f;
}
else {
u = v = 0.0f;
More information about the Bf-blender-cvs
mailing list