blob: 189236d3ab3c486e9119ba98ba872ce17959ab75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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) );
}
};
|