From 3d3f019817b4049a86071dd6ea01f4256187157a Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 9 Dec 2020 19:15:19 +0100 Subject: [PATCH] [unity] Changed default Sprite shader ramp mode from `Old Hard` to `Hard` for 4.0 and newer. This will affect newly created materials only. See commit 2fde05e. --- CHANGELOG.md | 2 +- .../Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f10e9c19c..5d8f6cb10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -378,7 +378,7 @@ * `GetRemappedClone()` now provides an additional parameter `pivotShiftsMeshUVCoords` for `MeshAttachment` to prevent uv shifts at a non-central Sprite pivot. This parameter defaults to `true` to maintain previous behaviour. * `SkeletonRenderer` components now provide an additional update mode `Only Event Timelines` at the `Update When Invisible` property. This mode saves additional timeline updates compared to update mode `Everything Except Mesh`. * Now all URP (Universal Render Pipeline) and LWRP (Lightweight Render Pipeline) shaders support SRP (Scriptable Render Pipeline) batching. See [Unity SRPBatcher documentation pages](https://docs.unity3d.com/Manual/SRPBatcher.html) for additional information. - * Sprite shaders now provide four `Diffuse Ramp` modes as an Inspector Material parameter: `Hard`, `Soft`, `Old Hard` and `Old Soft`. In spine-unity 3.8 it defaults to `Old Hard` to keep the behaviour of existing projects unchanged. Note that `Old Hard` and `Old Soft` ramp versions were using only the right half of the ramp texture, and additionally multiplying the light intensity by 2, both leading to brighter lighting than without a ramp texture active. The new ramp modes `Hard` and `Soft` use the full ramp texture and do not modify light intensity, being consistent with lighting without a ramp texture active. + * Sprite shaders now provide four `Diffuse Ramp` modes as an Inspector Material parameter: `Hard`, `Soft`, `Old Hard` and `Old Soft`. In spine-unity 3.8 it defaults to `Old Hard` to keep the behaviour of existing projects unchanged. From 4.0 on it defaults to `Hard` for newly created materials while existing ones remain unchanged. Note that `Old Hard` and `Old Soft` ramp versions were using only the right half of the ramp texture, and additionally multiplying the light intensity by 2, both leading to brighter lighting than without a ramp texture active. The new ramp modes `Hard` and `Soft` use the full ramp texture and do not modify light intensity, being consistent with lighting without a ramp texture active. * **Changes of default values** * `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.MixNext` instead of `MixMode.MixAlways`. diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs index d28da4582..cb0fbdc6e 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs @@ -88,7 +88,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI { OldHard = 2, OldSoft = 3, - DefaultRampMode = OldHard + DefaultRampMode = FullRangeHard }; MaterialProperty _mainTexture = null; @@ -643,7 +643,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI { if (EditorGUI.EndChangeCheck()) { if (rampMode == eDiffuseRampMode.NoRampSpecified) - rampMode = eDiffuseRampMode.DefaultRampMode; + rampMode = eDiffuseRampMode.OldHard; SetDiffuseRampMode(_materialEditor, rampMode); mixedRampMode = false;