diff --git a/spine-unity/Assets/Spine Examples/Spine Skeletons/spineboy-unity/spineboy.png.meta b/spine-unity/Assets/Spine Examples/Spine Skeletons/spineboy-unity/spineboy.png.meta index f42b5dfc6..12efdb0f7 100644 --- a/spine-unity/Assets/Spine Examples/Spine Skeletons/spineboy-unity/spineboy.png.meta +++ b/spine-unity/Assets/Spine Examples/Spine Skeletons/spineboy-unity/spineboy.png.meta @@ -34,8 +34,8 @@ TextureImporter: serializedVersion: 4 mipmaps: mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 + enableMipMap: 0 + sRGBTexture: 1 linearTexture: 0 fadeOut: 0 borderMipMap: 0 diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs index 709254936..21d1871d8 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs @@ -286,8 +286,8 @@ namespace Spine.Unity.Editor { // 'sRGBTexture = true' generates incorrectly weighted mipmaps at PMA textures, // causing white borders due to undesired custom weighting. - if (texImporter.sRGBTexture && texImporter.mipmapEnabled) { - Debug.LogWarningFormat("`{0}` : Incorrect Texture Settings found: When enabling `Generate Mip Maps`, it is strongly recommended to disable `sRGB (Color Texture)`. Otherwise you will receive white border artifacts on an atlas exported with default `Premultiply alpha` settings.\n(You can disable this warning in `Edit - Preferences - Spine`)", texturePath); + if (texImporter.sRGBTexture && texImporter.mipmapEnabled && PlayerSettings.colorSpace == ColorSpace.Gamma) { + Debug.LogWarningFormat("`{0}` : Problematic Texture Settings found: When enabling `Generate Mip Maps` in Gamma color space, it is recommended to disable `sRGB (Color Texture)`. Otherwise you will receive white border artifacts on an atlas exported with default `Premultiply alpha` settings.\n(You can disable this warning in `Edit - Preferences - Spine`)", texturePath); } if (texImporter.alphaIsTransparency) { int straightAlphaValue = material.GetInt(STRAIGHT_ALPHA_PARAM_ID); @@ -966,10 +966,6 @@ namespace Spine.Unity.Editor { continue; } - // Note: 'sRGBTexture = false' below might seem counter-intuitive, but prevents mipmaps from being - // generated incorrectly (causing white borders due to undesired custom weighting) for PMA textures - // when mipmaps are enabled later. - texImporter.sRGBTexture = false; texImporter.textureCompression = TextureImporterCompression.Uncompressed; texImporter.alphaSource = TextureImporterAlphaSource.FromInput; texImporter.mipmapEnabled = false;