Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/hydra/light.h')
-rw-r--r--intern/cycles/hydra/light.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/intern/cycles/hydra/light.h b/intern/cycles/hydra/light.h
new file mode 100644
index 00000000000..9230bc5730e
--- /dev/null
+++ b/intern/cycles/hydra/light.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: Apache-2.0
+ * Copyright 2022 NVIDIA Corporation
+ * Copyright 2022 Blender Foundation */
+
+#pragma once
+
+#include "hydra/config.h"
+
+#include <pxr/imaging/hd/light.h>
+
+HDCYCLES_NAMESPACE_OPEN_SCOPE
+
+class HdCyclesLight final : public PXR_NS::HdLight {
+ public:
+ HdCyclesLight(const PXR_NS::SdfPath &sprimId, const PXR_NS::TfToken &lightType);
+ ~HdCyclesLight() override;
+
+ PXR_NS::HdDirtyBits GetInitialDirtyBitsMask() const override;
+
+ void Sync(PXR_NS::HdSceneDelegate *sceneDelegate,
+ PXR_NS::HdRenderParam *renderParam,
+ PXR_NS::HdDirtyBits *dirtyBits) override;
+
+ void Finalize(PXR_NS::HdRenderParam *renderParam) override;
+
+ private:
+ void Initialize(PXR_NS::HdRenderParam *renderParam);
+
+ void PopulateShaderGraph(PXR_NS::HdSceneDelegate *sceneDelegate);
+
+ CCL_NS::Light *_light = nullptr;
+ PXR_NS::TfToken _lightType;
+};
+
+HDCYCLES_NAMESPACE_CLOSE_SCOPE