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:
authorMai Lavelle <mai.lavelle@gmail.com>2017-03-21 05:51:36 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2017-03-21 05:55:52 +0300
commit8fff6cc2f56a088c4c9d3112bdb94b85bc9cb498 (patch)
tree98943ebae82fb749b8b4158f3363a041c897dc2b /intern/cycles
parent13d8661503f07a16da15f75d9fc9597e43d78283 (diff)
Cycles: Fix building of OpenCL kernels
Theres no overloading of functions in OpenCL so we can't make use of `safe_normalize` with `float2`.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/kernel/closure/bsdf_microfacet_multi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet_multi.h b/intern/cycles/kernel/closure/bsdf_microfacet_multi.h
index aa4b91eac40..1dd24078037 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet_multi.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet_multi.h
@@ -83,7 +83,7 @@ ccl_device_forceinline float3 mf_sample_vndf(const float3 wi, const float2 alpha
const float3 wi_11 = normalize(make_float3(alpha.x*wi.x, alpha.y*wi.y, wi.z));
const float2 slope_11 = mf_sampleP22_11(wi_11.z, randU);
- const float2 cossin_phi = safe_normalize(make_float2(wi_11.x, wi_11.y));
+ const float3 cossin_phi = safe_normalize(make_float3(wi_11.x, wi_11.y, 0.0f));
const float slope_x = alpha.x*(cossin_phi.x * slope_11.x - cossin_phi.y * slope_11.y);
const float slope_y = alpha.y*(cossin_phi.y * slope_11.x + cossin_phi.x * slope_11.y);