24 #ifndef HDX_COLORCORRECTION_TASK_H
25 #define HDX_COLORCORRECTION_TASK_H
28 #include "pxr/usd/sdf/path.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"
41 PXR_NAMESPACE_OPEN_SCOPE
56 ~HdxColorCorrectionTask()
override;
60 void Prepare(HdTaskContext* ctx,
65 void Execute(HdTaskContext* ctx)
override;
72 HdDirtyBits* dirtyBits)
override;
75 HdxColorCorrectionTask() =
delete;
76 HdxColorCorrectionTask(
const HdxColorCorrectionTask &) =
delete;
77 HdxColorCorrectionTask &operator =(
const HdxColorCorrectionTask &) =
delete;
80 std::string _CreateOpenColorIOResources();
83 bool _GetUseOcio()
const;
86 bool _CreateShaderResources();
89 bool _CreateBufferResources();
92 bool _CreateResourceBindings(HgiTextureHandle
const& aovTexture);
95 bool _CreatePipeline(HgiTextureHandle
const& aovTexture);
98 bool _CreateSampler();
101 void _ApplyColorCorrection(HgiTextureHandle
const& aovTexture);
104 void _DestroyShaderProgram();
107 void _PrintCompileErrors();
112 HgiTextureHandle _texture3dLUT;
119 std::string _displayOCIO;
120 std::string _viewOCIO;
121 std::string _colorspaceOCIO;
122 std::string _looksOCIO;
125 float _screenSize[2];
157 std::string displayOCIO;
158 std::string viewOCIO;
159 std::string colorspaceOCIO;
160 std::string looksOCIO;
180 PXR_NAMESPACE_CLOSE_SCOPE
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
A task for performing color correction (and optionally color grading) on a color buffer to transform ...
Describes the properties of a framebuffer attachment.
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
AR_API bool operator==(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
ColorCorrectionTask parameters.
Token for efficient comparison, assignment, and hashing of known strings.
HDX_API void Execute(HdTaskContext *ctx) override
Execute the color correction task.
Adapter class providing data exchange with the client scene graph.
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].
HDX_API void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex) override
Prepare the tasks resources.
HDX_API void _Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
Sync the render pass resources.