24 #ifndef HDX_VISUALIZE_AOV_TASK_H 25 #define HDX_VISUALIZE_AOV_TASK_H 29 #include "pxr/imaging/hdx/api.h" 30 #include "pxr/imaging/hdx/task.h" 31 #include "pxr/imaging/hdx/tokens.h" 32 #include "pxr/imaging/hgi/attachmentDesc.h" 33 #include "pxr/imaging/hgi/buffer.h" 34 #include "pxr/imaging/hgi/graphicsPipeline.h" 35 #include "pxr/imaging/hgi/resourceBindings.h" 36 #include "pxr/imaging/hgi/shaderProgram.h" 37 #include "pxr/imaging/hgi/texture.h" 38 #include "pxr/usd/sdf/path.h" 40 PXR_NAMESPACE_OPEN_SCOPE
70 void Prepare(HdTaskContext* ctx,
74 void Execute(HdTaskContext* ctx)
override;
80 HdDirtyBits* dirtyBits)
override;
98 bool _UpdateVizKernel(
TfToken const &aovName);
101 TfToken const& _GetTextureIdentifierForShader()
const;
104 TfToken const& _GetFragmentMixin()
const;
108 bool _CreateShaderResources(
HgiTextureDesc const& inputAovTextureDesc);
111 bool _CreateBufferResources();
114 bool _CreateResourceBindings(HgiTextureHandle
const& inputAovTexture);
120 bool _CreateSampler();
123 bool _CreateOutputTexture(
GfVec3i const &dimensions);
126 void _DestroyShaderProgram();
129 void _PrintCompileErrors();
133 void _UpdateMinMaxDepth(HgiTextureHandle
const &inputAovTexture);
136 void _ApplyVisualizationKernel(HgiTextureHandle
const& outputTexture);
139 HgiTextureHandle _outputTexture;
140 GfVec3i _outputTextureDimensions;
151 float _screenSize[2];
152 float _minMaxDepth[2];
153 VizKernel _vizKernel;
184 PXR_NAMESPACE_CLOSE_SCOPE
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Describes the properties of a framebuffer attachment.
A task for visualizing non-color AOVs such as depth, normals, primId.
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
AR_API bool operator==(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
Describes the properties needed to create a GPU texture.
Token for efficient comparison, assignment, and hashing of known strings.
aovName: The name of the aov to visualize.
Adapter class providing data exchange with the client scene graph.
Basic type for a vector of 3 int components.
A path value used to locate objects in layers or scenegraphs.
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].