Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/light.cpp
| Show First 20 Lines • Show All 244 Lines • ▼ Show 20 Lines | if (last_background_enabled != background_enabled || | ||||
| last_background_resolution = background_resolution; | last_background_resolution = background_resolution; | ||||
| need_update_background = true; | need_update_background = true; | ||||
| } | } | ||||
| } | } | ||||
| bool LightManager::object_usable_as_light(Object *object) | bool LightManager::object_usable_as_light(Object *object) | ||||
| { | { | ||||
| Geometry *geom = object->geometry; | Geometry *geom = object->geometry; | ||||
| if (geom->type != Geometry::MESH) { | if (geom->type != Geometry::MESH && geom->type != Geometry::VOLUME) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* Skip objects with NaNs */ | /* Skip objects with NaNs */ | ||||
| if (!object->bounds.valid()) { | if (!object->bounds.valid()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* Skip if we are not visible for BSDFs. */ | /* Skip if we are not visible for BSDFs. */ | ||||
| if (!(object->visibility & (PATH_RAY_DIFFUSE | PATH_RAY_GLOSSY | PATH_RAY_TRANSMIT))) { | if (!(object->visibility & (PATH_RAY_DIFFUSE | PATH_RAY_GLOSSY | PATH_RAY_TRANSMIT))) { | ||||
| ▲ Show 20 Lines • Show All 873 Lines • Show Last 20 Lines | |||||