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
draw
ofBBMOD_PostProcessor
now accepts optional arguments_depth
and_normals
, where_depth
is a surface containing the scene depth encoded into RGB channels orundefined
if not available, and_normals
a surface containing the scene's world-space normals in the RGB channels orundefined
if not available. - Added new property
DesignWidth
toBBMOD_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
DesignHeight
toBBMOD_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 propertiesDesignWidth
andDesignHeight
. - Added new read-only property
Rect
toBBMOD_PostProcessor
, which is the screen size and position. This is not initialized beforeBBMOD_PostProcessor.draw
is called! - Added new property
LensDirt
toBBMOD_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
Starburst
toBBMOD_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_LensFlareElement
s 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
ColorGradingLUT
ofBBMOD_PostProcessor
is now obsolete! Please use the newBBMOD_ColorGradingEffect
instead. - Properties
ChromaticAberration
andChromaticAberrationOffset
ofBBMOD_PostProcessor
are now obsolete! Please use the newBBMOD_ChromaticAberrationEffect
instead. - Property
Grayscale
ofBBMOD_PostProcessor
is now obsolete! Please use the newBBMOD_MonochromeEffect
instead. - Properties
Vignette
andVignetteColor
ofBBMOD_PostProcessor
are now obsolete! Please use the newBBMOD_VignetteEffect
instead. - Property
Antialiasing
ofBBMOD_PostProcessor
is now obsolete! Please use the newBBMOD_FXAAEffect
instead. - Enum
BBMOD_EAntialiasing
is now obsolete! Please use the newBBMOD_FXAAEffect
instead. - Method
world_to_screen
ofBBMOD_BaseCamera
now also acceptsBBMOD_Vec4
s, using which you can project directions (W
equal to 0) as well instead of just positions (W
equal to 1). - Added shadowmap stabilization for directional lights to reduce flickering when the camera is moving.
- Added new member
Outline
to enumBBMOD_ERenderPass
, which is a render pass for model outlines. Please note that this is not yet used. - Added new member
Translucent
to 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
Distortion
to enumBBMOD_ERenderPass
, which is a render pass for screen distortion effects. Please note that this is not yet used. - Fixed a bug where
BBMOD_Resource
was not removed from aBBMOD_ResourceManager
when destroyed. - Fixed method
load
ofBBMOD_ResourceManager
which 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.