From ab9ed1ccadbd2c1b971bfbfb5ee651aa03a4a63e Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 22 Feb 2025 18:16:05 +1100 Subject: shader globals --- model.hpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'model.hpp') diff --git a/model.hpp b/model.hpp index e7b07e6..7417e51 100644 --- a/model.hpp +++ b/model.hpp @@ -40,7 +40,8 @@ struct Mesh { mat_binding, light_binding, shadowmaps_binding, - casters_binding; + casters_binding, + globals_binding; int env_cube_binding; bool world_dirty; m4f world, local; @@ -98,6 +99,7 @@ struct Model_Resources { Texture_Id env_cubemap; Sampler_Id sampler; Buffer_Id vp; + Buffer_Id globals; void (*overrider)(Pipeline_Builder&); }; @@ -112,11 +114,7 @@ struct Model_Instance { void init(Device* dev, Heap* h, Model* model); void destroy(Device* dev, Heap* h); void update(); - void update_cbuffers( - Device* dev, - const Lighting& lighting, - const Camera& cam - ); + void update_cbuffers(Device* dev); void render( Device* dev, Arena* a, @@ -138,11 +136,7 @@ struct Model_Scene { void destroy(Device* dev); void init(Arena* arena, int max_instances, Sampler_Id s); - void update( - const Camera& cam, - const Lighting& lighting, - Device* dev - ); + void update(Device* dev); }; #endif -- cgit v1.2.3-54-g00ecf