Advanced Multiplatform Real-Time Blur & FX Base
High-performance post-processing blur and visual effects base for Android (OpenGL ES 3.0) and Desktop (OpenGL 3.3 Core) with seamless ImGui integration.
<--- --->
Q: What is the advantage of this base?
A: Let's try to highlight the main ones:
- Multiplatform Core. Native OpenGL ES 3.0 (Android) and OpenGL 3.3 Core (Desktop Windows/Linux/macOS) rendering backends.
- Rich Visual FX Suite. Supports 9 real-time shader algorithms:
- Gaussian Blur — Classic separable Gaussian blur
- Kawase Blur — High-speed dual-filter bloom/blur
- Frosted Glass — Jittered noise frosted blur
- Bokeh Effect — Circular lens light spread
- Motion Blur — Directional motion smear
- Radial Zoom Blur — Center-focused radial zoom blur
- Pixelate Effect — Retro block-averaging pixelation
- Box Blur — Fast 5-tap box filter
- Dual Hardware Execution. Choose between
Hardware::GPU(ping-pong framebuffers) andHardware::CPU(software fallback). - ImGui Ready. Direct overloads for
ImDrawList,ImRect, andImVec2for window overlays & UI elements. - Zero Mandatory Dependencies. Drop-in headers and sources into any project setup without forced vendor libraries.
<--- --->
Q: How to add a Blur or FX to your project?
A: Ah, it's simple:
- Add
blur.cpp,blur/cpu/cpu.cpp, andblur/gpu/gpu.cppto your build. - Include
blur.hppand instantiate:
#include "blur.hpp"
static Blur* blur = nullptr;
if (!blur) {
blur = new Blur(Hardware::GPU);
blur->type = Blur::Type::Kawase; // Or Bokeh, Pixelate, Frosted, Zoom, Motion...
}
blur->process(x, y, width, height, 12.0f, 4);
// Use blur->tex in your OpenGL or ImGui renderer<--- --->
Q: How to use with ImGui?
A: Pass your draw list or window rect directly:
blur->process(ImGui::GetWindowDrawList(), 14.0f, 12.0f, 4, Hardware::GPU);<--- --->
Q: How to configure Desktop OpenGL loader?
A: Use your preferred GL loader header:
// By default <glad/glad.h> is included on desktop.
// You can supply your custom loader header via compiler flag:
// -DBLUR_GL_LOADER_HEADER="my_gl_loader.h"