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/graphicsCmds.h"
35#include "pxr/imaging/hgi/graphicsPipeline.h"
36#include "pxr/imaging/hgi/resourceBindings.h"
37#include "pxr/imaging/hgi/shaderProgram.h"
38#include "pxr/imaging/hgi/texture.h"
42PXR_NAMESPACE_OPEN_SCOPE
70 std::string displayOCIO;
72 std::string colorspaceOCIO;
73 std::string looksOCIO;
111 HdDirtyBits* dirtyBits)
override;
119 struct _TextureSamplerDesc {
122 std::vector<float> samples;
126 struct _UniformBufferDesc {
127 std::string typeName;
129 std::vector<uint8_t> data;
133 friend struct HdxColorCorrectionTask_UboBuilder;
136 struct _OCIOResources {
137 std::vector<_TextureSamplerDesc> luts;
138 std::vector<_UniformBufferDesc> ubos;
139 std::vector<unsigned char> constantValues;
140 std::string gpuShaderText;
145 _CreateOpenColorIOResources(
148 _OCIOResources *result);
150 _CreateOpenColorIOResourcesImpl(
153 _OCIOResources *result);
156 bool _GetUseOcio()
const;
159 bool _CreateShaderResources();
162 std::string _CreateOpenColorIOShaderCode(std::string &ocioGpuShaderText,
166 bool _CreateBufferResources();
178 bool _CreateAovSampler();
187 void _DestroyShaderProgram();
190 void _PrintCompileErrors();
195 _OCIOResources _ocioResources;
202 struct TextureSamplerInfo
207 std::string samplerName;
210 std::vector<TextureSamplerInfo> _textureLUTs;
214 std::string typeName;
219 std::vector<BufferInfo> _bufferConstants;
224 float _screenSize[2];
226 std::unique_ptr<class WorkDispatcher> _workDispatcher;
240PXR_NAMESPACE_CLOSE_SCOPE
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Adapter class providing data exchange with the client scene graph.
A task for performing color correction (and optionally color grading) on a color buffer to transform ...
HDX_API void _Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
Sync the render pass resources.
HDX_API void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex) override
Prepare the tasks resources.
HDX_API void Execute(HdTaskContext *ctx) override
Execute the color correction task.
Base class for (some) tasks in Hdx that provides common progressive rendering and Hgi functionality.
A graphics API independent abstraction of graphics commands.
Hydra Graphics Interface.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
ColorCorrectionTask parameters.
Describes the properties of a framebuffer attachment.
Describes a set of resources that are bound to the GPU during encoding.
Describes the properties needed to create a GPU sampler.
Describes the properties needed to create a GPU shader function.
Describes the properties needed to create a GPU texture.