HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
aovInputTask.h
Go to the documentation of this file.
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
15
PXR_NAMESPACE_OPEN_SCOPE
16
17
struct
HdxAovInputTaskParams
;
18
19
/// \class HdxAovInputTask
20
///
21
/// A task for taking input AOV data comming from a render buffer that was
22
/// filled by render tasks and converting it to a HgiTexture.
23
/// The aov render buffer can be a GPU or CPU buffer, while the resulting output
24
/// HgiTexture will always be a GPU texture.
25
///
26
/// The HgiTexture is placed in the shared task context so that following tasks
27
/// maybe operate on this HgiTexture without having to worry about converting
28
/// the aov data from CPU to GPU.
29
///
30
class
HdxAovInputTask
:
public
HdxTask
31
{
32
public
:
33
using
TaskParams
=
HdxAovInputTaskParams
;
34
35
HDX_API
36
HdxAovInputTask
(
HdSceneDelegate
* delegate,
SdfPath
const
&
id
);
37
38
HDX_API
39
~HdxAovInputTask
()
override
;
40
41
/// Hooks for progressive rendering.
42
bool
IsConverged
()
const override
;
43
44
HDX_API
45
void
Prepare
(
46
HdTaskContext
* ctx,
47
HdRenderIndex
* renderIndex)
override
;
48
49
HDX_API
50
void
Execute
(
HdTaskContext
* ctx)
override
;
51
52
protected
:
53
HDX_API
54
void
_Sync
(
55
HdSceneDelegate
* delegate,
56
HdTaskContext
* ctx,
57
HdDirtyBits
* dirtyBits)
override
;
58
59
private
:
60
void
_UpdateTexture(
61
HdTaskContext
* ctx,
62
HgiTextureHandle
&
texture
,
63
HdRenderBuffer
*
buffer
,
64
HgiTextureUsageBits
usage
);
65
66
void
_UpdateIntermediateTexture(
67
HgiTextureHandle
&
texture
,
68
HdRenderBuffer
*
buffer
,
69
HgiTextureUsageBits
usage
);
70
71
bool
_converged;
72
73
SdfPath
_aovBufferPath;
74
SdfPath
_depthBufferPath;
75
76
HdRenderBuffer
* _aovBuffer;
77
HdRenderBuffer
* _depthBuffer;
78
79
HgiTextureHandle
_aovTexture;
80
HgiTextureHandle
_depthTexture;
81
HgiTextureHandle
_aovTextureIntermediate;
82
HgiTextureHandle
_depthTextureIntermediate;
83
84
HdxAovInputTask
() =
delete
;
85
HdxAovInputTask
(
const
HdxAovInputTask
&) =
delete
;
86
HdxAovInputTask
&operator =(
const
HdxAovInputTask
&) =
delete
;
87
};
88
89
90
/// \class HdxAovInputTaskParams
91
///
92
/// AovInput parameters.
93
///
94
struct
HdxAovInputTaskParams
95
{
96
HdxAovInputTaskParams
() {}
97
98
SdfPath
aovBufferPath
;
99
SdfPath
depthBufferPath
;
100
};
101
102
// VtValue requirements
103
HDX_API
104
std::ostream&
operator<<
(std::ostream& out,
const
HdxAovInputTaskParams
& pv);
105
HDX_API
106
bool
operator==
(
const
HdxAovInputTaskParams
& lhs,
107
const
HdxAovInputTaskParams
& rhs);
108
HDX_API
109
bool
operator!=
(
const
HdxAovInputTaskParams
& lhs,
110
const
HdxAovInputTaskParams
& rhs);
111
112
113
PXR_NAMESPACE_CLOSE_SCOPE
114
115
#endif
HdRenderIndex
Definition:
renderIndex.h:104
HdxAovInputTask::Execute
HDX_API void Execute(HdTaskContext *ctx) override
operator<<
HDX_API std::ostream & operator<<(std::ostream &out, const HdxAovInputTaskParams &pv)
HdxAovInputTaskParams::depthBufferPath
SdfPath depthBufferPath
Definition:
aovInputTask.h:99
HdDirtyBits
uint32_t HdDirtyBits
Definition:
types.h:143
HgiTextureHandle
int HgiHandle< class HgiTexture > HgiTextureHandle
Definition:
ptexTextureObject.h:36
HDX_API
#define HDX_API
Definition:
api.h:23
HdxAovInputTask
Definition:
aovInputTask.h:30
buffer
GLuint buffer
Definition:
glcorearb.h:660
HdxAovInputTaskParams::aovBufferPath
SdfPath aovBufferPath
Definition:
aovInputTask.h:98
HdxAovInputTask::IsConverged
bool IsConverged() const override
Hooks for progressive rendering.
pxr.h
HdSceneDelegate
Definition:
sceneDelegate.h:404
openvdb::OPENVDB_VERSION_NAME::math::Mat3::operator!=
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition:
Mat3.h:556
texture.h
HdxAovInputTaskParams::HdxAovInputTaskParams
HdxAovInputTaskParams()
Definition:
aovInputTask.h:96
HdxAovInputTask::_Sync
HDX_API void _Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
HdxAovInputTask::Prepare
HDX_API void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex) override
SdfPath
Definition:
path.h:273
HgiTextureUsageBits
HgiTextureUsageBits
Definition:
enums.h:142
HdTaskContext
std::unordered_map< TfToken, VtValue, TfToken::HashFunctor > HdTaskContext
Definition:
renderIndex.h:61
task.h
HdxTask
Definition:
task.h:27
HdxAovInputTask::~HdxAovInputTask
HDX_API ~HdxAovInputTask() override
usage
GLsizeiptr const void GLenum usage
Definition:
glcorearb.h:664
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
HdxAovInputTaskParams
Definition:
aovInputTask.h:94
api.h
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
HdRenderBuffer
Definition:
renderBuffer.h:32
texture
GLuint texture
Definition:
glcorearb.h:415
openvdb::OPENVDB_VERSION_NAME::math::Mat3::operator==
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition:
Mat3.h:542
pxr
imaging
hdx
aovInputTask.h
Generated on Wed Aug 27 2025 03:07:56 for HDK by
1.8.6