forked from blender/blender
Add IBL support #29
@ -95,6 +95,7 @@ void WorldData::init()
|
||||
if (color_input_node->type == SH_NODE_TEX_IMAGE) {
|
||||
NodeTexImage *tex = static_cast<NodeTexImage *>(color_input_node->storage);
|
||||
Image *image = (Image *)color_input_node->id;
|
||||
if (image) {
|
||||
std::string image_path = cache_or_get_image_file(image, scene_delegate_, &tex->iuser);
|
||||
if (!image_path.empty()) {
|
||||
data_[pxr::HdLightTokens->textureFile] = pxr::SdfAssetPath(image_path, image_path);
|
||||
@ -102,6 +103,7 @@ void WorldData::init()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
data_[pxr::HdLightTokens->intensity] = 1.0f;
|
||||
data_[pxr::HdLightTokens->exposure] = world->exposure;
|
||||
|
Loading…
Reference in New Issue
Block a user