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.
This commit is contained in:
Sergey Sharybin 2015-04-30 14:21:32 +05:00
parent aa4c97faa3
commit 41d817f15d
Notes: blender-bot 2023-11-20 12:14:32 +01:00
Referenced by issue #44548, Cycles Tube Mapping off / not compatible with BI
1 changed files with 1 additions and 1 deletions

View File

@ -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;