aboutsummaryrefslogtreecommitdiff
path: root/include/gfx/util/ibl.h
blob: 6e39180fdf3e92fb44e86b9712e41e3cd40b02cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/// Functions for image-based lighting.
#pragma once

typedef struct IBL IBL;

typedef struct GfxCore GfxCore;
typedef struct Texture Texture;

/// Create an environment map filterer for IBL.
IBL* gfx_make_ibl(GfxCore*);

/// Destroy the environment map filterer.
void gfx_destroy_ibl(GfxCore*, IBL**);

/// Create a BRDF integration map for IBL.
Texture* gfx_make_brdf_integration_map(IBL*, GfxCore*, int width, int height);

/// Create an irradiance map (cubemap) from an environment map for IBL.
Texture* gfx_make_irradiance_map(
    IBL*, GfxCore*, const Texture* environment_map, int width, int height);

/// Create a prefiltered environment map (cubemap) for IBL.
Texture* gfx_make_prefiltered_environment_map(
    IBL*, GfxCore*, const Texture* environment_map, int width, int height,
    int* max_mip_level);