Task manager implementation in Hydrogent. More...
#include <HnTaskManager.hpp>
Public Member Functions | |
const pxr::HdTaskSharedPtrVector | GetTasks (const std::vector< TaskUID > *TaskOrder=nullptr) const |
void | SetCollection (const pxr::HdRprimCollection &Collection) |
Sets new collection for the render tasks. | |
void | SetRenderTags (const pxr::TfTokenVector &RenderTags) |
Sets new render tags for the render tasks. | |
void | SetParameter (const pxr::SdfPath &TaskId, const pxr::TfToken &ValueKey, pxr::VtValue Value) |
Sets the parameter value. | |
template<typename ParamterType> | |
void | SetParameter (const pxr::SdfPath &TaskId, const pxr::TfToken &ValueKey, ParamterType &&Value) |
Sets the parameter value. | |
template<typename ParamterType> | |
void | SetParameter (const pxr::TfToken &TaskName, const pxr::TfToken &ValueKey, ParamterType &&Value) |
Sets the parameter value. | |
template<typename TaskType, typename TaskParamsType> | |
void | CreateTask (const pxr::SdfPath &TaskId, TaskUID UID, TaskParamsType &&Params, bool Enabled=true) |
template<typename TaskType, typename TaskParamsType> | |
void | CreateTask (const pxr::TfToken &TaskName, TaskUID UID, TaskParamsType &&Params, bool Enabled=true) |
const pxr::SdfPath * | GetSelectedRPrimId () const |
void | EnableMaterial (const pxr::TfToken &MaterialTag, bool Enable) |
Enables or disables the tasks associated with the specified material tag. | |
void | EnableEnvironmentMap (bool Enable) |
Enables or disables environment map rendering. | |
bool | IsEnvironmentMapEnabled () const |
Returns true if environment map rendering is enabled. | |
bool | IsMaterialEnabled (const pxr::TfToken &MaterialTag) const |
Returns true if the tasks associated with the specified material tag are enabled. | |
void | EnableSelectedPrimBoundBox (bool Enable) |
Enables or disables the rendering of the selected Rprim's bounding box. | |
bool | IsSelectedPrimBoundBoxEnabled () const |
Returns true if the rendering of the selected Rprim's bounding box is enabled. | |
void | ResetTAA () |
Resets temporal anti-aliasing. | |
void | SuspendSuperSampling () |
Suspends temporal super-sampling. | |
Task manager implementation in Hydrogent.
void Diligent::USD::HnTaskManager::CreateTask | ( | const pxr::SdfPath & | TaskId, |
TaskUID | UID, | ||
TaskParamsType && | Params, | ||
bool | Enabled = true ) |
Creates a new render task.
[in] | TaskId | - The task ID that will be used to register the task in the render index. |
[in] | UID | - The task UID that will be used to identify the task in the task manager. |
[in] | Params | - The task parameters that will be associated with the task using the task ID. |
[in] | Enabled | - Whether the task is enabled. |
void Diligent::USD::HnTaskManager::CreateTask | ( | const pxr::TfToken & | TaskName, |
TaskUID | UID, | ||
TaskParamsType && | Params, | ||
bool | Enabled = true ) |
Creates a new render task.
This is method is similar to the one above, but it automatically appends the task ID as child of the manager ID.
const pxr::SdfPath * Diligent::USD::HnTaskManager::GetSelectedRPrimId | ( | ) | const |
Returns the Id of the selected Rprim:
const pxr::HdTaskSharedPtrVector Diligent::USD::HnTaskManager::GetTasks | ( | const std::vector< TaskUID > * | TaskOrder = nullptr | ) | const |
Returns the list of tasks that can be passed to the Hydra engine for execution.
[in] | TaskOrder | - Optional task order. If not specified, the following default order is used:
|
Task | Selected Rprims | Unselected Rprims | Color | Mesh ID | G-Buffer | Selection Detph | Main Depth |
---|---|---|---|---|---|---|---|
BeginFrame | |||||||
RenderShadows | |||||||
BeginMainPass | |||||||
RenderRprimsDefaultSelected | V | V | V | V | V | ||
RenderRprimsMaskedSelected | V | V | V | V | V | ||
CopySelectionDepth | V—copy– | ---->V | |||||
RenderRprimsDefaultUnselected | V | V | V | V | V | ||
RenderRprimsMaskedUnselected | V | V | V | V | V | ||
RenderEnvMap | V | ||||||
RenderBoundBox | V | ||||||
RenderRprimsAdditive | V | V | V | V | V | V | |
BeginOITPass | |||||||
RenderRprimsOITLayers | V | V | |||||
EndOITPass | |||||||
RenderRprimsTranslucent | V | V | V | V | V | V | |
RenderRprimsTranslucentMeshId | V | V | V | MV, N | V | ||
RenderRprimsAdditiveSelected | V | V | |||||
RenderRprimsTranslucentSelected | V | V | |||||
ComputeDepthBounds | |||||||
ReadRprimId | |||||||
ProcessSelection | |||||||
PostProcess |