Skip to content

Releases: blueburncz/BBMOD

3.22.5

12 Apr 20:12
Compare
Choose a tag to compare

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 command BBMOD_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 struct BBMOD_Matrix.
  • Added new method SetIdentity() to struct BBMOD_Matrix, which turns the matrix into an identity matrix.
  • Added new method clear_draw_cache() to struct BBMOD_Model, which clears cached data that speeds up rendering of the model. This should be used when properties like BBMOD_Node.Visible change!
  • Added new method Equals(_q) to struct BBMOD_Quaternion, which checks whether two quaternions are equal.
  • Added new method Equals(_dq) to struct BBMOD_DualQuaternion, which checks whether two dual quaternions are equal.

3.22.4

23 Mar 09:40
Compare
Choose a tag to compare

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

21 Mar 20:00
Compare
Choose a tag to compare

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

08 Mar 11:33
Compare
Choose a tag to compare

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 struct BBMOD_LensFlareElement defaulting to sprite BBMOD_SprLensFlareGhost, which does not exist. Now it defaults to BBMOD_SprLensFlareHeptagon.
  • Fixed loading of "Lightmap" textures from *.bbmat files for BBMOD_MATERIAL_DEFAULT_LIGHTMAP materials.
  • Added new utility function bbmod_is_browser(), which returns true if the game is running in a browser.
  • Added new utility functions bbmod_window_get_width() and bbmod_window_get_height(), which return the width and the height of the game window respectively. This is useful for GX.games platform, where window_get_width() and window_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 and BBMOD_SunShaftEffect not working on GX.games platform.
  • Disabled property RenderScale of BBMOD_BaseRenderer on GX.games and HTML5 platforms, as it does not work properly!

3.22.1

04 Jan 19:28
Compare
Choose a tag to compare

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 to BBMOD_Mesh, which updates the mesh's bounding box using data from its vertex buffer.
  • Methods from_buffer and to_buffer of BBMOD_Mesh now throw a BBMOD_Exception if used when property Model is undefined. Previously this would cause a crash.
  • Fixed ClearColor of BBMOD_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

07 Sep 20:06
Compare
Choose a tag to compare

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 to BBMOD_DeferredRenderer, which is the color to clear the background with. Default value is c_black.
  • Fixed normal vectors of backfaces being flipped incorrectly.
  • Fixed lens dirt post-processing effect on OpenGL platforms.

3.21.4

04 Jul 06:23
Compare
Choose a tag to compare

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 of BBMOD_DefaultShader, which tried to use the NormalSmoothness texture when the material was using NormalRoughness, causing an error.

3.21.3

03 Jul 19:33
Compare
Choose a tag to compare

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 and BBMOD_SHADER_GBUFFER are now compatible with vertex format BBMOD_VFORMAT_DEFAULT_SPRITE.
  • Added new macro BBMOD_U_SUBSURFACE_UV, which is the name of a fragment shader uniform of type vec4 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 the BBMOD_U_SUBSURFACE_UV uniform to given values.
  • Added new macro BBMOD_U_EMISSIVE_UV, which is the name of a fragment shader uniform of type vec4 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 the BBMOD_U_EMISSIVE_UV uniform to given values.
  • Added new macro BBMOD_U_TWO_SIDED, which is the name of a fragment shader uniform of type float 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 the BBMOD_U_TWO_SIDED uniform.
  • Added new property TwoSided to BBMOD_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 is true.
  • 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 of BBMOD_RenderQueue now set uniform BBMOD_U_BASE_OPACITY_UV automatically and you do not need to assign the BaseOpacity property of used material to the sprite drawn.
  • Method set_material of BBMOD_DefaultShader now automatically sets uniforms BBMOD_U_BASE_OPACITY_UV, BBMOD_U_NORMAL_W_UV, BBMOD_U_MATERIAL_UV, BBMOD_U_SUBSURFACE_UV and BBMOD_U_EMISSIVE_UV.
  • Struct BBMOD_DefaultSpriteShader is now deprecated! Please use BBMOD_DefaultShader instead.
  • Macro BBMOD_SHADER_DEFAULT_SPRITE is now deprecated! Please use BBMOD_SHADER_DEFAULT instead.
  • Macro BBMOD_MATERIAL_DEFAULT_SPRITE is now deprecated! Please use BBMOD_MATERIAL_DEFAULT instead.
  • Added new member SetGpuDepth to enum BBMOD_ERenderCommand, which is a render command that changes the z coordinate at which sprites and text are drawn.
  • Added new method SetGpuDepth to BBMOD_RenderQueue, which adds a SetGpuDepth command to the render queue.
  • Added new member CallFunction to enum BBMOD_ERenderCommand, which is a render command that executes a custom function with given arguments.
  • Added new method CallFunction to BBMOD_RenderQueue, which adds a CallFunction command to the render queue.
  • Added more ready-to-use models of basic shapes.
  • Fixed method clear of BBMOD_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 not infinity.
  • 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

18 Apr 21:15
Compare
Choose a tag to compare

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 to BBMOD_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 of BBMOD_SunShafts, using which you can change the initial value of the LensDirtStrength property.
  • Fixed BBMOD_LensDistortionEffect, which did not work with negative strength.
  • Fixed BBMOD_ColorGradingEffect, which did not actually apply color grading.

3.21.1

16 Apr 19:59
Compare
Choose a tag to compare

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 of BBMOD_BaseRenderer, BBMOD_DefaultRenderer and BBMOD_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).