3.14.0
This release brings various improvements to different parts of the library. Post-processing was separated from renderer into a dedicated struct. A new type of punctual light was added - a spot light. A frustum collider and frustum-sphere intersection test was added, using which you can make simple frustum culling. Lastly, a new basic camera with full control over from, to and up vectors was added, so it is easier to create BBMOD cameras matching regular GameMaker cameras.
Changelog:
GML API:
Core module:
- Method
BBMOD_RenderQueue.set_sampler
now also accepts a specific index instead of just a uniform name. This is useful for HLSL11, which does not have theuniform
keyword. - Added new struct
BBMOD_PunctualLight
, which is a base struct for punctual lights. - Struct
BBMOD_PointLight
now inherits fromBBMOD_PunctualLight
. - Added new struct
BBMOD_SpotLight
, which is a new punctual light - a spot light. - Added new function
bbmod_light_punctual_add
, which adds a punctual light to be sent to shaders. - Added new function
bbmod_light_punctual_count
, which retrieves number of punctual lights added to be sent to shaders. - Added new function
bbmod_light_punctual_get
, which retrieves a punctual light at given index. - Added new function
bbmod_light_punctual_remove
, which removes a punctual light so it is not sent to shaders anymore. - Added new function
bbmod_light_punctual_remove_index
, which removes a punctual light so it is not sent to shaders anymore. - Added new function
bbmod_light_punctual_clear
, which removes all punctual lights sent to shaders. - Functions
bbmod_light_point_add
,bbmod_light_point_count
,bbmod_light_point_get
,bbmod_light_point_remove
,bbmod_light_point_remove_index
andbbmod_light_point_clear
are now deprecated. Please use the newbbmod_light_punctual_*
functions instead. - Added new property
MaxPunctualLights
toBBMOD_BaseShader
, which is the maximum number of punctual lights in the shader. This must match with value defined in the raw GameMaker shader! - Property
MaxPointLights
ofBBMOD_BaseShader
is now obsolete. Please use the newMaxPunctualLights
instead. - Added new method
set_punctual_lights
toBBMOD_BaseShader
, which sets uniformbbmod_LightPunctualDataA
. - Method
set_point_lights
ofBBMOD_BaseShader
is now deprecated, please use the newset_punctual_lights
instead.
Camera module:
- Added new property
Up
toBBMOD_Camera
, which is the camera's up vector. - Changed
BBMOD_Camera.AspectRatio
's default value towindow_get_width() / window_get_height()
. Previously it was set to16 / 9
. - Added new struct
BBMOD_BaseCamera
, which inherits fromBBMOD_Class
and it is now the base struct for cameras. It has adestroy
method that destroys the raw GameMaker camera! - Struct
BBMOD_Camera
now inherits fromBBMOD_BaseCamera
.
Raycasting module:
- Added new struct
BBMOD_FrustumCollider
, which is a frustum collider that can be initialized from any view-projection matrix or aBBMOD_Camera
. - Added new method
TestFrustum
toBBMOD_Collider
, which tests whether a collider intersects with a frustum collider. This method is by default not implemented and it will throw aBBMOD_NotImplementedException
! - Implemented method
TestFrustum
forBBMOD_SphereCollider
.
Rendering module:
Post-processing submodule:
- Added new struct
BBMOD_PostProcessor
, which handles post-processing effects.
Renderer submodule:
- Moved enum
BBMOD_EAntialiasing
from the Renderer submodule to the Post-processing submodule. - Moved properties
ColorGradingLUT
,ChromaticAberration
,Grayscale
,Vignette
,VignetteColor
andAntialiasing
fromBBMOD_Renderer
toBBMOD_PostProcessor
. - Added new property
PostProcessor
toBBMOD_Renderer
, which is an instance of post-processor. Default isundefined
. - Property
EnablePostProcessing
ofBBMOD_Renderer
is now obsolete.