Masks in URP

Updated: 01/08/2026

This page contains statements regarding the beta version.

In Cubism 5 SDK for Unity R5 beta3, the rendering pipeline has moved to the Universal Rendering Pipeline (hereinafter referred to as URP). As a result, the mask function mechanism has changed.

Changes from R4_1

  • All models use the high-definition mask method.
  • The previously used Assets/Live2D/Cubism/Rendering/Masking and other components for masking are no longer used and have been removed for performance reasons.
    • When updating from R4_1, the components will remain in the projects unless deleted, but each component will no longer be used by the model. Note that since the CubismMaskController component is a MonoBehaviour, it must be explicitly removed from the model prefab to stop the process.
    • Please refer to “Migration from Built-in Render Pipeline to URP” for the location of the components to be removed and how to migrate to URP.

High-definition mask method

The high-definition mask method is a method that performs the drawing process of the mask used by a drawable object each time just before drawing that drawable object.

This method emphasizes drawing quality over performance and has the following advantages over the mask method used by R4_1 or earlier.

  • The maximum number of masks used is unlimited.
  • Since only the screen resolution texture is required for masking, memory usage is reduced.
  • Masks are not divided, but drawn on a single texture in sequence, which improves the quality of mask drawing.

However, there are some disadvantages as follows:

  • Even if the same ArtMesh is set as a mask, it will be drawn at separate times.
    • This effect reduces performance, especially when using the same ArtMesh, compared to masking methods used by R4_1 and earlier.
  • Since the size of the mask drawing is fixed to the size of the camera’s render target, the size of the render target reflecting the model can have a significant impact on performance.

About masks in offscreen drawing

The mask applied to the offscreen drawing is drawn and applied at the position and size where the ArtMesh set as a mask is drawn on the screen, unlike when clipping ArtMesh, due to the calculation in the shaders.

If the RenderTexture of the camera on which the Cubism model is drawn has the same resolution as the screen resolution and the render target displayed on the entire screen is the same, the drawing result will not be degraded because the required number of pixels will be reserved (dot-by-dot).

Was this article helpful?
YesNo
Please let us know what you think about this article.