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;
94 HdStSimpleLightingShaderSharedPtr _lightingShader;
98 std::pair<bool, CameraUtilConformWindowPolicy> _overrideWindowPolicy;
102 GlfSimpleMaterial _material;
107 GlfSimpleLightVector _glfSimpleLights;
110 std::vector<TfToken>
const &lightTypes,
111 SdfPathVector
const &lightIncludePaths,
112 SdfPathVector
const &lightExcludePaths,
113 std::map<TfToken, SdfPathVector> *lights);
115 HdxSimpleLightTask() =
delete;
116 HdxSimpleLightTask(
const HdxSimpleLightTask &) =
delete;
117 HdxSimpleLightTask &operator =(
const HdxSimpleLightTask &) =
delete;
120 struct HdxSimpleLightTaskParams {
121 HdxSimpleLightTaskParams()
123 , lightIncludePaths(1,
SdfPath::AbsoluteRootPath())
124 , lightExcludePaths()
125 , enableShadows(false)
127 , overrideWindowPolicy{
false, CameraUtilFit}
133 SdfPathVector lightIncludePaths;
134 SdfPathVector lightExcludePaths;
138 std::pair<bool, CameraUtilConformWindowPolicy> overrideWindowPolicy;
142 GlfSimpleMaterial material;
148 std::ostream&
operator<<(std::ostream& out,
const HdxSimpleLightTaskParams& pv);
151 const HdxSimpleLightTaskParams& lhs,
152 const HdxSimpleLightTaskParams& rhs);
155 const HdxSimpleLightTaskParams& lhs,
156 const HdxSimpleLightTaskParams& rhs);
158 struct HdxShadowParams {
167 HdxShadowMatrixComputationSharedPtr shadowMatrix;
176 std::ostream&
operator<<(std::ostream& out,
const HdxShadowParams& pv);
178 bool operator==(
const HdxShadowParams& lhs,
const HdxShadowParams& rhs);
180 bool operator!=(
const HdxShadowParams& lhs,
const HdxShadowParams& rhs);
183 PXR_NAMESPACE_CLOSE_SCOPE
185 #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.
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.