diff --git a/GPUAnimationExamples/Assets/ForwardRenderer.asset b/GPUAnimationExamples/Assets/ForwardRenderer.asset new file mode 100644 index 0000000..1096d69 --- /dev/null +++ b/GPUAnimationExamples/Assets/ForwardRenderer.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: ForwardRenderer + m_EditorClassIdentifier: + m_RendererFeatures: [] + postProcessData: {fileID: 0} + shaders: + blitPS: {fileID: 0} + copyDepthPS: {fileID: 0} + screenSpaceShadowPS: {fileID: 0} + samplingPS: {fileID: 0} + fallbackErrorPS: {fileID: 0} + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 0 + failOperation: 0 + zFailOperation: 0 diff --git a/GPUAnimationExamples/Assets/Plugins/Editor.meta b/GPUAnimationExamples/Assets/ForwardRenderer.asset.meta similarity index 54% rename from GPUAnimationExamples/Assets/Plugins/Editor.meta rename to GPUAnimationExamples/Assets/ForwardRenderer.asset.meta index eba45dc..d1683ca 100644 --- a/GPUAnimationExamples/Assets/Plugins/Editor.meta +++ b/GPUAnimationExamples/Assets/ForwardRenderer.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 732e4eafbd87240c0b8d53defddf50fa -folderAsset: yes -DefaultImporter: +guid: a96f09cf5d2cf4f6b9c3e892861ceb03 +NativeFormatImporter: externalObjects: {} + mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: diff --git a/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains.meta b/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains.meta deleted file mode 100644 index ef61ef3..0000000 --- a/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2b42abc3aee584b6eaefddfdd2b62bf8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll b/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll deleted file mode 100644 index 6e892a2..0000000 Binary files a/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll and /dev/null differ diff --git a/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta b/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta deleted file mode 100644 index 20f8500..0000000 --- a/GPUAnimationExamples/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta +++ /dev/null @@ -1,30 +0,0 @@ -fileFormatVersion: 2 -guid: 4e21a7ab239ab4d83af9b4998cc2a112 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/GPUAnimationExamples/Assets/Scripts/SimpleAnim.cs b/GPUAnimationExamples/Assets/Scripts/SimpleAnim.cs index 9f63d4c..19f0f41 100644 --- a/GPUAnimationExamples/Assets/Scripts/SimpleAnim.cs +++ b/GPUAnimationExamples/Assets/Scripts/SimpleAnim.cs @@ -58,6 +58,6 @@ public void Execute(Entity entity, int index, ref SimpleAnim simple, ref GPUAnim protected override JobHandle OnUpdate(JobHandle inputDeps) { - return new SimpleAnimJob { DeltaTime = Time.deltaTime}.Schedule(this, inputDeps); + return new SimpleAnimJob { DeltaTime = Time.DeltaTime}.Schedule(this, inputDeps); } } \ No newline at end of file diff --git a/GPUAnimationExamples/Assets/SkeletonAssets/minionGPU LOD0.prefab b/GPUAnimationExamples/Assets/SkeletonAssets/minionGPU LOD0.prefab index a89ba7b..8d88f92 100644 --- a/GPUAnimationExamples/Assets/SkeletonAssets/minionGPU LOD0.prefab +++ b/GPUAnimationExamples/Assets/SkeletonAssets/minionGPU LOD0.prefab @@ -57,10 +57,6 @@ PrefabInstance: propertyPath: m_LocalPosition.z value: 1.09 objectReference: {fileID: 0} - - target: {fileID: 13700000, guid: 325d845a8317c2240905bd464b84d6f8, type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 01262259b8597f34886395bfc78a3dac, type: 2} - target: {fileID: 11100000, guid: 325d845a8317c2240905bd464b84d6f8, type: 3} propertyPath: m_Animations.Array.size value: 1 @@ -77,6 +73,10 @@ PrefabInstance: propertyPath: m_Animations.Array.data[0] value: objectReference: {fileID: 7400000, guid: e2cbc102bf5423f43a12c4cf95311af8, type: 3} + - target: {fileID: 13700000, guid: 325d845a8317c2240905bd464b84d6f8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 01262259b8597f34886395bfc78a3dac, type: 2} m_RemovedComponents: - {fileID: 11100000, guid: 325d845a8317c2240905bd464b84d6f8, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 325d845a8317c2240905bd464b84d6f8, type: 3} diff --git a/GPUAnimationExamples/Packages/manifest.json b/GPUAnimationExamples/Packages/manifest.json index 4b500b6..fbe7ff0 100644 --- a/GPUAnimationExamples/Packages/manifest.json +++ b/GPUAnimationExamples/Packages/manifest.json @@ -1,9 +1,20 @@ { "dependencies": { + "com.unity.2d.sprite": "1.0.0", + "com.unity.2d.tilemap": "1.0.0", + "com.unity.burst": "1.2.1", + "com.unity.entities": "0.5.1-preview.11", "com.unity.gpuanimation": "file:../../com.unity.gpuanimation", - "com.unity.package-manager-ui": "2.1.2", - "com.unity.render-pipelines.lightweight": "5.16.1", + "com.unity.ide.rider": "1.1.4", + "com.unity.ide.vscode": "1.1.4", + "com.unity.render-pipelines.core": "7.1.6", + "com.unity.render-pipelines.lightweight": "7.1.6", + "com.unity.render-pipelines.universal": "7.1.6", + "com.unity.shadergraph": "7.1.6", + "com.unity.test-framework": "1.1.9", + "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", diff --git a/GPUAnimationExamples/ProjectSettings/EditorSettings.asset b/GPUAnimationExamples/ProjectSettings/EditorSettings.asset index 9402756..bad08f7 100644 --- a/GPUAnimationExamples/ProjectSettings/EditorSettings.asset +++ b/GPUAnimationExamples/ProjectSettings/EditorSettings.asset @@ -3,19 +3,33 @@ --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 - serializedVersion: 7 + serializedVersion: 9 m_ExternalVersionControlSupport: Visible Meta Files m_SerializationMode: 2 m_LineEndingsForNewScripts: 2 m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} m_SpritePackerMode: 0 m_SpritePackerPaddingPower: 1 m_EtcTextureCompressorBehavior: 1 m_EtcTextureFastCompressor: 1 m_EtcTextureNormalCompressor: 2 m_EtcTextureBestCompressor: 4 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref m_ProjectGenerationRootNamespace: - m_UserGeneratedProjectSuffix: m_CollabEditorSettings: inProgressEnabled: 1 + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_ShowLightmapResolutionOverlay: 1 + m_UseLegacyProbeSampleCount: 1 + m_AssetPipelineMode: 1 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 diff --git a/GPUAnimationExamples/ProjectSettings/InputManager.asset b/GPUAnimationExamples/ProjectSettings/InputManager.asset index 2596646..b16147e 100644 --- a/GPUAnimationExamples/ProjectSettings/InputManager.asset +++ b/GPUAnimationExamples/ProjectSettings/InputManager.asset @@ -1,295 +1,487 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!13 &1 -InputManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Axes: - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: a - altPositiveButton: d - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: s - altPositiveButton: w - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: mouse 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: mouse 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left shift - altNegativeButton: - altPositiveButton: mouse 2 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: space - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse X - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse Y - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse ScrollWheel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 2 - joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: enter - altNegativeButton: - altPositiveButton: space - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Cancel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: escape - altNegativeButton: - altPositiveButton: joystick button 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Enable Debug Button 1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: joystick button 8 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Enable Debug Button 2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: backspace + altNegativeButton: + altPositiveButton: joystick button 9 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Reset + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Next + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: page down + altNegativeButton: + altPositiveButton: joystick button 5 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Previous + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: page up + altNegativeButton: + altPositiveButton: joystick button 4 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Validate + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Persistent + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: right shift + altNegativeButton: + altPositiveButton: joystick button 2 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Multiplier + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: joystick button 3 + gravity: 0 + dead: 0 + sensitivity: 0 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 2 + axis: 6 + joyNum: 0 + - serializedVersion: 3 + m_Name: Debug Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 2 + axis: 5 + joyNum: 0 diff --git a/GPUAnimationExamples/ProjectSettings/ProjectSettings.asset b/GPUAnimationExamples/ProjectSettings/ProjectSettings.asset index 781c81d..082353d 100644 --- a/GPUAnimationExamples/ProjectSettings/ProjectSettings.asset +++ b/GPUAnimationExamples/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 16 + serializedVersion: 20 productGUID: d200e57b2bb9f464f964fbba9432033c AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -52,8 +52,7 @@ PlayerSettings: m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 - iosAppInBackgroundBehavior: 0 - displayResolutionDialog: 1 + iosUseCustomAppBackgroundBehavior: 0 iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 @@ -65,6 +64,7 @@ PlayerSettings: disableDepthAndStencilBuffers: 0 androidStartInFullscreen: 1 androidRenderOutsideSafeArea: 1 + androidUseSwappy: 0 androidBlitType: 1 defaultIsNativeResolution: 1 macRetinaSupport: 1 @@ -79,11 +79,11 @@ PlayerSettings: usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 + useFlipModelSwapchain: 1 resizableWindow: 0 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games gpuSkinning: 1 - graphicsJobs: 0 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 xboxEnableKinect: 0 @@ -91,7 +91,6 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 - graphicsJobMode: 0 fullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 @@ -111,6 +110,7 @@ PlayerSettings: switchNVNShaderPoolsGranularity: 33554432 switchNVNDefaultPoolsGranularity: 16777216 switchNVNOtherPoolsGranularity: 16777216 + vulkanNumSwapchainBuffers: 3 vulkanEnableSetSRGBWrite: 0 m_SupportedAspectRatios: 4:3: 1 @@ -148,11 +148,14 @@ PlayerSettings: oculus: sharedDepthBuffer: 0 dashSupport: 0 + lowOverheadMode: 0 + protectedContext: 0 + v2Signing: 1 enable360StereoCapture: 0 isWsaHolographicRemotingEnabled: 0 - protectGraphicsMemory: 0 enableFrameTimingStats: 0 useHDRDisplay: 0 + D3DHDRBitDepth: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 @@ -161,7 +164,7 @@ PlayerSettings: applicationIdentifier: {} buildNumber: {} AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 16 + AndroidMinSdkVersion: 19 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: @@ -176,10 +179,10 @@ PlayerSettings: StripUnusedMeshComponents: 1 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 9.0 + iOSTargetOSVersionString: 10.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 9.0 + tvOSTargetOSVersionString: 10.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -267,7 +270,8 @@ PlayerSettings: height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 - resolutionDialogBanner: {fileID: 0} + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 m_BuildTargetIcons: [] m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: @@ -286,6 +290,38 @@ PlayerSettings: - m_BuildTarget: WebGL m_StaticBatching: 0 m_DynamicBatching: 0 + m_BuildTargetGraphicsJobs: + - m_BuildTarget: MacStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: Switch + m_GraphicsJobs: 0 + - m_BuildTarget: MetroSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AppleTVSupport + m_GraphicsJobs: 0 + - m_BuildTarget: BJMSupport + m_GraphicsJobs: 0 + - m_BuildTarget: LinuxStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: PS4Player + m_GraphicsJobs: 0 + - m_BuildTarget: iOSSupport + m_GraphicsJobs: 0 + - m_BuildTarget: WindowsStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobs: 0 + - m_BuildTarget: LuminSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AndroidPlayer + m_GraphicsJobs: 0 + - m_BuildTarget: WebGLSupport + m_GraphicsJobs: 0 + m_BuildTargetGraphicsJobMode: + - m_BuildTarget: PS4Player + m_GraphicsJobMode: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobMode: 0 m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer m_APIs: 0b00000015000000 @@ -305,7 +341,6 @@ PlayerSettings: m_Devices: - Oculus - OpenVR - m_BuildTargetEnableVuforiaSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 openGLRequireES32: 0 @@ -424,6 +459,7 @@ PlayerSettings: switchRatingsInt_9: 0 switchRatingsInt_10: 0 switchRatingsInt_11: 0 + switchRatingsInt_12: 0 switchLocalCommunicationIds_0: switchLocalCommunicationIds_1: switchLocalCommunicationIds_2: @@ -523,9 +559,11 @@ PlayerSettings: ps4contentSearchFeaturesUsed: 0 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 monoEnv: splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 spritePackerPolicy: webGLMemorySize: 256 webGLExceptionSupport: 1 @@ -556,6 +594,7 @@ PlayerSettings: 26: UNITY_POST_PROCESSING_STACK_V2 27: UNITY_POST_PROCESSING_STACK_V2 28: UNITY_POST_PROCESSING_STACK_V2 + 29: UNITY_POST_PROCESSING_STACK_V2 platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} @@ -620,7 +659,6 @@ PlayerSettings: XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 XboxOneXTitleMemory: 8 - xboxOneScriptCompiler: 1 XboxOneOverrideIdentityName: vrEditorSettings: daydream: @@ -639,13 +677,6 @@ PlayerSettings: luminVersion: m_VersionCode: 1 m_VersionName: - facebookSdkVersion: 7.9.4 - facebookAppId: - facebookCookies: 1 - facebookLogging: 1 - facebookStatus: 1 - facebookXfbml: 0 - facebookFrictionlessRequests: 1 apiCompatibilityLevel: 3 cloudProjectId: framebufferDepthMemorylessMode: 0 diff --git a/GPUAnimationExamples/ProjectSettings/ProjectVersion.txt b/GPUAnimationExamples/ProjectSettings/ProjectVersion.txt index fc8056b..f66c2e7 100644 --- a/GPUAnimationExamples/ProjectSettings/ProjectVersion.txt +++ b/GPUAnimationExamples/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.1.5f1 -m_EditorVersionWithRevision: 2019.1.5f1 (0ca0f5646614) +m_EditorVersion: 2019.3.0f3 +m_EditorVersionWithRevision: 2019.3.0f3 (6c9e2bfd6f81) diff --git a/GPUAnimationExamples/ProjectSettings/QualitySettings.asset b/GPUAnimationExamples/ProjectSettings/QualitySettings.asset index d554ce6..dbb5c39 100644 --- a/GPUAnimationExamples/ProjectSettings/QualitySettings.asset +++ b/GPUAnimationExamples/ProjectSettings/QualitySettings.asset @@ -40,6 +40,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Low @@ -75,6 +76,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Medium @@ -110,6 +112,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: High @@ -145,6 +148,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Very High @@ -180,6 +184,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra @@ -215,6 +220,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] m_PerPlatformDefaultQuality: Android: 2 diff --git a/GPUAnimationExamples/ProjectSettings/VFXManager.asset b/GPUAnimationExamples/ProjectSettings/VFXManager.asset index 4b77776..3a95c98 100644 Binary files a/GPUAnimationExamples/ProjectSettings/VFXManager.asset and b/GPUAnimationExamples/ProjectSettings/VFXManager.asset differ diff --git a/com.unity.gpuanimation/Shaders/GPUAnimationLWRP.hlsl b/com.unity.gpuanimation/Shaders/GPUAnimationLWRP.hlsl index 0004046..3d10f87 100644 --- a/com.unity.gpuanimation/Shaders/GPUAnimationLWRP.hlsl +++ b/com.unity.gpuanimation/Shaders/GPUAnimationLWRP.hlsl @@ -26,6 +26,22 @@ real3 TransformObjectToWorldDir_CustomMatrix(float4x4 objectToWorld, real3 dirOS return normalize(mul((real3x3)objectToWorld, dirOS)); } +float4 TransformObjectToHClip_CustomMatrix(float4x4 objectToWorld, float3 positionOS) +{ + return mul(GetWorldToHClipMatrix(), mul(objectToWorld, float4(positionOS, 1.0))); +} + +float4 TransformObjectToHClip_GPUAnimation(float3 positionOS, float2 boneIds, float2 boneInfluences) +{ +#if !UNITY_ANY_INSTANCING_ENABLED + return TransformObjectToHClip(positionOS); +#else + + float4x4 skinMatrix = CalculateSkinMatrix(textureCoordinatesBuffer[unity_InstanceID], boneIds, boneInfluences); + return TransformObjectToHClip_CustomMatrix(mul(objectToWorldBuffer[unity_InstanceID], skinMatrix), positionOS); +#endif +} + float3 TransformObjectToWorld_GPUAnimation_Shadow(float3 positionOS, float2 boneIds, float2 boneInfluences) { #if !UNITY_ANY_INSTANCING_ENABLED diff --git a/com.unity.gpuanimation/Shaders/LWRP.meta b/com.unity.gpuanimation/Shaders/LWRP.meta deleted file mode 100644 index 18ab528..0000000 --- a/com.unity.gpuanimation/Shaders/LWRP.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3a24639ea99684c8da1b2304ebf10965 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/GPUAnimationExamples/Assets/Plugins.meta b/com.unity.gpuanimation/Shaders/URP.meta similarity index 77% rename from GPUAnimationExamples/Assets/Plugins.meta rename to com.unity.gpuanimation/Shaders/URP.meta index ea9f314..878c868 100644 --- a/GPUAnimationExamples/Assets/Plugins.meta +++ b/com.unity.gpuanimation/Shaders/URP.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 79a7dd18fe96145eb85087b5a31ed701 +guid: e81f2f6752b1a4d02b5114223552a2ec folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/com.unity.gpuanimation/Shaders/LWRP/DepthOnlyPass.hlsl b/com.unity.gpuanimation/Shaders/URP/DepthOnlyPass.hlsl similarity index 70% rename from com.unity.gpuanimation/Shaders/LWRP/DepthOnlyPass.hlsl rename to com.unity.gpuanimation/Shaders/URP/DepthOnlyPass.hlsl index f9d46d0..954c8e6 100644 --- a/com.unity.gpuanimation/Shaders/LWRP/DepthOnlyPass.hlsl +++ b/com.unity.gpuanimation/Shaders/URP/DepthOnlyPass.hlsl @@ -1,12 +1,13 @@ -#ifndef LIGHTWEIGHT_DEPTH_ONLY_PASS_INCLUDED -#define LIGHTWEIGHT_DEPTH_ONLY_PASS_INCLUDED +#ifndef UNIVERSAL_DEPTH_ONLY_PASS_INCLUDED +#define UNIVERSAL_DEPTH_ONLY_PASS_INCLUDED -#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" struct Attributes { float4 position : POSITION; float2 texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_GPUANIMATION UNITY_VERTEX_INPUT_INSTANCE_ID }; @@ -25,14 +26,15 @@ Varyings DepthOnlyVertex(Attributes input) UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap); - output.positionCS = TransformObjectToHClip(input.position.xyz); + output.positionCS = TransformObjectToHClip_GPUAnimation(input.position.xyz, input.boneIds, input.boneInfluences); + return output; } half4 DepthOnlyFragment(Varyings input) : SV_TARGET { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); - + Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)).a, _BaseColor, _Cutoff); return 0; } diff --git a/com.unity.gpuanimation/Shaders/LWRP/DepthOnlyPass.hlsl.meta b/com.unity.gpuanimation/Shaders/URP/DepthOnlyPass.hlsl.meta similarity index 100% rename from com.unity.gpuanimation/Shaders/LWRP/DepthOnlyPass.hlsl.meta rename to com.unity.gpuanimation/Shaders/URP/DepthOnlyPass.hlsl.meta diff --git a/com.unity.gpuanimation/Shaders/LWRP/LitForwardPass.hlsl b/com.unity.gpuanimation/Shaders/URP/LitForwardPass.hlsl similarity index 85% rename from com.unity.gpuanimation/Shaders/LWRP/LitForwardPass.hlsl rename to com.unity.gpuanimation/Shaders/URP/LitForwardPass.hlsl index 2dbf56f..25ad840 100644 --- a/com.unity.gpuanimation/Shaders/LWRP/LitForwardPass.hlsl +++ b/com.unity.gpuanimation/Shaders/URP/LitForwardPass.hlsl @@ -1,7 +1,7 @@ -#ifndef LIGHTWEIGHT_FORWARD_LIT_PASS_INCLUDED -#define LIGHTWEIGHT_FORWARD_LIT_PASS_INCLUDED +#ifndef UNIVERSAL_FORWARD_LIT_PASS_INCLUDED +#define UNIVERSAL_FORWARD_LIT_PASS_INCLUDED -#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Lighting.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" @@ -12,6 +12,8 @@ struct Attributes float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float2 texcoord : TEXCOORD0; + float2 lightmapUV : TEXCOORD1; + UNITY_VERTEX_INPUT_GPUANIMATION UNITY_VERTEX_INPUT_INSTANCE_ID @@ -27,12 +29,12 @@ struct Varyings #endif #ifdef _NORMALMAP - half4 normalWS : TEXCOORD3; // xyz: normal, w: viewDir.x - half4 tangentWS : TEXCOORD4; // xyz: tangent, w: viewDir.y - half4 bitangentWS : TEXCOORD5; // xyz: bitangent, w: viewDir.z + float4 normalWS : TEXCOORD3; // xyz: normal, w: viewDir.x + float4 tangentWS : TEXCOORD4; // xyz: tangent, w: viewDir.y + float4 bitangentWS : TEXCOORD5; // xyz: bitangent, w: viewDir.z #else - half3 normalWS : TEXCOORD3; - half3 viewDirWS : TEXCOORD4; + float3 normalWS : TEXCOORD3; + float3 viewDirWS : TEXCOORD4; #endif half4 fogFactorAndVertexLight : TEXCOORD6; // x: fogFactor, yzw: vertex light @@ -90,7 +92,6 @@ Varyings LitPassVertex(Attributes input) UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); - VertexPositionInputs vertexInput = GetVertexPositionInputs_GPUAnimation(input.positionOS.xyz, input.boneIds, input.boneInfluences); VertexNormalInputs normalInput = GetVertexNormalInputs_GPUAnimation(input.normalOS, input.tangentOS, input.boneIds, input.boneInfluences); @@ -109,7 +110,7 @@ Varyings LitPassVertex(Attributes input) output.normalWS = NormalizeNormalPerVertex(normalInput.normalWS); output.viewDirWS = viewDirWS; #endif - + OUTPUT_LIGHTMAP_UV(input.lightmapUV, unity_LightmapST, output.lightmapUV); OUTPUT_SH(output.normalWS.xyz, output.vertexSH); @@ -140,7 +141,7 @@ half4 LitPassFragment(Varyings input) : SV_Target InputData inputData; InitializeInputData(input, surfaceData.normalTS, inputData); - half4 color = LightweightFragmentPBR(inputData, surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.occlusion, surfaceData.emission, surfaceData.alpha); + half4 color = UniversalFragmentPBR(inputData, surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.occlusion, surfaceData.emission, surfaceData.alpha); color.rgb = MixFog(color.rgb, inputData.fogCoord); return color; diff --git a/com.unity.gpuanimation/Shaders/LWRP/LitForwardPass.hlsl.meta b/com.unity.gpuanimation/Shaders/URP/LitForwardPass.hlsl.meta similarity index 100% rename from com.unity.gpuanimation/Shaders/LWRP/LitForwardPass.hlsl.meta rename to com.unity.gpuanimation/Shaders/URP/LitForwardPass.hlsl.meta diff --git a/com.unity.gpuanimation/Shaders/LWRP/LitInput.hlsl b/com.unity.gpuanimation/Shaders/URP/LitInput.hlsl similarity index 90% rename from com.unity.gpuanimation/Shaders/LWRP/LitInput.hlsl rename to com.unity.gpuanimation/Shaders/URP/LitInput.hlsl index 019de22..b55093f 100644 --- a/com.unity.gpuanimation/Shaders/LWRP/LitInput.hlsl +++ b/com.unity.gpuanimation/Shaders/URP/LitInput.hlsl @@ -1,9 +1,9 @@ -#ifndef LIGHTWEIGHT_LIT_INPUT_INCLUDED -#define LIGHTWEIGHT_LIT_INPUT_INCLUDED +#ifndef UNIVERSAL_LIT_INPUT_INCLUDED +#define UNIVERSAL_LIT_INPUT_INCLUDED -#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" -#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/SurfaceInput.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl" #include "Packages/com.unity.gpuanimation/Shaders/GPUAnimationLWRP.hlsl" CBUFFER_START(UnityPerMaterial) @@ -93,4 +93,4 @@ inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfa outSurfaceData.emission = SampleEmission(uv, _EmissionColor.rgb, TEXTURE2D_ARGS(_EmissionMap, sampler_EmissionMap)); } -#endif // LIGHTWEIGHT_INPUT_SURFACE_PBR_INCLUDED +#endif // UNIVERSAL_INPUT_SURFACE_PBR_INCLUDED diff --git a/com.unity.gpuanimation/Shaders/LWRP/LitInput.hlsl.meta b/com.unity.gpuanimation/Shaders/URP/LitInput.hlsl.meta similarity index 100% rename from com.unity.gpuanimation/Shaders/LWRP/LitInput.hlsl.meta rename to com.unity.gpuanimation/Shaders/URP/LitInput.hlsl.meta diff --git a/com.unity.gpuanimation/Shaders/LWRP/ShadowCasterPass.hlsl b/com.unity.gpuanimation/Shaders/URP/ShadowCasterPass.hlsl similarity index 83% rename from com.unity.gpuanimation/Shaders/LWRP/ShadowCasterPass.hlsl rename to com.unity.gpuanimation/Shaders/URP/ShadowCasterPass.hlsl index 5f5b7d9..817da01 100644 --- a/com.unity.gpuanimation/Shaders/LWRP/ShadowCasterPass.hlsl +++ b/com.unity.gpuanimation/Shaders/URP/ShadowCasterPass.hlsl @@ -1,8 +1,8 @@ -#ifndef LIGHTWEIGHT_SHADOW_CASTER_PASS_INCLUDED -#define LIGHTWEIGHT_SHADOW_CASTER_PASS_INCLUDED +#ifndef UNIVERSAL_SHADOW_CASTER_PASS_INCLUDED +#define UNIVERSAL_SHADOW_CASTER_PASS_INCLUDED -#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl" -#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Shadows.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; @@ -24,7 +24,6 @@ struct Varyings float4 GetShadowPositionHClip(Attributes input) { float3 positionWS = TransformObjectToWorld_GPUAnimation_Shadow(input.positionOS.xyz, input.boneIds, input.boneInfluences); - float3 normalWS = TransformObjectToWorldNormal_GPUAnimation_Shadow(input.normalOS, input.boneIds, input.boneInfluences); float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, _LightDirection)); diff --git a/com.unity.gpuanimation/Shaders/LWRP/ShadowCasterPass.hlsl.meta b/com.unity.gpuanimation/Shaders/URP/ShadowCasterPass.hlsl.meta similarity index 100% rename from com.unity.gpuanimation/Shaders/LWRP/ShadowCasterPass.hlsl.meta rename to com.unity.gpuanimation/Shaders/URP/ShadowCasterPass.hlsl.meta diff --git a/com.unity.gpuanimation/Shaders/LWRP/SkinningLit.shader b/com.unity.gpuanimation/Shaders/URP/SkinningLit.shader similarity index 88% rename from com.unity.gpuanimation/Shaders/LWRP/SkinningLit.shader rename to com.unity.gpuanimation/Shaders/URP/SkinningLit.shader index c5737ce..88d8dba 100644 --- a/com.unity.gpuanimation/Shaders/LWRP/SkinningLit.shader +++ b/com.unity.gpuanimation/Shaders/URP/SkinningLit.shader @@ -1,10 +1,10 @@ -Shader "Lightweight Render Pipeline/Skinning Lit" +Shader "Universal Render Pipeline/GPU Animation Skinning Lit" { Properties { // Specular vs Metallic workflow [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 - + [MainColor] _BaseColor("Color", Color) = (0.5,0.5,0.5,1) [MainTexture] _BaseMap("Albedo", 2D) = "white" {} @@ -41,10 +41,10 @@ Shader "Lightweight Render Pipeline/Skinning Lit" [HideInInspector] _ZWrite("__zw", Float) = 1.0 [HideInInspector] _Cull("__cull", Float) = 2.0 - _ReceiveShadows("Receive Shadows", Float) = 1.0 + _ReceiveShadows("Receive Shadows", Float) = 1.0 // Editmode props [HideInInspector] _QueueOffset("Queue offset", Float) = 0.0 - + // ObsoleteProperties [HideInInspector] _MainTex("BaseMap", 2D) = "white" {} [HideInInspector] _Color("Base Color", Color) = (0.5, 0.5, 0.5, 1) @@ -55,20 +55,20 @@ Shader "Lightweight Render Pipeline/Skinning Lit" SubShader { - // Lightweight Pipeline tag is required. If Lightweight render pipeline is not set in the graphics settings + // Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings // this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this - // material work with both Lightweight Render Pipeline and Builtin Unity Pipeline - Tags{"RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "True"} + // material work with both Universal Render Pipeline and Builtin Unity Pipeline + Tags{"RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "IgnoreProjector" = "True"} LOD 300 // ------------------------------------------------------------------ // Forward pass. Shades all light in a single pass. GI + emission + Fog Pass { - // Lightmode matches the ShaderPassName set in LightweightRenderPipeline.cs. SRPDefaultUnlit and passes with - // no LightMode tag are also rendered by Lightweight Render Pipeline + // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with + // no LightMode tag are also rendered by Universal Render Pipeline Name "ForwardLit" - Tags{"LightMode" = "LightweightForward"} + Tags{"LightMode" = "UniversalForward"} Blend[_SrcBlend][_DstBlend] ZWrite[_ZWrite] @@ -97,7 +97,7 @@ Shader "Lightweight Render Pipeline/Skinning Lit" #pragma shader_feature _RECEIVE_SHADOWS_OFF // ------------------------------------- - // Lightweight Pipeline keywords + // Universal Pipeline keywords #pragma multi_compile _ _MAIN_LIGHT_SHADOWS #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS @@ -158,7 +158,6 @@ Shader "Lightweight Render Pipeline/Skinning Lit" ENDHLSL } - /* @TODO: not implemented yet Pass { Name "DepthOnly" @@ -191,12 +190,9 @@ Shader "Lightweight Render Pipeline/Skinning Lit" #include "DepthOnlyPass.hlsl" ENDHLSL } - */ - - } - FallBack "Hidden/InternalErrorShader" - CustomEditor "UnityEditor.Rendering.LWRP.ShaderGUI.LitShader" + FallBack "Hidden/Universal Render Pipeline/FallbackError" + CustomEditor "UnityEditor.Rendering.Universal.ShaderGUI.LitShader" } diff --git a/com.unity.gpuanimation/Shaders/LWRP/SkinningLit.shader.meta b/com.unity.gpuanimation/Shaders/URP/SkinningLit.shader.meta similarity index 100% rename from com.unity.gpuanimation/Shaders/LWRP/SkinningLit.shader.meta rename to com.unity.gpuanimation/Shaders/URP/SkinningLit.shader.meta diff --git a/com.unity.gpuanimation/Unity.GPUAnimation/GpuCharacterRenderSystem.cs b/com.unity.gpuanimation/Unity.GPUAnimation/GpuCharacterRenderSystem.cs index 3da591d..d70aff3 100644 --- a/com.unity.gpuanimation/Unity.GPUAnimation/GpuCharacterRenderSystem.cs +++ b/com.unity.gpuanimation/Unity.GPUAnimation/GpuCharacterRenderSystem.cs @@ -195,7 +195,7 @@ protected override JobHandle OnUpdate(JobHandle inputDeps) _Drawers.Add(character, drawer); } - m_Characters.SetFilter(character); + m_Characters.SetSharedComponentFilter(character); Profiler.BeginSample("ExtractState"); JobHandle jobA, jobB;