From dc8952e6650aae6297915bf118e1f7b1259d235d Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:17:46 +1000 Subject: fixing shadows. --- src/new_render/render.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/new_render/render.c') diff --git a/src/new_render/render.c b/src/new_render/render.c index 11f7e0a..386a356 100644 --- a/src/new_render/render.c +++ b/src/new_render/render.c @@ -5,11 +5,9 @@ #include "render.h" #include #include "camera.h" -#include "colours.h" #include "core.h" #include "log.h" #include "maths.h" -#include "maths_types.h" #include "mem.h" #include "pbr.h" #include "ral_common.h" @@ -101,7 +99,7 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window // create our renderpasses ren->shadows = malloc(sizeof(Shadow_Storage)); - Shadow_Init(ren->shadows, u32x2(512, 512)); + Shadow_Init(ren->shadows, 1024, 1024); ren->pbr = malloc(sizeof(PBR_Storage)); PBR_Init(ren->pbr); @@ -235,4 +233,14 @@ void Geometry_Destroy(Geometry* geometry) { void SetCamera(Camera camera) { g_core.renderer->scene.camera = camera; } void SetMainLight(DirectionalLight light) { g_core.renderer->scene.sun = light; } -arena* GetRenderFrameArena(Renderer* r) { return &r->frame_arena; } \ No newline at end of file +arena* GetRenderFrameArena(Renderer* r) { return &r->frame_arena; } + +RenderScene* Render_GetScene() { + Renderer* ren = Core_GetRenderer(&g_core); + return &ren->scene; +} + +Shadow_Storage* Render_GetShadowStorage() { + Renderer* ren = Core_GetRenderer(&g_core); + return ren->shadows; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2