3.21.0
This release brings a massive overhaul to the post-processing system. Post-processing effects are now individual structs that are added to a post-processor, which then executes them in order, making the system fully customisable. Many new post-processing effects were added. HDR post-processing effects are available when using the deferred renderer. Various smaller fixes and improvements are also included in this release.
Changelog:
- Added new struct
BBMOD_Rect, which is a rectangle structure defined by position and size. - Added new struct
BBMOD_PostProcessEffect, which is a base struct for all post-processing effects. - Added new method
add_effect(_effect)toBBMOD_PostProcessor, which adds an effect to the post-processor. - Added new method
remove_effect(_effect)toBBMOD_PostProcessor, which removes an effect from the post-processor. - Method
drawofBBMOD_PostProcessornow accepts optional arguments_depthand_normals, where_depthis a surface containing the scene depth encoded into RGB channels orundefinedif not available, and_normalsa surface containing the scene's world-space normals in the RGB channels orundefinedif not available. - Added new property
DesignWidthtoBBMOD_PostProcessor, which is the width of the screen for which was the game designed orundefined. Effects are scaled based on this and the current width of the screen if notundefined. Default value is 1366. - Added new property
DesignHeighttoBBMOD_PostProcessor, which is the height of the screen for which was the game designed orundefined. Effects are scaled based on this and the current height of the screen if notundefined. Default value isundefined. - Added new method
get_effect_scale()toBBMOD_PostProcessor, which retrieves the current effect scale based on the current screen size and propertiesDesignWidthandDesignHeight. - Added new read-only property
RecttoBBMOD_PostProcessor, which is the screen size and position. This is not initialized beforeBBMOD_PostProcessor.drawis called! - Added new property
LensDirttoBBMOD_PostProcessor, which is a lens dirt texture applied to effects like light bloom and lens flares. - Added new property
LensDirtStrength, which is the intensity of the lens dirt effect. - Added new property
StarbursttoBBMOD_PostProcessor, which is a starburst texture applied to lens flares (when enabled). - Added new property
StarburstStrength, which is the intensity of the starburst effect. - Added new struct
BBMOD_ChromaticAberrationEffect, which is a chromatic aberration post-processing effect. - Added new struct
BBMOD_ColorGradingEffect, which is a color grading post-processing effect. - Added new struct
BBMOD_DepthOfFieldEffect, which is a depth of field post-processing effect. - Added new struct
BBMOD_DirectionalBlurEffect, which is a directional blur post-processing effect. - Added new struct
BBMOD_ExposureEffect, which is a post-processing effect that applies camera exposure. - Added new struct
BBMOD_FilmGrainEffect, which is a film grain post-processing effect. - Added new struct
BBMOD_FXAAEffect, which is a fast approximate anti-aliasing post-processing effect. - Added new struct
BBMOD_GammaCorrectEffect, which is a post-processing effect that applies gamma correction. - Added new struct
BBMOD_KawaseBlurEffect, which is a Kawase blur post-processing effect. - Added new struct
BBMOD_LensDistortionEffect, which is a barell/pincushion lens distortion post-processing effect. - Added new struct
BBMOD_LensFlareElement, which is a single lens flare element (sprite). - Added new struct
BBMOD_LensFlare, which is a collection ofBBMOD_LensFlareElements that together define a single lens flare instance. - Added new function
bbmod_lens_flare_add(_lensFlare), which adds a lens flare to be drawn withBBMOD_LensFlaresEffect. - Added new function
bbmod_lens_flare_count(), which retrieves number of lens flares to be drawn. - Added new function
bbmod_lens_flare_get(_index), which retrieves a lens flare at given index. - Added new function
bbmod_lens_flare_remove(_lensFlare), which removes a lens flare so it is not drawn anymore. - Added new function
bbmod_lens_flare_remove_index(_index), which removes a lens flare so it is not drawn anymore - Added new function
bbmod_lens_flare_clear(), which removes all lens flares. - Added new struct
BBMOD_LensFlaresEffect, which is a post-processing effect that draws all lens flares added withbbmod_lens_flare_add. - Added new struct
BBMOD_LightBloomEffect, which is a light bloom post-processing effect. - Added new struct
BBMOD_LumaSharpenEffect, which is a luma sharpen post-processing effect. - Added new struct
BBMOD_MonochromeEffect, which is a monochrome post-processing effect. - Added new struct
BBMOD_NormalDistortionEffect, which is a post-processing effect that distort screen using a normal map texture. - Added new struct
BBMOD_RadialBlurEffect, which is a radial blur post-processing effect. - Added new struct
BBMOD_ReinhardTonemapEffect, which is a Reinhard tonemapping post-processing effect. - Added new struct
BBMOD_SunShaftsEffect, which is a sun shafts post-processing effect. - Added new struct
BBMOD_VignetteEffect, which is a vignette post-processing effect. - Property
ColorGradingLUTofBBMOD_PostProcessoris now obsolete! Please use the newBBMOD_ColorGradingEffectinstead. - Properties
ChromaticAberrationandChromaticAberrationOffsetofBBMOD_PostProcessorare now obsolete! Please use the newBBMOD_ChromaticAberrationEffectinstead. - Property
GrayscaleofBBMOD_PostProcessoris now obsolete! Please use the newBBMOD_MonochromeEffectinstead. - Properties
VignetteandVignetteColorofBBMOD_PostProcessorare now obsolete! Please use the newBBMOD_VignetteEffectinstead. - Property
AntialiasingofBBMOD_PostProcessoris now obsolete! Please use the newBBMOD_FXAAEffectinstead. - Enum
BBMOD_EAntialiasingis now obsolete! Please use the newBBMOD_FXAAEffectinstead. - Method
world_to_screenofBBMOD_BaseCameranow also acceptsBBMOD_Vec4s, using which you can project directions (Wequal to 0) as well instead of just positions (Wequal to 1). - Added shadowmap stabilization for directional lights to reduce flickering when the camera is moving.
- Added new member
Outlineto enumBBMOD_ERenderPass, which is a render pass for model outlines. Please note that this is not yet used. - Added new member
Translucentto enumBBMOD_ERenderPass, which is a render pass for translucent object that take a blurred screen surface as an input. Please note that this is not yet used. - Added new member
Distortionto enumBBMOD_ERenderPass, which is a render pass for screen distortion effects. Please note that this is not yet used. - Fixed a bug where
BBMOD_Resourcewas not removed from aBBMOD_ResourceManagerwhen destroyed. - Fixed method
loadofBBMOD_ResourceManagerwhich executed callback multiple times when loading models with materials. - Fixed depth in deferred rendering pipeline being cleared to 0 instead of 1, which was inconsistent with the forward renderer and made particles invisible when not rendered over solid geometry (e.g. only a sky dome was behind).
- Fixed shading of backfacing polygons.
- Fixed rpaths for BBMOD CLI on macOS.