Support more AOVs #78

Merged
Bogdan Nagirniak merged 11 commits from DagerD/blender:BLEN-462_3 into hydra-render 2023-07-29 14:45:16 +02:00
2 changed files with 6 additions and 9 deletions
Showing only changes of commit 06aec6a826 - Show all commits

View File

@ -119,7 +119,8 @@ void Engine::set_sync_setting(const std::string &key, const pxr::VtValue &val)
void Engine::set_render_setting(const std::string &key, const pxr::VtValue &val) void Engine::set_render_setting(const std::string &key, const pxr::VtValue &val)
{ {
if (STRPREFIX(key.c_str(), "aovToken:")) { if (STRPREFIX(key.c_str(), "aovToken:")) {
render_delegate_settings_.aovs.add_new(key.substr(key.find(":") + 1), pxr::TfToken(val.UncheckedGet<std::string>())); render_delegate_settings_.aovs.add_new(key.substr(key.find(":") + 1),
pxr::TfToken(val.UncheckedGet<std::string>()));
} }
else { else {
render_delegate_->SetRenderSetting(pxr::TfToken(key), val); render_delegate_->SetRenderSetting(pxr::TfToken(key), val);

View File

@ -70,8 +70,7 @@ void RenderTaskDelegate::set_camera(pxr::SdfPath const &camera_id)
return; return;
} }
task_params_.camera = camera_id; task_params_.camera = camera_id;
GetRenderIndex().GetChangeTracker().MarkTaskDirty(task_id_, GetRenderIndex().GetChangeTracker().MarkTaskDirty(task_id_, pxr::HdChangeTracker::DirtyParams);
pxr::HdChangeTracker::DirtyParams);
} }
bool RenderTaskDelegate::is_converged() bool RenderTaskDelegate::is_converged()
@ -86,8 +85,7 @@ void RenderTaskDelegate::set_viewport(pxr::GfVec4d const &viewport)
} }
auto &render_index = GetRenderIndex(); auto &render_index = GetRenderIndex();
task_params_.viewport = viewport; task_params_.viewport = viewport;
render_index.GetChangeTracker().MarkTaskDirty(task_id_, render_index.GetChangeTracker().MarkTaskDirty(task_id_, pxr::HdChangeTracker::DirtyParams);
pxr::HdChangeTracker::DirtyParams);
int w = viewport[2] - viewport[0]; int w = viewport[2] - viewport[0];
int h = viewport[3] - viewport[1]; int h = viewport[3] - viewport[1];
@ -123,8 +121,7 @@ void RenderTaskDelegate::add_aov(pxr::TfToken const &aov_key)
binding.renderBufferId = buf_id; binding.renderBufferId = buf_id;
binding.aovSettings = aov_desc.aovSettings; binding.aovSettings = aov_desc.aovSettings;
task_params_.aovBindings.push_back(binding); task_params_.aovBindings.push_back(binding);
render_index.GetChangeTracker().MarkTaskDirty(task_id_, render_index.GetChangeTracker().MarkTaskDirty(task_id_, pxr::HdChangeTracker::DirtyParams);
pxr::HdChangeTracker::DirtyParams);
CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", aov_key.GetText()); CLOG_INFO(LOG_RENDER_HYDRA, 1, "%s", aov_key.GetText());
} }
@ -171,8 +168,7 @@ void GPURenderTaskDelegate::set_viewport(pxr::GfVec4d const &viewport)
} }
auto &render_index = GetRenderIndex(); auto &render_index = GetRenderIndex();
task_params_.viewport = viewport; task_params_.viewport = viewport;
render_index.GetChangeTracker().MarkTaskDirty(task_id_, render_index.GetChangeTracker().MarkTaskDirty(task_id_, pxr::HdChangeTracker::DirtyParams);
pxr::HdChangeTracker::DirtyParams);
if (tex_color_) { if (tex_color_) {
GPU_texture_free(tex_color_); GPU_texture_free(tex_color_);