Blend mode (OW)
Updated: 08/26/2025
This page contains statements regarding the beta version.
Starting with the Cubism 5.3 SDK for Native R1 beta1 and for Web R1 beta1, the blend mode added in Cubism 5.3 is supported.
Applying a blend mode to a model allows for advanced compositing like with the paint tool.
The blend mode set in Cubism Editor is applied without any additional coding by using the Cubism SDK in Cubism 5.3 or later.
See “Blend mode” in the Editor Manual for the blend mode settings in the Cubism Editor.
Internal processing of Cubism Framework
This is the Framework’s internal process for representing blend mode.
The process is as follows.
- Get the blend mode from Cubism Core.
- Switch the drawing destination to a buffer for drawing the entire model.
- Determine which blend mode is used for drawing.
- Specify the shader program to be used from the obtained blend mode.
- Set a buffer for drawing the entire model in the shader program as a texture to be blended.
- Blend the source texture and the texture to be drawn in the fragment shader with the specified blend mode and draw the model.
- Draw the buffer that has drawn the entire model on the screen.
TIPS
If the blend mode is Normal Over, AddCompatible, or MultiplyCompatible, the drawing is done using the conventional blend method.Get blend mode from Cubism Core
Get blend modes from the model for all Drawables using Cubism Core’s API.
For Offscreen blend mode, replace Drawable with Offscreen.
csmBlendMode CubismModel::GetDrawableBlendModeType(csmInt32 drawableIndex) const { csmBlendMode blendMode; const csmInt32* const blendModes = Core::csmGetDrawableBlendModes(_model); blendMode.SetBlendMode(blendModes[drawableIndex]); return blendMode; }
Core’s API is as follows.
csmApi const int* csmCallingConvention csmGetDrawableBlendModes(const csmModel* model);
The blend mode is obtained for all Drawables to be drawn when drawing the CubismModel class.