* Avoid an unnecessary condition in light.cpp, (totarea > 0.0f) is always true inside the "if(kintegrator->use_direct_light)" branch.
This commit is contained in:
Thomas Dinges
2013-03-23 10:11:29 +00:00
parent 838c263be1
commit 349c5ecc95
2 changed files with 2 additions and 2 deletions

View File

@@ -332,7 +332,7 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
if(kintegrator->use_direct_light) {
/* number of emissives */
kintegrator->num_distribution = (totarea > 0.0f)? num_distribution: 0;
kintegrator->num_distribution = num_distribution;
/* precompute pdfs */
kintegrator->pdf_triangles = 0.0f;

View File

@@ -307,4 +307,4 @@ const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, i
void UI_make_axis_color(const unsigned char *src_col, unsigned char *dst_col, const char axis);
#endif /* UI_ICONS_H */
#endif /* UI_RESOURCES_H */