Fix T100119: Cycles light object's parametric vector distorted
Caused by 38af5b0501
.
Adjust barycentric coordinates used for intersection result in the
ray-to-rectangle intersection check.
Differential Revision: https://developer.blender.org/D15592
This commit is contained in:
parent
7b0bc1573b
commit
cefd6140f3
Notes:
blender-bot
2023-02-14 19:45:25 +01:00
Referenced by commit 1b216fc237
, Fix T100814: Cycles wrong area light parametric texture coordinates
Referenced by issue #100299, Parametric doesn't generate UV correctly with area lights in 3.3 beta
Referenced by issue #100119, Regression: Light object's parametric vector distorted in blender 3.4
|
@ -209,10 +209,13 @@ ccl_device bool ray_quad_intersect(float3 ray_P,
|
|||
*isect_P = hit;
|
||||
if (isect_t != NULL)
|
||||
*isect_t = t;
|
||||
|
||||
/* NOTE: Return barycentric coordinates in the same notation as Embree and OptiX. */
|
||||
if (isect_u != NULL)
|
||||
*isect_u = u + 0.5f;
|
||||
*isect_u = v + 0.5f;
|
||||
if (isect_v != NULL)
|
||||
*isect_v = v + 0.5f;
|
||||
*isect_v = -u - v;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue