Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/scene/light_tree.cpp
| Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | else if (type == LIGHT_DISTANT) { | ||||
| bcone.theta_o = 0; | bcone.theta_o = 0; | ||||
| bcone.theta_e = 0.5f * lamp->get_angle(); | bcone.theta_e = 0.5f * lamp->get_angle(); | ||||
| } | } | ||||
| if (lamp->get_shader()) { | if (lamp->get_shader()) { | ||||
| strength *= lamp->get_shader()->emission_estimate; | strength *= lamp->get_shader()->emission_estimate; | ||||
| } | } | ||||
| energy = average(strength); | /* Use absolute value of energy so lights with negative strength are properly | ||||
| * supported in the light tree. */ | |||||
| energy = fabsf(average(strength)); | |||||
| } | } | ||||
| } | } | ||||
| LightTree::LightTree(vector<LightTreePrimitive> &prims, | LightTree::LightTree(vector<LightTreePrimitive> &prims, | ||||
| const int &num_distant_lights, | const int &num_distant_lights, | ||||
| uint max_lights_in_leaf) | uint max_lights_in_leaf) | ||||
| { | { | ||||
| if (prims.empty()) { | if (prims.empty()) { | ||||
| ▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines | |||||