diff --git a/Editor/Scripts/ModelBaker/AnimationPrefab.cs b/Editor/Scripts/ModelBaker/AnimationPrefab.cs index 692ceb0..68d450b 100644 --- a/Editor/Scripts/ModelBaker/AnimationPrefab.cs +++ b/Editor/Scripts/ModelBaker/AnimationPrefab.cs @@ -14,25 +14,25 @@ namespace TAO.VertexAnimation.Editor parent = PrefabUtility.LoadPrefabContents(path); // Check setup. - if (!parent.TryGetComponent(out LODGroup _)) - { - parent.AddComponent(); - } + //if (!parent.TryGetComponent(out LODGroup _)) + //{ + // parent.AddComponent(); + //} - if (!parent.TryGetComponent(out VA_AnimatorComponentAuthoring _)) - { - parent.AddComponent(); - } + //if (!parent.TryGetComponent(out VA_AnimatorComponentAuthoring _)) + //{ + // parent.AddComponent(); + //} - if (!parent.TryGetComponent(out Unity.Entities.ConvertToEntity _)) - { - parent.AddComponent(); - } + //if (!parent.TryGetComponent(out Unity.Entities.ConvertToEntity _)) + //{ + // parent.AddComponent(); + //} } else { // Create parent. - parent = new GameObject(name, typeof(LODGroup), typeof(VA_AnimatorComponentAuthoring), typeof(Unity.Entities.ConvertToEntity)); + parent = new GameObject(name); } // Create all LODs. @@ -66,16 +66,16 @@ namespace TAO.VertexAnimation.Editor } child.transform.SetParent(parent.transform); - lods[i] = new LOD(lodTransitions[i], new Renderer[1] { mr }); + //lods[i] = new LOD(lodTransitions[i], new Renderer[1] { mr }); } - var lodGroup = parent.GetComponent(); - lodGroup.SetLODs(lods); - lodGroup.RecalculateBounds(); + //var lodGroup = parent.GetComponent(); + //lodGroup.SetLODs(lods); + //lodGroup.RecalculateBounds(); // Create prefab. GameObject prefab = PrefabUtility.SaveAsPrefabAssetAndConnect(parent, path, InteractionMode.AutomatedAction); - GameObject.DestroyImmediate(parent); + //GameObject.DestroyImmediate(parent); return prefab; } diff --git a/Editor/Scripts/ModelBaker/VA_ModelBaker.cs b/Editor/Scripts/ModelBaker/VA_ModelBaker.cs index 8fb5679..9046439 100644 --- a/Editor/Scripts/ModelBaker/VA_ModelBaker.cs +++ b/Editor/Scripts/ModelBaker/VA_ModelBaker.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using UnityEngine; using UnityEditor; +using UnityEngine.Experimental.Rendering; namespace TAO.VertexAnimation.Editor { @@ -155,6 +156,9 @@ namespace TAO.VertexAnimation.Editor // Get info. NamingConventionUtils.PositionMapInfo info = bakedData.GetPositionMap.name.GetTextureInfo(); + bakedData.mesh.SetTriangles( bakedData.mesh.triangles, 0 ); + meshes = new[] { bakedData.mesh }; + // Generate Material if (!AssetDatabaseUtils.HasChildAsset(this, material)) { diff --git a/Runtime/Scripts/ModelBaker/MeshCombiner.cs b/Runtime/Scripts/ModelBaker/MeshCombiner.cs index 9ebcd44..c0a2d69 100644 --- a/Runtime/Scripts/ModelBaker/MeshCombiner.cs +++ b/Runtime/Scripts/ModelBaker/MeshCombiner.cs @@ -5,9 +5,103 @@ using UnityEngine; using System.Collections.Generic; +using UnityEditor; +using UnityEngine.Rendering; namespace TAO.VertexAnimation { +public static class SkinnedMeshCombiner +{ + public static GameObject Combine(this SkinnedMeshRenderer target, List skinnedMeshRenderers, string name, Vector3 position, Quaternion rotation, Vector3 scale) + { + + List boneWeights = new List(); + List bones = new List(); + List combineInstances = new List(); + Material sharedMaterial = skinnedMeshRenderers[0].sharedMaterial; + Bounds newBounds = skinnedMeshRenderers[0].bounds; + int num = 0; + for( int i = 0; i < skinnedMeshRenderers.Count; ++i ) + { + SkinnedMeshRenderer skinnedMeshRenderer = skinnedMeshRenderers[i]; + BoneWeight[] bws = skinnedMeshRenderer.sharedMesh.boneWeights; + Transform[] bs = skinnedMeshRenderer.bones; + + for( int bwIndex = 0; bwIndex < bws.Length; ++bwIndex ) + { + BoneWeight boneWeight = bws[bwIndex]; + boneWeight.boneIndex0 += num; + boneWeight.boneIndex1 += num; + boneWeight.boneIndex2 += num; + boneWeight.boneIndex3 += num; + + boneWeights.Add( boneWeight ); + } + num += bs.Length; + + for( int boneIndex = 0; boneIndex < bs.Length; ++boneIndex ) + { + bones.Add( bs[boneIndex] ); + } + + CombineInstance combineInstance = new CombineInstance() + { + mesh = skinnedMeshRenderer.sharedMesh, + transform = skinnedMeshRenderer.transform.localToWorldMatrix + }; + combineInstances.Add( combineInstance ); + + if ( i > 0 ) + { + newBounds.Encapsulate( skinnedMeshRenderers[i].bounds ); + } + //skinnedMeshRenderer.enabled = false; + } + + List bindposes = new List(); + for( int i = 0; i < bones.Count; ++i ) + { + Transform bone = bones[i]; + bindposes.Add( bone.worldToLocalMatrix * target.transform.worldToLocalMatrix ); + + } + + SkinnedMeshRenderer combinedSkinnedMeshRenderer = target; + combinedSkinnedMeshRenderer.updateWhenOffscreen = false; + + combinedSkinnedMeshRenderer.sharedMesh = new Mesh(); + combinedSkinnedMeshRenderer.sharedMesh.indexFormat = IndexFormat.UInt32; + + if ( combineInstances.Count == 1 ) + { + combinedSkinnedMeshRenderer.sharedMesh = combineInstances[0].mesh; + } + else + { + combinedSkinnedMeshRenderer.sharedMesh.CombineMeshes( combineInstances.ToArray(), true, true ); + } + + foreach ( CombineInstance combineInstance in combineInstances ) + { + combinedSkinnedMeshRenderer.sharedMesh.subMeshCount += combineInstance.mesh.subMeshCount; + } + + combinedSkinnedMeshRenderer.sharedMaterials = new Material[combinedSkinnedMeshRenderer.sharedMesh.subMeshCount]; + for ( int i = 0; i < combinedSkinnedMeshRenderer.sharedMesh.subMeshCount; i++ ) + { + combinedSkinnedMeshRenderer.sharedMaterials[i] = sharedMaterial; + } + //combinedSkinnedMeshRenderer.sharedMaterial = sharedMaterial; + combinedSkinnedMeshRenderer.bones = bones.ToArray(); + combinedSkinnedMeshRenderer.sharedMesh.boneWeights = boneWeights.ToArray(); + combinedSkinnedMeshRenderer.sharedMesh.bindposes = bindposes.ToArray(); + combinedSkinnedMeshRenderer.sharedMesh.RecalculateBounds(); + //combinedSkinnedMeshRenderer.localBounds = new Bounds( new Vector3( 0.0f, 1.0f, 0.0f ), new Vector3( 0.5f, 1.0f, 0.5f ) ); + //AssetDatabase.CreateAsset( combinedSkinnedMeshRenderer.sharedMesh, $"Assets/CombinedSkinnedMeshRendererPrefabs/{name}(Mesh{System.DateTime.Now:MM_dd_yyyy-H_mm}).asset" ); + //AssetDatabase.SaveAssets(); + return target.gameObject; + } +} public static class MeshCombiner { private struct MaterialMeshGroup @@ -262,7 +356,7 @@ namespace TAO.VertexAnimation // Add target mesh. SkinnedMeshRenderer target = gameObject.AddComponent(); - target.Combine(skinnedMeshes, meshes); + target.Combine(skinnedMeshes, gameObject.name, gameObject.transform.position, gameObject.transform.rotation, gameObject.transform.localScale); } } } \ No newline at end of file diff --git a/Runtime/Scripts/ModelBaker/MeshCombiner.cs.meta b/Runtime/Scripts/ModelBaker/MeshCombiner.cs.meta index 3ba9ac3..15ed99a 100644 --- a/Runtime/Scripts/ModelBaker/MeshCombiner.cs.meta +++ b/Runtime/Scripts/ModelBaker/MeshCombiner.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f43224daff50a5042a182c6fb12440a8 +guid: e9d4c3f791214a29ac7c1238c9381900 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Runtime/Scripts/VA_Animation.cs b/Runtime/Scripts/VA_Animation.cs index d935bf2..f4564e3 100644 --- a/Runtime/Scripts/VA_Animation.cs +++ b/Runtime/Scripts/VA_Animation.cs @@ -16,13 +16,13 @@ namespace TAO.VertexAnimation public VA_AnimationData GetData() { // TODO: Fix data name, FixedString32 doesn't transfer from editor? - Data.name = new FixedString64(name); + Data.name = new FixedString64Bytes(name); return Data; } - public FixedString64 GetName() + public FixedString64Bytes GetName() { - return new FixedString64(this.name); + return new FixedString64Bytes(this.name); } } } \ No newline at end of file diff --git a/Runtime/Scripts/VA_AnimationDataComponentAuthoring.cs b/Runtime/Scripts/VA_AnimationDataComponentAuthoring.cs new file mode 100644 index 0000000..b9678bc --- /dev/null +++ b/Runtime/Scripts/VA_AnimationDataComponentAuthoring.cs @@ -0,0 +1,21 @@ +using Unity.Entities; +using Unity.Mathematics; +using UnityEngine; + +namespace TAO.VertexAnimation +{ + +public class VA_AnimationDataComponentAuthoring : MonoBehaviour +{ + public float4 Color; +} + +public class VA_AnimationDataBaker : Baker < VA_AnimationDataComponentAuthoring > +{ + public override void Bake( VA_AnimationDataComponentAuthoring authoring ) + { + //Entity parent = GetEntity( authoring.RootParent ); + AddComponent( new VaAnimationDataComponent{ Value = authoring.Color} ); + } +} +} diff --git a/Runtime/Scripts/VA_AnimationDataComponentAuthoring.cs.meta b/Runtime/Scripts/VA_AnimationDataComponentAuthoring.cs.meta new file mode 100644 index 0000000..bd611c8 --- /dev/null +++ b/Runtime/Scripts/VA_AnimationDataComponentAuthoring.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4fed86d3fa104b829db2922ca534f704 +timeCreated: 1670034530 \ No newline at end of file diff --git a/Runtime/Scripts/VA_AnimationLibraryComponentAuthoring.cs b/Runtime/Scripts/VA_AnimationLibraryComponentAuthoring.cs index 8d8e355..00c0be6 100644 --- a/Runtime/Scripts/VA_AnimationLibraryComponentAuthoring.cs +++ b/Runtime/Scripts/VA_AnimationLibraryComponentAuthoring.cs @@ -1,64 +1,100 @@ using Unity.Entities; using Unity.Collections; +using UnityEngine; +using Hash128 = Unity.Entities.Hash128; namespace TAO.VertexAnimation { - [UnityEngine.RequireComponent(typeof(ConvertToEntity))] - [UnityEngine.DisallowMultipleComponent] +[UnityEngine.DisallowMultipleComponent] public class VA_AnimationLibraryComponentAuthoring : UnityEngine.MonoBehaviour { - public VA_AnimationLibrary animationLibrary; - public bool debugMode = false; + public VA_AnimationLibrary AnimationLibrary; + public bool DebugMode = false; } - public class VA_AnimationLibraryConversionSystem : GameObjectConversionSystem +internal struct SkinnedMeshEntity : IBufferElementData +{ + public Entity Value; +} + +public struct VA_AnimationLibraryComponent : IComponentData +{ + public BlobAssetReference AnimLibAssetRef; + public BlobAssetStore BlobAssetStore; +} + +public class VA_AnimationLibraryComponentBaker : Baker < VA_AnimationLibraryComponentAuthoring > +{ + public override void Bake( VA_AnimationLibraryComponentAuthoring authoring ) { - // Static because of multi scene setup. - public static BlobAssetReference animLibAssetRef; - - protected override void OnUpdate() + authoring.AnimationLibrary.Init(); + VA_AnimationLibraryComponent animationLibrary = new VA_AnimationLibraryComponent(); + using (BlobBuilder blobBuilder = new BlobBuilder(Allocator.Temp)) { - Entities.ForEach((VA_AnimationLibraryComponentAuthoring animationLib) => + // Construct the root. + ref VA_AnimationLibraryData animationDataBlobAsset = ref blobBuilder.ConstructRoot(); + + // Set all the data. + BlobBuilderArray animationDataArray = blobBuilder.Allocate(ref animationDataBlobAsset.animations, authoring.AnimationLibrary.animationData.Count); + + for (int i = 0; i < animationDataArray.Length; i++) { - animationLib.animationLibrary.Init(); + // Copy data. + animationDataArray[i] = authoring.AnimationLibrary.animationData[i]; - // Blob builder to build. - using (BlobBuilder blobBuilder = new BlobBuilder(Allocator.Temp)) + if (authoring.DebugMode) { - // Construct the root. - ref VA_AnimationLibraryData animationDataBlobAsset = ref blobBuilder.ConstructRoot(); - - // Set all the data. - BlobBuilderArray animationDataArray = blobBuilder.Allocate(ref animationDataBlobAsset.animations, animationLib.animationLibrary.animationData.Count); - - for (int i = 0; i < animationDataArray.Length; i++) - { - // Copy data. - animationDataArray[i] = animationLib.animationLibrary.animationData[i]; - - if (animationLib.debugMode) - { - UnityEngine.Debug.Log("VA_AnimationLibrary added " + animationDataArray[i].name.ToString()); - } - } - - // Construct blob asset reference. - //BlobAssetReference animLibAssetRef = blobBuilder.CreateBlobAssetReference(Allocator.Persistent); - // Static because of multi scene setup. - animLibAssetRef = blobBuilder.CreateBlobAssetReference(Allocator.Persistent); - - // Add it to the asset store. - BlobAssetStore.TryAdd(new Hash128(VA_AnimationLibraryUtils.AnimationLibraryAssetStoreName), animLibAssetRef); - - if (animationLib.debugMode) - { - UnityEngine.Debug.Log("VA_AnimationLibrary has " + animLibAssetRef.Value.animations.Length.ToString() + " animations."); - } + UnityEngine.Debug.Log("VA_AnimationLibrary added " + animationDataArray[i].name.ToString()); } + } - // Remove the entity since we don't need it anymore. - DstEntityManager.DestroyEntity(GetPrimaryEntity(animationLib)); - }); + // Construct blob asset reference. + //BlobAssetReference animLibAssetRef = blobBuilder.CreateBlobAssetReference(Allocator.Persistent); + // Static because of multi scene setup. + animationLibrary.AnimLibAssetRef = blobBuilder.CreateBlobAssetReference(Allocator.Persistent); + Hash128 hash128 = new Hash128( VA_AnimationLibraryUtils.AnimationLibraryAssetStoreName ); + // Add it to the asset store. + animationLibrary.BlobAssetStore = new BlobAssetStore( 50); + animationLibrary.BlobAssetStore.TryAdd(hash128, ref animationLibrary.AnimLibAssetRef); + + if (authoring.DebugMode) + { + UnityEngine.Debug.Log("VA_AnimationLibrary has " + animationLibrary.AnimLibAssetRef.Value.animations.Length.ToString() + " animations."); + } + } + AddComponent( animationLibrary ); + + BlobAssetReference animLib = animationLibrary.AnimLibAssetRef; + + // Add animator to 'parent'. + VA_AnimatorComponent animatorComponent = new VA_AnimatorComponent + { + animationIndex = 0, + animationIndexNext = -1, + animationTime = 0, + animationLibrary = animLib + }; + AddComponent(animatorComponent); + var boneEntityArray = AddBuffer(); + + MeshRenderer[] skinnedMeshRenderers = + authoring.transform.GetComponentsInChildren < MeshRenderer >(); + boneEntityArray.ResizeUninitialized(skinnedMeshRenderers.Length); + + for (int boneIndex = 0; boneIndex < skinnedMeshRenderers.Length; ++boneIndex) + { + var boneEntity = GetEntity(skinnedMeshRenderers[boneIndex]); + boneEntityArray[boneIndex] = new SkinnedMeshEntity {Value = boneEntity}; } } +} + +//[GenerateAuthoringComponent] +public struct VA_AnimatorComponent : IComponentData +{ + public int animationIndex; + public int animationIndexNext; + public float animationTime; + public BlobAssetReference animationLibrary; +} } \ No newline at end of file diff --git a/Runtime/Scripts/VA_AnimationLibraryData.cs b/Runtime/Scripts/VA_AnimationLibraryData.cs index cdfdf3f..a5d62a6 100644 --- a/Runtime/Scripts/VA_AnimationLibraryData.cs +++ b/Runtime/Scripts/VA_AnimationLibraryData.cs @@ -6,7 +6,7 @@ namespace TAO.VertexAnimation [System.Serializable] public struct VA_AnimationData { - public VA_AnimationData(FixedString64 a_name, int a_frames, int a_maxFrames, int a_fps, int a_positionMapIndex, int a_colorMapIndex = -1) + public VA_AnimationData(FixedString64Bytes a_name, int a_frames, int a_maxFrames, int a_fps, int a_positionMapIndex, int a_colorMapIndex = -1) { name = a_name; frames = a_frames; @@ -18,7 +18,7 @@ namespace TAO.VertexAnimation } // The name of the animation. - public FixedString64 name; + public FixedString64Bytes name; // The frames in this animation. public int frames; // The maximum of frames the texture holds. @@ -42,7 +42,7 @@ namespace TAO.VertexAnimation { public const string AnimationLibraryAssetStoreName = "VA_AnimationLibrary"; - public static int GetAnimation(ref VA_AnimationLibraryData animationsRef, FixedString64 animationName) + public static int GetAnimation(ref VA_AnimationLibraryData animationsRef, FixedString64Bytes animationName) { for (int i = 0; i < animationsRef.animations.Length; i++) { diff --git a/Runtime/Scripts/VA_AnimatorComponentAuthoring.cs b/Runtime/Scripts/VA_AnimatorComponentAuthoring.cs index bfa9b5b..c48a0a5 100644 --- a/Runtime/Scripts/VA_AnimatorComponentAuthoring.cs +++ b/Runtime/Scripts/VA_AnimatorComponentAuthoring.cs @@ -5,54 +5,5 @@ using UnityEngine; namespace TAO.VertexAnimation { - [DisallowMultipleComponent] - public class VA_AnimatorComponentAuthoring : MonoBehaviour - { - - } - - //[GenerateAuthoringComponent] - public struct VA_AnimatorComponent : IComponentData - { - public int animationIndex; - public int animationIndexNext; - public float animationTime; - public BlobAssetReference animationLibrary; - } - - [UpdateAfter(typeof(VA_AnimationLibraryConversionSystem))] - public class VA_AnimatorConversionSystem : GameObjectConversionSystem - { - protected override void OnUpdate() - { - //BlobAssetStore.TryGet(new Unity.Entities.Hash128(VA_AnimationLibraryUtils.AnimationLibraryAssetStoreName), out BlobAssetReference animLib); - // Static because of multi scene setup. - BlobAssetReference animLib = VA_AnimationLibraryConversionSystem.animLibAssetRef; - - Entities.ForEach((VA_AnimatorComponentAuthoring animator) => - { - Entity entity = GetPrimaryEntity(animator); - - // Add animator to 'parent'. - VA_AnimatorComponent animatorComponent = new VA_AnimatorComponent - { - animationIndex = 0, - animationIndexNext = -1, - animationTime = 0, - animationLibrary = animLib - }; - DstEntityManager.AddComponentData(entity, animatorComponent); - - // Add the Material data to the children. - var children = animator.GetComponentsInChildren(); - for (int i = 0; i < children.Length; i++) - { - Entity ent = GetPrimaryEntity(children[i]); - - VA_AnimationDataComponent animationData = new VA_AnimationDataComponent(); - DstEntityManager.AddComponentData(ent, animationData); - } - }); - } - } + } diff --git a/Runtime/Scripts/VA_AnimatorSystem.cs b/Runtime/Scripts/VA_AnimatorSystem.cs index cff1a42..0b9a6e3 100644 --- a/Runtime/Scripts/VA_AnimatorSystem.cs +++ b/Runtime/Scripts/VA_AnimatorSystem.cs @@ -1,58 +1,52 @@ -using Unity.Entities; +using System.Collections.Generic; +using Unity.Entities; using Unity.Transforms; using Unity.Mathematics; namespace TAO.VertexAnimation { // System to update all the animations. - public class VA_AnimatorSystem : SystemBase + public partial class VA_AnimatorSystem : SystemBase { protected override void OnUpdate() { - var animationData = GetComponentDataFromEntity(false); - - Entities.ForEach((ref VA_AnimatorComponent ac, in DynamicBuffer children) => - { - for (int i = 0; i < children.Length; i++) + // This is only executed if we have a valid skinning setup + Entities + .ForEach((VA_AnimatorComponent animator, in DynamicBuffer bones) => { - // Get child. - Entity child = children[i].Value; - // Get the animation lib data. - ref VA_AnimationLibraryData animationsRef = ref ac.animationLibrary.Value; + ref VA_AnimationLibraryData animationsRef = ref animator.animationLibrary.Value; // Lerp animations. // Set animation for lerp. - int animationIndexNext = ac.animationIndexNext; - if (ac.animationIndexNext < 0) + int animationIndexNext = animator.animationIndexNext; + if (animator.animationIndexNext < 0) { - animationIndexNext = ac.animationIndex; + animationIndexNext = animator.animationIndex; + //animator.animationIndexNext = animationIndexNext + 1; } // Calculate next frame time for lerp. - float animationTimeNext = ac.animationTime + (1.0f / animationsRef.animations[animationIndexNext].maxFrames); + float animationTimeNext = animator.animationTime + (1.0f / animationsRef.animations[animationIndexNext].maxFrames); if (animationTimeNext > animationsRef.animations[animationIndexNext].duration) { // Set time. Using the difference to smooth out animations when looping. - animationTimeNext -= ac.animationTime; + animationTimeNext -= animator.animationTime; } - // Set material data. - animationData[child] = new VA_AnimationDataComponent + for ( int i = 0; i < bones.Length; i++ ) { - Value = new float4 + VaAnimationDataComponent vaAnimationDataComponent = new VaAnimationDataComponent(); + vaAnimationDataComponent.Value = new float4 { - x = ac.animationTime, - y = VA_AnimationLibraryUtils.GetAnimationMapIndex(ref animationsRef, ac.animationIndex), + x = animator.animationTime, + y = VA_AnimationLibraryUtils.GetAnimationMapIndex( ref animationsRef, animator.animationIndex ), z = animationTimeNext, - w = VA_AnimationLibraryUtils.GetAnimationMapIndex(ref animationsRef, animationIndexNext) - } - }; - } - }) - .WithNativeDisableContainerSafetyRestriction(animationData) - .WithName("VA_AnimatorSystem") - .ScheduleParallel(); + w = VA_AnimationLibraryUtils.GetAnimationMapIndex( ref animationsRef, animationIndexNext ) + }; + SystemAPI.SetComponent( bones[i].Value, vaAnimationDataComponent ); + } + }).Run(); } } } \ No newline at end of file diff --git a/Runtime/Scripts/VA_MaterialComponentData.cs b/Runtime/Scripts/VA_MaterialComponentData.cs index d613526..2a90afe 100644 --- a/Runtime/Scripts/VA_MaterialComponentData.cs +++ b/Runtime/Scripts/VA_MaterialComponentData.cs @@ -4,10 +4,12 @@ using Unity.Rendering; namespace TAO.VertexAnimation { - [MaterialProperty("_AnimationData", MaterialPropertyFormat.Float4)] - public struct VA_AnimationDataComponent : IComponentData - { - // animationTime, animationIndex, colorIndex, nan. - public float4 Value; - } +[MaterialProperty("_AnimationData")] //, MaterialPropertyFormat.Float4 +public struct VaAnimationDataComponent : IComponentData +{ + // animationTime, animationIndex, colorIndex, nan. + public float4 Value; +} + + } \ No newline at end of file diff --git a/Runtime/Shaders/Graphs/Lit.ShaderGraph b/Runtime/Shaders/Graphs/Lit.ShaderGraph index cd8ad9d..16f6692 100644 --- a/Runtime/Shaders/Graphs/Lit.ShaderGraph +++ b/Runtime/Shaders/Graphs/Lit.ShaderGraph @@ -1,5 +1,5 @@ { - "m_SGVersion": 2, + "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.GraphData", "m_ObjectId": "c285e49e032c4c3d925d9135ea1f8e89", "m_Properties": [ @@ -63,6 +63,12 @@ "m_Id": "cc15912931794ae79993f81f6f7efd62" } ], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "86fb5c9a8b5641de8066fe26b14b557c" + } + ], "m_Nodes": [ { "m_Id": "81f4b8eb7f418186969fad0762cb8ab8" @@ -109,9 +115,6 @@ { "m_Id": "82a97a731a634e92b7829f9d48acd24f" }, - { - "m_Id": "9d35a83053dd4bfeab773c504266bfb8" - }, { "m_Id": "907efe7641ef42f7871dd2405fd1a3bd" }, @@ -276,6 +279,12 @@ }, { "m_Id": "e436940e72cd4dfc9d2fc46fbcb08d19" + }, + { + "m_Id": "c3f529c5eeeb493387e492e27635091c" + }, + { + "m_Id": "a932c739a0d9425aa8c1ef6d9b354ff5" } ], "m_GroupDatas": [ @@ -1394,7 +1403,7 @@ "m_Id": "82a97a731a634e92b7829f9d48acd24f" }, { - "m_Id": "9d35a83053dd4bfeab773c504266bfb8" + "m_Id": "c3f529c5eeeb493387e492e27635091c" } ] }, @@ -1427,27 +1436,44 @@ }, { "m_Id": "ae27dbe6c62f4b9098f5b93f1f2780bd" + }, + { + "m_Id": "a932c739a0d9425aa8c1ef6d9b354ff5" } ] }, "m_PreviewData": { "serializedMesh": { - "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_SerializedMesh": "{\"mesh\":{\"fileID\":10205,\"guid\":\"0000000000000000e000000000000000\",\"type\":0}}", "m_Guid": "" - } + }, + "preventRotation": false }, "m_Path": "TAO", - "m_ConcretePrecision": 0, + "m_GraphPrecision": 0, + "m_PreviewMode": 2, "m_OutputNode": { "m_Id": "" }, "m_ActiveTargets": [ { - "m_Id": "5d6e8c3bdec441d892accc35decba207" + "m_Id": "50cd0b1080b746fe9c990a61b7bd3104" } ] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitData", + "m_ObjectId": "005e177df76b4383ad7b677d784637fc", + "m_RayTracing": false, + "m_MaterialType": 0, + "m_RefractionModel": 0, + "m_SSSTransmission": true, + "m_EnergyConservingSpecular": true, + "m_ClearCoat": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -1498,6 +1524,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, "m_CustomColors": { "m_SerializableColors": [] }, @@ -1545,6 +1573,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -1561,8 +1591,9 @@ "m_DisplayName": "SamplerState", "m_SlotType": 0, "m_Hidden": false, - "m_ShaderOutputName": "SamplerState_Linear_Repeat", - "m_StageCapability": 3 + "m_ShaderOutputName": "SamplerState_975a04061f8d4786bce18d1574108732", + "m_StageCapability": 3, + "m_BareResource": false } { @@ -1638,6 +1669,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -1715,17 +1748,24 @@ "m_GuidSerialized": "b1ea1c46-9dad-45c6-a833-b0ca7a7eb72e" }, "m_Name": "BaseMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Texture2D_FAFF6B06", "m_OverrideReferenceName": "_BaseMap", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": false, "m_Modifiable": true, "m_DefaultType": 0 } @@ -1790,6 +1830,7 @@ "m_Hidden": false, "m_ShaderOutputName": "Texture2DArray_c333595616b942739573e272a2bcc553", "m_StageCapability": 3, + "m_BareResource": false, "m_TextureArray": { "m_SerializedTexture": "{\"textureArray\":{\"instanceID\":0}}", "m_Guid": "" @@ -1873,6 +1914,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -1890,10 +1933,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -2527.000244140625, - "y": -474.9999694824219, - "width": 239.99998474121095, - "height": 398.0 + "x": -2528.0, + "y": -488.0000305175781, + "width": 237.33349609375, + "height": 400.0 } }, "m_Slots": [ @@ -1925,6 +1968,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -1944,7 +1989,9 @@ 509595180, -1112573420, -1634479697 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -2013,6 +2060,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -2099,12 +2148,17 @@ "m_GuidSerialized": "27540cfd-4bb2-4ac1-a2bd-769f94938217" }, "m_Name": "AlphaClipThreshhold", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_CC96E0E2", "m_OverrideReferenceName": "_AlphaClipThreshhold", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": 0.5, "m_FloatType": 1, @@ -2198,12 +2252,17 @@ "m_GuidSerialized": "d64d3aee-3dbe-46e3-ad7a-f260a05630bf" }, "m_Name": "Smoothness", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_E826F7F4", "m_OverrideReferenceName": "_Smoothness", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": 0.0, "m_FloatType": 1, @@ -2279,6 +2338,7 @@ "m_Hidden": false, "m_ShaderOutputName": "Texture", "m_StageCapability": 3, + "m_BareResource": false, "m_Texture": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" @@ -2315,6 +2375,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -2324,7 +2386,9 @@ ], "m_PropertyIds": [ 1192378022 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -2522,6 +2586,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -2539,7 +2605,8 @@ "m_SlotType": 0, "m_Hidden": false, "m_ShaderOutputName": "Sampler", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -2613,6 +2680,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -2669,6 +2738,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -2765,6 +2836,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -2774,7 +2847,9 @@ ], "m_PropertyIds": [ 1192378022 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -3010,6 +3085,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -3208,6 +3285,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -3230,6 +3309,28 @@ ] } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "50cd0b1080b746fe9c990a61b7bd3104", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "ec727ed5bb904d87b4a489bfbfcba6b0" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "TAO.VertexAnimation.Editor.LitGUI", + "m_SupportVFX": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.LerpNode", @@ -3265,6 +3366,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -3310,12 +3413,17 @@ "m_GuidSerialized": "241e52c1-f0f9-4980-ad50-a54a452dee72" }, "m_Name": "NormalStrength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_56580fdbb4ad4dc39d73f20ee06e5b56", "m_OverrideReferenceName": "_NormalStrength", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": 1.0, "m_FloatType": 0, @@ -3375,6 +3483,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -3418,6 +3528,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -3474,6 +3586,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -3617,25 +3731,13 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", - "m_ObjectId": "5d6e8c3bdec441d892accc35decba207", - "m_ActiveSubTarget": { - "m_Id": "e61d432149484d47bf07363b07a201dc" - }, - "m_SurfaceType": 0, - "m_AlphaMode": 0, - "m_TwoSided": false, - "m_AlphaClip": true, - "m_CustomEditorGUI": "TAO.VertexAnimation.Editor.LitGUI" -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -3714,6 +3816,20 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.LightingData", + "m_ObjectId": "60d74aca481d4338bd55ab3108507b6f", + "m_NormalDropOffSpace": 0, + "m_BlendPreserveSpecular": true, + "m_ReceiveDecals": true, + "m_ReceiveSSR": true, + "m_ReceiveSSRTransparent": false, + "m_SpecularAA": false, + "m_SpecularOcclusionMode": 1, + "m_OverrideBakedGI": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", @@ -3761,11 +3877,15 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_TextureType": 0, - "m_NormalMapSpace": 0 + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 } { @@ -3800,12 +3920,17 @@ "m_GuidSerialized": "6578b8f6-44ef-45ac-b645-75de3cbb5825" }, "m_Name": "EmissionColor", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Color_6D56F0DB", "m_OverrideReferenceName": "_EmissionColor", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": { "r": 0.0, @@ -3813,6 +3938,7 @@ "b": 0.0, "a": 0.0 }, + "isMainColor": false, "m_ColorMode": 1 } @@ -3842,6 +3968,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -3888,6 +4016,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -3917,6 +4047,38 @@ ] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", + "m_ObjectId": "6ae1534d2b9d454c925705a55d45aa65", + "m_MaterialNeedsUpdateHash": 529, + "m_SurfaceType": 0, + "m_RenderingPass": 1, + "m_BlendMode": 0, + "m_ZTest": 4, + "m_ZWrite": false, + "m_TransparentCullMode": 2, + "m_OpaqueCullMode": 2, + "m_SortPriority": 0, + "m_AlphaTest": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false, + "m_DoubleSidedMode": 0, + "m_DOTSInstancing": false, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, + "m_Version": 1, + "inspectorFoldoutMask": 9 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.UVNode", @@ -3943,6 +4105,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -3975,6 +4139,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4035,6 +4201,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -4114,6 +4282,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4145,12 +4315,17 @@ "m_GuidSerialized": "8664a328-0cd3-43c1-a367-b728c51ffb7c" }, "m_Name": "BaseColor", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Color_1975F252", "m_OverrideReferenceName": "_BaseColor", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": { "r": 1.0, @@ -4158,6 +4333,7 @@ "b": 1.0, "a": 0.0 }, + "isMainColor": false, "m_ColorMode": 0 } @@ -4215,6 +4391,30 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "769ef3bffef244f2b0c098e896e3a412", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -4241,6 +4441,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4272,19 +4474,25 @@ } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", "m_ObjectId": "7c33c1d673e94bbeb1b275184439bab2", "m_Guid": { "m_GuidSerialized": "fd4d176e-6a60-4dc9-9bc2-75c409513d2a" }, "m_Name": "UseInterpolation", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "BOOLEAN_7C33C1D673E94BBEB1B275184439BAB2_ON", "m_OverrideReferenceName": "USE_INTERPOLATION_ON", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -4349,6 +4557,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -4380,6 +4590,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4414,6 +4626,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4467,6 +4681,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4486,7 +4702,9 @@ 509595180, -1112573420, -1634479697 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -4522,7 +4740,74 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "86fb5c9a8b5641de8066fe26b14b557c", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "73615b790d14838d808dcc75cf6c7d47" + }, + { + "m_Id": "0d45416d8d660a86b6c005d732a53eaa" + }, + { + "m_Id": "2050e0ab6209188987441943ce1d9601" + }, + { + "m_Id": "dce6400ed295b5879db60d50219be7f8" + }, + { + "m_Id": "56580fdbb4ad4dc39d73f20ee06e5b56" + }, + { + "m_Id": "a4f03e6e3684788ba75400817834c667" + }, + { + "m_Id": "9b352a6846488e8380fa03d9459132c3" + }, + { + "m_Id": "2303ebb861eedd879cdeb61953663a11" + }, + { + "m_Id": "647973c6b9d7d08e89b6831ff21aaaf0" + }, + { + "m_Id": "ef585cca41ba4bd3858cb09898ac8d26" + }, + { + "m_Id": "f105625e9ef44d4c898f7ed315000014" + }, + { + "m_Id": "b8ee11fe1178410a95b7b678347777ae" + }, + { + "m_Id": "d8e6dd9d0f5b4f75a95867330e06f4e6" + }, + { + "m_Id": "a26112f7a84a474fb5edbe1546f1d72b" + }, + { + "m_Id": "b9e013614c534e1cb383404d0ee936b9" + }, + { + "m_Id": "f9e1cb1197da47409d5a9dd9b809de80" + }, + { + "m_Id": "7c33c1d673e94bbeb1b275184439bab2" + }, + { + "m_Id": "91eff99b70f0413a8f826a9f717ac3b6" + }, + { + "m_Id": "cc15912931794ae79993f81f6f7efd62" + } + ] } { @@ -4688,6 +4973,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -4729,25 +5016,33 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", "m_ObjectId": "91eff99b70f0413a8f826a9f717ac3b6", "m_Guid": { "m_GuidSerialized": "ec07dc77-11ca-452e-bc93-85ce1a68f88e" }, "m_Name": "UseNormalMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "BOOLEAN_91EFF99B70F0413A8F826A9F717AC3B6_ON", "m_OverrideReferenceName": "USE_NORMALMAP_ON", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -4800,11 +5095,15 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_TextureType": 0, - "m_NormalMapSpace": 0 + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 } { @@ -4860,6 +5159,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -5034,6 +5335,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5074,6 +5377,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5154,6 +5459,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5170,12 +5477,17 @@ "m_GuidSerialized": "629fbb17-fc38-4d83-b6f7-878a14786f8b" }, "m_Name": "Metalness", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_72474321", "m_OverrideReferenceName": "_Metalness", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": 0.0, "m_FloatType": 1, @@ -5194,7 +5506,8 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -5226,43 +5539,13 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "9d35a83053dd4bfeab773c504266bfb8", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Tangent", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "ea28f02b20e44ebda7dbeb47c8ab8af1" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Tangent" -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -5338,7 +5621,8 @@ "m_SlotType": 0, "m_Hidden": false, "m_ShaderOutputName": "Sampler", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -5349,9 +5633,14 @@ "m_GuidSerialized": "be8a21bb-997f-49f5-adff-8dde83813969" }, "m_Name": "PositionMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Texture2DArray_a26112f7a84a474fb5edbe1546f1d72b", "m_OverrideReferenceName": "_PositionMap", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -5389,6 +5678,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5423,6 +5714,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5511,17 +5804,24 @@ "m_GuidSerialized": "3e3fb8dd-ad7d-435a-80c8-0cca0f6a198a" }, "m_Name": "MaskMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Texture2D_3E939B7", "m_OverrideReferenceName": "_MaskMap", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": true, "m_Modifiable": true, "m_DefaultType": 0 } @@ -5569,6 +5869,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5609,11 +5911,47 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a932c739a0d9425aa8c1ef6d9b354ff5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Specular", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ab9067a4ca7b43dc9ae35bb2b9524ae6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Specular" +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -5662,6 +6000,25 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", + "m_ObjectId": "aa3231a9e59c4c9996ea8e38c7549e52", + "m_Distortion": false, + "m_DistortionMode": 0, + "m_DistortionDepthTest": true, + "m_AddPrecomputedVelocity": false, + "m_TransparentWritesMotionVec": false, + "m_DepthOffset": false, + "m_ConservativeDepthOffset": false, + "m_TransparencyFog": true, + "m_AlphaTestShadow": false, + "m_BackThenFrontRendering": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -5688,6 +6045,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5704,6 +6063,7 @@ "m_Hidden": false, "m_ShaderOutputName": "Texture", "m_StageCapability": 3, + "m_BareResource": false, "m_Texture": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" @@ -5711,6 +6071,36 @@ "m_DefaultType": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "ab9067a4ca7b43dc9ae35bb2b9524ae6", + "m_Id": 0, + "m_DisplayName": "Specular Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Specular", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -5819,6 +6209,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -5850,6 +6242,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5914,7 +6308,8 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -5949,6 +6344,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -5966,7 +6363,8 @@ "m_SlotType": 0, "m_Hidden": false, "m_ShaderOutputName": "Sampler", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -5992,12 +6390,17 @@ "m_GuidSerialized": "b6fa6f51-6712-45cc-a398-a04bb8777468" }, "m_Name": "MaxFrames", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_b8ee11fe1178410a95b7b678347777ae", "m_OverrideReferenceName": "_MaxFrames", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": 0.0, "m_FloatType": 2, @@ -6033,19 +6436,25 @@ } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", "m_ObjectId": "b9e013614c534e1cb383404d0ee936b9", "m_Guid": { "m_GuidSerialized": "416e5d06-22ba-446c-a133-37a773135edb" }, "m_Name": "FlipPositionMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "BOOLEAN_B9E013614C534E1CB383404D0EE936B9_ON", "m_OverrideReferenceName": "VA_FLIP_UVS_ON", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -6131,6 +6540,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 1, "m_CustomColors": { "m_SerializableColors": [] }, @@ -6189,12 +6600,48 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, "m_CustomColors": { "m_SerializableColors": [] }, "m_Space": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "c3f529c5eeeb493387e492e27635091c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "769ef3bffef244f2b0c098e896e3a412" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -6207,10 +6654,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -2682.000244140625, - "y": -338.9999694824219, - "width": 136.0, - "height": 34.0 + "x": -2695.333251953125, + "y": -349.33331298828127, + "width": 137.333251953125, + "height": 36.0 } }, "m_Slots": [ @@ -6221,6 +6668,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -6295,6 +6744,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -6404,6 +6855,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -6462,6 +6915,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -6538,23 +6993,30 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", "m_ObjectId": "cc15912931794ae79993f81f6f7efd62", "m_Guid": { "m_GuidSerialized": "c85b3983-2358-48e5-9289-79b549b771e9" }, "m_Name": "UseEmissionMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "BOOLEAN_CC15912931794AE79993F81F6F7EFD62_ON", "m_OverrideReferenceName": "USE_EMISSIONMAP_ON", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -6568,8 +7030,9 @@ "m_DisplayName": "SamplerState", "m_SlotType": 0, "m_Hidden": false, - "m_ShaderOutputName": "SamplerState_Linear_Repeat", - "m_StageCapability": 3 + "m_ShaderOutputName": "SamplerState_975a04061f8d4786bce18d1574108732", + "m_StageCapability": 3, + "m_BareResource": false } { @@ -6604,6 +7067,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -6676,11 +7141,15 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_TextureType": 1, - "m_NormalMapSpace": 0 + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 } { @@ -6805,7 +7274,8 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -6864,6 +7334,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -6879,6 +7351,7 @@ "m_Hidden": false, "m_ShaderOutputName": "Texture", "m_StageCapability": 3, + "m_BareResource": false, "m_Texture": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" @@ -7129,9 +7602,14 @@ "m_GuidSerialized": "1ae6efb7-4b10-4256-8b3d-b26b7ccccde1" }, "m_Name": "AnimationData", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector4_d8e6dd9d0f5b4f75a95867330e06f4e6", "m_OverrideReferenceName": "_AnimationData", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": true, "hlslDeclarationOverride": 3, @@ -7170,6 +7648,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7188,6 +7668,7 @@ "m_Hidden": false, "m_ShaderOutputName": "Texture", "m_StageCapability": 3, + "m_BareResource": false, "m_Texture": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" @@ -7238,6 +7719,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7246,6 +7729,12 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitSubTarget", + "m_ObjectId": "dca6cccbddd64c21acc4b47558729667" +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", @@ -7254,17 +7743,24 @@ "m_GuidSerialized": "df707a47-db95-405a-97c4-a2d89fcd61a0" }, "m_Name": "NormalMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Texture2D_E3942DC8", "m_OverrideReferenceName": "_NormalMap", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": true, "m_Modifiable": true, "m_DefaultType": 3 } @@ -7319,6 +7815,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7384,6 +7882,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7507,6 +8007,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7547,6 +8049,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7572,15 +8076,6 @@ ] } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", - "m_ObjectId": "e61d432149484d47bf07363b07a201dc", - "m_WorkflowMode": 1, - "m_NormalDropOffSpace": 0, - "m_ClearCoat": false -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.GroupData", @@ -7705,30 +8200,6 @@ "m_Labels": [] } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", - "m_ObjectId": "ea28f02b20e44ebda7dbeb47c8ab8af1", - "m_Id": 0, - "m_DisplayName": "Tangent", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Tangent", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.LerpNode", @@ -7764,6 +8235,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -7795,12 +8268,24 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_SerializedDescriptor": "SurfaceDescription.Emission" } +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "ec727ed5bb904d87b4a489bfbfcba6b0", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0, + "m_ClearCoat": false, + "m_BlendModePreserveSpecular": true +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -7845,6 +8330,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -7917,6 +8404,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -7931,17 +8420,24 @@ "m_GuidSerialized": "b8c76c8e-26fd-4144-8fd2-c1092633e2f0" }, "m_Name": "EmissionMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Texture2D_ef585cca41ba4bd3858cb09898ac8d26", "m_OverrideReferenceName": "_EmissionMap", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": { "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": true, "m_Modifiable": true, "m_DefaultType": 0 } @@ -7956,6 +8452,7 @@ "m_Hidden": false, "m_ShaderOutputName": "Texture2DArray_c333595616b942739573e272a2bcc553", "m_StageCapability": 3, + "m_BareResource": false, "m_TextureArray": { "m_SerializedTexture": "{\"textureArray\":{\"instanceID\":0}}", "m_Guid": "" @@ -7994,6 +8491,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -8083,12 +8582,17 @@ "m_GuidSerialized": "05f7483d-8755-4e61-9a50-b4c237bcaffa" }, "m_Name": "TilingAndOffset", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector4_f105625e9ef44d4c898f7ed315000014", "m_OverrideReferenceName": "_TilingAndOffset", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, "m_Hidden": false, "m_Value": { "x": 1.0, @@ -8193,6 +8697,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] } @@ -8207,7 +8713,8 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -8284,6 +8791,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -8333,19 +8842,25 @@ } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", "m_ObjectId": "f9e1cb1197da47409d5a9dd9b809de80", "m_Guid": { "m_GuidSerialized": "e9246a9c-8c97-4448-860d-375ca8b59975" }, "m_Name": "UseNormal(A)", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "BOOLEAN_F9E1CB1197DA47409D5A9DD9B809DE80_ON", "m_OverrideReferenceName": "USE_NORMALA_ON", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -8398,11 +8913,15 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_TextureType": 0, - "m_NormalMapSpace": 0 + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 } { @@ -8448,6 +8967,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -8465,7 +8986,8 @@ "m_SlotType": 0, "m_Hidden": false, "m_ShaderOutputName": "Sampler", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { diff --git a/Runtime/Shaders/HLSL/VertexAnimation.hlsl b/Runtime/Shaders/HLSL/VertexAnimation.hlsl index 5cfece6..c68cfaf 100644 --- a/Runtime/Shaders/HLSL/VertexAnimation.hlsl +++ b/Runtime/Shaders/HLSL/VertexAnimation.hlsl @@ -2,9 +2,25 @@ #ifndef VERTEXANIMATIONUTILS_INCLUDED #define VERTEX_ANIMATION_INCLUDED -#include "VectorEncodingDecoding.hlsl" + #include "SampleTexture2DArrayLOD.hlsl" +void CALC_VA_UV_float(float2 uv, int maxFrames, float time, out float2 uvPosition) +{ + float timeInFrames = frac(time); + timeInFrames = ceil(timeInFrames * maxFrames); + timeInFrames /= maxFrames; + timeInFrames += round(1.0f / maxFrames); + + uvPosition.x = uv.x; + + #ifdef VA_FLIP_UVS_ON + uvPosition.y = (1.0f - (timeInFrames)) + (1.0f - (1.0f - uv.y)); + #else + uvPosition.y = (1.0f - (1.0f - uv.y) - (1.0f - (timeInFrames))); + #endif +} + float2 VA_UV_float(float2 uv, int maxFrames, float time) { float2 uvPosition; diff --git a/Runtime/Shaders/SubGraphs/VA_ARRAY.shadersubgraph b/Runtime/Shaders/SubGraphs/VA_ARRAY.shadersubgraph index ea74693..ecf3079 100644 --- a/Runtime/Shaders/SubGraphs/VA_ARRAY.shadersubgraph +++ b/Runtime/Shaders/SubGraphs/VA_ARRAY.shadersubgraph @@ -1,5 +1,5 @@ { - "m_SGVersion": 2, + "m_SGVersion": 3, "m_Type": "UnityEditor.ShaderGraph.GraphData", "m_ObjectId": "144dcb1a2d15470a91360080bc9bd989", "m_Properties": [ @@ -23,6 +23,12 @@ } ], "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "7b54f901e6934a3f86974515753934c1" + } + ], "m_Nodes": [ { "m_Id": "031d019a3f114a639fed0a731159883c" @@ -183,10 +189,12 @@ "serializedMesh": { "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", "m_Guid": "" - } + }, + "preventRotation": false }, "m_Path": "Sub Graphs", - "m_ConcretePrecision": 0, + "m_GraphPrecision": 0, + "m_PreviewMode": 2, "m_OutputNode": { "m_Id": "031d019a3f114a639fed0a731159883c" }, @@ -222,6 +230,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -254,7 +264,8 @@ "m_SlotType": 0, "m_Hidden": false, "m_ShaderOutputName": "texSampler", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": true } { @@ -283,6 +294,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -317,6 +330,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -334,7 +349,8 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -369,6 +385,33 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "7b54f901e6934a3f86974515753934c1", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "c333595616b942739573e272a2bcc553" + }, + { + "m_Id": "a09a6ce7e08545d99b5bda70586f4e79" + }, + { + "m_Id": "975a04061f8d4786bce18d1574108732" + }, + { + "m_Id": "f9b649ed28584dca8a522f3fb582f350" + }, + { + "m_Id": "967e0c2bcb6e48c2b85b82c6d4c734a4" + }, + { + "m_Id": "cc4eba55004546408c4665cdb22d3111" + } + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", @@ -409,21 +452,21 @@ } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", "m_ObjectId": "83aca69ecbd845e888867dea88a660f1", "m_Group": { "m_Id": "" }, - "m_Name": "Custom Function", + "m_Name": "VA_ARRAY (Custom Function)", "m_DrawState": { "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -405.0, - "y": -144.0, - "width": 237.99998474121095, - "height": 494.0 + "x": -402.66668701171877, + "y": -148.0, + "width": 237.33331298828126, + "height": 399.9999694824219 } }, "m_Slots": [ @@ -455,6 +498,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -496,12 +541,17 @@ "m_GuidSerialized": "26e53708-434a-4d58-b8b2-d8fb8005d644" }, "m_Name": "MaxFrames", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_967e0c2bcb6e48c2b85b82c6d4c734a4", "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": 0.0, "m_FloatType": 0, @@ -512,23 +562,29 @@ } { - "m_SGVersion": 0, + "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.SamplerStateShaderProperty", "m_ObjectId": "975a04061f8d4786bce18d1574108732", "m_Guid": { "m_GuidSerialized": "374e9a5f-1ef4-43a2-9ff2-6108a1976ab0" }, "m_Name": "SamplerState", - "m_DefaultReferenceName": "", - "m_OverrideReferenceName": "SamplerState_Linear_Repeat", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "SamplerState_975a04061f8d4786bce18d1574108732", + "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, "m_Hidden": false, "m_Value": { "m_filter": 0, - "m_wrap": 0 + "m_wrap": 0, + "m_anisotropic": 0 } } @@ -540,12 +596,17 @@ "m_GuidSerialized": "96fb959c-8624-4642-9ac6-6b405b5a6dd4" }, "m_Name": "UV", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector2_a09a6ce7e08545d99b5bda70586f4e79", "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": { "x": 0.0, @@ -642,6 +703,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -660,6 +723,7 @@ "m_Hidden": false, "m_ShaderOutputName": "positionMap", "m_StageCapability": 3, + "m_BareResource": true, "m_TextureArray": { "m_SerializedTexture": "{\"textureArray\":{\"instanceID\":0}}", "m_Guid": "" @@ -718,15 +782,20 @@ "m_GuidSerialized": "484a186e-c3de-457f-80e1-65e0ac649faf" }, "m_Name": "PositionMap", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Texture2DArray_c333595616b942739573e272a2bcc553", "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, "m_Hidden": false, "m_Value": { - "m_SerializedTexture": "{\"textureArray\":{\"instanceID\":0}}", + "m_SerializedTexture": "{\"textureArray\":{\"fileID\":3909434844059189716,\"guid\":\"7211d85b1ff94194f9be9f44b460b472\",\"type\":2}}", "m_Guid": "" }, "m_Modifiable": true @@ -758,6 +827,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -774,12 +845,17 @@ "m_GuidSerialized": "3f779194-c6e4-40be-9134-677bb0c69785" }, "m_Name": "PositionMapIndex", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_cc4eba55004546408c4665cdb22d3111", "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": true, - "hlslDeclarationOverride": 3, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": 0.0, "m_FloatType": 0, @@ -798,7 +874,8 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "Out", - "m_StageCapability": 3 + "m_StageCapability": 3, + "m_BareResource": false } { @@ -827,6 +904,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -878,6 +957,8 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, @@ -894,12 +975,17 @@ "m_GuidSerialized": "07478aa4-3d18-4430-bf12-24688db601b8" }, "m_Name": "Time", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", "m_DefaultReferenceName": "Vector1_f9b649ed28584dca8a522f3fb582f350", "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 2, "m_Hidden": false, "m_Value": 0.0, "m_FloatType": 0, diff --git a/Runtime/TAO.VertexAnimation.asmdef b/Runtime/TAO.VertexAnimation.asmdef index cf7b1b2..856995e 100644 --- a/Runtime/TAO.VertexAnimation.asmdef +++ b/Runtime/TAO.VertexAnimation.asmdef @@ -8,7 +8,8 @@ "GUID:7a450cf7ca9694b5a8bfa3fd83ec635a", "GUID:a5baed0c9693541a5bd947d336ec7659", "GUID:d8b63aba1907145bea998dd612889d6b", - "GUID:e0cd26848372d4e5c891c569017e11f1" + "GUID:e0cd26848372d4e5c891c569017e11f1", + "GUID:c6266fb6386056f4b9e71740697607ca" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/package.json b/package.json index 3aeaa56..fdaa3a2 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,7 @@ ], "dependencies": { "com.unity.entities": "0.16.0-preview.21", - "com.unity.render-pipelines.universal": "10.2.2", - "com.unity.shadergraph": "10.2.2", - "com.unity.rendering.hybrid": "0.10.0-preview.21" + "com.unity.shadergraph": "10.2.2" }, "hideInEditor": false } \ No newline at end of file