Page MenuHome

Cycles: Fix uniform cone sampling
ClosedPublic

Authored by Lukas Stockner (lukasstockner97) on Jun 6 2020, 9:35 PM.

Details

Summary

This code is currently only used for the Glossy Toon BSDF, but it's a generic
building block that might be used for other things in the future.

To see why the current code does not give a uniform distribution, consider that
it chooses both angles uniformly, but the smaller the angle from the center of
the cone is, the smaller the differential solid angle is (similar to how
sampling disks by choosing radius and phi uniformly does not work).

Diff Detail

Repository
rB Blender

Event Timeline

Lukas Stockner (lukasstockner97) requested review of this revision.Jun 6 2020, 9:35 PM
Lukas Stockner (lukasstockner97) created this revision.

Correction: It's also used for the Diffuse Toon BSDF.

This revision is now accepted and ready to land.Jun 8 2020, 2:52 PM