2 // Copyright (c) Microsoft. All rights reserved.
3 // This code is licensed under the MIT License (MIT).
4 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
5 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
6 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
7 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 // Developed by Minigraph
11 // Author(s): Alex Nankervis
17 //using namespace Graphics;
21 class StructuredBuffer
;
22 class ByteAddressBuffer
;
25 class GraphicsContext
;
36 extern IntVar LightGridDim
;
38 enum { MaxLights
= 128 };
40 //LightData m_LightData[MaxLights];
41 extern StructuredBuffer m_LightBuffer
;
42 extern ByteAddressBuffer m_LightGrid
;
44 extern ByteAddressBuffer m_LightGridBitMask
;
45 extern std::uint32_t m_FirstConeLight
;
46 extern std::uint32_t m_FirstConeShadowedLight
;
48 extern ColorBuffer m_LightShadowArray
;
49 extern ShadowBuffer m_LightShadowTempBuffer
;
50 extern Math::Matrix4 m_LightShadowMatrix
[MaxLights
];
52 void InitializeResources(void);
53 void CreateRandomLights(const Math::Vector3 minBound
, const Math::Vector3 maxBound
);
54 void FillLightGrid(GraphicsContext
& gfxContext
, const Math::Camera
& camera
);