Cycles: using concentric mapping when sampling disk

This commit is contained in:
Weizhen Huang 2022-12-12 17:07:57 +01:00
parent 85d92afbd4
commit 014ffc4615
1 changed files with 2 additions and 2 deletions

View File

@ -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)