Add IBL support #29

Merged
Bogdan Nagirniak merged 5 commits from BLEN-385 into hydra-render 2023-04-27 09:25:11 +02:00
Showing only changes of commit d5ead16c0b - Show all commits

View File

@ -95,9 +95,11 @@ void WorldData::init()
if (color_input_node->type == SH_NODE_TEX_IMAGE) { if (color_input_node->type == SH_NODE_TEX_IMAGE) {
NodeTexImage *tex = static_cast<NodeTexImage *>(color_input_node->storage); NodeTexImage *tex = static_cast<NodeTexImage *>(color_input_node->storage);
Image *image = (Image *)color_input_node->id; Image *image = (Image *)color_input_node->id;
std::string image_path = cache_or_get_image_file(image, scene_delegate_, &tex->iuser); if (image) {
if (!image_path.empty()) { std::string image_path = cache_or_get_image_file(image, scene_delegate_, &tex->iuser);
data_[pxr::HdLightTokens->textureFile] = pxr::SdfAssetPath(image_path, image_path); if (!image_path.empty()) {
data_[pxr::HdLightTokens->textureFile] = pxr::SdfAssetPath(image_path, image_path);
}
} }
} }
} }