From 993f8a7cd423825b78cd2690b3a2d2543697ce3f Mon Sep 17 00:00:00 2001 From: phuong-axie Date: Mon, 1 Apr 2024 16:14:17 +0700 Subject: [PATCH] v0.0.5 --- .../Components/Builder/Axie2dBuilder.cs | 5 +- .../Components/Core/IAxieMixerMaterials.cs | 1 + .../Components/Helper/AxieMixerMaterials.cs | 30 +- .../AxieMixerUnity/Resources/Sprites.meta | 8 - .../axie-2d-v3-stuff-animations.json | 258 ++++++++++++++++++ .../axie-2d-v3-stuff-materials.json | 5 + .../axie-2d-v3-stuff-samples.json | 26 +- .../axie-2d-v3-stuff/axie-2d-v3-swap-tex.png | Bin 1008 -> 2132 bytes .../axie-2d-v3-swap-tex.png.meta | 21 +- .../AxieMixerShaderVariants.shadervariants | 3 + .../SplattingGraphicLinearShader.shader | 133 +++++++++ .../SplattingGraphicLinearShader.shader.meta | 9 + .../Shaders/SplattingGraphicShader.shader | 19 +- .../SplattingGraphicShader.shader.meta | 3 +- .../Shaders/SplattingPaletteShader.shader | 10 +- ProjectSettings/ProjectSettings.asset | 2 +- 16 files changed, 474 insertions(+), 59 deletions(-) delete mode 100644 Assets/AxieInfinity/AxieMixerUnity/Resources/Sprites.meta create mode 100644 Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader create mode 100644 Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader.meta diff --git a/Assets/AxieInfinity/AxieMixerUnity/Components/Builder/Axie2dBuilder.cs b/Assets/AxieInfinity/AxieMixerUnity/Components/Builder/Axie2dBuilder.cs index 5ccd263..fbe451e 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Components/Builder/Axie2dBuilder.cs +++ b/Assets/AxieInfinity/AxieMixerUnity/Components/Builder/Axie2dBuilder.cs @@ -19,10 +19,12 @@ public class Axie2dBuilderResult public class Axie2dBuilder { public IAxieMixerMaterials axieMixerMaterials { get; private set; } + public bool isGraphicLinear { get; private set; } public void Init(IAxieMixerMaterials axieMixerMaterials) { this.axieMixerMaterials = axieMixerMaterials; + this.isGraphicLinear = QualitySettings.activeColorSpace == ColorSpace.Linear; } public int GetSampleColorVariant(AxieCore.AxieMixer.CharacterClass characterClass, int colorValue) @@ -95,7 +97,8 @@ public Axie2dBuilderResult BuildSpineAdultCombo(Dictionary adult else { builderResult.skeletonDataAsset = skeletonDataAsset; - builderResult.sharedGraphicMaterial = axieMixerMaterials.GetSampleGraphicMaterial(AxieFormType.Normal); + builderResult.sharedGraphicMaterial = isGraphicLinear ? axieMixerMaterials.GetSampleLinearGraphicMaterial(AxieFormType.Normal, colorVariant, 0) : //phuongnk - tmp solution shift value is not correct + axieMixerMaterials.GetSampleGraphicMaterial(AxieFormType.Normal); } return builderResult; } diff --git a/Assets/AxieInfinity/AxieMixerUnity/Components/Core/IAxieMixerMaterials.cs b/Assets/AxieInfinity/AxieMixerUnity/Components/Core/IAxieMixerMaterials.cs index 86fcedf..d8dac53 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Components/Core/IAxieMixerMaterials.cs +++ b/Assets/AxieInfinity/AxieMixerUnity/Components/Core/IAxieMixerMaterials.cs @@ -18,5 +18,6 @@ public interface IAxieMixerMaterials IAxieGenesStuff GetGenesStuff(AxieFormType formType); IAxieMixerStuff GetMixerStuff(AxieFormType formType); Material GetSampleGraphicMaterial(AxieFormType formType); + Material GetSampleLinearGraphicMaterial(AxieFormType formType, byte colorVariant, byte colorShift); } } diff --git a/Assets/AxieInfinity/AxieMixerUnity/Components/Helper/AxieMixerMaterials.cs b/Assets/AxieInfinity/AxieMixerUnity/Components/Helper/AxieMixerMaterials.cs index bbb4363..15fd593 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Components/Helper/AxieMixerMaterials.cs +++ b/Assets/AxieInfinity/AxieMixerUnity/Components/Helper/AxieMixerMaterials.cs @@ -20,7 +20,9 @@ public class SingleStuff { public IAxieGenesStuff axieGenesStuff; public IAxieMixerStuff axieMixerStuff; public Material sampleGraphicMaterial; + public Material sampleGraphicLinearMaterial; public Dictionary materials = new Dictionary(); + public Dictionary variantMaterials = new Dictionary(); } SingleStuff[ ] stuffs = new SingleStuff[(int)AxieFormType.Count]; @@ -45,6 +47,23 @@ public Material GetSampleGraphicMaterial(AxieFormType formType) return stuffs[(int)formType].sampleGraphicMaterial; } + public Material GetSampleLinearGraphicMaterial(AxieFormType formType, byte colorVariant, byte colorShift) + { + if (stuffs[(int)formType] == null) return null; + var stuff = stuffs[(int)formType]; + string key = $"linear_{colorVariant}-{colorShift}"; + Material ret; + if(stuff.variantMaterials.TryGetValue(key, out ret)) + { + return ret; + } + ret = new Material(stuffs[(int)formType].sampleGraphicLinearMaterial); + ret.SetFloat("_ColorVariant", colorVariant); + ret.SetFloat("_ColorShift", colorShift); + stuff.variantMaterials.Add(key, ret); + return ret; + } + public IAxieGenesStuff GetGenesStuff(AxieFormType formType) { if (stuffs[(int)formType] == null) return null; return stuffs[(int)formType].axieGenesStuff; @@ -92,7 +111,15 @@ Dictionary baseMaterials UnityEngine.Assertions.Assert.IsTrue(materials.Count == 1); sampleGraphicMaterial = materials[0]; } - + + Material sampleGraphicLinearMaterial = null; + if (baseMaterials.TryGetValue("graphic-linear", out var baseGraphicLinearMaterial)) + { + List materials = LoadMaterials(atlasStuffSingle, baseGraphicLinearMaterial); + UnityEngine.Assertions.Assert.IsTrue(materials.Count == 1); + sampleGraphicLinearMaterial = materials[0]; + } + stuffs[(int)formType] = new SingleStuff { atlasStuffs = atlasStuffs, @@ -101,6 +128,7 @@ Dictionary baseMaterials axieGenesStuff = axieGenesStuff, axieMixerStuff = axieMixerStuff, sampleGraphicMaterial = sampleGraphicMaterial, + sampleGraphicLinearMaterial = sampleGraphicLinearMaterial, materials = baseMaterials }; } diff --git a/Assets/AxieInfinity/AxieMixerUnity/Resources/Sprites.meta b/Assets/AxieInfinity/AxieMixerUnity/Resources/Sprites.meta deleted file mode 100644 index ea07dee..0000000 --- a/Assets/AxieInfinity/AxieMixerUnity/Resources/Sprites.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 334144296db634a589e7607bdd851b66 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-animations.json b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-animations.json index 3a0e6f7..bfcbfed 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-animations.json +++ b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-animations.json @@ -3621,6 +3621,264 @@ }, "events": [{"time": 0.1667, "name": "hit-buff"}] }, + "2045974966": { + "slots": { + "eyes": {"attachment": [{"time": 0.0167, "name": "eyes-shut"}, {"time": 0.1833, "name": "eyes-angry"}, {"time": 0.4, "name": "eyes"}]}, + "mouth": {"attachment": [{"time": 0.0167, "name": "mouth-bite"}, {"time": 0.4, "name": "mouth"}]} + }, + "bones": { + "@pivot-back": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": -20}, {"time": 0.1667, "angle": -22, "curve": 0.464, "c4": 0.7}, {"time": 0.3167, "angle": 5.2, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.4167} + ], + "translate": [{"curve": "stepped"}, {"time": 0.0167, "x": 75, "y": -4.42}, {"time": 0.1667, "x": 80, "y": -7.47, "curve": 0.464, "c4": 0.7}, {"time": 0.3167}] + }, + "@leg-front-left": {"translate": [{"time": 0.1667, "curve": 0.62, "c4": 0.3}, {"time": 0.3167, "x": -1.1, "y": -14.87, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167}]}, + "@shadow": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 70.3, "curve": "stepped"}, {"time": 0.1667, "x": 70.3, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3167, "x": 12.49, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167} + ], + "scale": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 0.98, "y": 0.98}, {"time": 0.1667, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3167, "x": 1.08, "y": 1.08, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167} + ] + }, + "leg-back-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 20.18, "y": 0.9, "curve": "stepped"}, {"time": 0.1667, "x": 20.18, "y": 0.9, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3333} + ] + }, + "@leg-back-left": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": -0.94, "y": 4.51, "curve": "stepped"}, {"time": 0.1667, "x": -0.94, "y": 4.51, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3167} + ] + }, + "@pivot-main": {"translate": [{"curve": "stepped"}, {"time": 0.0167, "x": 20, "curve": "stepped"}, {"time": 0.3167, "x": 20, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167}]}, + "@leg-front-right": {"translate": [{"time": 0.1667, "curve": 0.62, "c4": 0.3}, {"time": 0.3167, "x": -2.11, "y": -28.46, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167}]}, + "tail": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": 19}, {"time": 0.1667, "angle": 23.91, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3167, "angle": -21.75, "curve": 0, "c2": 0.1, "c3": 0.85}, {"time": 0.4167} + ] + }, + "leg-front-right-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 44.88, "y": 143.25}, {"time": 0.0833, "x": -0.81, "y": 175.84}, {"time": 0.1667, "x": 46.95, "y": 154.35, "curve": 0.306, "c4": 0.8}, + {"time": 0.3167} + ] + }, + "leg-front-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": -4.98, "y": 86.81}, {"time": 0.0833, "x": 23.52, "y": 63.22}, {"time": 0.1667, "x": -2.69, "y": 90.83, "curve": 0.306, "c4": 0.8}, + {"time": 0.3167} + ] + } + } + }, + "2130010601": { + "slots": { + "eyes": {"attachment": [{"time": 0.0167, "name": "eyes-shut"}, {"time": 0.1833, "name": "eyes-angry"}, {"time": 0.4, "name": "eyes"}]}, + "mouth": {"attachment": [{"time": 0.0167, "name": "mouth-bite"}, {"time": 0.4, "name": "mouth"}]} + }, + "bones": { + "tail": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": 35.35}, {"time": 0.1667, "angle": 50.35, "curve": 0.315, "c4": 0.8}, {"time": 0.3167, "angle": -21.75, "curve": 0, "c2": 0.1, "c3": 0.85}, + {"time": 0.4167} + ] + }, + "leg-front-right-IK": { + "translate": [{"curve": "stepped"}, {"time": 0.0167, "x": 74.76, "y": 322.04}, {"time": 0.1667, "x": 85.96, "y": 349.35, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3167}] + }, + "@pivot-back": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": -45}, {"time": 0.1667, "angle": -50, "curve": 0.464, "c4": 0.7}, {"time": 0.3167, "angle": 5.2, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.4167} + ], + "translate": [{"curve": "stepped"}, {"time": 0.0167, "x": 94.99, "y": -21}, {"time": 0.1667, "x": 107, "y": -60, "curve": 0.464, "c4": 0.7}, {"time": 0.3167}] + }, + "@shadow": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 70.3, "curve": "stepped"}, {"time": 0.1667, "x": 70.3, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3167, "x": 12.49, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167} + ], + "scale": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 0.98, "y": 0.98}, {"time": 0.1667, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3167, "x": 1.08, "y": 1.08, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167} + ] + }, + "leg-back-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 11.67, "y": 0.9, "curve": "stepped"}, {"time": 0.1667, "x": 11.67, "y": 0.9, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3333} + ] + }, + "@leg-back-left": {"translate": [{"curve": "stepped"}, {"time": 0.0167, "x": -2.63, "y": 8.92}, {"time": 0.1667, "x": 18.61, "y": -8.3, "curve": 0.464, "c4": 0.7}, {"time": 0.3167}]}, + "@pivot-main": {"translate": [{"curve": "stepped"}, {"time": 0.0167, "x": 20, "curve": "stepped"}, {"time": 0.3167, "x": 20, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167}]}, + "leg-front-left-IK": { + "translate": [{"curve": "stepped"}, {"time": 0.0167, "x": -4.7, "y": 168.09}, {"time": 0.1667, "x": 6.72, "y": 174.87, "curve": 0.306, "c3": 0.695}, {"time": 0.3167}] + }, + "@leg-front-left": {"translate": [{"time": 0.1667, "curve": 0.62, "c4": 0.3}, {"time": 0.3167, "x": -1.1, "y": -14.87, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167}]}, + "@leg-front-right": {"translate": [{"time": 0.1667, "curve": 0.62, "c4": 0.3}, {"time": 0.3167, "x": -2.11, "y": -28.46, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4167}]} + } + }, + "3823092125": { + "slots": { + "eyes": {"attachment": [{"time": 0.0167, "name": "eyes-shut"}, {"time": 0.5833, "name": "eyes-angry"}, {"time": 0.8333, "name": "eyes-shut"}, {"time": 0.9167, "name": "eyes"}]}, + "mouth": {"attachment": [{"time": 0.0167, "name": "mouth-bite"}, {"time": 0.6667, "name": "mouth-open"}, {"time": 0.8333, "name": "mouth"}]} + }, + "bones": { + "@pivot-back": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": -45}, {"time": 0.1, "angle": -85, "curve": "stepped"}, {"time": 0.6667, "angle": -85, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.8333, "angle": 6, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 1} + ], + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 94.99, "y": -21}, {"time": 0.05, "x": 256.42, "y": -60}, {"time": 0.1, "x": 408.25, "y": -188, "curve": "stepped"}, + {"time": 0.6667, "x": 408.25, "y": -188, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.8333, "y": 12.75, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 1} + ] + }, + "@shadow": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 144.17}, {"time": 0.1, "x": 589.27, "curve": 0.313, "c3": 0.699}, {"time": 0.25, "x": 627.48, "curve": 0.313, "c3": 0.699}, + {"time": 0.4167, "x": 576.87, "curve": 0.313, "c3": 0.699}, {"time": 0.55, "x": 602.83, "curve": 0.313, "c3": 0.699}, {"time": 0.6667, "x": 576.87, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.8333} + ], + "scale": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 0.92, "y": 0.92}, {"time": 0.1, "curve": 0, "c2": 0.22, "c3": 0.373, "c4": 0.57}, {"time": 0.25, "x": 1.04, "y": 1.04, "curve": "stepped"}, + {"time": 0.6667, "x": 1.04, "y": 1.04, "curve": 0.206, "c2": 0.38, "c3": 0.736}, {"time": 0.8333, "x": 1.1, "y": 1.1, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 1} + ] + }, + "@leg-back-left": {"translate": [{"curve": "stepped"}, {"time": 0.0167, "x": 6.4, "y": 0.19}, {"time": 0.1667}]}, + "leg-front-right-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 69.67, "y": 327.04}, {"time": 0.05, "x": 451.04, "y": 582.91}, {"time": 0.0833, "x": 787.85, "y": 470.29}, + {"time": 0.1, "x": 945.09, "y": 394.99, "curve": 0.313, "c3": 0.699}, {"time": 0.25, "x": 1086.85, "y": 338.86, "curve": 0.313, "c3": 0.699}, + {"time": 0.4167, "x": 921.41, "y": 410.91, "curve": 0.313, "c3": 0.699}, {"time": 0.5833, "x": 1028.37, "y": 385.44}, {"time": 0.6667, "x": 914.82, "y": 422.49}, + {"time": 0.7, "x": 413.58, "y": 458.44}, {"time": 0.75, "x": 45.46, "y": 287.09}, {"time": 0.7833, "x": -34.18, "y": 117.59}, {"time": 0.8333} + ] + }, + "tail": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": 35.35}, {"time": 0.1, "angle": -18.03, "curve": 0.313, "c3": 0.699}, {"time": 0.25, "angle": 12.69, "curve": 0.313, "c3": 0.699}, + {"time": 0.4167, "angle": -15.12, "curve": 0.313, "c3": 0.699}, {"time": 0.6667, "angle": 1.29, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.8333, "angle": 19.35, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 1} + ] + }, + "leg-back-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": -3.7, "y": 19.91}, {"time": 0.05, "x": -86.78, "y": 121.52}, {"time": 0.1, "x": 129.15, "y": 364.61, "curve": 0.313, "c3": 0.699}, + {"time": 0.25, "x": 262.18, "y": 406.7, "curve": 0.313, "c3": 0.699}, {"time": 0.4167, "x": 109.91, "y": 347.96, "curve": 0.313, "c3": 0.699}, {"time": 0.5833, "x": 216.28, "y": 393.95}, + {"time": 0.6667, "x": 118.81, "y": 360.02}, {"time": 0.7, "x": -121.03, "y": 41.31}, {"time": 0.75, "x": -95.31, "y": -47.01}, {"time": 0.7833, "x": 22.31, "y": -53.8}, {"time": 0.8333} + ] + }, + "leg-front-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": -5.8, "y": 177.99}, {"time": 0.05, "x": 106.35, "y": 306.87}, {"time": 0.0833, "x": 355.94, "y": 424.69}, + {"time": 0.1, "x": 515.46, "y": 408.14, "curve": 0.313, "c3": 0.699}, {"time": 0.25, "x": 536.35, "y": 423.87, "curve": 0.313, "c3": 0.699}, + {"time": 0.4167, "x": 492.39, "y": 405.73, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.6667, "x": 482.36, "y": 419.06}, {"time": 0.7, "x": 97.67, "y": 283.45}, + {"time": 0.75, "x": -12.16, "y": 45.82}, {"time": 0.7833, "x": -31.56, "y": 29.02}, {"time": 0.8333} + ] + }, + "@pivot-center": { + "rotate": [ + {"time": 0.0167, "curve": 0, "c2": 0.1, "c3": 0.85}, {"time": 0.1, "angle": -95, "curve": 0.313, "c3": 0.699}, {"time": 0.25, "angle": -105, "curve": 0.313, "c3": 0.699}, + {"time": 0.4167, "angle": -90, "curve": 0.313, "c3": 0.699}, {"time": 0.55, "angle": -100, "curve": 0.313, "c3": 0.699}, + {"time": 0.6667, "angle": -90, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.8333} + ], + "translate": [ + {"time": 0.1, "curve": 0.313, "c3": 0.699}, {"time": 0.25, "x": 1.68, "y": 38.2, "curve": 0.313, "c3": 0.699}, {"time": 0.4167, "x": -2.73, "y": -12.21, "curve": 0.313, "c3": 0.699}, + {"time": 0.55, "x": -0.47, "y": 13.65, "curve": 0.313, "c3": 0.699}, {"time": 0.6667, "x": -2.73, "y": -12.21, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.8333} + ] + }, + "@pivot-main": { + "translate": [{"time": 0.6667, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.75, "y": 150, "curve": 0.315, "c4": 0.8}, {"time": 0.8333}], + "scale": [ + {"time": 0.1, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.1667, "y": 0.93, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.25, "curve": "stepped"}, + {"time": 0.5667, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.65, "y": 0.7, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.7333, "curve": "stepped"}, + {"time": 0.8333, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.9167, "y": 0.98, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 1} + ] + }, + "@leg-front-right": {"translate": [{"time": 0.75, "curve": 0.306, "c4": 0.8}, {"time": 0.8333, "x": -2.23, "y": -25.27, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 1}]} + } + }, + "2224561612": { + "slots": { + "eyes": {"attachment": [{"time": 0.0167, "name": "eyes-shut"}, {"time": 0.3, "name": "eyes-angry"}, {"time": 0.4833, "name": "eyes"}]}, + "mouth": {"attachment": [{"time": 0.0167, "name": "mouth-bite"}, {"time": 0.4833, "name": "mouth"}]} + }, + "bones": { + "@pivot-back": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": 8}, {"time": 0.2333, "angle": 10, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3333, "angle": -5, "curve": 0.315, "c4": 0.8}, + {"time": 0.4833, "angle": 5, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.5833} + ], + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 29.16, "y": 6.28}, {"time": 0.2667, "x": 18.48, "y": 18.85, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3833, "x": -1.17, "y": 18.85, "curve": 0.315, "c4": 0.8}, {"time": 0.4833} + ] + }, + "@shadow": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 33.22}, {"time": 0.2667, "x": 61.08, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3833, "x": 9.02, "curve": 0.315, "c4": 0.8}, + {"time": 0.4833} + ], + "scale": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 1.1, "y": 1.1, "curve": "stepped"}, {"time": 0.2667, "x": 1.1, "y": 1.1, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3833, "x": 0.98, "y": 0.98, "curve": 0.315, "c4": 0.8}, {"time": 0.4833, "x": 1.1, "y": 1.1, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.5833} + ] + }, + "@pivot-main": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 33.18}, {"time": 0.2667, "x": 61.52, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3833, "x": 20.27, "y": 27.91, "curve": 0.315, "c4": 0.8}, + {"time": 0.4833} + ] + }, + "tail": { + "rotate": [ + {"curve": "stepped"}, {"time": 0.0167, "angle": -18.65}, {"time": 0.2333, "angle": -21.65, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.3333, "angle": -13.3, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.45, "angle": 12.04, "curve": 0.154, "c4": 0.9}, + {"time": 0.5167, "angle": -9.14, "curve": 0.161, "c3": 0.854}, {"time": 0.5833} + ] + }, + "leg-front-right-IK": { + "translate": [ + {"time": 0.2333, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.3333, "x": 22.26, "y": 54.13}, {"time": 0.3833, "x": 28.04, "y": 49.32, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.45} + ] + }, + "@leg-front-left": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": -0.45, "y": -3.93}, {"time": 0.2333, "x": -0.82, "y": -2.61}, {"time": 0.3333, "x": -5.6, "y": -0.89, "curve": 0.617, "c4": 0.6}, + {"time": 0.45, "x": -1.09, "y": -14.69, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.5833} + ] + }, + "leg-back-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 50.74, "y": 0.9, "curve": "stepped"}, {"time": 0.2, "x": 50.74, "y": 0.9, "curve": 0, "c2": 0.2, "c3": 0.694}, + {"time": 0.25, "x": 12.5, "y": 6.45, "curve": 0, "c2": 0.8, "c3": 0.15}, {"time": 0.3667, "x": 5.47, "y": 26.12, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.4833} + ] + }, + "@leg-front-right": { + "translate": [ + {"time": 0.0167}, {"time": 0.3333, "x": -7.53, "y": 2.3, "curve": 0, "c2": 0.1, "c3": 0.853}, {"time": 0.45, "x": 0.15, "y": -4.26, "curve": 0.159, "c3": 0.853}, + {"time": 0.4833, "x": -2.34, "y": -28.14, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.5833} + ] + }, + "@leg-back-left": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 18.74, "y": 14.65, "curve": "stepped"}, {"time": 0.1667, "x": 18.74, "y": 14.65, "curve": 0, "c2": 0.1, "c3": 0.85}, {"time": 0.4833} + ] + }, + "leg-front-left-IK": { + "translate": [ + {"curve": "stepped"}, {"time": 0.0167, "x": 38.52}, {"time": 0.2333, "x": 38.87, "curve": 0, "c2": 0.3, "c3": 0.54}, {"time": 0.3333, "x": 26.12, "y": 38.71}, + {"time": 0.3833, "x": 12.33, "y": 29.93, "curve": 0, "c2": 0.2, "c3": 0.694}, {"time": 0.45} + ] + } + } + }, "390714790": { "slots": { "eyes": {"attachment": [{"time": 0.0167, "name": "eyes-angry"}, {"time": 0.25, "name": "eyes-shut"}, {"time": 0.3, "name": "eyes-angry"}, {"time": 0.4333, "name": "eyes"}]}, diff --git a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-materials.json b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-materials.json index 2990ffe..4a7df19 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-materials.json +++ b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-materials.json @@ -10,6 +10,11 @@ "name": "graphic", "shaderName": "Custom/Texture Splatting Graphic Palette", "keywords": [] + }, + { + "name": "graphic-linear", + "shaderName": "Custom/Texture Splatting Graphic Linear Palette", + "keywords": [] } ] } \ No newline at end of file diff --git a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-samples.json b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-samples.json index 5687585..2be5745 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-samples.json +++ b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-stuff-samples.json @@ -1,6 +1,6 @@ { "version": 1, - "buildTime": "2024.02.22.15.55.21", + "buildTime": "2024.04.01.15.14.14", "accessoryAnims": { "body-air": { "body-air1a": { @@ -18106,12 +18106,8 @@ "battle/get-debuff": "606904312", "defense/hit-by-normal": "978716858", "defense/hit-by-normal-crit": "3941256645", - "defense/hit-by-normal-crit2": "2130010601", "defense/hit-by-normal-dramatic": "2527908154", - "defense/hit-by-normal-dramatic2": "3823092125", - "defense/hit-by-normal2": "2045974966", "defense/hit-by-ranged-attack": "2207699263", - "defense/hit-by-ranged-attack2": "2224561612", "defense/hit-with-shield": "390714790", "attack/melee/horn-gore": "1327954218", "attack/melee/mouth-bite": "2237748264", @@ -18121,7 +18117,6 @@ "action/idle/normal": "1659336865", "attack/melee/normal-attack": "3305373483", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "405864717", "action/idle/random-01": "554401889", "action/idle/random-02": "3634120758", @@ -19132,7 +19127,6 @@ "action/idle/normal": "2865608434", "attack/melee/normal-attack": "3802408031", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "1112993905", "action/idle/random-01": "4074297404", "action/idle/random-02": "3457159700", @@ -20271,7 +20265,6 @@ "action/idle/normal": "2865608434", "attack/melee/normal-attack": "3802408031", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "1112993905", "action/idle/random-01": "4074297404", "action/idle/random-02": "3457159700", @@ -21396,12 +21389,8 @@ "battle/get-debuff": "606904312", "defense/hit-by-normal": "978716858", "defense/hit-by-normal-crit": "3941256645", - "defense/hit-by-normal-crit2": "2130010601", "defense/hit-by-normal-dramatic": "2527908154", - "defense/hit-by-normal-dramatic2": "3823092125", - "defense/hit-by-normal2": "2045974966", "defense/hit-by-ranged-attack": "2207699263", - "defense/hit-by-ranged-attack2": "2224561612", "defense/hit-with-shield": "390714790", "attack/melee/horn-gore": "1327954218", "attack/melee/mouth-bite": "2237748264", @@ -21411,7 +21400,6 @@ "action/idle/normal": "1659336865", "attack/melee/normal-attack": "3305373483", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "405864717", "action/idle/random-01": "554401889", "action/idle/random-02": "3634120758", @@ -27632,7 +27620,6 @@ "action/idle/normal": "2865608434", "attack/melee/normal-attack": "3802408031", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "1112993905", "action/idle/random-01": "4074297404", "action/idle/random-02": "3457159700", @@ -28771,7 +28758,6 @@ "action/idle/normal": "2865608434", "attack/melee/normal-attack": "3802408031", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "1112993905", "action/idle/random-01": "4074297404", "action/idle/random-02": "3457159700", @@ -29896,12 +29882,8 @@ "battle/get-debuff": "606904312", "defense/hit-by-normal": "978716858", "defense/hit-by-normal-crit": "3941256645", - "defense/hit-by-normal-crit2": "2130010601", "defense/hit-by-normal-dramatic": "2527908154", - "defense/hit-by-normal-dramatic2": "3823092125", - "defense/hit-by-normal2": "2045974966", "defense/hit-by-ranged-attack": "2207699263", - "defense/hit-by-ranged-attack2": "2224561612", "defense/hit-with-shield": "390714790", "attack/melee/horn-gore": "1327954218", "attack/melee/mouth-bite": "2237748264", @@ -29911,7 +29893,6 @@ "action/idle/normal": "1659336865", "attack/melee/normal-attack": "3305373483", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "405864717", "action/idle/random-01": "554401889", "action/idle/random-02": "3634120758", @@ -31036,12 +31017,8 @@ "battle/get-debuff": "606904312", "defense/hit-by-normal": "978716858", "defense/hit-by-normal-crit": "3941256645", - "defense/hit-by-normal-crit2": "2130010601", "defense/hit-by-normal-dramatic": "2527908154", - "defense/hit-by-normal-dramatic2": "3823092125", - "defense/hit-by-normal2": "2045974966", "defense/hit-by-ranged-attack": "2207699263", - "defense/hit-by-ranged-attack2": "2224561612", "defense/hit-with-shield": "390714790", "attack/melee/horn-gore": "1327954218", "attack/melee/mouth-bite": "2237748264", @@ -31051,7 +31028,6 @@ "action/idle/normal": "1659336865", "attack/melee/normal-attack": "3305373483", "action/mix/normal-mouth-animation": "1178295570", - "action/idle/normal2": "3503981622", "activity/prepare": "405864717", "action/idle/random-01": "554401889", "action/idle/random-02": "3634120758", diff --git a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-swap-tex.png b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-swap-tex.png index a103ab7e2c70c3f6dab6ad3791279224e0006f4e..430fe26051237e4e28808a553d44e8e285db76fc 100644 GIT binary patch literal 2132 zcmeH}>r;{m6vkh>=!Q|VYiVX#+f13{s@u)6a`T3WDVCwGDVUliXn6q)*wijVDwT%! zQWHT0Q8Ws0#nMeznNabHmU&s$Q3E2gKonBf{)qk7hcmx(W}Z*ydCttqK8t{XK|4VJ z0D$4X-a!ChveudaKbWo|B878#4V#jD!*Bp#Zt<;5fX8J!zDaOFFi)UfwoAD-Y`EeP z-~j;qT=TC{8v(#f3HSCu5=}I3jERLh6UltAD80$aO7i`qf$ zQ%_m=`x{(tOf*c&^rvP|O@3)7WwiFXJlqDl$=Yo46bb+_8vtjY@A$rg?+n?aLU)d^#Dqz&BNS+knJDXn zQ(av;`Utd~J-Ph(9!~4E%u!T{mNSNnW6X3nCtgf%yt)X>M{_Yl+!k~&0fh_=WSXLB zm#h39x8CiV;%yAK?NghL>IS*(qk|E3pYBxo zwQTR1!?wzXts-0XbMYdzO(Yl}qx&+jv{mr6``$Wdbf5g(9>?(1;+gSLX8)6)A8cmh zm$Z7p6mJtYkbNvfM}wHc2pGhL+Uq0s!lTtM#3>z_UBX$_CFLNK{4BQlV+O+uQgZM? zS;1YZwql%(6h>DR8uj{M&<%qtIJOtL5SN1}C!&DPuE!%0Y(v8sYq1+k$w!|jvixI% z)k9^2OuQIXG1D75|H-vOYKf7Jp?Qh6=b)sVb>s9*LkyXFiBS~T1QCkh*^rv+*lo8; z^2|OL%17(yj36pBDr<$_J$v!8>`aK#H3h7|+-C z#HHvIq?fyg)J_WIFJLOcUKe$gE%?_0v@PT%?@}L^66|81&hxbR%;3jqdiT_}thBf7 zRh=!VDWiWdsA-kTHCvKq7IBJELM~>tdKL3e0p335mSt;mSf;3ugTociB)W2kP7Wvp zf>V01Tg!scV9b#)G#Tjvp=1A{Ts%bANhZ{dbJNyS#6(w^-4SyEe$GkWzeLcWL zmQRjEJMVRs{O6aGs*)E$k_MJwWuf=ze&c>Oy|Ca(0;-0muNWzBG!>89sFY0-Ez!tS zA)ryp99xq-`{n061S(v_nR?YDB^o3re%0B6dFXmxa}h^O5Vq+@@d>lX3!TKF838v! zYZnga+9Y3NsY1z7;8$mZbepirXg`F2dMrd`Vtt!_;2iE}_Er||tONPgXCAjyi7!$xXhV^SVyYDrr9BPud% zU)pgxF(z3{O9`kc;RJR{gCBKMx0tWgiloO3UYPpZ@5?;Er~6w>F#*4`Q7r!Zi*$FX z1GV#v964F#y{{4~6rKnzXTb;kgvseV(8onzn~+^Y=h>k(illM@9o`6r;XdTpdigkE ilZd%0RnR);iCJd^;>2Wb>&V&@0KlOL?|RRRxBmmuSpMk% delta 1000 zcmVV1F6wJq=a1rXY;Gd?qp6>j)qX7WGCz{(`9e_(8X_H)&51(J4aPnQF zr}dAF=W_rK{kiRG{g0OGT65*%yvn`c_L*01LMEHuyA>H6peqiv!L3<1P!0E{z*ycs ze{pztxX*UzPJh4S1JzKsRZKrJNnQj0nt$3LM&aZa+O}6-L^f-#fcH_^)U^%C#E4ah z+i55%*^{%~7x4wdA#!>0t@eBI4vLDZ9xDQor7WtdOHUT__GqnTbaSf4MU+IdQquyyE9t{XnR~G50c$Fo> zQ)hylbWQ}F7{9a8#TYS#onzG-Uf6@DYv_dA^r}pzs?p6F}*eSc*FmRNa(51R&CC9WoSZu1EF0EQ?i z(T-Mm!T#@vH!FKgSD$z;HcnGTS2nsBBc`yoq?ag^XSf#N zU~++rE<6!Y^F zgt&m8CIh7eo~__!F^0>N6zYGYa;1q4=wWYmW%ZX*E}{i6zTazvYFghZi}DzXp=b?f!yMi*nml>Y#S Wyh%kw(Iy)J0000*`h diff --git a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-swap-tex.png.meta b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-swap-tex.png.meta index 164d939..27e2a0f 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-swap-tex.png.meta +++ b/Assets/AxieInfinity/AxieMixerUnity/Resources/axie-2d-v3-stuff/axie-2d-v3-swap-tex.png.meta @@ -3,7 +3,7 @@ guid: 79dea58465b394636b8964c8c4935b72 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -62,10 +62,11 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 + maxTextureSize: 256 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 @@ -77,7 +78,7 @@ TextureImporter: forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Standalone - maxTextureSize: 2048 + maxTextureSize: 256 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 @@ -89,7 +90,19 @@ TextureImporter: forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: iPhone - maxTextureSize: 2048 + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 256 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 diff --git a/Assets/AxieInfinity/AxieMixerUnity/Shaders/AxieMixerShaderVariants.shadervariants b/Assets/AxieInfinity/AxieMixerUnity/Shaders/AxieMixerShaderVariants.shadervariants index 611146c..0b359e5 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Shaders/AxieMixerShaderVariants.shadervariants +++ b/Assets/AxieInfinity/AxieMixerUnity/Shaders/AxieMixerShaderVariants.shadervariants @@ -14,3 +14,6 @@ ShaderVariantCollection: - first: {fileID: 4800000, guid: f5518c6dc55cd4860bd202c80d159294, type: 3} second: variants: [] + - first: {fileID: 4800000, guid: 298a09cd1d2a94ef2b858fa56e0849b3, type: 3} + second: + variants: [] diff --git a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader new file mode 100644 index 0000000..ebe24a3 --- /dev/null +++ b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader @@ -0,0 +1,133 @@ +Shader "Custom/Texture Splatting Graphic Linear Palette" { + + Properties { + [NoScaleOffset] _MainTex ("Main Tex", 2D) = "white" {} + [NoScaleOffset] _LineTex ("Line Tex", 2D) = "(0,0,0,0)" {} + [NoScaleOffset] _Splat0Tex ("Splat0 Tex", 2D) = "(0,0,0,0)" {} + [NoScaleOffset] _Splat1Tex ("Splat1 Tex", 2D) = "(0,0,0,0)" {} + [NoScaleOffset] _SwapTex ("Swap Tex", 2D) = "(0,0,0,0)" {} + + [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Stencil Comparison", Float) = 8 + [HideInInspector] _Stencil ("Stencil ID", Float) = 0 + [HideInInspector][Enum(UnityEngine.Rendering.StencilOp)] _StencilOp ("Stencil Operation", Float) = 0 + [HideInInspector] _StencilWriteMask ("Stencil Write Mask", Float) = 255 + [HideInInspector] _StencilReadMask ("Stencil Read Mask", Float) = 255 + + [HideInInspector] _ColorMask ("Color Mask", Float) = 15 + + _ColorVariant ("Color Variant", Range(0.0, 58.0)) = 0.0 + _ColorShift ("Color Shift", Range(0.0, 2.0)) = 0.0 + [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 + } + + SubShader { + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + "PreviewType"="Plane" + "CanUseSpriteAtlas"="True" + } + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull Off + Lighting Off + ZWrite Off + ZTest [unity_GUIZTestMode] + Fog { Mode Off } + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + Name "Normal" + + CGPROGRAM + // #pragma multi_compile_instancing + #pragma vertex MyVertexProgram + #pragma fragment MyFragmentProgram + + #include "UnityCG.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + + sampler2D _LineTex, _Splat0Tex, _Splat1Tex, _SwapTex; + float _ColorVariant; + float _ColorShift; + + struct VertexData { + float4 position : POSITION; + float2 uv : TEXCOORD0; + float4 vertexColor : COLOR; + // UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Interpolators { + float4 position : SV_POSITION; + float2 uv : TEXCOORD0; + float4 vertexColor : COLOR; + //UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + Interpolators MyVertexProgram (VertexData v) { + Interpolators i; + UNITY_INITIALIZE_OUTPUT(Interpolators, i); + // UNITY_SETUP_INSTANCE_ID(v); + // UNITY_TRANSFER_INSTANCE_ID(v, i); + + i.position = UnityObjectToClipPos(v.position); + i.uv = TRANSFORM_TEX(v.uv, _MainTex); + i.vertexColor = v.vertexColor; + return i; + } + + float4 MyFragmentProgram (Interpolators i) : SV_TARGET { + float4 dstColor1 = tex2D(_SwapTex, float2(_ColorVariant/ 256.0, 0.0 / 256.0 + _ColorShift / 256.0)); + float4 dstColor2 = tex2D(_SwapTex, float2(_ColorVariant/ 256.0, 1.0 / 256.0 + _ColorShift / 256.0)); + float4 dstColor3 = tex2D(_SwapTex, float2(_ColorVariant/ 256.0, 2.0 / 256.0)); + float4 dstColor4 = tex2D(_SwapTex, float2(_ColorVariant/ 256.0, 3.0 / 256.0)); + float4 dstColor5 = tex2D(_SwapTex, float2(_ColorVariant/ 256.0, 4.0 / 256.0)); + + float4 mainColor = tex2D(_MainTex, i.uv); + float4 lineColor = tex2D(_LineTex, i.uv); + + float3 splat0Color = tex2D(_Splat0Tex, i.uv).rgb; + float3 splat1Color = tex2D(_Splat1Tex, i.uv).rgb; + + float3 color = float3(0, 0, 0); + + float mainBackColorA = mainColor.a * splat0Color.b; + float mainColorA = mainColor.a * (1 - splat0Color.b); + + color = color * (1 - mainBackColorA) + mainColor.rgb * mainBackColorA; + color = color * (1 - splat0Color.r) + dstColor1 * splat0Color.r; + color = color * (1 - splat0Color.g) + dstColor2 * splat0Color.g; + color = color * (1 - splat1Color.b) + dstColor4 * splat1Color.b; + color = color * (1 - splat1Color.g) + dstColor3 * splat1Color.g; + color = color * (1 - splat1Color.r) + dstColor4 * splat1Color.r; + color = color * (1 - mainColorA) + mainColor.rgb * i.vertexColor.a * mainColorA; + color = color * (1 - lineColor.a) + lineColor.rgb * dstColor5 * lineColor.a; + + float4 baseColor = 0; + baseColor.rgb = color; + baseColor.a = clamp(mainBackColorA + splat0Color.r + splat0Color.g + splat1Color.g + splat1Color.b + splat1Color.r + mainColorA + lineColor.a, 0, 1) * i.vertexColor.a; + #ifdef UNITY_UI_ALPHACLIP + clip (baseColor.a - 0.001); + #endif + return baseColor; + + } + + ENDCG + } + } +} diff --git a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader.meta b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader.meta new file mode 100644 index 0000000..de55eec --- /dev/null +++ b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicLinearShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f5518c6dc55cd4860bd202c80d159294 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader index aa95e19..1062b38 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader +++ b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader @@ -100,19 +100,12 @@ Shader "Custom/Texture Splatting Graphic Palette" { } float4 MyFragmentProgram (Interpolators i) : SV_TARGET { - //UNITY_SETUP_INSTANCE_ID(i); - - /*float4 dstColor1 = UNITY_ACCESS_INSTANCED_PROP(UnityPerMaterial, _DstColor1); - float4 dstColor2 = UNITY_ACCESS_INSTANCED_PROP(UnityPerMaterial, _DstColor2); - float4 dstColor3 = UNITY_ACCESS_INSTANCED_PROP(UnityPerMaterial, _DstColor3); - float4 dstColor4 = UNITY_ACCESS_INSTANCED_PROP(UnityPerMaterial, _DstColor4); - float4 dstColor5 = UNITY_ACCESS_INSTANCED_PROP(UnityPerMaterial, _DstColor5);*/ - - float4 dstColor1 = tex2D(_SwapTex, float2(i.vertexColor.r, 0.0 / 8.0 + i.vertexColor.g * 256.0 / 8.0)); - float4 dstColor2 = tex2D(_SwapTex, float2(i.vertexColor.r, 1.0 / 8.0 + i.vertexColor.g * 256.0 / 8.0)); - float4 dstColor3 = tex2D(_SwapTex, float2(i.vertexColor.r, 2.0 / 8.0)); - float4 dstColor4 = tex2D(_SwapTex, float2(i.vertexColor.r, 3.0 / 8.0)); - float4 dstColor5 = tex2D(_SwapTex, float2(i.vertexColor.r, 4.0 / 8.0)); + float4 dstColor1 = tex2D(_SwapTex, float2(i.vertexColor.r, 0.0 / 256.0 + i.vertexColor.g)); + float4 dstColor2 = tex2D(_SwapTex, float2(i.vertexColor.r, 1.0 / 256.0 + i.vertexColor.g)); + float4 dstColor3 = tex2D(_SwapTex, float2(i.vertexColor.r, 2.0 / 256.0)); + float4 dstColor4 = tex2D(_SwapTex, float2(i.vertexColor.r, 3.0 / 256.0)); + float4 dstColor5 = tex2D(_SwapTex, float2(i.vertexColor.r, 4.0 / 256.0)); + float4 mainColor = tex2D(_MainTex, i.uv); float4 lineColor = tex2D(_LineTex, i.uv); diff --git a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader.meta b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader.meta index de55eec..36258b9 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader.meta +++ b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingGraphicShader.shader.meta @@ -1,9 +1,10 @@ fileFormatVersion: 2 -guid: f5518c6dc55cd4860bd202c80d159294 +guid: 298a09cd1d2a94ef2b858fa56e0849b3 ShaderImporter: externalObjects: {} defaultTextures: [] nonModifiableTextures: [] + preprocessorOverride: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingPaletteShader.shader b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingPaletteShader.shader index 25d59fd..6aa5f38 100644 --- a/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingPaletteShader.shader +++ b/Assets/AxieInfinity/AxieMixerUnity/Shaders/SplattingPaletteShader.shader @@ -56,11 +56,11 @@ } float4 MyFragmentProgram (Interpolators i) : SV_TARGET { - float4 dstColor1 = tex2D(_SwapTex, float2(i.vertexColor.r, 0.0 / 8.0 + i.vertexColor.g * 256.0 / 8.0)); - float4 dstColor2 = tex2D(_SwapTex, float2(i.vertexColor.r, 1.0 / 8.0 + i.vertexColor.g * 256.0 / 8.0)); - float4 dstColor3 = tex2D(_SwapTex, float2(i.vertexColor.r, 2.0 / 8.0)); - float4 dstColor4 = tex2D(_SwapTex, float2(i.vertexColor.r, 3.0 / 8.0)); - float4 dstColor5 = tex2D(_SwapTex, float2(i.vertexColor.r, 4.0 / 8.0)); + float4 dstColor1 = tex2D(_SwapTex, float2(i.vertexColor.r, 0.0 / 256.0 + i.vertexColor.g)); + float4 dstColor2 = tex2D(_SwapTex, float2(i.vertexColor.r, 1.0 / 256.0 + i.vertexColor.g)); + float4 dstColor3 = tex2D(_SwapTex, float2(i.vertexColor.r, 2.0 / 256.0)); + float4 dstColor4 = tex2D(_SwapTex, float2(i.vertexColor.r, 3.0 / 256.0)); + float4 dstColor5 = tex2D(_SwapTex, float2(i.vertexColor.r, 4.0 / 256.0)); float4 mainColor = tex2D(_MainTex, i.uv); float4 lineColor = tex2D(_LineTex, i.uv); diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 51c3ba1..9a8bfd6 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -124,7 +124,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.0.4 + bundleVersion: 0.0.5 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0