75 int width,
int height,
float threshold);
104 GLuint env_hdr_tex, GLuint dest_tex,
int width,
105 int height,
int level,
int total_levels,
int slice_index,
106 int total_slices,
float threshold);
142 GLuint env_hdr_tex, GLuint dest_tex,
int size,
143 int slice_index,
int total_slices,
165 GLuint hdr_tex,
int width,
int height,
178 float clamp_multiplier);
Common OpenGL definitions, RAII helpers, and utilities.
void pbr_get_spec_uniforms(GLuint shader, PBRSpecUniforms *out)
Retrieves uniform locations for the specular prefilter shader.
Definition: pbr.c:20
void pbr_prefilter_mip(GLuint shader, const PBRSpecUniforms *uniforms, GLuint env_hdr_tex, GLuint dest_tex, int width, int height, int level, int total_levels, int slice_index, int total_slices, float threshold)
Computes a single slice or mip-level for progressive pre-filtering.
Definition: pbr.c:63
GLuint build_irradiance_map(GLuint shader, GLuint env_hdr_tex, int size, float threshold)
Generates an irradiance map (diffuse IBL) in a single pass.
Definition: pbr.c:230
void pbr_get_lum_uniforms(GLuint shader, PBRLumUniforms *out)
Retrieves uniform locations for the luminance reduction shader.
Definition: pbr.c:43
GLuint build_brdf_lut_map(int size)
Generates the 2D BRDF Integration Look-Up Table.
Definition: pbr.c:375
GLuint pbr_prefilter_init(int width, int height)
Initializes a texture for progressive specular pre-filtering.
Definition: pbr.c:52
void pbr_irradiance_slice_compute(GLuint shader, const PBRIrrUniforms *uniforms, GLuint env_hdr_tex, GLuint dest_tex, int size, int slice_index, int total_slices, float threshold)
Computes one face/slice of the irradiance map.
Definition: pbr.c:178
GLuint build_prefiltered_specular_map(GLuint shader, GLuint env_hdr_tex, int width, int height, float threshold)
Generates a pre-filtered specular environment map in a single pass.
Definition: pbr.c:142
float compute_mean_luminance_gpu_result(GLuint ssbos[2], float clamp_multiplier)
Reads the result of mean luminance computation from the SSBO. This function should be called only aft...
Definition: pbr.c:364
GLuint pbr_irradiance_init(int size)
Initializes a texture for progressive irradiance computation.
Definition: pbr.c:168
void compute_mean_luminance_gpu_start(GLuint shader_pass1, GLuint shader_pass2, GLuint hdr_tex, int width, int height, GLuint ssbos[2], const PBRLumUniforms *uniforms)
Starts the GPU computation for mean luminance (non-blocking). Uses a two-pass parallel reduction via ...
Definition: pbr.c:274
void pbr_get_irr_uniforms(GLuint shader, PBRIrrUniforms *out)
Retrieves uniform locations for the irradiance convolution shader.
Definition: pbr.c:33