$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
postprocess.h File Reference

High-level post-processing pipeline and effects. More...

#include "effects/fx_auto_exposure.h"
#include "effects/fx_bloom.h"
#include "effects/fx_dof.h"
#include "effects/fx_lut3d.h"
#include "effects/fx_lut_viz.h"
#include "effects/fx_motion_blur.h"
#include "gl_common.h"
#include "gpu_profiler.h"
#include "shader.h"
#include <cglm/cglm.h>
#include <cglm/types.h>
Include dependency graph for postprocess.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ColorGradingParams
 Unreal-style color grading parameters. More...
 
struct  VignetteParams
 Controls for the screen-edge darkening effect. More...
 
struct  GrainParams
 Fine-grained controls for film noise. More...
 
struct  ExposureParams
 Manual exposure tuning. More...
 
struct  ChromAbberationParams
 Focal-length distortion simulation. More...
 
struct  WhiteBalanceParams
 Temperature and tint correction. More...
 
struct  TonemapParams
 ACES-like filmic tonemapping curve parameters. More...
 
struct  FXAAParams
 Parameters for Fast Approximate Anti-Aliasing. More...
 
struct  BandingParams
 Controls for color banding/quantization. More...
 
struct  FogParams
 Depth-based atmospheric fog parameters. More...
 
struct  ShaderCacheEntry
 Cache entry for optimized shaders. More...
 
struct  PostProcessUBO
 Shared Uniform Buffer structure for shaders. More...
 
struct  PostProcess
 Main pipeline state for post-processing. More...
 
struct  PostProcessPreset
 Snapshot of every configurable parameter in the pipeline. More...
 

Macros

#define POSTPROCESS_HISTOGRAM_BUCKETS   256
 
#define DEFAULT_VIGNETTE_INTENSITY   0.8F
 
#define DEFAULT_VIGNETTE_SMOOTHNESS   0.5F
 
#define DEFAULT_VIGNETTE_ROUNDNESS   1.0F
 
#define DEFAULT_GRAIN_INTENSITY   0.02F
 
#define DEFAULT_GRAIN_SHADOWS_MAX   0.09F
 
#define DEFAULT_GRAIN_HIGHLIGHTS_MIN   0.5F
 
#define DEFAULT_GRAIN_TEXEL_SIZE   1.0F
 
#define DEFAULT_EXPOSURE   1.00F
 
#define DEFAULT_CHROM_ABBR_STRENGTH   0.005F
 
#define DEFAULT_BLOOM_INTENSITY   0.0F
 
#define DEFAULT_BLOOM_THRESHOLD   1.0F
 
#define DEFAULT_BLOOM_SOFT_THRESHOLD   0.5F
 
#define DEFAULT_BLOOM_RADIUS   1.0F
 
#define DEFAULT_FXAA_SUBPIX   0.75F
 
#define DEFAULT_FXAA_EDGE_THRESHOLD   0.125F
 
#define DEFAULT_FXAA_EDGE_THRESHOLD_MIN   0.063F
 
#define DEFAULT_DOF_FOCAL_DISTANCE   20.0F
 
#define DEFAULT_DOF_FOCAL_RANGE   5.0F
 
#define DEFAULT_DOF_BOKEH_SCALE   10.0F
 
#define DEFAULT_DOF_ANAMORPHIC_RATIO    1.0F
 
#define DEFAULT_BANDING_LEVELS   256.0F
 
#define DEFAULT_FOG_DENSITY   0.0F
 
#define DEFAULT_FOG_START   10.0F
 
#define DEFAULT_FOG_HEIGHT_FALLOFF   0.1F
 
#define DEFAULT_FOG_COLOR_R   0.5F
 
#define DEFAULT_FOG_COLOR_G   0.6F
 
#define DEFAULT_FOG_COLOR_B   0.7F
 
#define DEFAULT_WB_TEMP   6500.0F
 
#define DEFAULT_WB_TINT   0.0F
 
#define DEFAULT_FILMIC_SLOPE   1.0F
 
#define DEFAULT_FILMIC_TOE   0.0F
 
#define DEFAULT_FILMIC_SHOULDER   0.0F
 
#define DEFAULT_FILMIC_BLACK_CLIP   0.0F
 
#define DEFAULT_FILMIC_WHITE_CLIP   0.0F
 
#define DEFAULT_ACTIVE_EFFECTS
 Default mask of active effects. More...
 

Enumerations

enum  PostProcessEffect {
  POSTFX_VIGNETTE = (1U << 0U) , POSTFX_GRAIN = (1U << 1U) , POSTFX_EXPOSURE = (1U << 2U) , POSTFX_CHROM_ABBR = (1U << 3U) ,
  POSTFX_BLOOM = (1U << 4U) , POSTFX_COLOR_GRADING , POSTFX_DOF = (1U << 6U) , POSTFX_DOF_DEBUG = (1U << 7U) ,
  POSTFX_AUTO_EXPOSURE , POSTFX_EXPOSURE_DEBUG , POSTFX_MOTION_BLUR = (1U << 10U) , POSTFX_MOTION_BLUR_DEBUG ,
  POSTFX_FXAA = (1U << 12U) , POSTFX_FXAA_DEBUG = (1U << 13U) , POSTFX_BANDING = (1U << 14U) , POSTFX_VECTOR_FIELD_DEBUG ,
  POSTFX_STENCIL_DEBUG = (1U << 16U) , POSTFX_BLOOM_DEBUG = (1U << 17U) , POSTFX_FOG = (1U << 18U) , POSTFX_FOG_DEBUG = (1U << 19U) ,
  POSTFX_LUT3D = (1U << 20U) , POSTFX_LUT_VIZ = (1U << 21U)
}
 Bitmask flags for enabling/disabling individual effects. More...
 
enum  BandingMode {
  BANDING_MODE_LINEAR = 0 , BANDING_MODE_DITHERED = 1 , BANDING_MODE_PERCEPTUAL = 2 , BANDING_MODE_CHANNEL = 3 ,
  BANDING_MODE_LUMINANCE = 4
}
 Styles of color quantization. More...
 
enum  { SHADER_CACHE_SIZE = 64 }
 

Functions

 _Static_assert (_Alignof(PostProcessUBO) >=GL_UBO_ALIGNMENT, "PostProcessUBO" " must be >= 32-byte aligned for AVX (cglm)")
 
int postprocess_init (PostProcess *post_processing, GPUProfiler *external_profiler, int width, int height)
 Initializes the post-processing pipeline. More...
 
void postprocess_cleanup (PostProcess *post_processing)
 Releases all GPU and CPU resources. More...
 
void postprocess_compile_optimized (PostProcess *post_processing, unsigned int static_flags)
 Compiles a specialized Uber-shader for maximum performance. More...
 
void postprocess_use_dynamic (PostProcess *post_processing)
 Switches back to the dynamic/generic Uber-shader. More...
 
void postprocess_set_dummy_textures (PostProcess *post_processing, GLuint dummy_black)
 Internal helper to set fallback textures. More...
 
void postprocess_resize (PostProcess *post_processing, int width, int height)
 Recreates all internal buffers for a new resolution. More...
 
void postprocess_enable (PostProcess *post_processing, PostProcessEffect effect)
 Enables a specific effect. More...
 
void postprocess_disable (PostProcess *post_processing, PostProcessEffect effect)
 Disables a specific effect. More...
 
void postprocess_toggle (PostProcess *post_processing, PostProcessEffect effect)
 Toggles the current state of an effect. More...
 
int postprocess_is_enabled (PostProcess *post_processing, PostProcessEffect effect)
 Returns true if an effect is currently active. More...
 
void postprocess_set_white_balance (PostProcess *post_processing, float temperature, float tint)
 
void postprocess_set_color_grading (PostProcess *post_processing, float saturation, float contrast, float gamma, float gain, float offset, float lift)
 
void postprocess_set_tonemapper (PostProcess *post_processing, float slope, float toe, float shoulder, float black_clip, float white_clip)
 
void postprocess_set_grading_ue_default (PostProcess *post_processing)
 
void postprocess_set_vignette (PostProcess *post_processing, float intensity, float smoothness, float roundness)
 
void postprocess_set_grain (PostProcess *post_processing, float intensity)
 
void postprocess_set_exposure (PostProcess *post_processing, float exposure)
 
void postprocess_set_chrom_abbr (PostProcess *post_processing, float strength)
 
void postprocess_set_bloom (PostProcess *post_processing, float intensity, float threshold, float soft_threshold)
 
void postprocess_set_dof (PostProcess *post_processing, float focal_distance, float focal_range, float bokeh_scale)
 
void postprocess_set_dof_anamorphic (PostProcess *post_processing, float anamorphic_ratio)
 
float postprocess_get_exposure (PostProcess *post_processing)
 
void postprocess_set_auto_exposure (PostProcess *post_processing, float min_luminance, float max_luminance, float speed_up, float speed_down, float key_value)
 
void postprocess_set_fxaa (PostProcess *post_processing, float subpix, float edge_threshold, float edge_threshold_min)
 
void postprocess_set_banding (PostProcess *post_processing, BandingMode mode, float levels)
 
void postprocess_set_banding_dither (PostProcess *post_processing, float strength)
 
void postprocess_set_banding_perceptual (PostProcess *post_processing, float gamma)
 
void postprocess_set_banding_channels (PostProcess *post_processing, float red, float green, float blue)
 
void postprocess_set_fog (PostProcess *post_processing, float density, float start, float height_falloff, float fog_r, float fog_g, float fog_b)
 
void postprocess_set_lut3d (PostProcess *post_processing, float intensity, GLuint texture)
 
int postprocess_load_lut3d (PostProcess *post_processing, const char *path)
 
void postprocess_update_matrices (PostProcess *post_processing, mat4 view_proj)
 Updates view-projection matrices for effects requiring depth-reconstruction. More...
 
void postprocess_apply_preset (PostProcess *post_processing, const PostProcessPreset *preset)
 Applies all settings from a preset atomically. More...
 
void postprocess_begin (PostProcess *post_processing)
 Binds the HDR FBO and prepares for scene rendering. Should be called BEFORE the main render loop. More...
 
void postprocess_end (PostProcess *post_processing)
 Processes the HDR scene and renders the final LDR result to screen. Should be called AFTER the main render loop. More...
 
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...
 
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...
 

Detailed Description

High-level post-processing pipeline and effects.

This module manages the multi-pass post-processing pipeline, including blooming, auto-exposure, color grading, motion blur, and tone mapping. It uses a centralized Uniform Buffer Object (UBO) for settings.

Macro Definition Documentation

◆ DEFAULT_ACTIVE_EFFECTS

#define DEFAULT_ACTIVE_EFFECTS
Value:
((unsigned int)POSTFX_EXPOSURE | (unsigned int)POSTFX_COLOR_GRADING | \
(unsigned int)POSTFX_FXAA)
@ POSTFX_COLOR_GRADING
Definition: postprocess.h:86
@ POSTFX_FXAA
Definition: postprocess.h:97
@ POSTFX_EXPOSURE
Definition: postprocess.h:83

Default mask of active effects.

◆ DEFAULT_BANDING_LEVELS

#define DEFAULT_BANDING_LEVELS   256.0F

8-bit simulation.

◆ DEFAULT_BLOOM_INTENSITY

#define DEFAULT_BLOOM_INTENSITY   0.0F

◆ DEFAULT_BLOOM_RADIUS

#define DEFAULT_BLOOM_RADIUS   1.0F

◆ DEFAULT_BLOOM_SOFT_THRESHOLD

#define DEFAULT_BLOOM_SOFT_THRESHOLD   0.5F

◆ DEFAULT_BLOOM_THRESHOLD

#define DEFAULT_BLOOM_THRESHOLD   1.0F

◆ DEFAULT_CHROM_ABBR_STRENGTH

#define DEFAULT_CHROM_ABBR_STRENGTH   0.005F

◆ DEFAULT_DOF_ANAMORPHIC_RATIO

#define DEFAULT_DOF_ANAMORPHIC_RATIO    1.0F

1.0 = Spherical, 2.0 = Anamorphic

◆ DEFAULT_DOF_BOKEH_SCALE

#define DEFAULT_DOF_BOKEH_SCALE   10.0F

◆ DEFAULT_DOF_FOCAL_DISTANCE

#define DEFAULT_DOF_FOCAL_DISTANCE   20.0F

◆ DEFAULT_DOF_FOCAL_RANGE

#define DEFAULT_DOF_FOCAL_RANGE   5.0F

◆ DEFAULT_EXPOSURE

#define DEFAULT_EXPOSURE   1.00F

◆ DEFAULT_FILMIC_BLACK_CLIP

#define DEFAULT_FILMIC_BLACK_CLIP   0.0F

◆ DEFAULT_FILMIC_SHOULDER

#define DEFAULT_FILMIC_SHOULDER   0.0F

◆ DEFAULT_FILMIC_SLOPE

#define DEFAULT_FILMIC_SLOPE   1.0F

◆ DEFAULT_FILMIC_TOE

#define DEFAULT_FILMIC_TOE   0.0F

◆ DEFAULT_FILMIC_WHITE_CLIP

#define DEFAULT_FILMIC_WHITE_CLIP   0.0F

◆ DEFAULT_FOG_COLOR_B

#define DEFAULT_FOG_COLOR_B   0.7F

◆ DEFAULT_FOG_COLOR_G

#define DEFAULT_FOG_COLOR_G   0.6F

◆ DEFAULT_FOG_COLOR_R

#define DEFAULT_FOG_COLOR_R   0.5F

◆ DEFAULT_FOG_DENSITY

#define DEFAULT_FOG_DENSITY   0.0F

◆ DEFAULT_FOG_HEIGHT_FALLOFF

#define DEFAULT_FOG_HEIGHT_FALLOFF   0.1F

◆ DEFAULT_FOG_START

#define DEFAULT_FOG_START   10.0F

◆ DEFAULT_FXAA_EDGE_THRESHOLD

#define DEFAULT_FXAA_EDGE_THRESHOLD   0.125F

◆ DEFAULT_FXAA_EDGE_THRESHOLD_MIN

#define DEFAULT_FXAA_EDGE_THRESHOLD_MIN   0.063F

◆ DEFAULT_FXAA_SUBPIX

#define DEFAULT_FXAA_SUBPIX   0.75F

◆ DEFAULT_GRAIN_HIGHLIGHTS_MIN

#define DEFAULT_GRAIN_HIGHLIGHTS_MIN   0.5F

◆ DEFAULT_GRAIN_INTENSITY

#define DEFAULT_GRAIN_INTENSITY   0.02F

Default film grain strength.

◆ DEFAULT_GRAIN_SHADOWS_MAX

#define DEFAULT_GRAIN_SHADOWS_MAX   0.09F

◆ DEFAULT_GRAIN_TEXEL_SIZE

#define DEFAULT_GRAIN_TEXEL_SIZE   1.0F

◆ DEFAULT_VIGNETTE_INTENSITY

#define DEFAULT_VIGNETTE_INTENSITY   0.8F

Default vignette strength.

◆ DEFAULT_VIGNETTE_ROUNDNESS

#define DEFAULT_VIGNETTE_ROUNDNESS   1.0F

Default vignette shape.

◆ DEFAULT_VIGNETTE_SMOOTHNESS

#define DEFAULT_VIGNETTE_SMOOTHNESS   0.5F

Default vignette falloff.

◆ DEFAULT_WB_TEMP

#define DEFAULT_WB_TEMP   6500.0F

◆ DEFAULT_WB_TINT

#define DEFAULT_WB_TINT   0.0F

◆ POSTPROCESS_HISTOGRAM_BUCKETS

#define POSTPROCESS_HISTOGRAM_BUCKETS   256

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SHADER_CACHE_SIZE 

◆ BandingMode

Styles of color quantization.

Enumerator
BANDING_MODE_LINEAR 

Standard uniform (Posterization).

BANDING_MODE_DITHERED 

Ordered dithering (Bayer).

BANDING_MODE_PERCEPTUAL 

Gamma-weighted.

BANDING_MODE_CHANNEL 

RGB independent.

BANDING_MODE_LUMINANCE 

Grayscale quantization + Tint.

◆ PostProcessEffect

Bitmask flags for enabling/disabling individual effects.

Enumerator
POSTFX_VIGNETTE 

Vignette overlay.

POSTFX_GRAIN 

Film grain noise.

POSTFX_EXPOSURE 

Manual exposure compensation.

POSTFX_CHROM_ABBR 

Chromatic aberration.

POSTFX_BLOOM 

HDR Bloom.

POSTFX_COLOR_GRADING 

Saturation/Contrast/Gamma adjustment.

POSTFX_DOF 

Depth of Field.

POSTFX_DOF_DEBUG 

Focus visualization.

POSTFX_AUTO_EXPOSURE 

Automatic exposure adaptation.

POSTFX_EXPOSURE_DEBUG 

Exposure histogram visualization.

POSTFX_MOTION_BLUR 

Velocity-based motion blur.

POSTFX_MOTION_BLUR_DEBUG 

Velocity buffer visualization.

POSTFX_FXAA 

Fast Approximate Anti-Aliasing.

POSTFX_FXAA_DEBUG 

Edge detection visualization.

POSTFX_BANDING 

Color banding/quantization.

POSTFX_VECTOR_FIELD_DEBUG 

Vector field velocity visualization.

POSTFX_STENCIL_DEBUG 

Stencil mask visualization.

POSTFX_BLOOM_DEBUG 

Bloom debug view.

POSTFX_FOG 

Atmospheric depth fog.

POSTFX_FOG_DEBUG 

Fog component visualization.

POSTFX_LUT3D 

3D LUT Gamut Mapping.

POSTFX_LUT_VIZ 

3D LUT Lattice visualization.

Function Documentation

◆ _Static_assert()

_Static_assert ( _Alignof(PostProcessUBO) >=  GL_UBO_ALIGNMENT,
"PostProcessUBO" " must be >= 32-byte aligned for AVX (cglm)"   
)

◆ postprocess_apply_preset()

void postprocess_apply_preset ( PostProcess post_processing,
const PostProcessPreset preset 
)

Applies all settings from a preset atomically.

Parameters
post_processingPointer to the struct.
presetPointer to the preset values.
See also
postprocess_presets.h
Here is the call graph for this function:

◆ postprocess_begin()

void postprocess_begin ( PostProcess post_processing)

Binds the HDR FBO and prepares for scene rendering. Should be called BEFORE the main render loop.

◆ postprocess_cleanup()

void postprocess_cleanup ( PostProcess post_processing)

Releases all GPU and CPU resources.

Parameters
post_processingPointer to the struct.
Here is the call graph for this function:

◆ postprocess_compile_optimized()

void postprocess_compile_optimized ( PostProcess post_processing,
unsigned int  static_flags 
)

Compiles a specialized Uber-shader for maximum performance.

Parameters
post_processingPointer to the struct.
static_flagsBitmask of effects to bake into the shader.
Here is the call graph for this function:

◆ postprocess_compute_luminance_histogram()

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.

Returns
1 if buckets were updated, 0 otherwise.
Here is the call graph for this function:

◆ postprocess_disable()

void postprocess_disable ( PostProcess post_processing,
PostProcessEffect  effect 
)

Disables a specific effect.

Here is the call graph for this function:

◆ postprocess_enable()

void postprocess_enable ( PostProcess post_processing,
PostProcessEffect  effect 
)

Enables a specific effect.

Here is the call graph for this function:

◆ postprocess_end()

void postprocess_end ( PostProcess post_processing)

Processes the HDR scene and renders the final LDR result to screen. Should be called AFTER the main render loop.

Here is the call graph for this function:

◆ postprocess_get_exposure()

float postprocess_get_exposure ( PostProcess post_processing)
Here is the call graph for this function:

◆ postprocess_get_exposure_pbo()

GLuint postprocess_get_exposure_pbo ( PostProcess post_processing,
int  index 
)

◆ postprocess_get_exposure_sync()

GLsync postprocess_get_exposure_sync ( PostProcess post_processing,
int  index 
)

◆ postprocess_get_histogram_pbo()

GLuint postprocess_get_histogram_pbo ( PostProcess post_processing,
int  index 
)

◆ postprocess_get_histogram_sync()

GLsync postprocess_get_histogram_sync ( PostProcess post_processing,
int  index 
)

◆ postprocess_init()

int postprocess_init ( PostProcess post_processing,
GPUProfiler external_profiler,
int  width,
int  height 
)

Initializes the post-processing pipeline.

Parameters
post_processingPointer to the struct.
external_profilerPointer to the GPU profiler for timing stages.
widthInitial resolution width.
heightInitial resolution height.
Returns
0 on success, negative on error.
Here is the call graph for this function:

◆ postprocess_is_enabled()

int postprocess_is_enabled ( PostProcess post_processing,
PostProcessEffect  effect 
)

Returns true if an effect is currently active.

◆ postprocess_load_lut3d()

int postprocess_load_lut3d ( PostProcess post_processing,
const char *  path 
)

◆ postprocess_resize()

void postprocess_resize ( PostProcess post_processing,
int  width,
int  height 
)

Recreates all internal buffers for a new resolution.

Parameters
post_processingPointer to the struct.
widthNew width.
heightNew height.
Here is the call graph for this function:

◆ postprocess_set_auto_exposure()

void postprocess_set_auto_exposure ( PostProcess post_processing,
float  min_luminance,
float  max_luminance,
float  speed_up,
float  speed_down,
float  key_value 
)

◆ postprocess_set_banding()

void postprocess_set_banding ( PostProcess post_processing,
BandingMode  mode,
float  levels 
)

◆ postprocess_set_banding_channels()

void postprocess_set_banding_channels ( PostProcess post_processing,
float  red,
float  green,
float  blue 
)

◆ postprocess_set_banding_dither()

void postprocess_set_banding_dither ( PostProcess post_processing,
float  strength 
)

◆ postprocess_set_banding_perceptual()

void postprocess_set_banding_perceptual ( PostProcess post_processing,
float  gamma 
)

◆ postprocess_set_bloom()

void postprocess_set_bloom ( PostProcess post_processing,
float  intensity,
float  threshold,
float  soft_threshold 
)

◆ postprocess_set_chrom_abbr()

void postprocess_set_chrom_abbr ( PostProcess post_processing,
float  strength 
)

◆ postprocess_set_color_grading()

void postprocess_set_color_grading ( PostProcess post_processing,
float  saturation,
float  contrast,
float  gamma,
float  gain,
float  offset,
float  lift 
)

◆ postprocess_set_dof()

void postprocess_set_dof ( PostProcess post_processing,
float  focal_distance,
float  focal_range,
float  bokeh_scale 
)

◆ postprocess_set_dof_anamorphic()

void postprocess_set_dof_anamorphic ( PostProcess post_processing,
float  anamorphic_ratio 
)

◆ postprocess_set_dummy_textures()

void postprocess_set_dummy_textures ( PostProcess post_processing,
GLuint  dummy_black 
)

Internal helper to set fallback textures.

◆ postprocess_set_exposure()

void postprocess_set_exposure ( PostProcess post_processing,
float  exposure 
)

◆ postprocess_set_exposure_sync()

void postprocess_set_exposure_sync ( PostProcess post_processing,
int  index,
GLsync  sync 
)

◆ postprocess_set_exposure_target()

void postprocess_set_exposure_target ( PostProcess post_processing,
float  threshold 
)

Updates the target exposure threshold for AE.

Here is the call graph for this function:

◆ postprocess_set_fog()

void postprocess_set_fog ( PostProcess post_processing,
float  density,
float  start,
float  height_falloff,
float  fog_r,
float  fog_g,
float  fog_b 
)

◆ postprocess_set_fxaa()

void postprocess_set_fxaa ( PostProcess post_processing,
float  subpix,
float  edge_threshold,
float  edge_threshold_min 
)

◆ postprocess_set_grading_ue_default()

void postprocess_set_grading_ue_default ( PostProcess post_processing)
Here is the call graph for this function:

◆ postprocess_set_grain()

void postprocess_set_grain ( PostProcess post_processing,
float  intensity 
)

◆ postprocess_set_histogram_sync()

void postprocess_set_histogram_sync ( PostProcess post_processing,
int  index,
GLsync  sync 
)

◆ postprocess_set_lut3d()

void postprocess_set_lut3d ( PostProcess post_processing,
float  intensity,
GLuint  texture 
)

◆ postprocess_set_tonemapper()

void postprocess_set_tonemapper ( PostProcess post_processing,
float  slope,
float  toe,
float  shoulder,
float  black_clip,
float  white_clip 
)

◆ postprocess_set_vignette()

void postprocess_set_vignette ( PostProcess post_processing,
float  intensity,
float  smoothness,
float  roundness 
)

◆ postprocess_set_white_balance()

void postprocess_set_white_balance ( PostProcess post_processing,
float  temperature,
float  tint 
)

◆ postprocess_toggle()

void postprocess_toggle ( PostProcess post_processing,
PostProcessEffect  effect 
)

Toggles the current state of an effect.

Here is the call graph for this function:

◆ postprocess_update_matrices()

void postprocess_update_matrices ( PostProcess post_processing,
mat4  view_proj 
)

Updates view-projection matrices for effects requiring depth-reconstruction.

Parameters
post_processingPointer to the struct.
view_projThe current frame's View-Proj matrix.

◆ postprocess_update_readbacks()

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.

Here is the call graph for this function:

◆ postprocess_update_time()

void postprocess_update_time ( PostProcess post_processing,
float  delta_time 
)

Increments internal clocks.

Parameters
post_processingPointer to the struct.
delta_timeSECONDS elapsed since last frame.

◆ postprocess_use_dynamic()

void postprocess_use_dynamic ( PostProcess post_processing)

Switches back to the dynamic/generic Uber-shader.

Parameters
post_processingPointer to the struct.
Here is the call graph for this function: