|
GlistEngine
|
#include <gBloomPyramid.h>


Public Member Functions | |
| gBloomPyramid (int miplevels=6, float intensity=1.0f, float threshold=1.0f, float knee=0.2f, float bloomsize=1.0f) | |
| Constructs a Luminance/Alpha based Bloom Pyramid (Auto-sized). | |
| gBloomPyramid (int screenwidth, int screenheight, int miplevels=6, float intensity=1.0f, float threshold=1.0f, float knee=0.2f, float bloomsize=1.0f) | |
| Constructs a Luminance/Alpha based Bloom Pyramid with specific FBO dimensions. | |
| gBloomPyramid (float rgb[3], int miplevels=6, float intensity=1.0f, float bloomsize=1.0f, float colorSoftness=0.0f, float minGlowBrightness=0.0f) | |
| Constructs an RGB Mask based Bloom Pyramid (Auto-sized). | |
| gBloomPyramid (int screenwidth, int screenheight, int miplevels, float intensity, float bloomsize, float rgb[3], float colorSoftness=0.0f, float minGlowBrightness=0.0f) | |
| virtual | ~gBloomPyramid () |
| void | use () override |
| void | render (gFbo &src, gFbo &dst) override |
| Executes the multi-pass bloom rendering pipeline. | |
| void | setIntensity (float newintensity) |
| void | setThreshold (float newthreshold) |
| void | setKnee (float newknee) |
| void | setBloomSize (float newbloomsize) |
| void | setRgbMask (float r, float g, float b) |
| void | setColorSoftness (float newcolorsoftness) |
| void | setMinGlowBrightness (float newminglowbrightness) |
| void | setAlphaMask (bool enabled) |
| void | disableRgbMask () |
| void | disableAlphaMask () |
| void | resize (int screenwidth, int screenheight) |
| Public Member Functions inherited from gBasePostProcess | |
| gBasePostProcess () | |
| virtual | ~gBasePostProcess () |
| gShader * | getShader () |
| Public Member Functions inherited from gRenderObject | |
| gRenderObject () | |
| int | getScreenWidth () |
| int | getScreenHeight () |
| void | pushMatrix () |
| void | popMatrix () |
| Public Member Functions inherited from gObject | |
| gObject () | |
| void | logi (std::string message) |
| void | logd (std::string message) |
| void | logw (std::string message) |
| void | loge (std::string message) |
| void | logi (std::string tag, std::string message) |
| void | logd (std::string tag, std::string message) |
| void | logw (std::string tag, std::string message) |
| void | loge (std::string tag, std::string message) |
Protected Member Functions | |
| const std::string | getVertSrc () override |
| const std::string | getFragSrc () override |
Additional Inherited Members | |
| Static Public Member Functions inherited from gRenderObject | |
| static void | setScreenSize (int screenWidth, int screenHeight) |
| static void | setUnitScreenSize (int unitWidth, int unitHeight) |
| static void | setScreenScaling (int screenScaling) |
| static void | enableShadowMapping () |
| static void | disableShadowMapping () |
| static bool | isShadowMappingEnabled () |
| static void | enableExtraShaders (bool isEnabled=true) |
| static void | disableExtraShaders () |
| static bool | isExtraShadersEnabled () |
| static gRenderer * | getRenderer () |
| static void | destroyRenderer () |
| static void | createRenderer (int renderEngine=G_RENDERER_GL) |
| Static Public Member Functions inherited from gObject | |
| static std::string | gGetAppDir () |
| static std::string | gGetAssetsDir () |
| static void | gSetAssetsDir (std::string assetsDir) |
| static std::string | gGetFilesDir () |
| static std::string | gGetImagesDir () |
| static std::string | gGetFontsDir () |
| static std::string | gGetModelsDir () |
| static std::string | gGetTexturesDir () |
| static std::string | gGetShadersDir () |
| static std::string | gGetSoundsDir () |
| static std::string | gGetDatabasesDir () |
| static std::string | gGetVideosDir () |
| static void | setCurrentResolution (int scalingNo, int currentResolutionNo) |
| Static Public Attributes inherited from gObject | |
| static const int | LOGLEVEL_SILENT |
| static const int | LOGLEVEL_DEBUG |
| static const int | LOGLEVEL_INFO |
| static const int | LOGLEVEL_WARNING |
| static const int | LOGLEVEL_ERROR |
| Protected Attributes inherited from gBasePostProcess | |
| gShader * | shader |
| Static Protected Attributes inherited from gRenderObject | |
| static bool | isshadowmappingenabled |
| static bool | isextrashadersenabled |
| Static Protected Attributes inherited from gObject | |
| static int | renderpassnum |
| static int | renderpassno |
| static int | releasescaling |
| static int | releaseresolution |
Unlike traditional single-pass Gaussian blur blooms which are highly dependent on kernel size and can bottleneck GPU texture fetching, this implementation uses a downsample/upsample mip-chain. This allows for extremely wide, physically accurate glowing effects with minimal performance cost.
**Filtering Modes (Highly recommended for LDR engines):**
| gBloomPyramid::gBloomPyramid | ( | int | miplevels = 6, |
| float | intensity = 1.0f, | ||
| float | threshold = 1.0f, | ||
| float | knee = 0.2f, | ||
| float | bloomsize = 1.0f ) |
Constructs a Luminance/Alpha based Bloom Pyramid (Auto-sized).
| miplevels | Number of downsample/upsample passes. Higher values create a wider, softer glow. (Recommended: 5-7) |
| intensity | Global multiplier for the final bloom output added to the scene. |
| threshold | The brightness cutoff point. Pixels with luminance below this value will not bloom. (Ignored if Alpha Mask is enabled). |
| knee | The soft-knee transition value. Smooths out harsh cutoffs around the threshold (0.0 = hard cutoff, 0.5 = very smooth transition). |
| bloomsize | Radius multiplier for the tent filter during the upsampling pass. |
| gBloomPyramid::gBloomPyramid | ( | int | screenwidth, |
| int | screenheight, | ||
| int | miplevels = 6, | ||
| float | intensity = 1.0f, | ||
| float | threshold = 1.0f, | ||
| float | knee = 0.2f, | ||
| float | bloomsize = 1.0f ) |
Constructs a Luminance/Alpha based Bloom Pyramid with specific FBO dimensions.
| screenwidth | Width of the internal FBO mip-chain. |
| screenheight | Height of the internal FBO mip-chain. |
| gBloomPyramid::gBloomPyramid | ( | float | rgb[3], |
| int | miplevels = 6, | ||
| float | intensity = 1.0f, | ||
| float | bloomsize = 1.0f, | ||
| float | colorSoftness = 0.0f, | ||
| float | minGlowBrightness = 0.0f ) |
Constructs an RGB Mask based Bloom Pyramid (Auto-sized).
Isolates a specific color in the scene and applies bloom only to pixels matching that color.
| rgb | The target RGB color to isolate and bloom (values 0.0f - 1.0f). |
| miplevels | Number of downsample/upsample passes. |
| intensity | Global multiplier for the final bloom output. |
| bloomsize | Radius multiplier for the tent filter. |
| colorSoftness | Tolerance distance for the RGB mask. Higher values allow slightly different shades of the target color to bloom. |
| minGlowBrightness | The minimum luminance a pixel must have to be considered for blooming, even if it matches the RGB mask. |
| gBloomPyramid::gBloomPyramid | ( | int | screenwidth, |
| int | screenheight, | ||
| int | miplevels, | ||
| float | intensity, | ||
| float | bloomsize, | ||
| float | rgb[3], | ||
| float | colorSoftness = 0.0f, | ||
| float | minGlowBrightness = 0.0f ) |
|
virtual |
| void gBloomPyramid::disableAlphaMask | ( | ) |
| void gBloomPyramid::disableRgbMask | ( | ) |
|
overrideprotectedvirtual |
Implements gBasePostProcess.
|
overrideprotectedvirtual |
Implements gBasePostProcess.
Executes the multi-pass bloom rendering pipeline.
Reimplemented from gBasePostProcess.
| void gBloomPyramid::resize | ( | int | screenwidth, |
| int | screenheight ) |
| void gBloomPyramid::setAlphaMask | ( | bool | enabled | ) |
| void gBloomPyramid::setBloomSize | ( | float | newbloomsize | ) |
| void gBloomPyramid::setColorSoftness | ( | float | newcolorsoftness | ) |
| void gBloomPyramid::setIntensity | ( | float | newintensity | ) |
| void gBloomPyramid::setKnee | ( | float | newknee | ) |
| void gBloomPyramid::setMinGlowBrightness | ( | float | newminglowbrightness | ) |
| void gBloomPyramid::setRgbMask | ( | float | r, |
| float | g, | ||
| float | b ) |
| void gBloomPyramid::setThreshold | ( | float | newthreshold | ) |
|
overridevirtual |
Implements gBasePostProcess.