Skip to content

Releases: blueburncz/BBMOD

3.16.6

02 Feb 23:00
Compare
Choose a tag to compare

This release fixes SSAO when using orthographic projection and adds more options to control SSAO quality with.

Changelog:

  • Added new property SSAOSelfOcclusionBias to BBMOD_DefaultRenderer, which defaults to 0.01. Increase to fix self-occlusion.
  • Added new property SSAOBlurDepthRange to BBMOD_DefaultRenderer, which is the maximum depth difference over which can be SSAO samples blurred. Defaults to 2.
  • Added new optional arguments _selfOcclusionBias and _blurDepthRange to function bbmod_ssao_draw, using which you can configure self-occlusion bias and blur depth range respectively.
  • Fixed SSAO when using orthographic projection.

3.16.5

02 Feb 19:44
Compare
Choose a tag to compare

This release mainly fixes specular reflections and the size of the gizmo when using an orthographic projection. Additionally, resources can now be marked as persistent and a new clear method was added to the resource manager, which frees all non-persistent resources.

Changelog:

  • Added new property Height to BBMOD_BaseCamera, which is the height of the orthographic projection. If undefined, then it is computed from Width using AspectRatio. Defaults to undefined.
  • Property Width of BBMOD_BaseCamera can now be undefined. It is then computed from Height using AspectRatio.
  • Fixed gizmo changing size based on its distance from the camera when using an orthographic projection.
  • Fixed specular reflections when using an orthographic projection.
  • Added new property Persistent to BBMOD_Resource. If it is true, then the resource is persistent and it is not destroyed when method free is used. Default value is false.
  • Added new method clear to BBMOD_ResourceManager, which destroys all non-persistent resources.
  • Added new macro BBMOD_RESOURCE_MANAGER, which is the default resource manager.

3.16.4

31 Dec 08:54
Compare
Choose a tag to compare

This release fixes animation serialization to buffers.

Scripting API changes

  • Fixed method to_buffer of BBMOD_Animation, which previously caused a crash.

3.16.3

29 Dec 19:53
Compare
Choose a tag to compare

This release fixes rendering of particles and SSAO on macOS (and possibly other OpenGL platforms). No changes were made to the Scripting API.

3.16.2

28 Dec 11:13
Compare
Choose a tag to compare

This is a tiny release that fixes BBMOD_BaseCamera and model serialization to buffers.

Scripting API changes

  • Fixed method update_matrices of BBMOD_BaseCamera.
  • Added missing method ToBuffer to BBMOD_Quaternion.
  • Fixed method to_buffer of BBMOD_Model.
  • Fixed method to_buffer of BBMOD_Mesh.

3.16.1

20 Dec 22:16
Compare
Choose a tag to compare

This release adds more of unlit variations of the default shaders and materials.

Scripting API changes

  • Added new macro BBMOD_SHADER_DEFAULT_UNLIT, which is the default shader for unlit objects.
  • Added new macro BBMOD_MATERIAL_DEFAULT_UNLIT, which is the default material for unlit objects.
  • Added new macro BBMOD_SHADER_TERRAIN_UNLIT, which is an unlit terrain shader.
  • Added new macro BBMOD_MATERIAL_TERRAIN_UNLIT, which is an unlit terrain material.

3.16.0

17 Dec 08:31
Compare
Choose a tag to compare

This release is a preface to bigger new features to come that require some modifications to the library. It is being released earlier to give you more time to accommodate to the changes and to give us time to fix potential issues while we also work on the new features. Please make sure to read this changelog thoroughly before updating to this release!

Feature highlights

Modules reorganized

To simplify the structure of the library and to allow certain planned features to be implemented, modules had to be reorganized, with a lot of the API being put into the Core module. The Core module now contains all the basics and the rest are modules that add features on top of that.

BBMOD DLL in the core

BBMOD DLL is now also a part of the Core module and its path in the included files can be controlled only through a new macro BBMOD_DLL_PATH! This is because it could be utilized throughout other parts of the library when possible (e.g. to speed things up or enable features otherwise unsupported on certain platforms).

Vertex texture fetching support

GameMaker supports vertex texture fetching (VTF) on most platforms, known exceptions being PS4, PS5, Xbox and Windows. We would like to utilize VTF on desktop platforms in one of the future updates, so we are adding support for VTF on Windows through the BBMOD DLL. You can now use bbmod_vtf_is_supported to check if VTF is supported on the current platform and bbmod_texture_set_stage_vs to pass a texture to a vertex shader.

Shader variants

Before it was not possible to share a single material between static, animated and dynamically batched models. Instead you had to create a separate copy of the material with a special shader. This issue has been resolved by adding shader variants. Each BBMOD_Shader can now consist of multiple GameMaker shader resources, where each is used with a different vertex format. This means that you can now use BBMOD_MATERIAL_DEFAULT for all three model kinds, without the _ANIMATED or _BATCHED suffix.

Default renderer

To enable us to develop multiple rendering pipelines, BBMOD_Renderer had to be split into BBMOD_BaseRenderer and BBMOD_DefaultRenderer. The former is a new base struct for all renderers and the latter is a replacement for the old renderer. Aditionally, everything regarding the default materials and the default renderer was put into a single folder, so it is easier to find all resources used in the default rendering pipeline.

Scripting API changes

  • Added missing method Reset to BBMOD_RaycastResult, which resets its properties to their default values.
  • Prefixed all private API with __ (two underscores) to "hide" it from autocomplete.
  • Structs BBMOD_Collider, BBMOD_Node, BBMOD_Vertex, BBMOD_VertexFormat, BBMOD_ParticleModule, BBMOD_Property and BBMOD_Shader now inherit from BBMOD_Class.
  • Added new macro BBMOD_MAX_BONES, which is the maximum number of bones a single model can have. Equals to 128.
  • Added new method set_node_rotation_post to BBMOD_AnimationPlayer, which sets a post-rotation of a node.
  • Added new macro BBMOD_MAX_BATCH_VEC4S, which is the maximum number of vec4 uniforms for dynamic batch data available in the default shaders.
  • Added new function bbmod_vtf_is_supported, which checks if vertex texture fetching is supported on the current platform.
  • Added new function bbmod_texture_set_stage_vs, which passes a texture to a vertex shader.
  • Added new member DepthOnly to enum BBMOD_ERenderPass, which is a render pass where opaque objects are rendered into an off-screen depth buffer.
  • Member Deferred of enum BBMOD_ERenderPass is now deprecated! Please use the new DepthOnly instead.
  • Added new member GBuffer to enum BBMOD_ERenderPass, which is a render pass where opaque objects are rendered into a G-Buffer.
  • Added new method add_variant to BBMOD_Shader, which adds a shader variant to be used with a specific vertex format.
  • Added new method has_variant to BBMOD_Shader, which checks whether the shader has a variant for given vertex format.
  • Property VertexFormat of BBMOD_Shader is now obsolete! Please use the new method has_variant instead.
  • Arguments _shader and _vertexFormat of BBMOD_Shader's constructor are now optional. If specified, then they are added to the shader with the new method add_variant.
  • Added new method get_variant to BBMOD_Shader, which retrieves a shader variant for given vertex format.
  • Property Raw of BBMOD_Shader is now obsolete! Please use the new method get_variant instead.
  • Method get_name of BBMOD_Shader is now obsolete and will always return undefined!
  • Method is_compiled of BBMOD_Shader now checks if all its variants are compiled!
  • Removed deprecated methods, set_uniform_f, set_uniform_f2, set_uniform_f3, set_uniform_f4, set_uniform_f_array, set_uniform_i, set_uniform_i2, set_uniform_i3, set_uniform_i4, set_uniform_i_array, set_uniform_matrix, set_uniform_matrix_array and set_sampler of BBMOD_Shader!
  • Methods get_uniform and get_sampler_index of BBMOD_Shader are now obsolete and will always return -1!
  • Method set of BBMOD_Shader now expects argument _vertexFormat, which is used to set a specific shader variant!
  • Changed signature of BBMOD_RenderQueue.draw_mesh to draw_mesh(_vertexBuffer, _vertexFormat, _primitiveType, _materialIndex, _material, _matrix)!
  • Changed signature of BBMOD_RenderQueue.draw_mesh_animated to draw_mesh_animated(_vertexBuffer, _vertexFormat, _primitiveType, _materialIndex, _material, _matrix, _boneTransform)!
  • Changed signature of BBMOD_RenderQueue.draw_mesh_batched to draw_mesh_batched(_vertexBuffer, _vertexFormat, _primitiveType, _materialIndex, _material, _matrix, _batchData)!
  • Added new optional argument _matrix to BBMOD_Model.render, which is the world matrix to use when rendering the model. It defaults to matrix_get(matrix_world) when not specified.
  • Renamed sprite BBMOD_SprCheckerboard to BBMOD_SprDefaultBaseOpacity!
  • Moved macros BBMOD_SHADER_DEPTH, BBMOD_SHADER_DEPTH_ANIMATED and BBMOD_SHADER_DEPTH_BATCHED to the Core module!
  • Added new macro BBMOD_SHADER_DEFAULT_DEPTH, which is a substitution for the old BBMOD_SHADER_DEPTH. It contains shader variants for vertex formats BBMOD_VFORMAT_DEFAULT_ANIMATED, BBMOD_VFORMAT_DEFAULT_BATCHED and BBMOD_VFORMAT_DEFAULT_LIGHTMAP.
  • Macros BBMOD_SHADER_DEPTH, BBMOD_SHADER_DEPTH_ANIMATED and BBMOD_SHADER_DEPTH_BATCHED are now deprecated! Please use the new BBMOD_SHADER_DEFAULT_DEPTH instead.
  • Renamed shaders BBMOD_ShDepth, BBMOD_ShDepthAnimated and BBMOD_ShDepthBatched to BBMOD_ShDefaultDepth, BBMOD_ShDefaultDepthAnimated and BBMOD_ShDefaultDepthBatched respectively!
  • Removed the Rendering/Depth buffer submodule, since it became empty!
  • Moved structs BBMOD_LightmapMaterial and BBMOD_LightmapShader to the Core module!
  • Added new structs BBMOD_DefaultLightmapMaterial and BBMOD_DefaultLightmapShader, which are substitutions for BBMOD_LightmapMaterial and BBMOD_LightmapShader respectively.
  • Struct BBMOD_LightmapMaterial now inherits from the new BBMOD_DefaultLightmapMaterial and is marked as deprecated! Please use BBMOD_DefaultLightmapMaterial instead.
  • Struct BBMOD_LightmapShader now inherits from the new BBMOD_DefaultLightmapShader and is marked as deprecated! Please use BBMOD_DefaultLightmapShader instead.
  • Moved macros BBMOD_VFORMAT_LIGHTMAP, BBMOD_SHADER_LIGHTMAP, BBMOD_SHADER_LIGHTMAP_DEPTH and BBMOD_MATERIAL_LIGHTMAP to the Core module!
  • Added new macro BBMOD_VFORMAT_DEFAULT_LIGHTMAP, which is a vertex format of lightmapped models with two UV channels.
  • Macro BBMOD_VFORMAT_LIGHTMAP is now deprecated! Please use the new BBMOD_VFORMAT_DEFAULT_LIGHTMAP instead.
  • Added new macro BBMOD_SHADER_DEFAULT_LIGHTMAP, which is a shader for rendering lightmapped models with two UV channels.
  • Macro BBMOD_SHADER_LIGHTMAP is now deprecated! Please use the new BBMOD_SHADER_DEFAULT_LIGHTMAP instead.
  • Macro BBMOD_SHADER_LIGHTMAP_DEPTH is now deprecated! Please use the new BBMOD_SHADER_DEFAULT_DEPTH instead.
  • Moved functions bbmod_lightmap_get and bbmod_lightmap_set to the Core module!
  • Renamed shader BBMOD_ShLightmap to BBMOD_ShDefaultLightmap!
  • Renamed shader BBMOD_ShLightmapDepth to BBMOD_ShDefaultDepthLightmap!
  • Moved macros BBMOD_VFORMAT_SPRITE, BBMOD_SHADER_SPRITE and BBMOD_MATERIAL_SPRITE to the Core module!
  • Added new macro BBMOD_VFORMAT_DEFAULT_SPRITE, which is a vertex format of 2D sprites.
  • Macro BBMOD_VFORMAT_SPRITE is now deprecated! Please use the new BBMOD_VFORMAT_DEFAULT_SPRITE instead.
  • Added new macro BBMOD_SHADER_DEFAULT_SPRITE, which is a shader for 2D sprites.
  • Macro BBMOD_SHADER_SPRITE is now deprecated! Please use the new BBMOD_SHADER_DEFAULT_SPRITE instead.
  • Added new macro BBMOD_MATERIAL_DEFAULT_SPRITE, which is a material for 2D sprites.
  • Macro BBMOD_MATERIAL_SPRITE is now deprecated! Please use the new BBMOD_MATERIAL_DEFAULT_SPRITE instead.
  • Renamed shader BBMOD_ShSprite to BBMOD_ShDefaultSprite!
  • Removed the 2D module, since it became empty!
  • Moved struct BBMOD_Renderer from to the Core module!
  • Added new struct BBMOD_BaseRenderer, which is a base struct for renderers.
  • Added new struct BBMOD_DefaultRenderer, which inherits from BBMOD_BaseRenderer and implements the same functionality as BBMOD_Renderer did.
  • Struct BBMOD_Renderer now inherits from the new BBMOD_DefaultRenderer and is marked as deprecated! Please use BBMOD_DefaultRenderer instead.
  • Removed the Rendering/Renderer submodule, since it became empty!
  • Removed ...
Read more

3.15.1

16 Nov 10:21
Compare
Choose a tag to compare

This is a tiny release that adds more mipmapping configuration options to materials.

Changelog:

Core module:

  • Added new property MipBias to BBMOD_Material, which defines a bias for which mip level is used. Default value is 0.
  • Added new property MipFilter to BBMOD_Material, which is the mip filter mode used for the material. Default value is tf_anisotropic.
  • Added new property MipMin to BBMOD_Material, which is the minimum mip level used. Default value is 0.
  • Added new property MipMax to BBMOD_Material, which is the maximum mip level used. Default value is 16.
  • Added new property Anisotropy to BBMOD_Material, which is the maximum level of anisotropy when BBMOD_Material.MipFilter is set to tf_anisotropic. Default value is 16.

3.15.0

12 Nov 22:53
Compare
Choose a tag to compare

This release brings many improvements to various parts of the library, like improved gizmo, possibility to select instances rendered in dynamic batches, debug draw for colliders, fixed rendering of terrain when using non-uniform scaling, configurable chromatic aberration post-processing effect and also support for shadow-casting spot lights among others. Please read the changelog thoroughly before upgrading to this version, as changes done to add support for selecting instances from dynamic batches could be breaking (depending on your project)!

Changelog:

General:

  • Default animated shaders now accept max 128 bones instead of 64.
  • Default batched shaders now expect data in form of [(x, y, z, uniformScale), (qX, qY, qZ, qW), (idX, idY, idZ, idW), ...], where (idX, idY, idZ, idW) is instance ID encoded as color!
  • Shadows from directional lights now smoothly transition out at shadowmap borders instead of being cut off right away.

Core module:

  • Added new function bbmod_matrix_build_normalmatrix, which creates a matrix using which you can safely transform normal vectors in shaders.
  • Struct BBMOD_StaticBatch is now deprecated. We recommend using a BBMOD_DynamicBatch instead.
  • Added new property ShadowmapResolution to BBMOD_Light, which is the shadowmap resolution.
  • Added new property ShadowmapArea to BBMOD_DirectionalLight, which is the area captured by the shadowmap.
  • Argument _slotsPerInstance of BBMOD_DynamicBatch's constructor now defaults to 12 instead of 8.
  • Method default_fn of BBMOD_DynamicBatch, which is the default data writer, now also writes instance id encoded as color (12 places in total instead of 8)!
  • Added new optional argument _ids to method render of BBMOD_DynamicBatch, which are IDs of instances in the _batchData array(s). Defaults to IDs of instances added to the batch using its add_instance method.
  • Added new macro BBMOD_VFORMAT_DEBUG, which is a vertex format useful for debugging purposes, like drawing previews of colliders.

Gizmo module:

  • Added new property EnableGridSnap to BBMOD_Gizmo, which enables snapping to grid when moving objects.
  • Added new property GridSize to BBMOD_Gizmo, which is the size of the grid.
  • Added new property EnableAngleSnap to BBMOD_Gizmo, which enables angle snapping when rotating objects.
  • Added new property AngleSnap to BBMOD_Gizmo, which is the angle snapping size.
  • Added new property KeyCancel to BBMOD_Gizmo, which is the virtual key used to cancel editing and revert changes. Default is vk_escape.
  • Added new property KeyIgnoreSnap to BBMOD_Gizmo, which is the virtual key used to ignore grid and angle snapping when they are enabled. Default is vk_alt.
  • Added new method GetInstanceGlobalMatrix to BBMOD_Gizmo, which is a function that the gizmo uses to retrieve an instance's global matrix. Normally this is an identity matrix. If the instance is attached to another instance for example, then this will be that instance's transformation matrix.
  • Fixed the gizmo to work independently on from which direction is the camera looking at it and whether it's moving or not.
  • Added new macro BBMOD_SHADER_INSTANCE_ID_BATCHED, which is a shader used when rendering instance IDs.

Raycasting module:

  • Added new method GetCorners to BBMOD_FrustumCollider, which retrieves an array of its corners.
  • Added new method DrawDebug to BBMOD_Ray, which draws a debug preview of the ray.
  • Added new method DrawDebug to BBMOD_Collider, which draws a debug preview of the collider. By default this method is not implemented and it will throw BBMOD_NotImplementedException if used!
  • Implemented method DrawDebug for colliders BBMOD_AABBCollider, BBMOD_FrustumCollider and BBMOD_SphereCollider.

Rendering module:

Post-processing submodule:

  • Added new property ChromaticAberrationOffset to BBMOD_PostProcessor, which are chromatic aberration offsets for RGB channels.

Renderer submodule:

  • Property ShadowmapResolution of BBMOD_Renderer is now obsolete. Please use BBMOD_Light.ShadowmapResolution instead.
  • Property ShadowmapArea of BBMOD_Renderer is now obsolete. Please use BBMOD_DirectionalLight.ShadowmapArea instead.

Sky submodule:

  • Fixed shader BBMOD_ShSky ignoring matrix rotation.

Terrain module:

  • Fixed terrain normals when using non-uniform scaling.

3.14.1

20 Oct 15:20
Compare
Choose a tag to compare

This release is a hotfix of a bug where the screen turned all black when gizmo had instances selected. No changes were made to the GML API.