From c3737fff1be704e14a2bada69bbf8a6709c5f670 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Wed, 17 Jul 2024 23:12:42 +1000 Subject: wip shader layouts for common stuff --- src/new_render/pbr.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/new_render/pbr.h') diff --git a/src/new_render/pbr.h b/src/new_render/pbr.h index 7573563..4ee6810 100644 --- a/src/new_render/pbr.h +++ b/src/new_render/pbr.h @@ -4,16 +4,23 @@ */ #pragma once +#include "backend_opengl.h" #include "defines.h" #include "camera.h" #include "maths_types.h" -#include "ral/ral.h" -#include "ral/ral_common.h" - -// PBR; +#include "ral_types.h" +#include "render_types.h" // --- Public API -typedef struct PBR_Storage PBR_Storage; // Stores all necessary data and handles +typedef struct PBR_Storage { + GPU_Renderpass* pbr_pass; + GPU_Pipeline* pbr_pipeline; + +} PBR_Storage; // Stores all necessary data and handles + +typedef struct PBRMaterialUniforms { + Material mat; +} PBRMaterialUniforms; PUB void PBR_Init(PBR_Storage* storage); @@ -45,7 +52,6 @@ typedef struct PBR_Textures { // --- Internal typedef struct MaterialMap MaterialMap; -typedef struct RenderEnt RenderEnt; GPU_Renderpass* PBR_RPassCreate(); GPU_Pipeline* PBR_PipelineCreate(GPU_Renderpass* rpass); @@ -59,4 +65,4 @@ void PBR_Execute( ); -// Internally this will need to update material parameters +ShaderDataLayout PBRMaterial_GetLayout(void* data); \ No newline at end of file -- cgit v1.2.3-70-g09d2