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:
Diffstat (limited to 'intern/cycles/kernel/kernel_montecarlo.h')
-rw-r--r--intern/cycles/kernel/kernel_montecarlo.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_montecarlo.h b/intern/cycles/kernel/kernel_montecarlo.h
index 7d5e4cd9df5..592c45867ac 100644
--- a/intern/cycles/kernel/kernel_montecarlo.h
+++ b/intern/cycles/kernel/kernel_montecarlo.h
@@ -108,11 +108,26 @@ __device float3 sample_uniform_sphere(float u1, float u2)
return make_float3(x, y, z);
}
+__device float balance_heuristic(float a, float b)
+{
+ return (a)/(a + b);
+}
+
+__device float balance_heuristic_3(float a, float b, float c)
+{
+ return (a)/(a + b + c);
+}
+
__device float power_heuristic(float a, float b)
{
return (a*a)/(a*a + b*b);
}
+__device float power_heuristic_3(float a, float b, float c)
+{
+ return (a*a)/(a*a + b*b + c*c);
+}
+
__device float2 concentric_sample_disk(float u1, float u2)
{
float r, theta;