From 5b548cb866405b6716d5f904e4df75c07dbbad9b Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 2 Mar 2025 17:30:17 +1100 Subject: nevermind --- lighting.hpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'lighting.hpp') diff --git a/lighting.hpp b/lighting.hpp index ac2d2c5..ccd08d3 100644 --- a/lighting.hpp +++ b/lighting.hpp @@ -11,32 +11,19 @@ struct Model_Scene; struct Renderer; struct World; -struct Caster { - Camera_Id reality; - Camera_Id jittered; -}; - struct Lighting { static constexpr int max_lights = 128; static constexpr int max_shadows = 16; - static constexpr int shadowmap_count = max_shadows * 2; static constexpr int shadow_res = 2048; - Staged_Buffer gpu_lights; - Staged_Buffer gpu_casters; + Staged_Buffer lights; + Staged_Buffer casters; Texture_Id shadows; - Texture_Id shadow_slices[shadowmap_count]; - Texture_Id ss_shadows[2]; - Texture_Id ss_shadow_slices[2][shadowmap_count]; - Texture_Id occlusion[2]; + Texture_Id shadow_slices[max_shadows]; Sampler_Id shadow_sampler; - Caster casters[max_shadows]; - Camera_Id cameras[shadowmap_count]; - int light_count, caster_count, cam_count; - void init(Device* dev, int w, int h); - void destroy_ss(Device* dev); - void recreate(Device* dev, int w, int h); + Camera_Id cameras[max_shadows]; + int light_count, caster_count; + void init(Device* dev); void destroy(Device* dev, Renderer& r); - Camera_Id gm_cam(Renderer& r); void update( Device* dev, Context& ctx, -- cgit v1.2.3-54-g00ecf