$darkmode
Async GPU readback and histogram API for post-processing. More...
#include <glad/glad.h>#include <cglm/types.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| void | postprocess_update_time (PostProcess *post_processing, float delta_time) |
| Increments internal clocks. More... | |
| GLuint | postprocess_get_exposure_pbo (PostProcess *post_processing, int index) |
| GLuint | postprocess_get_histogram_pbo (PostProcess *post_processing, int index) |
| GLsync | postprocess_get_exposure_sync (PostProcess *post_processing, int index) |
| GLsync | postprocess_get_histogram_sync (PostProcess *post_processing, int index) |
| void | postprocess_set_exposure_sync (PostProcess *post_processing, int index, GLsync sync) |
| void | postprocess_set_histogram_sync (PostProcess *post_processing, int index, GLsync sync) |
| void | postprocess_update_readbacks (PostProcess *post_processing, uint64_t frame_count) |
| Updates all async GPU readbacks (Exposure, Histogram). Handles PBO mapping and Sync management internally to avoid CPU stalls. More... | |
| void | postprocess_set_exposure_target (PostProcess *post_processing, float threshold) |
| Updates the target exposure threshold for AE. More... | |
| void | postprocess_update_matrices (PostProcess *post_processing, mat4 view_proj) |
| Updates view-projection matrices for effects requiring depth-reconstruction. More... | |
| int | postprocess_compute_luminance_histogram (PostProcess *post_processing, uint64_t frame_count, int *buckets, int size, float *min_lum, float *max_lum) |
| Computes the luminance histogram from the GPU readback. More... | |
Async GPU readback and histogram API for post-processing.
Consumers that need PBO readback, histogram computation, or matrix updates should include this header.
| int postprocess_compute_luminance_histogram | ( | PostProcess * | post_processing, |
| uint64_t | frame_count, | ||
| int * | buckets, | ||
| int | size, | ||
| float * | min_lum, | ||
| float * | max_lum | ||
| ) |
Computes the luminance histogram from the GPU readback.
| GLuint postprocess_get_exposure_pbo | ( | PostProcess * | post_processing, |
| int | index | ||
| ) |
| GLsync postprocess_get_exposure_sync | ( | PostProcess * | post_processing, |
| int | index | ||
| ) |
| GLuint postprocess_get_histogram_pbo | ( | PostProcess * | post_processing, |
| int | index | ||
| ) |
| GLsync postprocess_get_histogram_sync | ( | PostProcess * | post_processing, |
| int | index | ||
| ) |
| void postprocess_set_exposure_sync | ( | PostProcess * | post_processing, |
| int | index, | ||
| GLsync | sync | ||
| ) |
| void postprocess_set_exposure_target | ( | PostProcess * | post_processing, |
| float | threshold | ||
| ) |
Updates the target exposure threshold for AE.
| void postprocess_set_histogram_sync | ( | PostProcess * | post_processing, |
| int | index, | ||
| GLsync | sync | ||
| ) |
| void postprocess_update_matrices | ( | PostProcess * | post_processing, |
| mat4 | view_proj | ||
| ) |
Updates view-projection matrices for effects requiring depth-reconstruction.
| post_processing | Pointer to the struct. |
| view_proj | The current frame's View-Proj matrix. |
| void postprocess_update_readbacks | ( | PostProcess * | post_processing, |
| uint64_t | frame_count | ||
| ) |
Updates all async GPU readbacks (Exposure, Histogram). Handles PBO mapping and Sync management internally to avoid CPU stalls.
| void postprocess_update_time | ( | PostProcess * | post_processing, |
| float | delta_time | ||
| ) |
Increments internal clocks.
| post_processing | Pointer to the struct. |
| delta_time | SECONDS elapsed since last frame. |