Releases: blueburncz/BBMOD
3.22.5
This patch release mainly fixes rendering bugs and brings performance improvements to the BBMOD_Matrix
struct.
Changelog:
- Fixed punctual lights not working in the default shaders.
- Fixed light bloom threshold shader modifying the original color.
- Fixed crash in method
BBMOD_MeshRenderQueue.submit
for commandBBMOD_ERenderCommand.DrawMesh
. - Added new function
bbmod_matrix_get_identity()
, which retrieves the identity matrix. - Added new function
bbmod_matrix_set_identity(_matrix)
, which turns given matrix into an identity matrix. - Added new function
bbmod_matrix_set_translation(_matrix, _x, _y, _z)
, which writes translation into given matrix. - Added new function
bbmod_matrix_set_rotation_x(_matrix, _angle)
, which writes rotation around the X axis into an identity matrix. - Added new function
bbmod_matrix_set_rotation_y(_matrix, _angle)
, which writes rotation around the Y axis into an identity matrix. - Added new function
bbmod_matrix_set_rotation_z(_matrix, _angle)
, which writes rotation around the Z axis into an identity matrix. - Added new function
bbmod_matrix_set_scale(_matrix, _x, _y, _z)
, which writes scale into an identity matrix. - Fixed infinite loop in method
Transpose
of structBBMOD_Matrix
. - Added new method
SetIdentity()
to structBBMOD_Matrix
, which turns the matrix into an identity matrix. - Added new method
clear_draw_cache()
to structBBMOD_Model
, which clears cached data that speeds up rendering of the model. This should be used when properties likeBBMOD_Node.Visible
change! - Added new method
Equals(_q)
to structBBMOD_Quaternion
, which checks whether two quaternions are equal. - Added new method
Equals(_dq)
to structBBMOD_DualQuaternion
, which checks whether two dual quaternions are equal.
3.22.4
This release updates Assimp used on Windows to its latest version.
Changelog:
- Updated Assimp used in Windows binaries to v5.4.3.
3.22.3
This release updates Assimp to its latest version (macOS only) and adds support for Intel-based Macs to BBMOD CLI and DLL!
Changelog:
- Updated Assimp used in macOS binaries to v5.4.3.
- Added support for Intel-based Macs to BBMOD CLI & DLL.
3.22.2
This is a small patch release mainly bringing fixes for the GX.games platform!
Changelog:
- Fixed not all parameters of
BBMOD_DepthOfFieldEffect
constructors being used. - Fixed property
Sprite
of structBBMOD_LensFlareElement
defaulting to spriteBBMOD_SprLensFlareGhost
, which does not exist. Now it defaults toBBMOD_SprLensFlareHeptagon
. - Fixed loading of "Lightmap" textures from
*.bbmat
files forBBMOD_MATERIAL_DEFAULT_LIGHTMAP
materials. - Added new utility function
bbmod_is_browser()
, which returnstrue
if the game is running in a browser. - Added new utility functions
bbmod_window_get_width()
andbbmod_window_get_height()
, which return the width and the height of the game window respectively. This is useful for GX.games platform, wherewindow_get_width()
andwindow_get_height()
do not return the desired value. - Fixed
BBMOD_Camera
's mouselook not working on GX.games platform. - Fixed default shaders not compiling on GX.games platform.
- Fixed post-processing effects
BBMOD_DepthOfFieldEffect
,BBMOD_DirectionalBlurEffect
,BBMOD_RadialBlurEffect
andBBMOD_SunShaftEffect
not working on GX.games platform. - Disabled property
RenderScale
ofBBMOD_BaseRenderer
on GX.games and HTML5 platforms, as it does not work properly!
3.22.1
This is a small patch released mainly to fix a crash that occurs in GM 2024.11 when using BBMOD_ResourceManager
.
Changelog:
- Added new method
update_bbox
toBBMOD_Mesh
, which updates the mesh's bounding box using data from its vertex buffer. - Methods
from_buffer
andto_buffer
ofBBMOD_Mesh
now throw aBBMOD_Exception
if used when propertyModel
isundefined
. Previously this would cause a crash. - Fixed
ClearColor
ofBBMOD_DeferredRender
resulting into a wrong color because of gamma correction. - Disabled Assimp option
AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS
, which should fix some problems with converting animated FBX models to BBMOD. - Fixed specular color of dielectric materials in
BBMOD_DeferredRenderer
. - Fixed crash in
bbmod_async_save_load_update
in GM 2024.11.
3.22.0
This is a small release that mainly adds functions using which you can configure flip of camera aspect ratio and field of view. Previously this was hardcoded to be enabled. Additionally you can now define clear color when using BBMOD_DeferredRenderer
.
Changelog:
- Added new function
bbmod_camera_get_fov_flip()
, which returns whether BBMOD cameras use a flipped field of view. - Added new function
bbmod_camera_set_fov_flip(_flip)
, using which you can change whether BBMOD cameras should use a flipped field of view. By default this is enabled for backwards compatibility. - Added new function
bbmod_camera_get_aspect_flip()
, which returns whether BBMOD cameras use a flipped aspect ratio. - Added new function
bbmod_camera_set_aspect_flip(_flip)
, using which you can change whether BBMOD cameras should use a flipped aspect ratio. By default this is enabled for backwards compatibility. - Added new property
ClearColor
toBBMOD_DeferredRenderer
, which is the color to clear the background with. Default value isc_black
. - Fixed normal vectors of backfaces being flipped incorrectly.
- Fixed lens dirt post-processing effect on OpenGL platforms.
3.21.4
This is a hotfix for the previous release, which included a typo in BBMOD_DefaultShader.set_material
, causing an error.
Changelog:
- Fixed typo in method
set_material
ofBBMOD_DefaultShader
, which tried to use theNormalSmoothness
texture when the material was usingNormalRoughness
, causing an error.
3.21.3
This release primarily fixes rendering of 2D sprites with BBMOD and adds an option to disable two-sided materials. There are now also more *.bbmod
models included - cubes, cylinders, cones, planes and slopes.
Changelog:
- Shaders
BBMOD_SHADER_DEFAULT_DEPTH
andBBMOD_SHADER_GBUFFER
are now compatible with vertex formatBBMOD_VFORMAT_DEFAULT_SPRITE
. - Added new macro
BBMOD_U_SUBSURFACE_UV
, which is the name of a fragment shader uniform of typevec4
that holds top left and bottom right coordinates of the subsurface texture on its texture page. - Added new function
bbmod_shader_set_subsurface_uv
, which sets theBBMOD_U_SUBSURFACE_UV
uniform to given values. - Added new macro
BBMOD_U_EMISSIVE_UV
, which is the name of a fragment shader uniform of typevec4
that holds top left and bottom right coordinates of the emissive texture on its texture page. - Added new function
bbmod_shader_set_emissive_uv
, which sets theBBMOD_U_EMISSIVE_UV
uniform to given values. - Added new macro
BBMOD_U_TWO_SIDED
, which is the name of a fragment shader uniform of typefloat
that equals 1 when the material is two-sided or 0 when it is not. If a material is two-sided, normal vectors of backfaces are flipped before shading. - Added new function
bbmod_shader_set_two_sided
, which sets theBBMOD_U_TWO_SIDED
uniform. - Added new property
TwoSided
toBBMOD_BaseMaterial
, which tells whether the material is two-sided. If the material is two-sided, normal vectors of backfaces are flipped before shading. Default value istrue
. - Fixed property
RenderScale
of renderers affecting the size of the final surface on screen. - Methods
DrawSprite
,DrawSpriteExt
,DrawSpriteGeneral
,DrawSpritePart
,DrawSpritePartExt
,DrawSpritePos
,DrawSpriteStretched
,DrawSpriteStretchedExt
,DrawSpriteTiled
,DrawSpriteTiledExt
ofBBMOD_RenderQueue
now set uniformBBMOD_U_BASE_OPACITY_UV
automatically and you do not need to assign theBaseOpacity
property of used material to the sprite drawn. - Method
set_material
ofBBMOD_DefaultShader
now automatically sets uniformsBBMOD_U_BASE_OPACITY_UV
,BBMOD_U_NORMAL_W_UV
,BBMOD_U_MATERIAL_UV
,BBMOD_U_SUBSURFACE_UV
andBBMOD_U_EMISSIVE_UV
. - Struct
BBMOD_DefaultSpriteShader
is now deprecated! Please useBBMOD_DefaultShader
instead. - Macro
BBMOD_SHADER_DEFAULT_SPRITE
is now deprecated! Please useBBMOD_SHADER_DEFAULT
instead. - Macro
BBMOD_MATERIAL_DEFAULT_SPRITE
is now deprecated! Please useBBMOD_MATERIAL_DEFAULT
instead. - Added new member
SetGpuDepth
to enumBBMOD_ERenderCommand
, which is a render command that changes the z coordinate at which sprites and text are drawn. - Added new method
SetGpuDepth
toBBMOD_RenderQueue
, which adds aSetGpuDepth
command to the render queue. - Added new member
CallFunction
to enumBBMOD_ERenderCommand
, which is a render command that executes a custom function with given arguments. - Added new method
CallFunction
toBBMOD_RenderQueue
, which adds aCallFunction
command to the render queue. - Added more ready-to-use models of basic shapes.
- Fixed method
clear
ofBBMOD_ResourceManager
not always removing destroyed resources, which could cause crashes for example when restarting rooms. - Fixed strength of lens flares exceeding 1 when property
Range
is notinfinity
. - Fixed macro
BBMOD_RELEASE_PATCH
, which we forgot to increase the last release. - Fixed macro
BBMOD_RELEASE_STRING
, which used invalid syntax.
3.21.2
This release fixes few bugs in the new post-processing system and adds a new "lens dirt strength" option to the sun shafts effect, using which you can modulate the strength of the lens dirt effect for sun shafts.
Changelog:
- Added new property
LensDirtStrength
toBBMOD_SunShafts
, which modules the strength of the lens dirt effect when applied to sun shafts. Default value is 1. - Added new optional argument
_lensDirtStrength
to the constructor ofBBMOD_SunShafts
, using which you can change the initial value of theLensDirtStrength
property. - Fixed
BBMOD_LensDistortionEffect
, which did not work with negative strength. - Fixed
BBMOD_ColorGradingEffect
, which did not actually apply color grading.
3.21.1
This release is a hotfix for an issue where renderers did not display the application surface if they did not use a post-processor.
Changelog:
- Fixed method
present
ofBBMOD_BaseRenderer
,BBMOD_DefaultRenderer
andBBMOD_DeferredRenderer
, which did not draw the application surface if post-processor was not defined or was disabled. - Fixed wrong comparisons with the epsilon value, which caused getting
NaN
in various places (e.g.BBMOD_Vec3.Normalize
). Thanks to @xgreffe for the pull request! - Fixed error that occured when
BBMOD_Material.from_json
was given a JSON that included string "undefined" as a value for a shader (which is a valid option).