|
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
|
#include "app_settings.h"#include "cglm/types.h"#include "effects/fx_motion_blur.h"#include "gl_common.h"#include "postprocess.h"#include "postprocess_internal.h"#include "pp_exposure_readback.h"#include <stddef.h>#include <stdint.h>Functions | |
| void | postprocess_update_time (PostProcess *post_processing, float delta_time) |
| Increments internal clocks. | |
| 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. | |
| void | postprocess_set_exposure_target (PostProcess *post_processing, float threshold) |
| Updates the target exposure threshold for AE. | |
| static void | fill_histogram_buckets (const float *lum_data, int *buckets, int size, float *min_lum, float *max_lum) |
| static void | trigger_histogram_readback (PostProcess *post_processing, int write_idx) |
| 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. | |
| void | postprocess_update_matrices (PostProcess *post_processing, mat4 view_proj) |
| Updates view-projection matrices for effects requiring depth-reconstruction. | |
Variables | |
| static const float | LUM_MIN_EXTREME = 1e30F |
| static const float | LUM_MAX_EXTREME = -1e30F |
|
static |
| 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. |
|
static |
|
static |
|
static |