Releases: blueburncz/BBMOD
3.19.2
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
toBBMOD_TerrainShader
, which is the number of terrain layers that the terrain shader can render in a single draw call. - Added new property
MaxLayers
toBBMOD_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 typesampler2D
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 theBBMOD_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 typesampler2D
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 theBBMOD_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 typefloat
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 theBBMOD_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 typeint
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 theBBMOD_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 typesampler2D
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 newBBMOD_U_BASE_OPACITY
macro. - Added new property
ShadowmapFollowsCamera
toBBMOD_DirectionalLight
, which if set totrue
, then the shadowmap is captured from the camera's position instead of from the directional light's position. Default value istrue
for backwards compatibility. - Added new property
EnableShadows
toBBMOD_ReflectionProbe
, which if set totrue
, then shadows are enabled when capturing the reflection probe, which takes longer to render. Default isfalse
. - 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
ofBBMOD_StaticBatch
crashing due to usingBBMOD_RenderQueue
incorrectly.
3.19.1
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
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
toBBMOD_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 typesampler2D
that holds the color map texture. - Added new property
ChunkSize
toBBMOD_Terrain
, which is the width and height of a single terrain chunk. Terrain mesh is now split into chunks which consist ofChunksize
xChunksize
quads. - Added new optional argument
_chunkSize
to the constructor ofBBMOD_Terrain
. This is the width and height of a single terrain chunk. Defaults to 128. - Added new property
Chunks
toBBMOD_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. Useinfinity
to make all chunks visible. Default value isinfinity
. - Property
VertexBuffer
ofBBMOD_Terrain
is now obsolete! It was replaced with the newChunks
property. - Added new property
Material
toBBMOD_Terrain
, which is the shader used when rendering the terrain. Default isBBMOD_MATERIAL_TERRAIN
. - Added new struct
BBMOD_TerrainLayer
, which describes a material of a single terrain layer. - Entries in
BBMOD_Terrain.Layer
should now be ofStruct.BBMOD_TerrainLayer
type instead ofStruct.BBMOD_DefaultMaterial
! - Added new struct
BBMOD_TerrainShader
, which is the base class for BBMOD terrain shaders. - Shaders
BBMOD_SHADER_TERRAIN
andBBMOD_SHADER_TERRAIN_UNLIT
are now constructed fromBBMOD_TerrainShader
. - Added new struct
BBMOD_TerrainMaterial
, which is a material that can be used when rendering terrain. - Materials
BBMOD_MATERIAL_TERRAIN
andBBMOD_MATERIAL_TERRAIN_UNLIT
are now constructed fromBBMOD_TerrainMaterial
. - Fixed method
screen_point_to_vec3
ofBBMOD_BaseCamera
normalizing the resulting vector when it should not be normalized. - Fixed crash after
BBMOD_Camera.set_mouselook(true)
in YYC.
3.18.1
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
ofBBMOD_BaseRenderer
, which did not reset the world matrix to identity before drawing surfaces.
3.18.0
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 structBBMOD_DLL
, which checks whether export of materials is enabled. - Added new method
set_export_materials
to structBBMOD_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 structBBMOD_DLL
, which checks whether model is converted from Y-up to Z-up. - Added new method
set_zup
to structBBMOD_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 structBBMOD_DLL
, which checks whether prefixing of output files with model name is enabled. - Added new method
set_enable_prefix
to structBBMOD_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
ofBBMOD_BaseMaterial
not being converted from gamma space to linear space in shaders. - Fixed docs for arguments of method
DrawDebug
of structsBBMOD_Collider
andBBMOD_Ray
(argument_alpha
was missing). - Added new property
ImportMaterials
to structBBMOD_OBJImporter
. If it is set totrue
, the importer tries to import materials from*.mtl
files. Default value isfalse
. - Added new function
bbmod_mipenable_to_string
, which converts constantsmip_off
,mip_on
andmip_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 constantstf_point
,tf_linear
andtf_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
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 methodsDrawMesh
,DrawMeshAnimated
andDrawMeshBatched
ofBBMOD_RenderQueue
with a single_mesh
argument, which is theStruct.BBMOD_Mesh
to be rendered! - Struct
BBMOD_RenderQueue
now implements theBBMOD_IMeshRenderQueue
interface. - Fixed methods
BBMOD_RenderQueue.DrawMeshBatched
not setting uniformBBMOD_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 ofBBMOD_RenderQueue
to increase rendering performance. - Methods
submit
andrender
ofBBMOD_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
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
, macroBBMOD_CLASS_GENERATED_BODY
and functionsbbmod_is_class
andbbmod_class_get_name
! This means methodsis_instance
,implement
andimplements
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 fromBBMOD_Class
and still need adestroy
method now implement this interface. Structs that did not need the method but still had it, because they inherited fromBBMOD_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 functionvariable_struct_get_names
. - Changed default value of property
Mipmapping
of all materials frommip_on
tomip_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 functionbbmod_surface_check
, using which you can configure whether a depth buffer should be created for the surface. Defaults totrue
. - 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 aBBMOD_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 aBBMOD_ERenderCommand.SubmitRenderQueue
command into the queue. - Fixed methods
DrawSpriteExt
,DrawSpriteGeneral
andDrawSpritePart
ofBBMOD_RenderQueue
crashing because of wrong variable names. - Fixed method
BBMOD_Sprite.from_file_async
passingAsset.GMSprite
instead ofStruct.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
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 functionbbmod_surface_check
, which is the surface format to use when the surface is created. - Added new property
Format
toBBMOD_Cubemap
, which is the format of created surfaces. Default value issurface_rgba8unorm
. - Added new property
SurfaceOctahedron
toBBMOD_Cubemap
, which is a surface with the cubemap converted into an octahedral map. - Arguments of
_clearColor
and_clearAlpha
of methodBBMOD_Cubemap.to_single_surface
are now optional and they default toc_black
and 1 respectively. - Added new method
to_octahedron
toBBMOD_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 inBBMOD_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
andDrawSpriteTiledExt
to enumBBMOD_ERenderCommand
, which are render commands for drawing sprites. - Added new methods
DrawSprite
,DrawSpriteExt
,DrawSpriteGeneral
,DrawSpritePart
,DrawSpritePartExt
,DrawSpritePos
,DrawSpriteStretched
,DrawSpriteStretchedExt
,DrawSpriteTiled
andDrawSpriteTiledExt
to structBBMOD_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
toBBMOD_ERenderPass
, which is a render pass where objects are rendered into reflection probes. - Added new method
prefilter_ibl
toBBMOD_Cubemap
, which prefilters the cubemap for use with image based lighting. - Materials
BBMOD_MATERIAL_SKY
,BBMOD_MATERIAL_TERRAIN
andBBMOD_MATERIAL_TERRAIN_UNLIT
now have a shader for the newBBMOD_ERenderPass.ReflectionCapture
pass, so they are visible in reflection probes. - Added new property
RenderPass
to structBBMOD_Light
, which is bitwise OR of 1 << render pass in which the light is enabled. By default this isBBMOD_ERenderPass.Forward
andBBMOD_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 enumBBMOD_ERenderCommand
, which is a render command to apply a material property block. - Added new member
SetMaterialProps
to enumBBMOD_ERenderCommand
, which is a render command to set current material property block. - Added new member
ResetMaterialProps
to enumBBMOD_ERenderCommand
, which is a render command to reset current material property block. - Added new method
apply_material_props
to structBBMOD_RenderQueue
, which adds aBBMOD_ERenderCommand.ApplyMaterialProps
command into the queue. - Added new method
set_material_props
to structBBMOD_RenderQueue
, which adds aBBMOD_ERenderCommand.SetMaterialProps
command into the queue. - Added new method
reset_material_props
to structBBMOD_RenderQueue
, which adds aBBMOD_ERenderCommand.ResetMaterialProps
command into the queue. - Added new macro
BBMOD_U_NORMAL_MATRIX
, which is the name of a vertex shader uniform of typemat4
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 typevec2
that holds offset of texture coordinates. - Added new macro
BBMOD_U_TEXTURE_SCALE
, which is the name of a vertex shader uniform of typevec2
that holds scale of texture coordinates. - Added new macro
BBMOD_U_BONES
, which is the name of a vertex shader uniform of typevec4[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 typevec4[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 typefloat
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 typemat4
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 typefloat
that holds how much are vertices offset by their normal before they are transformed into shadowmap-space, using formulavertex + normal * normalOffset
. - Added new macro
BBMOD_U_INSTANCE_ID
, which is the name of a fragment shader uniform of typevec4
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 typefloat
that holds the index of the current material within arrayBBMOD_Model.Materials
. - Added new macro
BBMOD_U_BASE_OPACITY_MULTIPLIER
, which is the name of a fragment shader uniform of typevec4
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 typefloat
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 typefloat
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 typesampler2D
that holds normal smoothness/roughness texture. - Added new macro
BBMOD_U_MATERIAL
, which is the name of a fragment shader uniform of typesampler2D
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 typesampler2D
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 typesampler2D
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 typesampler2D
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 typevec4
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 typevec4
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 typevec4
that holds top left and bottom right coordinates of the material textu...
3.16.8
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
toBBMOD_ResourceManager
, which allows methodload
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
toBBMOD_SprCheckerboard
. - Materials
BBMOD_MATERIAL_DEFAULT
andBBMOD_MATERIAL_DEFAULT_UNLIT
now useBBMOD_SprWhite
asBaseOpacity
. - 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
ofBBMOD_Material
now supports strings for propertiesBlendMode
,Culling
andZFunc
. E.g. "bm_add", "cull_clockwise" and "cmp_less" respectively, instead of their numeric values. - Fixed method
from_json
ofBBMOD_Material
not using theRenderQueue
property. - Function
bbmod_path_is_relative
now returnstrue
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
andbbmod_light_ambient_get_dir
, using which you can set and retrieve the direction to the ambient light's upper hemisphere. By default this isBBMOD_VEC3_UP
(i.e. vector0, 0, 1
). - Added optional argument
_dir
to methodBBMOD_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 newbbmod_light_ambient_set_dir
. - Method
Transform
of structsBBMOD_Vec2
,BBMOD_Vec3
andBBMOD_Vec4
now supportsBBMOD_Matrix
as an argument. - Method
build
ofBBMOD_MeshBuilder
now also assignsBboxMin
andBboxMax
properties of the created mesh. - Added new property
EnableTransitions
toBBMOD_AnimationPlayer
, which enables/disables transitions between animations. By default this is enabled! - Added new method
has_commands
toBBMOD_RenderQueue
, which checks whether the render queue has commands for given render pass. - Method
submit
ofBBMOD_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
ofBBMOD_Cubemap
, which returned a projection matrix that did not use negative FOV and aspect ratio. - Method
set_target
ofBBMOD_Cubemap
now callsbbmod_camera_set_position
to update the camera position (for correct specular reflections etc.). It is reset back to the original value whenreset_target
is called. - Added new method
draw_cross
toBBMOD_Cubemap
, which draws a cubemap cross at given position. - Particle materials now use the
Alpha
render pass instead ofForward
! - Fixed rendering errors on macOS (and possibly other OpenGL platforms) when image-based lighting is not used.
- Fixed shader
BBMOD_SHADER_DEFAULT_UNLIT
and materialBBMOD_MATERIAL_DEFAULT_UNLIT
not being registered. - Removed property
BBMOD_BaseRenderer.ShadowmapArea
, which was obsolete. Please use its counterpartBBMOD_DirectionalLight.ShadowmapArea
before updating to this release. - Removed property
BBMOD_BaseRenderer.ShadowmapResolution
, which was obsolete. Please use its counterpartBBMOD_Light.ShadowmapResolution
before updating to this release. - Removed property
BBMOD_BaseRenderer.UseAppSurface
, which was obsolete. Please use its counterpartBBMOD_BaseRenderer.PostProcessor
before updating to this release. - Removed property
BBMOD_Shader.Raw
, which was obsolete. Please useBBMOD_Shader.get_variant
before updating to this release. - Removed property
BBMOD_Shader.VertexFormat
, which was obsolete. Please useBBMOD_Shader.has_variant
before updating to this release. - Removed method
BBMOD_Shader.get_name
, which was obsolete. Please useshader_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 counterpartBBMOD_BaseShader.MaxPunctualLights
before updating to this version. - Removed property
BBMOD_DLL.Path
, which was obsolete. Please useBBMOD_DLL_PATH
before updating to this version.
3.16.7
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
toBBMOD_DLL
, which checks whether the new "apply scale" option is enabled. - Added new method
set_apply_scale
toBBMOD_DLL
, which enables/disables the new "apply scale" option. - Added new method
get_pre_transform
toBBMOD_DLL
, which checks whether the new "pre-transform" option is enabled. - Added new method
set_pre_transform
toBBMOD_DLL
, which enables/disables the new "pre-transform" option.