|
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
|
PostProcess struct definition and internal helpers. 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 "gpu_profiler.h"#include "postprocess.h"#include "pp_exposure_readback.h"#include "pp_gpu_resources.h"#include "pp_params.h"#include "pp_shader_state.h"#include "pp_ubo.h"#include "shader.h"#include <cglm/types.h>#include <stdbool.h>Go to the source code of this file.
Data Structures | |
| struct | PostProcess |
| Main pipeline state for post-processing. More... | |
| struct | PostProcessPreset |
| Snapshot of every configurable parameter in the pipeline. More... | |
Macros | |
| #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_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 |
Enumerations | |
| enum | { POSTPROCESS_TEX_UNIT_SCENE = 0 , POSTPROCESS_TEX_UNIT_BLOOM = 1 , POSTPROCESS_TEX_UNIT_DEPTH = 2 , POSTPROCESS_TEX_UNIT_EXPOSURE = 3 , POSTPROCESS_TEX_UNIT_VELOCITY = 4 , POSTPROCESS_TEX_UNIT_NEIGHBOR_MAX = 5 , POSTPROCESS_TEX_UNIT_DOF_BLUR = 6 , POSTPROCESS_TEX_UNIT_STENCIL = 7 , POSTPROCESS_TEX_UNIT_LUT3D = 8 } |
Functions | |
| void | pp_destroy_framebuffer (PostProcess *post_processing) |
| void | pp_destroy_screen_quad (PostProcess *post_processing) |
| void | pp_destroy_readback_buffers (PostProcess *post_processing) |
| void | pp_destroy_cached_shaders (PostProcess *post_processing) |
| bool | pp_is_shader_in_cache (PostProcess *post_processing, Shader *shader) |
| int | pp_create_framebuffer (PostProcess *post_processing) |
| void | pp_setup_sampler_uniforms (PostProcess *post_processing) |
| void | pp_update_current_shader (PostProcess *post_processing, Shader *new_shader, bool is_optimized) |
PostProcess struct definition and internal helpers.
Include this header when you need access to PostProcess struct members. For the public lifecycle/render API only, include postprocess.h instead.
| #define DEFAULT_BLOOM_INTENSITY 0.0F |
| #define DEFAULT_BLOOM_RADIUS 1.0F |
| #define DEFAULT_BLOOM_SOFT_THRESHOLD 0.5F |
| #define DEFAULT_BLOOM_THRESHOLD 1.0F |
| #define DEFAULT_DOF_ANAMORPHIC_RATIO 1.0F |
1.0 = Spherical, 2.0 = Anamorphic
| #define DEFAULT_DOF_BOKEH_SCALE 10.0F |
| #define DEFAULT_DOF_FOCAL_DISTANCE 20.0F |
| #define DEFAULT_DOF_FOCAL_RANGE 5.0F |
| anonymous enum |
| int pp_create_framebuffer | ( | PostProcess * | post_processing | ) |
Create the main scene FBO with color, velocity, depth/stencil.
| void pp_destroy_cached_shaders | ( | PostProcess * | post_processing | ) |
Destroy all cached shader variants.
| void pp_destroy_framebuffer | ( | PostProcess * | post_processing | ) |
Destroy the main scene FBO and its attachments.
| void pp_destroy_readback_buffers | ( | PostProcess * | post_processing | ) |
Destroy PBO readback buffers and sync objects.
| void pp_destroy_screen_quad | ( | PostProcess * | post_processing | ) |
Destroy the fullscreen quad VAO/VBO.
| bool pp_is_shader_in_cache | ( | PostProcess * | post_processing, |
| Shader * | shader | ||
| ) |
Check whether a shader is in the variant cache.
| void pp_setup_sampler_uniforms | ( | PostProcess * | post_processing | ) |
Bind sampler uniforms to texture units on the current shader.
| void pp_update_current_shader | ( | PostProcess * | post_processing, |
| Shader * | new_shader, | ||
| bool | is_optimized | ||
| ) |
Update the active shader, destroying the old one if not cached.