Page MenuHome

Cleanup: renaming `tan_spread` to `cot_half_spread` to avoid ambiguity
ClosedPublic

Authored by Weizhen Huang (weizhen) on Dec 5 2022, 5:04 PM.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 24935
Build 24935: arc lint + arc unit

Event Timeline

Weizhen Huang (weizhen) requested review of this revision.Dec 5 2022, 5:04 PM
Weizhen Huang (weizhen) created this revision.

This is a simple cleanup commit, I'm submitting as a patch because the regression test fails on light_spread.blend and area_light_uv.blend. This is due to numerical issues, if I change normalize_spread from 1.0f / (1.0f - half_spread * cot_half_spread) to 2.0f / (2.0f + (2.0f * 0.5f * (M_PI_F - 2.0f * half_spread) - M_PI_F) * cot_half_spread) (as the way computed before), the regression test would pass. I guess we could just update the images in the regression test, but I don't know how.
This is a comparison of the values of normalize_spread before and after the patch:

spread anglebeforeafter
90°4.659794.65979
30°43.570643.5702
10°393.813393.841
49056.267924
This revision is now accepted and ready to land.Dec 5 2022, 5:08 PM