10 #ifndef IBL_COORDINATOR_H
11 #define IBL_COORDINATOR_H
85 GLuint shader_irmap, GLuint shader_lum_pass1,
86 GLuint shader_lum_pass2);
122 GLuint* out_spec_tex, GLuint* out_irr_tex,
123 float* out_threshold);
Common OpenGL definitions, RAII helpers, and utilities.
void ibl_coordinator_reset(IBLCoordinator *coord)
Resets the coordinator to IDLE state.
Definition: ibl_coordinator.c:155
IBLState
States for the IBL generation state machine.
Definition: ibl_coordinator.h:21
@ IBL_STATE_SPECULAR_INIT
Definition: ibl_coordinator.h:25
@ IBL_STATE_SPECULAR_MIPS
Definition: ibl_coordinator.h:26
@ IBL_STATE_IDLE
Definition: ibl_coordinator.h:22
@ IBL_STATE_DONE
Definition: ibl_coordinator.h:29
@ IBL_STATE_IRRADIANCE
Definition: ibl_coordinator.h:28
@ IBL_STATE_LUMINANCE
Definition: ibl_coordinator.h:23
@ IBL_STATE_LUMINANCE_WAIT
Definition: ibl_coordinator.h:24
void ibl_coordinator_start(IBLCoordinator *coord, GLuint hdr_tex, int width, int height)
Starts the IBL generation process for a new HDR texture.
Definition: ibl_coordinator.c:176
void ibl_coordinator_cleanup(IBLCoordinator *coord)
Cleanups any pending resources held by the coordinator.
Definition: ibl_coordinator.c:145
int ibl_coordinator_get_results(IBLCoordinator *coord, GLuint *out_hdr_tex, GLuint *out_spec_tex, GLuint *out_irr_tex, float *out_threshold)
Retrieves the results of the IBL generation.
Definition: ibl_coordinator.c:413
IBLState ibl_coordinator_update(IBLCoordinator *coord, uint64_t frame_count)
Advances the state machine by one step (slice or pass).
Definition: ibl_coordinator.c:371
void ibl_coordinator_init(IBLCoordinator *coord, GLuint shader_spmap, GLuint shader_irmap, GLuint shader_lum_pass1, GLuint shader_lum_pass2)
Initializes the IBL coordinator with necessary shader resources.
Definition: ibl_coordinator.c:128
Physically-Based Rendering (PBR) and Image-Based Lighting (IBL) utilities.
High-precision performance measurement (CPU and GPU).
Manages the progressive IBL generation process.
Definition: ibl_coordinator.h:36
int current_slice
Definition: ibl_coordinator.h:45
GLuint pending_spec_tex
Definition: ibl_coordinator.h:50
float threshold
Definition: ibl_coordinator.h:44
GLuint shader_spmap
Definition: ibl_coordinator.h:54
PBRIrrUniforms irr_uniforms
Definition: ibl_coordinator.h:63
PBRLumUniforms lum_uniforms
Definition: ibl_coordinator.h:65
int width
Definition: ibl_coordinator.h:42
double stage_gpu_max
Definition: ibl_coordinator.h:71
int total_slices
Definition: ibl_coordinator.h:46
int total_mips
Definition: ibl_coordinator.h:41
int current_mip
Definition: ibl_coordinator.h:40
double stage_gpu_sum
Definition: ibl_coordinator.h:72
GLsync lum_sync
Definition: ibl_coordinator.h:39
PerfTimer global_timer
Definition: ibl_coordinator.h:68
int stage_slice_count
Definition: ibl_coordinator.h:73
GLuint shader_irmap
Definition: ibl_coordinator.h:55
GLuint pending_irr_tex
Definition: ibl_coordinator.h:51
PBRSpecUniforms spec_uniforms
Definition: ibl_coordinator.h:61
GLuint shader_lum_pass2
Definition: ibl_coordinator.h:57
double stage_gpu_min
Definition: ibl_coordinator.h:70
PerfTimer stage_timer
Definition: ibl_coordinator.h:69
int height
Definition: ibl_coordinator.h:43
GLuint shader_lum_pass1
Definition: ibl_coordinator.h:56
IBLState state
Definition: ibl_coordinator.h:38
GLuint pending_hdr_tex
Definition: ibl_coordinator.h:49
CPU high-precision timer.
Definition: perf_timer.h:23