Cleanup: removed unnecessary multiplications in area light importance sampling

Differential Revision: https://developer.blender.org/D11114
This commit is contained in:
Matteo Falduto 2021-04-29 15:10:16 +02:00 committed by Brecht Van Lommel
parent db021ee2ea
commit 8b9b87aee8
1 changed files with 4 additions and 4 deletions

View File

@ -200,12 +200,12 @@ ccl_device bool light_spread_clamp_area_light(const float3 P,
* uv coordinates. */
const float new_center_u = 0.5f * (min_u + max_u);
const float new_center_v = 0.5f * (min_v + max_v);
const float new_len_u = 0.5f * (max_u - min_u);
const float new_len_v = 0.5f * (max_v - min_v);
const float new_len_u = max_u - min_u;
const float new_len_v = max_v - min_v;
*lightP = *lightP + new_center_u * u + new_center_v * v;
*axisu = u * new_len_u * 2.0f;
*axisv = v * new_len_v * 2.0f;
*axisu = u * new_len_u;
*axisv = v * new_len_v;
return true;
}