diff options
Diffstat (limited to 'src/new_render/pbr.h')
-rw-r--r-- | src/new_render/pbr.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/new_render/pbr.h b/src/new_render/pbr.h new file mode 100644 index 0000000..dd29301 --- /dev/null +++ b/src/new_render/pbr.h @@ -0,0 +1,60 @@ +/** + * @file pbr.h + * @brief PBR render pass + */ + +#pragma once +#include "defines.h" +#include "camera.h" +#include "maths_types.h" +#include "ral/ral.h" +#include "ral/ral_common.h" + +// PBR; + +// --- Public API +typedef struct PBR_Storage PBR_Storage; // Stores all necessary data and handles + +PUB void PBR_Init(PBR_Storage* storage); + +// NOTE: For simplicity's sake we will render this pass directly to the default framebuffer +PUB void PBR_Run( + PBR_Storage* storage + // light data + // camera + // geometry + // materials +); + +typedef struct PBR_Params { + Vec3 albedo; + f32 metallic; + f32 roughness; + f32 ao; +} PBR_Params; + +typedef struct PBR_Textures { + TextureHandle albedo_map; + TextureHandle normal_map; + bool metal_roughness_combined; + TextureHandle metallic_map; + TextureHandle roughness_map; + TextureHandle ao_map; +} PBR_Textures; + +// --- Internal + + +GPU_Renderpass* PBR_RPassCreate(); +GPU_Pipeline* PBR_PipelineCreate(GPU_Renderpass* rpass); +void PBR_Execute( + PBR_Storage* storage, + Camera camera, + TextureHandle shadowmap_tex, + MaterialMap* materials, // map of String -> Material + RenderEnt* entities, + size_t entity_count + +); + +// Internally this will need to update material parameters |