Cleanup: Remove redundant object fetch in MNEE

The intersection already has proper object assigned.

Pull Request: https://projects.blender.org/blender/blender/pulls/108275
This commit is contained in:
Sergey Sharybin 2023-05-25 16:41:35 +02:00 committed by Sergey Sharybin
parent 2fce65ecfb
commit 393da5df78

@ -483,12 +483,7 @@ ccl_device_forceinline bool mnee_newton_solver(KernelGlobals kg,
if (!hit)
break;
// TODO: Is the fetch needed here? The shade_surface simply reads isect->object.
int hit_object = (projection_isect.object == OBJECT_NONE) ?
kernel_data_fetch(prim_object, projection_isect.prim) :
projection_isect.object;
if (hit_object == mv.object) {
if (projection_isect.object == mv.object) {
projection_success = true;
break;
}