forked from blender/blender
Make DomeLight visible for Storm delegate #68
@ -54,8 +54,7 @@ Engine::Engine(RenderEngine *bl_engine, const std::string &render_delegate_name)
|
|||||||
render_index_.get(), pxr::SdfPath::AbsoluteRootPath().AppendElementString("renderTask"));
|
render_index_.get(), pxr::SdfPath::AbsoluteRootPath().AppendElementString("renderTask"));
|
||||||
if (render_delegate_name == "HdStormRendererPlugin") {
|
if (render_delegate_name == "HdStormRendererPlugin") {
|
||||||
light_tasks_delegate_ = std::make_unique<LightTasksDelegate>(
|
light_tasks_delegate_ = std::make_unique<LightTasksDelegate>(
|
||||||
render_index_.get(),
|
render_index_.get(), pxr::SdfPath::AbsoluteRootPath().AppendElementString("lightTasks"));
|
||||||
pxr::SdfPath::AbsoluteRootPath().AppendElementString("lightTasks"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
engine_ = std::make_unique<pxr::HdEngine>();
|
engine_ = std::make_unique<pxr::HdEngine>();
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
#include "CLG_log.h"
|
#include "CLG_log.h"
|
||||||
|
|
||||||
#include "render_task_delegate.h"
|
|
||||||
#include "light_tasks_delegate.h"
|
#include "light_tasks_delegate.h"
|
||||||
|
#include "render_task_delegate.h"
|
||||||
|
|
||||||
#include "scene_delegate/blender_scene_delegate.h"
|
#include "scene_delegate/blender_scene_delegate.h"
|
||||||
#include "scene_delegate/usd_scene_delegate.hh"
|
#include "scene_delegate/usd_scene_delegate.hh"
|
||||||
|
@ -109,8 +109,7 @@ void FinalEngine::prepare_for_render(Depsgraph *depsgraph)
|
|||||||
if (light_tasks_delegate_) {
|
if (light_tasks_delegate_) {
|
||||||
light_tasks_delegate_->set_camera_path(free_camera_delegate_->GetCameraId());
|
light_tasks_delegate_->set_camera_path(free_camera_delegate_->GetCameraId());
|
||||||
light_tasks_delegate_->set_camera_and_viewport(
|
light_tasks_delegate_->set_camera_and_viewport(
|
||||||
free_camera_delegate_->GetCameraId(), pxr::GfVec4d(0, 0, resolution_[0],
|
free_camera_delegate_->GetCameraId(), pxr::GfVec4d(0, 0, resolution_[0], resolution_[1]));
|
||||||
resolution_[1]));
|
|
||||||
tasks_ = light_tasks_delegate_->get_tasks();
|
tasks_ = light_tasks_delegate_->get_tasks();
|
||||||
}
|
}
|
||||||
tasks_.push_back(render_task_delegate_->get_task());
|
tasks_.push_back(render_task_delegate_->get_task());
|
||||||
|
@ -20,10 +20,7 @@ LightTasksDelegate::LightTasksDelegate(pxr::HdRenderIndex *parent_index,
|
|||||||
|
|
||||||
pxr::HdTaskSharedPtrVector LightTasksDelegate::get_tasks()
|
pxr::HdTaskSharedPtrVector LightTasksDelegate::get_tasks()
|
||||||
{
|
{
|
||||||
return {
|
return {GetRenderIndex().GetTask(skydome_task), GetRenderIndex().GetTask(simple_light_task)};
|
||||||
GetRenderIndex().GetTask(skydome_task),
|
|
||||||
GetRenderIndex().GetTask(simple_light_task)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightTasksDelegate::set_camera_path(pxr::SdfPath const &camera_path)
|
void LightTasksDelegate::set_camera_path(pxr::SdfPath const &camera_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user