$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
postprocess_setters.h
Go to the documentation of this file.
1 
9 #ifndef POSTPROCESS_SETTERS_H
10 #define POSTPROCESS_SETTERS_H
11 
12 #include <glad/glad.h>
13 
14 #include "pp_params.h"
15 
16 typedef struct PostProcess PostProcess;
17 
18 /* --- Effect Control --- */
19 
21 void postprocess_enable(PostProcess* post_processing, PostProcessEffect effect);
23 void postprocess_disable(PostProcess* post_processing,
24  PostProcessEffect effect);
26 void postprocess_toggle(PostProcess* post_processing, PostProcessEffect effect);
28 int postprocess_is_enabled(PostProcess* post_processing,
29  PostProcessEffect effect);
30 
31 /* --- Parameter Tuning --- */
32 
33 void postprocess_set_white_balance(PostProcess* post_processing,
34  float temperature, float tint);
35 void postprocess_set_color_grading(PostProcess* post_processing,
36  float saturation, float contrast,
37  float gamma, float gain, float offset,
38  float lift);
39 void postprocess_set_tonemapper(PostProcess* post_processing, float slope,
40  float toe, float shoulder, float black_clip,
41  float white_clip);
42 void postprocess_set_grading_ue_default(PostProcess* post_processing);
43 void postprocess_set_vignette(PostProcess* post_processing, float intensity,
44  float smoothness, float roundness);
45 void postprocess_set_grain(PostProcess* post_processing, float intensity);
46 void postprocess_set_exposure(PostProcess* post_processing, float exposure);
47 void postprocess_set_chrom_abbr(PostProcess* post_processing, float strength);
48 void postprocess_set_bloom(PostProcess* post_processing, float intensity,
49  float threshold, float soft_threshold);
50 void postprocess_set_dof(PostProcess* post_processing, float focal_distance,
51  float focal_range, float bokeh_scale);
52 void postprocess_set_dof_anamorphic(PostProcess* post_processing,
53  float anamorphic_ratio);
54 float postprocess_get_exposure(PostProcess* post_processing);
55 void postprocess_set_auto_exposure(PostProcess* post_processing,
56  float min_luminance, float max_luminance,
57  float speed_up, float speed_down,
58  float key_value);
59 void postprocess_set_fxaa(PostProcess* post_processing, float subpix,
60  float edge_threshold, float edge_threshold_min);
61 void postprocess_set_banding(PostProcess* post_processing, BandingMode mode,
62  float levels);
63 void postprocess_set_banding_dither(PostProcess* post_processing,
64  float strength);
66  float gamma);
67 void postprocess_set_banding_channels(PostProcess* post_processing, float red,
68  float green, float blue);
69 void postprocess_set_fog(PostProcess* post_processing, float density,
70  float start, float height_falloff, float fog_r,
71  float fog_g, float fog_b);
72 void postprocess_set_lut3d(PostProcess* post_processing, float intensity,
73  GLuint texture);
74 int postprocess_load_lut3d(PostProcess* post_processing, const char* path);
75 
76 #endif /* POSTPROCESS_SETTERS_H */
void postprocess_set_color_grading(PostProcess *post_processing, float saturation, float contrast, float gamma, float gain, float offset, float lift)
Definition: postprocess_setters.c:103
void postprocess_set_white_balance(PostProcess *post_processing, float temperature, float tint)
Definition: postprocess_setters.c:95
void postprocess_set_banding_perceptual(PostProcess *post_processing, float gamma)
Definition: postprocess_setters.c:202
void postprocess_set_grain(PostProcess *post_processing, float intensity)
Definition: postprocess_setters.c:77
void postprocess_set_banding_dither(PostProcess *post_processing, float strength)
Definition: postprocess_setters.c:195
void postprocess_set_banding_channels(PostProcess *post_processing, float red, float green, float blue)
Definition: postprocess_setters.c:209
void postprocess_set_banding(PostProcess *post_processing, BandingMode mode, float levels)
Definition: postprocess_setters.c:187
void postprocess_set_chrom_abbr(PostProcess *post_processing, float strength)
Definition: postprocess_setters.c:89
void postprocess_set_lut3d(PostProcess *post_processing, float intensity, GLuint texture)
Definition: postprocess_setters.c:271
void postprocess_set_auto_exposure(PostProcess *post_processing, float min_luminance, float max_luminance, float speed_up, float speed_down, float key_value)
Definition: postprocess_setters.c:165
void postprocess_set_exposure(PostProcess *post_processing, float exposure)
Definition: postprocess_setters.c:83
void postprocess_set_tonemapper(PostProcess *post_processing, float slope, float toe, float shoulder, float black_clip, float white_clip)
Definition: postprocess_setters.c:117
void postprocess_enable(PostProcess *post_processing, PostProcessEffect effect)
Enables a specific effect.
Definition: postprocess_setters.c:44
void postprocess_set_bloom(PostProcess *post_processing, float intensity, float threshold, float soft_threshold)
Definition: postprocess_setters.c:129
void postprocess_toggle(PostProcess *post_processing, PostProcessEffect effect)
Toggles the current state of an effect.
Definition: postprocess_setters.c:56
void postprocess_set_fog(PostProcess *post_processing, float density, float start, float height_falloff, float fog_r, float fog_g, float fog_b)
Definition: postprocess_setters.c:218
void postprocess_set_grading_ue_default(PostProcess *post_processing)
Definition: postprocess_setters.c:231
void postprocess_disable(PostProcess *post_processing, PostProcessEffect effect)
Disables a specific effect.
Definition: postprocess_setters.c:50
void postprocess_set_dof(PostProcess *post_processing, float focal_distance, float focal_range, float bokeh_scale)
Definition: postprocess_setters.c:138
int postprocess_load_lut3d(PostProcess *post_processing, const char *path)
Definition: postprocess_setters.c:279
float postprocess_get_exposure(PostProcess *post_processing)
Definition: postprocess_setters.c:155
void postprocess_set_dof_anamorphic(PostProcess *post_processing, float anamorphic_ratio)
Definition: postprocess_setters.c:148
void postprocess_set_vignette(PostProcess *post_processing, float intensity, float smoothness, float roundness)
Definition: postprocess_setters.c:68
void postprocess_set_fxaa(PostProcess *post_processing, float subpix, float edge_threshold, float edge_threshold_min)
Definition: postprocess_setters.c:178
int postprocess_is_enabled(PostProcess *post_processing, PostProcessEffect effect)
Returns true if an effect is currently active.
Definition: postprocess_setters.c:62
Parameter structs and defaults for uber-shader post-processing effects.
PostProcessEffect
Bitmask flags for enabling/disabling individual effects.
Definition: pp_params.h:181
BandingMode
Styles of color quantization.
Definition: pp_params.h:146
Main pipeline state for post-processing.
Definition: postprocess_internal.h:46
ExposureParams exposure
Definition: postprocess_internal.h:69