24 #ifndef PXR_IMAGING_HDX_TASK_CONTROLLER_H
25 #define PXR_IMAGING_HDX_TASK_CONTROLLER_H
61 bool gpuEnabled =
true);
180 const std::pair<bool, CameraUtilConformWindowPolicy> &
policy);
277 HdxTaskController &operator=(HdxTaskController
const&) =
delete;
285 void _CreateRenderGraph();
287 void _CreateLightingTask();
288 void _CreateShadowTask();
291 void _CreateOitResolveTask();
292 void _CreateSelectionTask();
293 void _CreateColorizeSelectionTask();
294 void _CreateColorCorrectionTask();
295 void _CreateVisualizeAovTask();
296 void _CreatePickTask();
297 void _CreatePickFromRenderBufferTask();
298 void _CreateBoundingBoxTask();
299 void _CreateAovInputTask();
300 void _CreatePresentTask();
302 void _SetCameraParamForTasks(
SdfPath const&
id);
303 void _SetCameraFramingForTasks();
304 void _UpdateAovDimensions(
GfVec2i const& dimensions);
306 void _SetBlendStateForMaterialTag(
TfToken const& materialTag,
310 bool _ShadowsEnabled()
const;
311 bool _SelectionEnabled()
const;
312 bool _ColorizeSelectionEnabled()
const;
313 bool _ColorCorrectionEnabled()
const;
314 bool _VisualizeAovEnabled()
const;
315 bool _ColorizeQuantizationEnabled()
const;
316 bool _AovsSupported()
const;
317 bool _UsingAovs()
const;
325 bool _SupportBuiltInLightTypes();
326 void _SetBuiltInLightingState(GlfSimpleLightingContextPtr
const&
src);
336 void _SetMaterialNetwork(
SdfPath const& pathName,
339 void _RemoveLightSprim(
size_t const& pathIdx);
340 void _ReplaceLightSprim(
size_t const& pathIdx,
GlfSimpleLight const& light,
353 ~_Delegate()
override =
default;
356 template <
typename T>
359 _valueCacheMap[
id][key] =
value;
361 template <
typename T>
369 return vParams.
Get<
T>();
374 vCache.count(key) > 0) {
384 TfToken const& paramName)
override;
386 bool IsEnabled(
TfToken const& option)
const override;
388 GetRenderBufferDescriptor(
SdfPath const&
id)
override;
395 _ValueCacheMap _valueCacheMap;
398 std::unique_ptr<class HdxFreeCameraSceneDelegate> _freeCameraSceneDelegate;
407 SdfPath _colorizeSelectionTaskId;
408 SdfPath _colorCorrectionTaskId;
411 SdfPath _pickFromRenderBufferTaskId;
428 std::pair<bool, CameraUtilConformWindowPolicy> _overrideWindowPolicy;
435 #endif // PXR_IMAGING_HDX_TASK_CONTROLLER_H
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 SetOverrideWindowPolicy(const std::pair< bool, CameraUtilConformWindowPolicy > &policy)
HDX_API void SetBBoxParams(const HdxBoundingBoxTaskParams ¶ms)
Set the bounding box params.
GLsizei const GLfloat * value
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 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 HdTaskSharedPtrVector const GetPickingTasks() const
HDX_API void SetCameraPath(SdfPath const &id)
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
Return whether the image has converged.
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
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 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 HdTaskSharedPtrVector const GetRenderingTasks() const
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.