fix thickness bug.
This commit is contained in:
@@ -98,11 +98,11 @@ inline void uddBendVertex(inout float4 v, half radius, half width, half thicknes
|
|||||||
half angle = width * v.x / radius;
|
half angle = width * v.x / radius;
|
||||||
#ifdef _FORWARD_Z
|
#ifdef _FORWARD_Z
|
||||||
v.z *= thickness;
|
v.z *= thickness;
|
||||||
radius -= v.z;
|
radius += v.z;
|
||||||
v.z -= radius * (1 - cos(angle));
|
v.z -= radius * (1 - cos(angle));
|
||||||
#elif _FORWARD_Y
|
#elif _FORWARD_Y
|
||||||
v.y *= thickness;
|
v.y *= thickness;
|
||||||
radius -= v.y;
|
radius += v.y;
|
||||||
v.y += radius * (1 - cos(angle));
|
v.y += radius * (1 - cos(angle));
|
||||||
#endif
|
#endif
|
||||||
v.x = radius * sin(angle) / width;
|
v.x = radius * sin(angle) / width;
|
||||||
|
|||||||
Reference in New Issue
Block a user