Fix T69686: Cycles OpenCL build error after recent changes

This commit is contained in:
Brecht Van Lommel 2019-09-09 21:03:37 +02:00
parent 0426866eb0
commit 51334dd3a6
Notes: blender-bot 2023-02-14 07:17:43 +01:00
Referenced by issue #69686, OpenCL error when rendering with cycles
1 changed files with 7 additions and 3 deletions

View File

@ -447,7 +447,7 @@ ccl_device_inline int bsdf_sample(KernelGlobals *kg,
}
}
else if (label & LABEL_DIFFUSE) {
if (sc->N != sd->N) {
if (!isequal_float3(sc->N, sd->N)) {
*eval *= bump_shadowing_term((label & LABEL_TRANSMIT) ? -sd->N : sd->N, sc->N, *omega_in);
}
}
@ -563,7 +563,9 @@ ccl_device_inline
break;
}
if (CLOSURE_IS_BSDF_DIFFUSE(sc->type)) {
eval *= bump_shadowing_term(sd->N, sc->N, omega_in);
if (!isequal_float3(sc->N, sd->N)) {
eval *= bump_shadowing_term(sd->N, sc->N, omega_in);
}
}
}
else {
@ -652,7 +654,9 @@ ccl_device_inline
break;
}
if (CLOSURE_IS_BSDF_DIFFUSE(sc->type)) {
eval *= bump_shadowing_term(-sd->N, sc->N, omega_in);
if (!isequal_float3(sc->N, sd->N)) {
eval *= bump_shadowing_term(-sd->N, sc->N, omega_in);
}
}
}