7 #ifndef PXR_IMAGING_HDX_TASK_CONTROLLER_H
8 #define PXR_IMAGING_HDX_TASK_CONTROLLER_H
44 bool gpuEnabled =
true);
173 const std::optional<CameraUtilConformWindowPolicy> &
policy);
279 HdxTaskController &operator=(HdxTaskController
const&) =
delete;
287 void _CreateRenderGraph();
289 void _CreateLightingTask();
290 void _CreateShadowTask();
293 void _CreateOitResolveTask();
294 void _CreateSelectionTask();
295 void _CreateColorizeSelectionTask();
296 void _CreateColorCorrectionTask();
297 void _CreateVisualizeAovTask();
298 void _CreatePickTask();
299 void _CreatePickFromRenderBufferTask();
300 void _CreateBoundingBoxTask();
301 void _CreateAovInputTask();
302 void _CreatePresentTask();
304 void _SetCameraParamForTasks(
SdfPath const&
id);
305 void _SetCameraFramingForTasks();
306 void _UpdateAovDimensions(
GfVec2i const& dimensions);
308 void _SetBlendStateForMaterialTag(
TfToken const& materialTag,
312 bool _ShadowsEnabled()
const;
313 bool _SelectionEnabled()
const;
314 bool _ColorizeSelectionEnabled()
const;
315 bool _ColorCorrectionEnabled()
const;
316 bool _VisualizeAovEnabled()
const;
317 bool _ColorizeQuantizationEnabled()
const;
318 bool _AovsSupported()
const;
319 bool _UsingAovs()
const;
327 bool _SupportBuiltInLightTypes();
328 void _SetBuiltInLightingState(GlfSimpleLightingContextPtr
const&
src);
338 void _SetMaterialNetwork(
SdfPath const& pathName,
341 void _RemoveLightSprim(
size_t const& pathIdx);
342 void _ReplaceLightSprim(
size_t const& pathIdx,
GlfSimpleLight const& light,
355 ~_Delegate()
override =
default;
358 template <
typename T>
361 _valueCacheMap[
id][key] =
value;
363 template <
typename T>
371 return vParams.
Get<
T>();
376 vCache.count(key) > 0) {
386 TfToken const& paramName)
override;
388 bool IsEnabled(
TfToken const& option)
const override;
390 GetRenderBufferDescriptor(
SdfPath const&
id)
override;
397 _ValueCacheMap _valueCacheMap;
400 std::unique_ptr<class HdxFreeCameraSceneDelegate> _freeCameraSceneDelegate;
409 SdfPath _colorizeSelectionTaskId;
410 SdfPath _colorCorrectionTaskId;
413 SdfPath _pickFromRenderBufferTaskId;
430 std::optional<CameraUtilConformWindowPolicy> _overrideWindowPolicy;
437 #endif // PXR_IMAGING_HDX_TASK_CONTROLLER_H
HDX_API HdTaskSharedPtrVector GetRenderingTasks() const
HDX_API void SetOverrideWindowPolicy(const std::optional< CameraUtilConformWindowPolicy > &policy)
HDX_API ~HdxTaskController()
HDX_API void SetRenderParams(HdxRenderTaskParams const ¶ms)
hboost::math::policies::policy< hboost::math::policies::domain_error< hboost::math::policies::ignore_error >, hboost::math::policies::pole_error< hboost::math::policies::ignore_error >, hboost::math::policies::overflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::underflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::denorm_error< hboost::math::policies::ignore_error >, hboost::math::policies::rounding_error< hboost::math::policies::ignore_error >, hboost::math::policies::evaluation_error< hboost::math::policies::ignore_error >, hboost::math::policies::indeterminate_result_error< hboost::math::policies::ignore_error > > policy
HDX_API HdAovDescriptor GetRenderOutputSettings(TfToken const &name) const
Get parameters for an AOV.
HDX_API void SetBBoxParams(const HdxBoundingBoxTaskParams ¶ms)
Set the bounding box params.
GLsizei const GLfloat * value
HDX_API SdfPathVector GetPickingTaskPaths() const
GLenum GLenum GLsizei const GLuint GLboolean enabled
HDX_API void SetRenderOutputs(TfTokenVector const &names)
HDX_API void SetRenderBufferSize(const GfVec2i &size)
std::vector< HdTaskSharedPtr > HdTaskSharedPtrVector
HDX_API HdTaskSharedPtrVector GetPickingTasks() const
HDX_API HdRenderBuffer * GetRenderOutput(TfToken const &name)
GLenum const GLfloat * params
HdRenderIndex * GetRenderIndex()
Return the render index this controller is bound to.
HDX_API void SetViewportRenderOutput(TfToken const &name)
HdRenderIndex const * GetRenderIndex() const
SdfPath const & GetControllerId() const
bool TfMapLookup(Container const &map, Key const &key, Result *valuePtr)
HDX_API void SetFraming(const CameraUtilFraming &framing)
HDX_API void SetLightingState(GlfSimpleLightingContextPtr const &src)
HDX_API void SetCameraPath(SdfPath const &id)
std::vector< class SdfPath > SdfPathVector
HDX_API HdxTaskController(HdRenderIndex *renderIndex, SdfPath const &controllerId, bool gpuEnabled=true)
HDX_API void SetSelectionColor(GfVec4f const &color)
Set the selection color.
HDX_API void SetFreeCameraClipPlanes(std::vector< GfVec4d > const &clipPlanes)
std::vector< TfToken > TfTokenVector
Convenience types.
GLuint const GLchar * name
HDX_API bool IsConverged() const
HDX_API void SetShadowParams(HdxShadowTaskParams const ¶ms)
HDX_API void SetSelectionEnableOutline(bool enableOutline)
HDX_API void SetRenderOutputSettings(TfToken const &name, HdAovDescriptor const &desc)
Set custom parameters for an AOV.
HDX_API SdfPathVector GetRenderingTaskPaths() const
HDX_API void SetColorCorrectionParams(HdxColorCorrectionTaskParams const ¶ms)
Configure color correction by settings params.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HDX_API void SetEnablePresentation(bool enabled)
HDX_API void SetRenderViewport(GfVec4d const &viewport)
#define PXR_NAMESPACE_CLOSE_SCOPE
HDX_API void SetRenderTags(TfTokenVector const &renderTags)
HDX_API void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer)
HDX_API void SetSelectionOutlineRadius(unsigned int radius)
HDX_API void SetEnableSelection(bool enable)
Turns the selection task on or off.
HDX_API void SetCollection(HdRprimCollection const &collection)
Set the collection to be rendered.
HDX_API void SetFreeCameraMatrices(GfMatrix4d const &viewMatrix, GfMatrix4d const &projectionMatrix)
HDX_API void SetEnableShadows(bool enable)
Turns the shadow task on or off.
HDX_API void SetSelectionLocateColor(GfVec4f const &color)
Set the selection locate (over) color.