[Bf-blender-cvs] [014ffc4615b] master: Cycles: using concentric mapping when sampling disk
Weizhen Huang
noreply at git.blender.org
Mon Dec 12 17:16:03 CET 2022
Commit: 014ffc4615b8fc04ef37e9147074c0c86e347b06
Author: Weizhen Huang
Date: Mon Dec 12 17:07:57 2022 +0100
Branches: master
https://developer.blender.org/rB014ffc4615b8fc04ef37e9147074c0c86e347b06
Cycles: using concentric mapping when sampling disk
===================================================================
M intern/cycles/kernel/light/common.h
===================================================================
diff --git a/intern/cycles/kernel/light/common.h b/intern/cycles/kernel/light/common.h
index 9a08bbcf43a..bd2803eeade 100644
--- a/intern/cycles/kernel/light/common.h
+++ b/intern/cycles/kernel/light/common.h
@@ -30,8 +30,8 @@ typedef struct LightSample {
ccl_device_inline float3 ellipse_sample(float3 ru, float3 rv, float randu, float randv)
{
- to_unit_disk(&randu, &randv);
- return ru * randu + rv * randv;
+ const float2 rand = concentric_sample_disk(randu, randv);
+ return ru * rand.x + rv * rand.y;
}
ccl_device_inline float3 rectangle_sample(float3 ru, float3 rv, float randu, float randv)
More information about the Bf-blender-cvs
mailing list