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:
authorWilliam Leeson <leesonw>2021-10-27 14:28:13 +0300
committerWilliam Leeson <william@blender.org>2021-10-27 15:05:46 +0300
commit7b1c5712f888ea37bbccafd9ffd7a3a6a61e665f (patch)
tree659551f820d8b70fe1c37ac6a8711fcd73cd7434 /intern/cycles/kernel/svm/closure.h
parent18b6f0d0f18732a071b75ad56a2475c383d19111 (diff)
Cycles: Replace saturate with saturatef
saturate is depricated in favour of __saturatef this replaces saturate with __saturatef on CUDA by createing a saturatef function which replaces all instances of saturate and are hooked up to the correct function on all platforms. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13010
Diffstat (limited to 'intern/cycles/kernel/svm/closure.h')
-rw-r--r--intern/cycles/kernel/svm/closure.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/svm/closure.h b/intern/cycles/kernel/svm/closure.h
index 1dcfe003f74..71952e9e0f8 100644
--- a/intern/cycles/kernel/svm/closure.h
+++ b/intern/cycles/kernel/svm/closure.h
@@ -173,9 +173,9 @@ ccl_device_noinline int svm_node_closure_bsdf(KernelGlobals kg,
float fresnel = fresnel_dielectric_cos(cosNO, ior);
// calculate weights of the diffuse and specular part
- float diffuse_weight = (1.0f - saturate(metallic)) * (1.0f - saturate(transmission));
+ float diffuse_weight = (1.0f - saturatef(metallic)) * (1.0f - saturatef(transmission));
- float final_transmission = saturate(transmission) * (1.0f - saturate(metallic));
+ float final_transmission = saturatef(transmission) * (1.0f - saturatef(metallic));
float specular_weight = (1.0f - final_transmission);
// get the base color
@@ -746,7 +746,7 @@ ccl_device_noinline int svm_node_closure_bsdf(KernelGlobals kg,
if (bsdf) {
bsdf->N = N;
- bsdf->sigma = saturate(param1);
+ bsdf->sigma = saturatef(param1);
sd->flag |= bsdf_ashikhmin_velvet_setup(bsdf);
}
break;
@@ -1233,7 +1233,7 @@ ccl_device_noinline void svm_node_mix_closure(ccl_private ShaderData *sd,
node.y, &weight_offset, &in_weight_offset, &weight1_offset, &weight2_offset);
float weight = stack_load_float(stack, weight_offset);
- weight = saturate(weight);
+ weight = saturatef(weight);
float in_weight = (stack_valid(in_weight_offset)) ? stack_load_float(stack, in_weight_offset) :
1.0f;