This patch fixes T75087 by setting float offset to zero if wpd->taa_sample_len is zero. The offset is only used as input to get_random_vector(), which also works fine with a zero offset.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- 2020-03-25-fix-divide-by-zero (branched from master)
- Build Status
Buildable 7306 Build 7306: arc lint + arc unit
Event Timeline
This comment was removed by Robert Guetzkow (rjg).
| source/blender/draw/engines/workbench/workbench_effect_dof.c | ||
|---|---|---|
| 332 | Prefer offset = wpd->taa_sample / (float)max_ii(1, wpd->taa_sample_len);. I also just found that we are missing a float cast here. | |
Comment Actions
This revision was abandoned because I don't have commit access yet and this one line fix is easier and faster to add if @Clément Foucault (fclem) does this himself. The fix was commited in rBa0437c3f730f14be83f8e6cb20432b3775ffd03f.