24 #ifndef PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H 25 #define PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H 29 #include "pxr/imaging/hdx/api.h" 30 #include "pxr/imaging/hdx/task.h" 32 #include "pxr/imaging/hgi/texture.h" 34 PXR_NAMESPACE_OPEN_SCOPE
43 : enableSelection(
false)
46 , enableOutline(
false)
49 , instanceIdBufferPath()
50 , elementIdBufferPath()
57 unsigned int outlineRadius;
86 void Prepare(HdTaskContext* ctx,
91 void Execute(HdTaskContext* ctx)
override;
98 HdDirtyBits* dirtyBits)
override;
103 void _ColorizeSelection();
105 GfVec4f _GetColorForMode(
int mode)
const;
109 bool _UpdateParameterBuffer();
121 struct _ParameterBuffer
126 int enableOutline = 0;
130 bool operator==(
const _ParameterBuffer& other)
const {
131 return texelSize == other.texelSize &&
132 enableOutline == other.enableOutline &&
133 radius == other.radius;
142 VtIntArray _selectionOffsets;
148 uint8_t *_outputBuffer;
149 size_t _outputBufferSize;
152 std::unique_ptr<class HdxFullscreenShader> _compositor;
154 _ParameterBuffer _parameterData;
155 HgiTextureHandle _texture;
156 bool _pipelineCreated;
170 PXR_NAMESPACE_CLOSE_SCOPE
172 #endif // PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H The Hydra render index is a flattened representation of the client scene graph, which may be composed...
A task for taking ID buffer data and turning it into a "selection overlay" that can be composited on ...
bool IsConverged() const override
Hooks for progressive rendering.
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
AR_API bool operator==(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
HDX_API void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex) override
Prepare the render pass resources.
Adapter class providing data exchange with the client scene graph.
A path value used to locate objects in layers or scenegraphs.
HDX_API void _Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
Sync the render pass resources.
Basic type for a vector of 4 float components.
Base class for (some) tasks in Hdx that provides common progressive rendering and Hgi functionality.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
HDX_API void Execute(HdTaskContext *ctx) override
Execute the task.
Basic type for a vector of 2 float components.
Input parameters for HdxColorizeSelectionTask.
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
VT_API bool operator==(VtDictionary const &, VtDictionary const &)
Equality comparison.