Unity Lightweight Render Pipeline support
August 26th, 2019
We are happy to announce support for Unity 2019's Lightweight Render Pipeline in our spine-unity runtime!
The Lightweight Render Pipeline (LWRP) is a prebuilt Scriptable Render Pipeline (SRP) optimized for delivering high graphics performance. It scales seamlessly from mobile platforms to high-end PCs and consoles.
There is now an additional Unity Package Manager (UPM) package
com.esotericsoftware.spine.lwrp-shaders available for download which extends the spine-unity runtime by adding LWRP support.
Why a separate package
Unity has moved many of their optional modules to the new Unity Package Manager (UPM) ecosystem. Their LWRP base shader files are also provided as a UPM package under the name
Lightweight RP and not part of every new Unity project out of the box.
Including our LWRP Spine shaders in the spine-unity runtime would lead to confusing error messages and additional configuration steps in case Unity's
Lighweight RP package has not installed in a project. By providing our LWRP Spine shaders as a UPM package, such dependencies are automatically resolved, making it easier to use this additional functionality.
Going forward, we will provide separate UPM packages for other spine-unity features that depend on Unity's optional packages.
You can download the UPM package via the download page or find it in the spine-unity/Modules subdirectory in the Git repository. After unzipping or cloning, you can make use of the package in one of these two ways:
Copy into your project
Copy the package contents to the
Packages directory in your project. Unity will load it automatically.
Via the Package Manager
Copy the package contents anywhere outside your
Assets directory, then open the
Package Manager in Unity (via
Window > Package Manager), select the
+ icon, choose
Add package from disk..., and point it to the
Package Manager window will now list a
Spine Lightweight RP Shaders entry:
Project panel you will now also find a
Spine Lightweight RP Shaders entry under
If the entry is not yet listed in the
Project panel, you may need to close and re-open Unity.
The package contains an example scene similar to the animated GIF above at
com.esotericsoftware.spine.lwrp-shaders-3.8/Examples/LWRP Shaders.unity for you to check out. It demonstrates how to use the LWRP shaders and will react to changing the settings of your current
LightweightRenderPipelineAsset, set under
Project Settings > Graphics.
The standard Spine shaders in the spine-unity runtime
Spine/Sprite/Vertex Lit, and
Pixel Lit are not compatible with the lightweight render pipeline. Instead, the
Spine Lightweight RP Shaders package provides three shaders specifically built for the lightweight render pipeline:
Lightweight Render Pipeline/Spine/Skeletonis a lightweight variant of the
Lightweight Render Pipeline/Spine/Skeleton Litis a lightweight variant of the
Lightweight Render Pipeline/Spine/Spriteis a lightweight variant of the
The shaders can be assigned to materials as usual via the
Shader menu in the material properties:
Both lightweight shaders will respect your settings of the assigned
Project Settings > Graphics. The following GIF shows how characters in the scene are affected by changing these settings:
Like all other Spine shaders, the LWRP shaders do not support
Premultiply alpha (PMA) atlas textures when using the
Linear color space. If you are using the
Linear color space, please export your atlas textures as
straight alpha textures by disabling the
Premultiply alpha setting. See these instructions for straight alpha export and import settings for more information.
If you are unsure you can check the currently active color space via
Edit > Project Settings > Player > Other Settings > Color Space.
We hope that these additions to the spine-unity runtime let you create even more impressive games and apps for both high- and low-end devices. Share your thoughts on the forum.