Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-09 22:03:37 +0300
committerYimingWu <xp8110@outlook.com>2019-09-12 04:13:42 +0300
commit9bfccd1854570fabeafcc9fdac3097de7217becc (patch)
treeea87685858acc7211f29a26443227e56968f95b4
parent36f81b54de4bc8624de7624c9d4e83607edb2b9d (diff)
Fix T69686: Cycles OpenCL build error after recent changes
-rw-r--r--intern/cycles/kernel/closure/bsdf.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h
index c83e97d94c2..b282bf5a350 100644
--- a/intern/cycles/kernel/closure/bsdf.h
+++ b/intern/cycles/kernel/closure/bsdf.h
@@ -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);
+ }
}
}