From 63dd44c810e219603ddc5a76d23b698fa1d35f87 Mon Sep 17 00:00:00 2001 From: Weizhen Huang Date: Wed, 21 Feb 2024 23:06:15 +0100 Subject: [PATCH] Cleanup: avoid implicit conversion from int to float --- intern/cycles/kernel/closure/bsdf_principled_hair_huang.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h index 2d5a92d113c..adf8e220a6c 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h +++ b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h @@ -470,7 +470,7 @@ ccl_device Spectrum bsdf_hair_huang_eval_residual(KernelGlobals kg, const float3 wh1 = sample_wh(kg, roughness, wi, wmi, sample1); const float cos_hi1 = dot(wi, wh1); - if (!(cos_hi1 > 0)) { + if (!(cos_hi1 > 0.0f)) { continue; } @@ -535,7 +535,7 @@ ccl_device Spectrum bsdf_hair_huang_eval_residual(KernelGlobals kg, lcg_step_float(&rng_quadrature)); const float3 wh2 = sample_wh(kg, roughness, -wt, wmt, sample2); const float cos_hi2 = dot(-wt, wh2); - if (!(cos_hi2 > 0)) { + if (!(cos_hi2 > 0.0f)) { continue; } const float R2 = fresnel_dielectric_cos(cos_hi2, inv_eta);