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/film
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/film')
-rw-r--r--intern/cycles/kernel/film/passes.h2
-rw-r--r--intern/cycles/kernel/film/read.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/film/passes.h b/intern/cycles/kernel/film/passes.h
index 3a91d1653fe..22b4b779a17 100644
--- a/intern/cycles/kernel/film/passes.h
+++ b/intern/cycles/kernel/film/passes.h
@@ -312,7 +312,7 @@ ccl_device_inline void kernel_write_data_passes(KernelGlobals kg,
const float mist_inv_depth = kernel_data.film.mist_inv_depth;
const float depth = camera_distance(kg, sd->P);
- float mist = saturate((depth - mist_start) * mist_inv_depth);
+ float mist = saturatef((depth - mist_start) * mist_inv_depth);
/* Falloff */
const float mist_falloff = kernel_data.film.mist_falloff;
diff --git a/intern/cycles/kernel/film/read.h b/intern/cycles/kernel/film/read.h
index a87eff3832e..d308a9818e2 100644
--- a/intern/cycles/kernel/film/read.h
+++ b/intern/cycles/kernel/film/read.h
@@ -27,7 +27,7 @@ CCL_NAMESPACE_BEGIN
* roulette. */
ccl_device_forceinline float film_transparency_to_alpha(float transparency)
{
- return saturate(1.0f - transparency);
+ return saturatef(1.0f - transparency);
}
ccl_device_inline float film_get_scale(ccl_global const KernelFilmConvert *ccl_restrict
@@ -136,7 +136,7 @@ ccl_device_inline void film_get_pass_pixel_mist(ccl_global const KernelFilmConve
/* Note that we accumulate 1 - mist in the kernel to avoid having to
* track the mist values in the integrator state. */
- pixel[0] = saturate(1.0f - f * scale_exposure);
+ pixel[0] = saturatef(1.0f - f * scale_exposure);
}
ccl_device_inline void film_get_pass_pixel_sample_count(
@@ -458,7 +458,7 @@ ccl_device_inline float4 film_calculate_shadow_catcher_matte_with_shadow(
const float3 color_matte = make_float3(in_matte[0], in_matte[1], in_matte[2]) * scale_exposure;
const float transparency = in_matte[3] * scale;
- const float alpha = saturate(1.0f - transparency);
+ const float alpha = saturatef(1.0f - transparency);
const float alpha_matte = (1.0f - alpha) * (1.0f - average(shadow_catcher)) + alpha;