summaryrefslogtreecommitdiff
path: root/Runtime/Camera/LightTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Camera/LightTypes.h')
-rw-r--r--Runtime/Camera/LightTypes.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Runtime/Camera/LightTypes.h b/Runtime/Camera/LightTypes.h
new file mode 100644
index 0000000..189236d
--- /dev/null
+++ b/Runtime/Camera/LightTypes.h
@@ -0,0 +1,28 @@
+#pragma once
+
+struct ActiveLight;
+
+struct ForwardLightsBlock
+{
+ float sh[9][3];
+ const ActiveLight* mainLight;
+ int addLightCount;
+ int vertexLightCount;
+ float lastAddLightBlend;
+ float lastVertexLightBlend;
+ // followed by ActiveLight pointers; additive lights first, then vertex lights
+
+ const ActiveLight* const* GetLights() const {
+ return reinterpret_cast<const ActiveLight* const*>( reinterpret_cast<const UInt8*>(this) + sizeof(ForwardLightsBlock) );
+ }
+};
+
+struct VertexLightsBlock
+{
+ int lightCount;
+ // followed by ActiveLight pointers
+
+ const ActiveLight* const* GetLights() const {
+ return reinterpret_cast<const ActiveLight* const*>( reinterpret_cast<const UInt8*>(this) + sizeof(VertexLightsBlock) );
+ }
+};