diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-20 21:17:46 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-20 21:17:46 +1000 |
commit | dc8952e6650aae6297915bf118e1f7b1259d235d (patch) | |
tree | 98ef132262fa0e01c7df5cac7f73c825a65d09ed /src/new_render/shadows.h | |
parent | 58a748dcd77d0caacc9d6ef7a7e7e073ac849ad3 (diff) |
fixing shadows.
Diffstat (limited to 'src/new_render/shadows.h')
-rw-r--r-- | src/new_render/shadows.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/new_render/shadows.h b/src/new_render/shadows.h index 11fce3b..82439d4 100644 --- a/src/new_render/shadows.h +++ b/src/new_render/shadows.h @@ -10,9 +10,12 @@ typedef struct Shadow_Storage { GPU_Renderpass* shadowmap_pass; - GPU_Pipeline* pipeline; - bool debug_quad_enabled; + GPU_Pipeline* shadowmap_pipeline; TextureHandle depth_texture; + bool debug_quad_enabled; + Mesh quad; + GPU_Renderpass* debugquad_pass; + GPU_Pipeline* debugquad_pipeline; // TODO: Some statistics tracking } Shadow_Storage; @@ -25,11 +28,13 @@ typedef struct Camera Camera; typedef struct Mat4 Mat4; // --- Public API -PUB void Shadow_Init(Shadow_Storage* storage, u32x2 shadowmap_extents); +PUB void Shadow_Init(Shadow_Storage* storage, u32 shadowmap_width, u32 shadowmap_height); /** @brief Run shadow map generation for given entities, and store in a texture. * @note Uses active directional light for now */ -PUB void Shadow_Run(Shadow_Storage* storage, RenderEnt* entities, size_t entity_count); +PUB void Shadow_Run(RenderEnt* entities, size_t entity_count); + +PUB void Shadow_DrawDebugQuad(); /** @brief Get the shadow texture generated from shadowmap pass */ PUB Handle Shadow_GetShadowMapTexture(Shadow_Storage* storage); |