Loading...
Searching...
No Matches
aovInputTask.h
1//
2// Copyright 2020 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HDX_AOV_INPUT_TASK_H
8#define PXR_IMAGING_HDX_AOV_INPUT_TASK_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdx/api.h"
12#include "pxr/imaging/hdx/task.h"
13#include "pxr/imaging/hgi/texture.h"
14
15PXR_NAMESPACE_OPEN_SCOPE
16
29{
30public:
31 HDX_API
32 HdxAovInputTask(HdSceneDelegate* delegate, SdfPath const& id);
33
34 HDX_API
35 ~HdxAovInputTask() override;
36
38 bool IsConverged() const override;
39
40 HDX_API
41 void Prepare(
42 HdTaskContext* ctx,
43 HdRenderIndex* renderIndex) override;
44
45 HDX_API
46 void Execute(HdTaskContext* ctx) override;
47
48protected:
49 HDX_API
50 void _Sync(
51 HdSceneDelegate* delegate,
52 HdTaskContext* ctx,
53 HdDirtyBits* dirtyBits) override;
54
55private:
56 void _UpdateTexture(
57 HdTaskContext* ctx,
58 HgiTextureHandle& texture,
59 HdRenderBuffer* buffer,
60 HgiTextureUsageBits usage);
61
62 void _UpdateIntermediateTexture(
63 HgiTextureHandle& texture,
64 HdRenderBuffer* buffer,
65 HgiTextureUsageBits usage);
66
67 bool _converged;
68
69 SdfPath _aovBufferPath;
70 SdfPath _depthBufferPath;
71
72 HdRenderBuffer* _aovBuffer;
73 HdRenderBuffer* _depthBuffer;
74
75 HgiTextureHandle _aovTexture;
76 HgiTextureHandle _depthTexture;
77 HgiTextureHandle _aovTextureIntermediate;
78 HgiTextureHandle _depthTextureIntermediate;
79
80 HdxAovInputTask() = delete;
81 HdxAovInputTask(const HdxAovInputTask &) = delete;
82 HdxAovInputTask &operator =(const HdxAovInputTask &) = delete;
83};
84
85
91{
93 : aovBufferPath()
94 , depthBufferPath()
95 {}
96
97 SdfPath aovBufferPath;
98 SdfPath depthBufferPath;
99};
100
101// VtValue requirements
102HDX_API
103std::ostream& operator<<(std::ostream& out, const HdxAovInputTaskParams& pv);
104HDX_API
105bool operator==(const HdxAovInputTaskParams& lhs,
106 const HdxAovInputTaskParams& rhs);
107HDX_API
108bool operator!=(const HdxAovInputTaskParams& lhs,
109 const HdxAovInputTaskParams& rhs);
110
111
112PXR_NAMESPACE_CLOSE_SCOPE
113
114#endif
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
Definition: renderBuffer.h:33
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:104
Adapter class providing data exchange with the client scene graph.
A task for taking input AOV data comming from a render buffer that was filled by render tasks and con...
Definition: aovInputTask.h:29
bool IsConverged() const override
Hooks for progressive rendering.
Base class for (some) tasks in Hdx that provides common progressive rendering and Hgi functionality.
Definition: task.h:28
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
AovInput parameters.
Definition: aovInputTask.h:91