From b9315f9cb625db09c3c41d8adf5230a67510bef7 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:55:18 +1000 Subject: wip shadows --- src/new_render/shadows.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/new_render/shadows.h') diff --git a/src/new_render/shadows.h b/src/new_render/shadows.h index 82ded5c..81711de 100644 --- a/src/new_render/shadows.h +++ b/src/new_render/shadows.h @@ -6,9 +6,17 @@ #pragma once #include "defines.h" #include "ral.h" +#include "ral_impl.h" +#include "ral_types.h" #include "render_types.h" -typedef struct Shadow_Storage Shadow_Storage; +typedef struct Shadow_Storage { + GPU_Renderpass* shadowmap_pass; + GPU_Pipeline* pipeline; + bool debug_quad_enabled; + TextureHandle depth_texture; + // TODO: Some statistics tracking +} Shadow_Storage; typedef struct Camera Camera; typedef struct Mat4 Mat4; @@ -26,4 +34,5 @@ PUB Handle Shadow_GetShadowMapTexture(Shadow_Storage* storage); // --- Internal GPU_Renderpass* Shadow_RPassCreate(); // Creates the render pass GPU_Pipeline* Shadow_PipelineCreate(GPU_Renderpass* rpass); // Creates the pipeline -void Shadow_ShadowmapExecute(Shadow_Storage* storage, Mat4 light_space_transform, RenderEnt* entites, size_t entity_count); +void Shadow_ShadowmapExecute(Shadow_Storage* storage, Mat4 light_space_transform, RenderEnt* entities, size_t entity_count); +void Shadow_RenderDebugQuad(); -- cgit v1.2.3-70-g09d2