Skip to content

Releases: blueburncz/BBMOD

3.19.2

01 Sep 07:32
Compare
Choose a tag to compare

This release is the last step in preparations for a new deferred rendering pipeline - terrain now supports rendering of multiple material layers in a single draw call. Currently only the unlit terrain shader can benefit from this due to the limited amount of available texture samplers. Some new utilities and fixes are included in this release as well, like for example ability to capture directional light's shadow map from its position instead of from the camera's position, which is handy for certain styles of games.

Changelog:

  • Added new property LayersPerDrawCall to BBMOD_TerrainShader, which is the number of terrain layers that the terrain shader can render in a single draw call.
  • Added new property MaxLayers to BBMOD_TerrainShader, which is the maximum number of terrain layers that the terrain shader supports.
  • Added new macros BBMOD_U_TERRAIN_BASE_OPACITY_0..BBMOD_U_TERRAIN_BASE_OPACITY_2, which are the names of fragment shader uniforms of type sampler2D that hold a texture with base color in RGB channels and opacity in the A channel for the first, second and third terrain layer rendered in a single draw call.
  • Added new macro BBMOD_U_TERRAIN_BASE_OPACITY, which is a common part of names of the BBMOD_U_TERRAIN_BASE_OPACITY_[N] uniforms, which only append a number to it.
  • Added new macros BBMOD_U_TERRAIN_NORMAL_W_0..BBMOD_U_TERRAIN_NORMAL_W_2, which are the names of fragment shader uniforms of type sampler2D that hold normal smoothness/roughness texture for the first, second and third terrain layer rendered in a single draw call.
  • Added new macro BBMOD_U_TERRAIN_NORMAL_W, which is a common part of names of the BBMOD_U_TERRAIN_NORMAL_W_[N] uniforms, which only append a number to it.
  • Added new macros BBMOD_U_TERRAIN_IS_ROUGHNESS_0..BBMOD_U_TERRAIN_IS_ROUGHNESS_2, which are the name of fragment shader uniforms of type float that hold whether the first, second and third terrain material layer uses roughness workflow (1.0) or not (0.0).
  • Added new macro BBMOD_U_TERRAIN_IS_ROUGHNESS, which is a common part of names of the BBMOD_U_TERRAIN_IS_ROUGHNESS_[N] uniforms, which only append a number to it.
  • Added new macros BBMOD_U_SPLATMAP_INDEX_0..BBMOD_U_SPLATMAP_INDEX_2, which are the names of fragment shader uniforms of type int that hold the index of a channel to read from the splatmap for the first, second and third terrain layer rendered in a draw call.
  • Added new macro BBMOD_U_SPLATMAP_INDEX, which is a common part of names of the BBMOD_U_SPLATMAP_INDEX_[N] uniforms, which only append a number to it.
  • Shader BBMOD_SHADER_TERRAIN_UNLIT now supports rendering of up to 3 material layers in a single draw call.
  • Added new macro BBMOD_U_BASE_OPACITY, which is the name of a fragment shader uniform of type sampler2D that holds a texture with base color in RGB channels and opacity in the A channel.
  • Struct BBMOD_MaterialPropertyBlock can now also override the base opacity texture using the new BBMOD_U_BASE_OPACITY macro.
  • Added new property ShadowmapFollowsCamera to BBMOD_DirectionalLight, which if set to true, then the shadowmap is captured from the camera's position instead of from the directional light's position. Default value is true for backwards compatibility.
  • Added new property EnableShadows to BBMOD_ReflectionProbe, which if set to true, then shadows are enabled when capturing the reflection probe, which takes longer to render. Default is false.
  • Fixed camera exposure setting being used also when capturing reflection probes, which effectively caused the exposure to be applied twice, making the scene brighter or darker than it should be.
  • Fixed method render of BBMOD_StaticBatch crashing due to using BBMOD_RenderQueue incorrectly.

3.19.1

14 Aug 14:21
Compare
Choose a tag to compare

This path release fixes BBMOD CLI not working on Windows.

Changelog:

  • Fixed BBMOD CLI not working on Windows because of corrupted memory.

3.19.0

11 Aug 13:56
Compare
Choose a tag to compare

In this release terrain mesh is split into chunks of configurable size and you can control how many chunks to render from the camera's position. Using this you can create larger terrains and draw just a portion of them to save on triangle count. The terrain now also supports a color map, which multiplies the base texture. Terrain material layers were reworked as a preparation for a deferred rendering pipeline. Please read the following changelog thoroughly before upgrading to this version.

Changelog:

  • Added new property Colormap to BBMOD_Terrain, which is a texture to multiply the terrain colors with.
  • Added new macro BBMOD_U_COLORMAP, which is the name of a fragment shader uniform of type sampler2D that holds the color map texture.
  • Added new property ChunkSize to BBMOD_Terrain, which is the width and height of a single terrain chunk. Terrain mesh is now split into chunks which consist of ChunksizexChunksize quads.
  • Added new optional argument _chunkSize to the constructor of BBMOD_Terrain. This is the width and height of a single terrain chunk. Defaults to 128.
  • Added new property Chunks to BBMOD_Terrain, which is a grid of vertex buffers, each representing an individual terrain chunk.
  • Added new property ChunkRadius, which is the radius (in chunk size) within which terrain chunks are visible around the camera. Zero means only the chunk that the camera is on is visible. Use infinity to make all chunks visible. Default value is infinity.
  • Property VertexBuffer of BBMOD_Terrain is now obsolete! It was replaced with the new Chunks property.
  • Added new property Material to BBMOD_Terrain, which is the shader used when rendering the terrain. Default is BBMOD_MATERIAL_TERRAIN.
  • Added new struct BBMOD_TerrainLayer, which describes a material of a single terrain layer.
  • Entries in BBMOD_Terrain.Layer should now be of Struct.BBMOD_TerrainLayer type instead of Struct.BBMOD_DefaultMaterial!
  • Added new struct BBMOD_TerrainShader, which is the base class for BBMOD terrain shaders.
  • Shaders BBMOD_SHADER_TERRAIN and BBMOD_SHADER_TERRAIN_UNLIT are now constructed from BBMOD_TerrainShader.
  • Added new struct BBMOD_TerrainMaterial, which is a material that can be used when rendering terrain.
  • Materials BBMOD_MATERIAL_TERRAIN and BBMOD_MATERIAL_TERRAIN_UNLIT are now constructed from BBMOD_TerrainMaterial.
  • Fixed method screen_point_to_vec3 of BBMOD_BaseCamera normalizing the resulting vector when it should not be normalized.
  • Fixed crash after BBMOD_Camera.set_mouselook(true) in YYC.

3.18.1

10 Aug 06:49
Compare
Choose a tag to compare

This is a small patch release that mainly fixes dynamic batching that was broken in 3.18.0.

Changelog:

  • Fixed dynamic batches rendering only a single instance of a model.
  • Fixed method present of BBMOD_BaseRenderer, which did not reset the world matrix to identity before drawing surfaces.

3.18.0

09 Aug 08:06
Compare
Choose a tag to compare

This release mainly brings improvements to BBMOD CLI by adding export of materials to *.bbmat files and conversion from Y-up space to Z-up space. These are currently experimental features and they may not work in all cases. BBMOD CLI now also supports conversion of entire folders of models to the BBMOD format.

Changelog:

  • Added new option --export-materials (-em) to BBMOD CLI, using which you can enable/disable export of materials to .bbmat files. This is an experimental feature and it is by default disabled!
  • Added new method get_export_materials to struct BBMOD_DLL, which checks whether export of materials is enabled.
  • Added new method set_export_materials to struct BBMOD_DLL, which enables/disables export of materials.
  • Added new option -zup to BBMOD_CLI, using which you can enable/disable conversion from Y-up to Z-up. This is an experimental feature an it is by default disabled!
  • Added new method get_zup to struct BBMOD_DLL, which checks whether model is converted from Y-up to Z-up.
  • Added new method set_zup to struct BBMOD_DLL, which enables/disables conversion from Y-up to Z-up.
  • Added new option --enable-prefix to BBMOD CLI, using which you can enable/disable prefixing of output files with model name. This is by default enabled for backwards compatibility.
  • Added new method get_enable_prefix to struct BBMOD_DLL, which checks whether prefixing of output files with model name is enabled.
  • Added new method set_enable_prefix to struct BBMOD_DLL, which enables/disables prefixing of output files with model name.
  • Fixed a bug where BBMOD CLI used directory name as the model name if it was given an output directory instead of an output filename.
  • BBMOD CLI now accepts directories as an input, in which case it converts all files within the directory into the output directory.
  • Added new macro BBMOD_VFORMAT_DEFAULT_COLOR, which is the default vertex format for static models with vertex colors.
  • Added new macro BBMOD_VFORMAT_DEFAULT_COLOR_ANIMATED, which is the default vertex format for animated models with vertex colors.
  • Added new macro BBMOD_VFORMAT_DEFAULT_COLOR_BATCHED, which is the default vertex format for dynamically batched models with vertex colors.
  • Added shader variations for meshes with vertex colors.
  • Fixed property BaseOpacityMultiplier of BBMOD_BaseMaterial not being converted from gamma space to linear space in shaders.
  • Fixed docs for arguments of method DrawDebug of structs BBMOD_Collider and BBMOD_Ray (argument _alpha was missing).
  • Added new property ImportMaterials to struct BBMOD_OBJImporter. If it is set to true, the importer tries to import materials from *.mtl files. Default value is false.
  • Added new function bbmod_mipenable_to_string, which converts constants mip_off, mip_on and mip_markedonly to a string.
  • Added new function bbmod_mipenable_from_string, which converts strings "mip_off", "mip_on" and "mip_markedonly" to the respective constants.
  • Added new function bbmod_texfilter_to_string, which converts constants tf_point, tf_linear and tf_anisotropic to a string.
  • Added new function bbmod_texfilter_from_string, which converts strings "tf_point", "tf_linear" and "tf_anisotropic" to the respective constants.
  • Added new macro BBMOD_RELEASE_MAJOR, which is the major version number of this BBMOD release.
  • Added new macro BBMOD_RELEASE_MINOR, which is the minor version number of this BBMOD release.
  • Added new macro BBMOD_RELEASE_PATCH, which is the patch version number of this BBMOD release.
  • Added new macro BBMOD_RELEASE_STRING, which is the version of this BBMOD release as a string ("major.minor.patch" format).

3.17.2

14 Jul 17:19
Compare
Choose a tag to compare

This small release mainly brings a new type of render queue that specializes in rendering multiple instances of a single mesh, where each instance uses the same material. This new render queue can render such meshes faster than the regular one. Additionally, submitting and rendering models now uses cache for node transformations, which decreases number of operations required before a mesh is submitted/rendered and hence increases performance. Building terrain meshes was also optimized.

Changelog:

  • Added new interface BBMOD_IMeshRenderQueue, which is an interface for render queues that can draw meshes.
  • Replaced arguments _vertexBuffer, _vertexFormat, _primitiveType and _materialIndex of methods DrawMesh, DrawMeshAnimated and DrawMeshBatched of BBMOD_RenderQueue with a single _mesh argument, which is the Struct.BBMOD_Mesh to be rendered!
  • Struct BBMOD_RenderQueue now implements the BBMOD_IMeshRenderQueue interface.
  • Fixed methods BBMOD_RenderQueue.DrawMeshBatched not setting uniform BBMOD_U_MATERIAL_INDEX.
  • Added new struct BBMOD_MeshRenderQueue, which is a render queue specialized for rendering of multiple instances of a model, where all instances are using the same material. You can use this instead of BBMOD_RenderQueue to increase rendering performance.
  • Methods submit and render of BBMOD_Model now use caching to increase rendering performance of models that are either fully static or fully vertex-skinned. Models that consist from both static and vertex-skinned meshes cannot utilize this cache.
  • Greatly improved performance of method BBMOD_Terrain.build_mesh.

3.17.1

05 Jul 16:54
Compare
Choose a tag to compare

This release removes all RTTI mechanisms from BBMOD, as they were not used throughout the library and only unnecessarily increased memory consumption. All deprecated methods of BBMOD_RenderQueue were also removed. Some bugfixes and rendering optimizations are also included in this release. Please make sure to read this changelog thoroughly before updating to this version!

Changelog:

  • Removed RTTI mechanisms from BBMOD: removed struct BBMOD_Class, macro BBMOD_CLASS_GENERATED_BODY and functions bbmod_is_class and bbmod_class_get_name! This means methods is_instance, implement and implements are also no longer available. Please make sure that you are not using any of these before upgrading to this version!
  • Added BBMOD_IDestructible, which is an interface for structs that need to be manually destroyed to properly free used memory. Structs that previously inherited from BBMOD_Class and still need a destroy method now implement this interface. Structs that did not need the method but still had it, because they inherited from BBMOD_Class, now do not have the method and trying to call it will give you an error. To fix this, simply remove these calls.
  • Optimized method BBMOD_MaterialPropertyBlock.apply, which was previously slowed down by using function variable_struct_get_names.
  • Changed default value of property Mipmapping of all materials from mip_on to mip_markedonly to fix performance issues on some platforms. Please make sure to enable option "Generate mipmaps" in "Texture Groups" settings for texture pages that should have mipmaps.
  • Reduced complexity of depth and ID shaders and possibly increased rendering performance on some platforms.
  • Added new optional argument _depthBuffer to function bbmod_surface_check, using which you can configure whether a depth buffer should be created for the surface. Defaults to true.
  • BBMOD no longer creates depth buffers for surfaces that do not need them (e.g. surfaces for post-processing effects). Likewise it also always creates depth buffers for surfaces that do need them (e.g. the application surface, cubemaps etc.).
  • Removed all deprecated methods of struct BBMOD_RenderQueue!
  • Added new render command BBMOD_ERenderCommand.SetGpuState, which sets the GPU state.
  • Added new method BBMOD_RenderQueue.SetGpuState(_state), which adds a BBMOD_ERenderCommand.SetGpuState command into the queue.
  • Added new render command BBMOD_ERenderCommand.SubmitRenderQueue, which submits another render queue.
  • Added new method BBMOD_RenderQueue.SubmitRenderQueue(_renderQueue), which adds a BBMOD_ERenderCommand.SubmitRenderQueue command into the queue.
  • Fixed methods DrawSpriteExt, DrawSpriteGeneral and DrawSpritePart of BBMOD_RenderQueue crashing because of wrong variable names.
  • Fixed method BBMOD_Sprite.from_file_async passing Asset.GMSprite instead of Struct.BBMOD_Sprite into the callback function.
  • Fixed method BBMOD_ResourceManager.load crashing when callback function is not provided.
  • Fixed formula used in function bbmod_lerp_delta_time.
  • Fixed gizmo, which still did not work in 3.17.0.

3.17.0

02 May 07:53
Compare
Choose a tag to compare

The main new feature of this release are reflection probes, which are used to capture surrounding scene at a specific position into a texture, which is then used for reflections. You can have as many reflection probes as you like, but currently only one reflection probe is used when the camera enters its area of influence. There is a smooth transition when changing from one reflection probe to other. BBMOD now also has material property blocks, which are useful in case you want to render multiple models using the same material and only change a few properties for each model. Using material property blocks should lead into better performance than creating a clone of a material for each model. Other noteworthy updates included are fixed Gizmo module, new commands for rendering sprites through render queues and new *Self/*Other variations of methods of vectors, quaternions and matrices, which instead of creating new structs store the result into self or a struct passed in as an argument, which makes them more garbage collector-friendly.

Changelog:

  • Added an optional argument _format to function bbmod_surface_check, which is the surface format to use when the surface is created.
  • Added new property Format to BBMOD_Cubemap, which is the format of created surfaces. Default value is surface_rgba8unorm.
  • Added new property SurfaceOctahedron to BBMOD_Cubemap, which is a surface with the cubemap converted into an octahedral map.
  • Arguments of _clearColor and _clearAlpha of method BBMOD_Cubemap.to_single_surface are now optional and they default to c_black and 1 respectively.
  • Added new method to_octahedron to BBMOD_Cubemap, which converts the cubemap to an octahedral map.
  • Added new function bbmod_vertex_buffer_load, which loads a vertex buffer from a file.
  • For each method of BBMOD_RenderQueue that adds a render command into the queue there is now an equivalent function with an UpperCamelCase name (matching the command name defined in BBMOD_ERenderCommand). Please from now on use these methods instead of the original ones, as they are now deprecated.
  • Added new members DrawSprite, DrawSpriteExt, DrawSpriteGeneral, DrawSpritePart, DrawSpritePartExt, DrawSpritePos, DrawSpriteStretched, DrawSpriteStretchedExt, DrawSpriteTiled and DrawSpriteTiledExt to enum BBMOD_ERenderCommand, which are render commands for drawing sprites.
  • Added new methods DrawSprite, DrawSpriteExt, DrawSpriteGeneral, DrawSpritePart, DrawSpritePartExt, DrawSpritePos, DrawSpriteStretched, DrawSpriteStretchedExt, DrawSpriteTiled and DrawSpriteTiledExt to struct BBMOD_RenderQueue, which add respective commands into the queue.
  • Added new struct BBMOD_ReflectionProbe, which is used to capture surrounding scene at a specific position into a texture, which is then used for reflections.
  • Added new function bbmod_reflection_probe_add, which adds a reflection probe to be sent to shaders.
  • Added new function bbmod_reflection_probe_count, which retrieves number of reflection probes added to be sent to shaders.
  • Added new function bbmod_reflection_probe_get, which retrieves a reflection probe at given index.
  • Added new function bbmod_reflection_probe_find, which finds an enabled reflection probe at given position.
  • Added new function bbmod_reflection_probe_remove, which removes a reflection probe so it is not sent to shaders anymore.
  • Added new function bbmod_reflection_probe_remove_index, which removes a reflection probe so it is not sent to shaders anymore.
  • Added new function bbmod_reflection_probe_clear, which removes all reflection probes sent to shaders.
  • Added new member ReflectionCapture to BBMOD_ERenderPass, which is a render pass where objects are rendered into reflection probes.
  • Added new method prefilter_ibl to BBMOD_Cubemap, which prefilters the cubemap for use with image based lighting.
  • Materials BBMOD_MATERIAL_SKY, BBMOD_MATERIAL_TERRAIN and BBMOD_MATERIAL_TERRAIN_UNLIT now have a shader for the new BBMOD_ERenderPass.ReflectionCapture pass, so they are visible in reflection probes.
  • Added new property RenderPass to struct BBMOD_Light, which is bitwise OR of 1 << render pass in which the light is enabled. By default this is BBMOD_ERenderPass.Forward and BBMOD_ERenderPass.ReflectionCapture, which means the light is visible only in the forward render pass and during capture of reflection probes.
  • Added new enum BBMOD_EShaderUniformType, which is an enumeration of shader uniform types.
  • Added new struct BBMOD_MaterialPropertyBlock, which is a collection of material properties. Useful in case you want to use the same material when rendering multiple models and only change some of its properties for each model.
  • Added new function bbmod_material_props_set, using which you can set the current material property block.
  • Added new function bbmod_material_props_get, using which you can retrieve the current material property block.
  • Added new function bbmod_material_props_reset, using which you can unset the current material property block.
  • Added new member ApplyMaterialProps to enum BBMOD_ERenderCommand, which is a render command to apply a material property block.
  • Added new member SetMaterialProps to enum BBMOD_ERenderCommand, which is a render command to set current material property block.
  • Added new member ResetMaterialProps to enum BBMOD_ERenderCommand, which is a render command to reset current material property block.
  • Added new method apply_material_props to struct BBMOD_RenderQueue, which adds a BBMOD_ERenderCommand.ApplyMaterialProps command into the queue.
  • Added new method set_material_props to struct BBMOD_RenderQueue, which adds a BBMOD_ERenderCommand.SetMaterialProps command into the queue.
  • Added new method reset_material_props to struct BBMOD_RenderQueue, which adds a BBMOD_ERenderCommand.ResetMaterialProps command into the queue.
  • Added new macro BBMOD_U_NORMAL_MATRIX, which is the name of a vertex shader uniform of type mat4 that holds a matrix using which normal vectors of vertices are transformed.
  • Added new macro BBMOD_U_TEXTURE_OFFSET, which is the name of a vertex shader uniform of type vec2 that holds offset of texture coordinates.
  • Added new macro BBMOD_U_TEXTURE_SCALE, which is the name of a vertex shader uniform of type vec2 that holds scale of texture coordinates.
  • Added new macro BBMOD_U_BONES, which is the name of a vertex shader uniform of type vec4[2 * BBMOD_MAX_BONES] that holds bone transformation data.
  • Added new macro BBMOD_U_BATCH_DATA, which is the name of a vertex shader uniform of type vec4[BBMOD_MAX_BATCH_VEC4S] that holds dynamic batching data.
  • Added new macro BBMOD_U_SHADOWMAP_ENABLE_VS, which is the name of a vertex shader uniform of type float that holds whether shadowmapping is enabled (1.0) or disabled (0.0).
  • Added new macro BBMOD_U_SHADOWMAP_MATRIX, which is the name of a vertex shader uniform of type mat4 that holds a matrix that transforms vertices from world-space to shadowmap-space.
  • Added new macro BBMOD_U_SHADOWMAP_NORMAL_OFFSET, which is the name of a vertex shader uniform of type float that holds how much are vertices offset by their normal before they are transformed into shadowmap-space, using formula vertex + normal * normalOffset.
  • Added new macro BBMOD_U_INSTANCE_ID, which is the name of a fragment shader uniform of type vec4 that holds an ID of the instance that draws the model, encoded into a color.
  • Added new macro BBMOD_U_MATERIAL_INDEX, which is the name of a fragment shader uniform of type float that holds the index of the current material within array BBMOD_Model.Materials.
  • Added new macro BBMOD_U_BASE_OPACITY_MULTIPLIER, which is the name of a fragment shader uniform of type vec4 that holds a multiplier for the base opacity texture (gm_BaseTexture).
  • Added new macro BBMOD_U_IS_ROUGHNESS, which is the name of a fragment shader uniform of type float that holds whether the material uses roughness workflow (1.0) or not (0.0).
  • Added new macro BBMOD_U_IS_METALLIC, which is the name of a fragment shader uniform of type float that holds whether the material uses metallic workflow (1.0) or not (0.0).
  • Added new macro BBMOD_U_NORMAL_W, which is the name of a fragment shader uniform of type sampler2D that holds normal smoothness/roughness texture.
  • Added new macro BBMOD_U_MATERIAL, which is the name of a fragment shader uniform of type sampler2D that holds a texture with either metalness in the R channel and ambient occlusion in the G channel (for materials using metallic workflow), or specular color in RGB (for materials using specular color workflow).
  • Added new macro BBMOD_U_SUBSURFACE, which is the name of a fragment shader uniform of type sampler2D that holds a texture with subsurface color in RGB and subsurface effect intensity (or model thickness) in the A channel.
  • Added new macro BBMOD_U_EMISSIVE, which is the name of a fragment shader uniform of type sampler2D that holds a texture with RGBM encoded emissive color.
  • Added new macro BBMOD_U_LIGHTMAP, which is the name of a fragment shader uniform of type sampler2D that holds a texture with a baked lightmap applied to the model.
  • Added new macro BBMOD_U_BASE_OPACITY_UV, which is the name of a fragment shader uniform of type vec4 that holds top left and bottom right coordinates of the base opacity texture on its texture page.
  • Added new macro BBMOD_U_NORMAL_W_UV, which is the name of a fragment shader uniform of type vec4 that holds top left and bottom right coordinates of the normal texture on its texture page.
  • Added new macro BBMOD_U_MATERIAL_UV, which is the name of a fragment shader uniform of type vec4 that holds top left and bottom right coordinates of the material textu...
Read more

3.16.8

24 Mar 21:22
Compare
Choose a tag to compare

This release mainly adds support for automatic loading of model's materials from BBMAT files and a few other quality of life improvements. Please make sure to read the changelog thoroughly, as this release also removes obsolete API!

Changelog:

  • Added new property LoadMaterials to BBMOD_ResourceManager, which allows method load to automatically load model's materials when BBMAT files with the material names are found in the same directory. By default this is enabled.
  • Renamed sprite BBMOD_SprDefaultBaseOpacity to BBMOD_SprCheckerboard.
  • Materials BBMOD_MATERIAL_DEFAULT and BBMOD_MATERIAL_DEFAULT_UNLIT now use BBMOD_SprWhite as BaseOpacity.
  • Added new utility function bbmod_mrt_is_supported, which checks whether multiple render targets are supported on the current platform.
  • Added new function bbmod_blendmode_to_string, which retrieves a name of a basic blend mode.
  • Added new function bbmod_blendmode_from_string, which retrieves a basic blend mode from its name.
  • Added new function bbmod_cullmode_to_string, which retrieves a name of a cull mode.
  • Added new function bbmod_cullmode_from_string, which retrieves a cull mode from its name.
  • Added new function bbmod_cmpfunc_to_string, which retrieves a name of a cmpfunc.
  • Added new function bbmod_cmpfunc_from_string, which retrieves a cmpfunc from its name.
  • Method from_json of BBMOD_Material now supports strings for properties BlendMode, Culling and ZFunc. E.g. "bm_add", "cull_clockwise" and "cmp_less" respectively, instead of their numeric values.
  • Fixed method from_json of BBMOD_Material not using the RenderQueue property.
  • Function bbmod_path_is_relative now returns true also for paths that don't begin with "/" or a drive (e.g. "C:\") instead of just paths that begin with "." or "..".
  • Added new functions bbmod_light_ambient_set_dir and bbmod_light_ambient_get_dir, using which you can set and retrieve the direction to the ambient light's upper hemisphere. By default this is BBMOD_VEC3_UP (i.e. vector 0, 0, 1).
  • Added optional argument _dir to method BBMOD_BaseShader.set_ambient_light, which is the direction to the ambient light's upper hemisphere. If not defined, then it defaults to the value set by the new bbmod_light_ambient_set_dir.
  • Method Transform of structs BBMOD_Vec2, BBMOD_Vec3 and BBMOD_Vec4 now supports BBMOD_Matrix as an argument.
  • Method build of BBMOD_MeshBuilder now also assigns BboxMin and BboxMax properties of the created mesh.
  • Added new property EnableTransitions to BBMOD_AnimationPlayer, which enables/disables transitions between animations. By default this is enabled!
  • Added new method has_commands to BBMOD_RenderQueue, which checks whether the render queue has commands for given render pass.
  • Method submit of BBMOD_RenderQueue now exits early if it does not have any commands for the current render pass.
  • Fixed memory leak in BBMOD_RenderQueue.destroy.
  • Fixed method get_projection_matrix of BBMOD_Cubemap, which returned a projection matrix that did not use negative FOV and aspect ratio.
  • Method set_target of BBMOD_Cubemap now calls bbmod_camera_set_position to update the camera position (for correct specular reflections etc.). It is reset back to the original value when reset_target is called.
  • Added new method draw_cross to BBMOD_Cubemap, which draws a cubemap cross at given position.
  • Particle materials now use the Alpha render pass instead of Forward!
  • Fixed rendering errors on macOS (and possibly other OpenGL platforms) when image-based lighting is not used.
  • Fixed shader BBMOD_SHADER_DEFAULT_UNLIT and material BBMOD_MATERIAL_DEFAULT_UNLIT not being registered.
  • Removed property BBMOD_BaseRenderer.ShadowmapArea, which was obsolete. Please use its counterpart BBMOD_DirectionalLight.ShadowmapArea before updating to this release.
  • Removed property BBMOD_BaseRenderer.ShadowmapResolution, which was obsolete. Please use its counterpart BBMOD_Light.ShadowmapResolution before updating to this release.
  • Removed property BBMOD_BaseRenderer.UseAppSurface, which was obsolete. Please use its counterpart BBMOD_BaseRenderer.PostProcessor before updating to this release.
  • Removed property BBMOD_Shader.Raw, which was obsolete. Please use BBMOD_Shader.get_variant before updating to this release.
  • Removed property BBMOD_Shader.VertexFormat, which was obsolete. Please use BBMOD_Shader.has_variant before updating to this release.
  • Removed method BBMOD_Shader.get_name, which was obsolete. Please use shader_get_name(shader.get_variant(vertexFormat)) before updating to this version.
  • Removed method BBMOD_Shader.get_uniform, which was obsolete.
  • Removed method BBMOD_Shader.get_sampler_index, which was obsolete.
  • Removed property BBMOD_BaseShader.MaxPointLights, which was obsolete. Please use its counterpart BBMOD_BaseShader.MaxPunctualLights before updating to this version.
  • Removed property BBMOD_DLL.Path, which was obsolete. Please use BBMOD_DLL_PATH before updating to this version.

3.16.7

04 Feb 09:44
Compare
Choose a tag to compare

This release reconfigures Assimp and adds new options to BBMOD CLI and DLL to give you more control over model conversion.

Changelog:

  • Reconfigured Assimp to do less post-processing on models by default, as the old settings could sometime cause issues and make the model unusable.
  • Added new option --apply-scale (or -as) to BBMOD CLI, which applies global scaling factor defined in the model file if enabled. For backwards compatibility this is by default disabled.
  • Added new option --pre-transform (or -pt) to BBMOD CLI, which pre-transforms the models and collapses all nodes into one if possible. For backwards compatibility this is by default disabled.
  • Added new method get_apply_scale to BBMOD_DLL, which checks whether the new "apply scale" option is enabled.
  • Added new method set_apply_scale to BBMOD_DLL, which enables/disables the new "apply scale" option.
  • Added new method get_pre_transform to BBMOD_DLL, which checks whether the new "pre-transform" option is enabled.
  • Added new method set_pre_transform to BBMOD_DLL, which enables/disables the new "pre-transform" option.