3.1.2
This release mainly adds possibility to define shaders used by a material in individual render passes, which in combination with render queues enables creating advanced rendering pipelines.
Changelog:
GML API:
Core module:
- Added new macro
BBMOD_RGBM_VALUE_MAX
, which defines the maximum value which a single color channel can have before it is converted to RGBM. - Added new struct
BBMOD_Color
, which supports HDR colors. - Added new struct
BBMOD_BaseShader
, which does not define any uniforms specific to BBMOD and it is now the base class for shader resource wrappers. - Struct
BBMOD_Shader
now inherits fromBBMOD_BaseShader
. - Added new enum of render passes
BBMOD_ERenderPass
. - Deprecated macros
BBMOD_RENDER_DEFERRED
,BBMOD_RENDER_FORWARD
andBBMOD_RENDER_SHADOWS
. Use appropriate members ofBBMOD_ERenderPass
instead, as these macros will be removed in a future release. - Removed property
Shader
ofBBMOD_Material
. - Added new methods
set_shader
,has_shader
,get_shader
andremove_shader
toBBMOD_Material
, using which you can define shaders used by the material in specific render passes. - Method
BBMOD_Material.apply
now returnstrue
orfalse
based on whether the material was applied (instead of always returningself
). - Method
BBMOD_Material.submit_queue
does no longer automatically clear the queue. - Added new method
BBMOD_Material.clear_queue
, which clears the material's render queue. - New
BBMOD_Material
s no longer use the checkerboard texture as the default. The texture is still used byBBMOD_MATERIAL_DEFAULT*
materials. - Function
bbmod_get_materials
now accepts an optional render pass argument, using which you can retrieve only materials that have a shader for a specific render pass. - Added new interface
BBMOD_IRenderTarget
, which is an interface for structs that can be set as a render target. - Added new methods
Set
andSetIndex
toBBMOD_Vec2
,BBMOD_Vec3
andBBMOD_Vec4
using which you can change the vector components in-place. - Moved
bbmod_set_camera_position
,global.bbmod_camera_exposure
,global.bbmod_camera_position
from the PBR module to the Core module to resolve dependency issues. - Added new function
bbmod_get_calling_function_name
, using which you can retrieve the name of the function that calls it. - Added new function
bbmod_class_get_name
, using which you can retrieve class names of structs inheriting fromBBMOD_Class
. - Added new macro
BBMOD_CLASS_GENERATED_BODY
, which now must always be the first line in structs inheriting fromBBMOD_Class
. - Added new method
BBMOD_Class.is_instance
, using which you can test if an instance ofBBMOD_Class
inherits from a specific class.
Importer module:
- Fixed import of OBJ model that included empty lines.
Rendering module:
- Added new module - Rendering.
Cubemap submodule:
- Added new submodule - Cubemap.
- Added new struct
BBMOD_Cubemap
, using which you can easily render scenes into a cubemap.
PBR submodule:
- PBR is now a submodule of the Rendering module.
- Parameter
_shader
in the constructor ofBBMOD_PBRMaterial
is now optional. - Method
BBMOD_PBRMaterial.set_emissive
now acceptsBBMOD_Color
as an argument. The variant with 3 arguments (one for each color channel) is kept for backwards compatibility, but it should not be used anymore, as it will be removed in a future release!
Renderer submodule:
- Renderer is now a submodule of the Rendering module.