Cycles: using concentric mapping when sampling disk
This commit is contained in:
parent
85d92afbd4
commit
014ffc4615
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue