Spine uses a gamma color space, while Unity uses a linear color space by default. When applying an additive glow (additional color effect) in Spine and then exporting it to Unity, the effect appears dull in Unity. This issue arises due to the difference in color space between the two programs. Is it possible to make it look like Spine's gamma color space in Unity without changing the color space settings?
Maintaining Spine's Gamma Color Appearance in Unity Without Changing Color Space
To maintain the appearance of Spine's gamma color space in Unity without changing Unity's color space settings, you can adjust the export and import settings to better match the desired visual outcome. When exporting from Spine, ensure that you are using the appropriate texture settings, such as using straight alpha instead of premultiplied alpha if necessary. In Unity, you may need to adjust the material and shader settings to compensate for the color space difference. However, achieving an exact match without changing the color space settings might be challenging due to the inherent differences in how gamma and linear color spaces handle blending.
lenore Is it possible to make it look like Spine's gamma color space in Unity without changing the color space settings?
Short answer: no. If it were possible in a reasonable way, we would do it automatically. It can't be done by e.g. performing some additional math in the shaders.
If you prefer Gamma space blending, it's highly recommended to use Gamma color space in your Unity project. Is there a reason why you don't want to change the Unity project setting?
If you really can't do that, your next best option would be to change the Spine Viewport settings to Linear
to match your Unity project, as described here.
If you want to know why it's not possible:
The important part of the blending pipeline happens outside the shaders that we can control. With Linear
color space active, all objects are rendered to a (linear) frame buffer (FBO / render texture) which is then at the end converted once from Linear to Gamma color space. What would be necessary, is to render all Spine skeleton objects to a custom render texture in Gamma space, and then convert the result to Linear space and render it to the normal scene. However, this workflow has the following major problems:
1) it only blends skeleton objects in gamma space, the resulting skeleton objects are blended with the scene in linear color space.
2) You can't interleave Gamma space skeletons and normal Linear scene objects.
3) It comes with an unnecessary performance overhead which is best avoided.