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:
authorLukas Stockner <lukas.stockner@freenet.de>2017-11-05 23:43:23 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-11-14 06:17:54 +0300
commitd8066fb0f145395594d0a952a4c0f70206dc0214 (patch)
tree236c8d0e31f17d593cb7dba3d0430920d7893198 /intern/cycles/util
parentf4026382116b2fbd93c5f539addd5c03db01892a (diff)
Cycles: Refactor closure roughness detection to fix a potential bug with Denoising of specular shaders
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_math.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index fb04d49bcd9..39ce6a93982 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -518,6 +518,11 @@ ccl_device float safe_modulo(float a, float b)
return (b != 0.0f)? fmodf(a, b): 0.0f;
}
+ccl_device_inline float sqr(float a)
+{
+ return a * a;
+}
+
ccl_device_inline float beta(float x, float y)
{
#ifndef __KERNEL_OPENCL__