24 #ifndef PXR_IMAGING_HDX_SIMPLE_LIGHT_TASK_H 25 #define PXR_IMAGING_HDX_SIMPLE_LIGHT_TASK_H 28 #include "pxr/imaging/hdx/api.h" 29 #include "pxr/imaging/hdx/version.h" 31 #include "pxr/imaging/hd/task.h" 36 #include "pxr/imaging/cameraUtil/framing.h" 43 PXR_NAMESPACE_OPEN_SCOPE
49 using HdRenderPassSharedPtr = std::shared_ptr<class HdRenderPass>;
50 using HdStSimpleLightingShaderSharedPtr =
51 std::shared_ptr<class HdStSimpleLightingShader>;
52 using HdxShadowMatrixComputationSharedPtr =
53 std::shared_ptr<class HdxShadowMatrixComputation>;
58 class HdxSimpleLightTask :
public HdTask
65 ~HdxSimpleLightTask()
override;
71 HdDirtyBits* dirtyBits)
override;
75 void Prepare(HdTaskContext* ctx,
80 void Execute(HdTaskContext* ctx)
override;
83 std::vector<GfMatrix4d> _ComputeShadowMatrices(
85 HdxShadowMatrixComputationSharedPtr
const &computation)
const;
88 std::map<TfToken, SdfPathVector> _lightIds;
89 SdfPathVector _lightIncludePaths;
90 SdfPathVector _lightExcludePaths;
93 unsigned _sprimIndexVersion;
94 unsigned _settingsVersion;
97 HdStSimpleLightingShaderSharedPtr _lightingShader;
101 std::pair<bool, CameraUtilConformWindowPolicy> _overrideWindowPolicy;
105 GlfSimpleMaterial _material;
110 GlfSimpleLightVector _glfSimpleLights;
112 HdBufferArrayRangeSharedPtr _lightingBar;
113 HdBufferArrayRangeSharedPtr _lightSourcesBar;
114 HdBufferArrayRangeSharedPtr _shadowsBar;
115 HdBufferArrayRangeSharedPtr _materialBar;
119 SdfPathVector
const &lightIncludePaths,
120 SdfPathVector
const &lightExcludePaths,
121 std::map<TfToken, SdfPathVector> *lights);
123 HdxSimpleLightTask() =
delete;
124 HdxSimpleLightTask(
const HdxSimpleLightTask &) =
delete;
125 HdxSimpleLightTask &operator =(
const HdxSimpleLightTask &) =
delete;
128 struct HdxSimpleLightTaskParams {
129 HdxSimpleLightTaskParams()
131 , lightIncludePaths(1,
SdfPath::AbsoluteRootPath())
132 , lightExcludePaths()
133 , enableShadows(false)
135 , overrideWindowPolicy{
false, CameraUtilFit}
141 SdfPathVector lightIncludePaths;
142 SdfPathVector lightExcludePaths;
146 std::pair<bool, CameraUtilConformWindowPolicy> overrideWindowPolicy;
150 GlfSimpleMaterial material;
156 std::ostream&
operator<<(std::ostream& out,
const HdxSimpleLightTaskParams& pv);
159 const HdxSimpleLightTaskParams& lhs,
160 const HdxSimpleLightTaskParams& rhs);
163 const HdxSimpleLightTaskParams& lhs,
164 const HdxSimpleLightTaskParams& rhs);
166 struct HdxShadowParams {
175 HdxShadowMatrixComputationSharedPtr shadowMatrix;
184 std::ostream&
operator<<(std::ostream& out,
const HdxShadowParams& pv);
186 bool operator==(
const HdxShadowParams& lhs,
const HdxShadowParams& rhs);
188 bool operator!=(
const HdxShadowParams& lhs,
const HdxShadowParams& rhs);
191 PXR_NAMESPACE_CLOSE_SCOPE
193 #endif //PXR_IMAGING_HDX_SIMPLE_LIGHT_TASK_H The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Standard pointer typedefs.
Hydra schema for a camera that pulls the params (see above) during Sync.
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
AR_API bool operator==(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
Basic type for a vector of 4 float components.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.