summaryrefslogtreecommitdiff
path: root/lighting.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'lighting.hpp')
-rw-r--r--lighting.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lighting.hpp b/lighting.hpp
index f7708a1..627de66 100644
--- a/lighting.hpp
+++ b/lighting.hpp
@@ -5,12 +5,23 @@
#include "video.hpp"
struct Arena;
+struct Model_Resources;
+struct Model_Scene;
struct World;
+struct Caster {
+ m4f vp;
+};
+
struct Lighting {
static constexpr int max_lights = 128;
+ static constexpr int max_shadows = 16;
+ static constexpr int shadow_res = 512;
Staged_Buffer lights;
- int light_count;
+ Texture_Id shadows;
+ Texture_Id shadow_slices[max_shadows];
+ Caster casters[max_shadows];
+ int light_count, caster_count;
void init(Device* dev);
void destroy(Device* dev);
void update(Device* dev, Context& ctx, World& w);
@@ -20,6 +31,7 @@ struct Lighting {
struct Light {
v3f colour;
float brightness;
+ bool caster;
};
struct Sun_Light : Light {