From c2a6c686298a2faa6836dd1cd59c59cc7cac205d Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 25 Mar 2026 09:42:40 +0200 Subject: [PATCH 01/15] Change sample materials to use URP shaders and add URP settings Migrate materials and scene/prefab references to new URP shader assets: updated many .mat files to point to the new shader GUID/fileID and replaced placeholder material references in numerous scenes and prefabs (MeshRenderer/ParticleSystemRenderer entries). Added URP assets and global settings under Assets/Settings (URP-PipelineAsset, URP-Renderer, UniversalRenderPipelineGlobalSettings) and new shader sources (SamplesSimpleLit and other sample shaders). Also updated Packages/manifest.json and ProjectSettings (GraphicsSettings, QualitySettings) and added ShaderGraph/URP project settings to enable the URP configuration across the project and external sample projects. --- Assets/QA/Input_Test/GUITest.unity | 8 +- Assets/QA/Materials/Blue.mat | 2 +- Assets/QA/Materials/Green.mat | 2 +- Assets/QA/Materials/Red.mat | 2 +- Assets/QA/Materials/White.mat | 2 +- .../MouseEvents/OnMouseEventsTestScene.unity | 4 +- ...xample with Actions Asset C# Wrapper.unity | 2 +- ...Example with Actions Asset Reference.unity | 2 +- .../Example with PlayerInput component.unity | 2 +- Assets/QA/Tests/EditMode/EditModeTest.unity | 66 +++---- .../XRDeviceActions/MagicLeap/MLActions.unity | 4 +- .../InGameHints/InGameHintsSampleScene.unity | 44 ++--- .../ProjectWideActionsSampleScene.unity | 2 +- .../RebindingUI/Game/BulletMaterial.mat | 2 +- .../RebindingUI/Game/EnemyMaterial.mat | 2 +- .../Samples/RebindingUI/Game/Explosion.prefab | 2 +- .../RebindingUI/Game/PlayerMaterial.mat | 2 +- .../RebindingUI/Game/PlayerMaterial2.mat | 2 +- Assets/Samples/SimpleDemo/Environment.prefab | 10 +- .../SimpleDemo/SimpleProjectile.prefab | 2 +- .../SimpleMultiplayerDemo.unity | 48 ++--- .../Samples/UIvsGameInput/Projectile.prefab | 2 +- .../Samples/UIvsGameInput/UIvsGameInput.unity | 20 +- Assets/Samples/UnityRemote/CubeMaterial.mat | 2 +- Assets/Settings.meta | 8 + Assets/Settings/URP-PipelineAsset.asset | 114 ++++++++++++ Assets/Settings/URP-PipelineAsset.asset.meta | 8 + Assets/Settings/URP-Renderer.asset | 68 +++++++ Assets/Settings/URP-Renderer.asset.meta | 8 + Assets/Shaders.meta | 8 + Assets/Shaders/SamplesSimpleLit.shader | 175 ++++++++++++++++++ Assets/Shaders/SamplesSimpleLit.shader.meta | 10 + ...niversalRenderPipelineGlobalSettings.asset | 34 ++++ ...salRenderPipelineGlobalSettings.asset.meta | 8 + .../InputDeviceTester/Materials/pc_tablet.mat | 2 +- .../Shaders/SimpleLit.shader | 175 ++++++++++++++++++ .../Shaders/SimpleLit.shader.meta | 10 + .../Shaders/WorldCoord Diffuse.shader | 141 +++++++++++++- .../Assets/Demo/Materials/Default.mat | 30 +++ .../Assets/Demo/Materials/Default.mat.meta | 8 + .../Demo/Materials/Rolling/BasicTerrain.mat | 2 +- .../Demo/Materials/Rolling/BouncyTerrain.mat | 2 +- .../Demo/Materials/Rolling/PlayerBall.mat | 2 +- .../Demo/Materials/Rolling/RoughTerrain.mat | 2 +- .../Materials/Rolling/SlipperyTerrain.mat | 2 +- .../Assets/Demo/Scenes/Tapping.unity | 6 +- .../Demo/Shaders/Drawing/Background.shader | 56 +++++- .../Demo/Shaders/Drawing/Capture.shader | 113 ++++++++++- .../Assets/Demo/Shaders/Drawing/Tool.shader | 59 +++++- .../Assets/Demo/Shaders/SimpleLit.shader | 175 ++++++++++++++++++ .../Assets/Demo/Shaders/SimpleLit.shader.meta | 10 + Packages/manifest.json | 5 +- ProjectSettings/GraphicsSettings.asset | 9 +- ProjectSettings/QualitySettings.asset | 18 +- ProjectSettings/ShaderGraphSettings.asset | 17 ++ ProjectSettings/URPProjectSettings.asset | 15 ++ 56 files changed, 1391 insertions(+), 145 deletions(-) create mode 100644 Assets/Settings.meta create mode 100644 Assets/Settings/URP-PipelineAsset.asset create mode 100644 Assets/Settings/URP-PipelineAsset.asset.meta create mode 100644 Assets/Settings/URP-Renderer.asset create mode 100644 Assets/Settings/URP-Renderer.asset.meta create mode 100644 Assets/Shaders.meta create mode 100644 Assets/Shaders/SamplesSimpleLit.shader create mode 100644 Assets/Shaders/SamplesSimpleLit.shader.meta create mode 100644 Assets/UniversalRenderPipelineGlobalSettings.asset create mode 100644 Assets/UniversalRenderPipelineGlobalSettings.asset.meta create mode 100644 ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader create mode 100644 ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader.meta create mode 100644 ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat create mode 100644 ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat.meta create mode 100644 ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader create mode 100644 ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader.meta create mode 100644 ProjectSettings/ShaderGraphSettings.asset create mode 100644 ProjectSettings/URPProjectSettings.asset diff --git a/Assets/QA/Input_Test/GUITest.unity b/Assets/QA/Input_Test/GUITest.unity index e749d7d9d5..9f81ee5773 100644 --- a/Assets/QA/Input_Test/GUITest.unity +++ b/Assets/QA/Input_Test/GUITest.unity @@ -270,7 +270,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -943,7 +943,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1721,7 +1721,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2377,7 +2377,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/QA/Materials/Blue.mat b/Assets/QA/Materials/Blue.mat index 2adba28e66..b28b461d90 100644 --- a/Assets/QA/Materials/Blue.mat +++ b/Assets/QA/Materials/Blue.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Blue - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] diff --git a/Assets/QA/Materials/Green.mat b/Assets/QA/Materials/Green.mat index 90370803fa..904bbba117 100644 --- a/Assets/QA/Materials/Green.mat +++ b/Assets/QA/Materials/Green.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Green - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] diff --git a/Assets/QA/Materials/Red.mat b/Assets/QA/Materials/Red.mat index 18e55761de..3263914da4 100644 --- a/Assets/QA/Materials/Red.mat +++ b/Assets/QA/Materials/Red.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Red - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] diff --git a/Assets/QA/Materials/White.mat b/Assets/QA/Materials/White.mat index 84294d0f89..57c4143c80 100644 --- a/Assets/QA/Materials/White.mat +++ b/Assets/QA/Materials/White.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: White - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] diff --git a/Assets/QA/MouseEvents/OnMouseEventsTestScene.unity b/Assets/QA/MouseEvents/OnMouseEventsTestScene.unity index f1f00c0a0d..ccf7796fb0 100644 --- a/Assets/QA/MouseEvents/OnMouseEventsTestScene.unity +++ b/Assets/QA/MouseEvents/OnMouseEventsTestScene.unity @@ -289,7 +289,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -407,7 +407,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset C# Wrapper.unity b/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset C# Wrapper.unity index 3f18b91706..82a61e43b0 100644 --- a/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset C# Wrapper.unity +++ b/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset C# Wrapper.unity @@ -195,7 +195,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset Reference.unity b/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset Reference.unity index 8f84d64438..461abf327b 100644 --- a/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset Reference.unity +++ b/Assets/QA/Tests/DocsExamples/Scenes/Example with Actions Asset Reference.unity @@ -196,7 +196,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/QA/Tests/DocsExamples/Scenes/Example with PlayerInput component.unity b/Assets/QA/Tests/DocsExamples/Scenes/Example with PlayerInput component.unity index ae490cc5c9..d66bc8f79d 100644 --- a/Assets/QA/Tests/DocsExamples/Scenes/Example with PlayerInput component.unity +++ b/Assets/QA/Tests/DocsExamples/Scenes/Example with PlayerInput component.unity @@ -247,7 +247,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/QA/Tests/EditMode/EditModeTest.unity b/Assets/QA/Tests/EditMode/EditModeTest.unity index 19bf2170d1..85541990f5 100644 --- a/Assets/QA/Tests/EditMode/EditModeTest.unity +++ b/Assets/QA/Tests/EditMode/EditModeTest.unity @@ -199,7 +199,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -305,7 +305,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -410,7 +410,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -515,7 +515,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -621,7 +621,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -728,7 +728,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -833,7 +833,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -938,7 +938,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1044,7 +1044,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1151,7 +1151,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1351,7 +1351,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1591,7 +1591,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1696,7 +1696,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1837,7 +1837,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1944,7 +1944,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2180,7 +2180,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2416,7 +2416,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2521,7 +2521,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2626,7 +2626,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2733,7 +2733,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2840,7 +2840,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2945,7 +2945,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3051,7 +3051,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3157,7 +3157,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3262,7 +3262,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3367,7 +3367,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3472,7 +3472,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3617,7 +3617,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3724,7 +3724,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3831,7 +3831,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3938,7 +3938,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -4045,7 +4045,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -4151,7 +4151,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/QA/Tests/XRDeviceActions/MagicLeap/MLActions.unity b/Assets/QA/Tests/XRDeviceActions/MagicLeap/MLActions.unity index d9af4e8c9a..180f6e218e 100644 --- a/Assets/QA/Tests/XRDeviceActions/MagicLeap/MLActions.unity +++ b/Assets/QA/Tests/XRDeviceActions/MagicLeap/MLActions.unity @@ -6722,7 +6722,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -13120,7 +13120,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/InGameHints/InGameHintsSampleScene.unity b/Assets/Samples/InGameHints/InGameHintsSampleScene.unity index bbee5f835e..8bac79eb62 100644 --- a/Assets/Samples/InGameHints/InGameHintsSampleScene.unity +++ b/Assets/Samples/InGameHints/InGameHintsSampleScene.unity @@ -368,7 +368,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -501,7 +501,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -713,7 +713,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -819,7 +819,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -952,7 +952,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1085,7 +1085,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1218,7 +1218,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1351,7 +1351,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1484,7 +1484,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1617,7 +1617,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1750,7 +1750,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1883,7 +1883,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2016,7 +2016,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2292,7 +2292,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2425,7 +2425,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2558,7 +2558,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2691,7 +2691,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2824,7 +2824,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2957,7 +2957,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3090,7 +3090,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3223,7 +3223,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3356,7 +3356,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity b/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity index 18fecd297e..6368a997c8 100644 --- a/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity +++ b/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity @@ -413,7 +413,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/RebindingUI/Game/BulletMaterial.mat b/Assets/Samples/RebindingUI/Game/BulletMaterial.mat index b1b5c0921c..630f5ed2ba 100644 --- a/Assets/Samples/RebindingUI/Game/BulletMaterial.mat +++ b/Assets/Samples/RebindingUI/Game/BulletMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: BulletMaterial - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat b/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat index 92b4050ce8..23fbc0058d 100644 --- a/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat +++ b/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: EnemyMaterial - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/Game/Explosion.prefab b/Assets/Samples/RebindingUI/Game/Explosion.prefab index 57809ba924..72173c89d7 100644 --- a/Assets/Samples/RebindingUI/Game/Explosion.prefab +++ b/Assets/Samples/RebindingUI/Game/Explosion.prefab @@ -79,7 +79,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} - {fileID: 10308, guid: 0000000000000000f000000000000000, type: 0} m_StaticBatchInfo: firstSubMesh: 0 diff --git a/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat b/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat index c8625b01a3..8bd4937f6d 100644 --- a/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat +++ b/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: PlayerMaterial - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat b/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat index c3e33fa6cf..9cc446d3b4 100644 --- a/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat +++ b/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: PlayerMaterial2 - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/SimpleDemo/Environment.prefab b/Assets/Samples/SimpleDemo/Environment.prefab index 0c7c7e1330..fc95ef56c2 100644 --- a/Assets/Samples/SimpleDemo/Environment.prefab +++ b/Assets/Samples/SimpleDemo/Environment.prefab @@ -124,7 +124,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -324,7 +324,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -429,7 +429,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -534,7 +534,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -639,7 +639,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/SimpleDemo/SimpleProjectile.prefab b/Assets/Samples/SimpleDemo/SimpleProjectile.prefab index 844c823d0f..b41223fb07 100644 --- a/Assets/Samples/SimpleDemo/SimpleProjectile.prefab +++ b/Assets/Samples/SimpleDemo/SimpleProjectile.prefab @@ -84,7 +84,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity b/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity index 4f9d90745a..2567781408 100644 --- a/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity +++ b/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity @@ -183,7 +183,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -288,7 +288,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -487,7 +487,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -592,7 +592,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -697,7 +697,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -802,7 +802,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -907,7 +907,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1012,7 +1012,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1117,7 +1117,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1222,7 +1222,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1327,7 +1327,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1433,7 +1433,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1538,7 +1538,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1643,7 +1643,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1748,7 +1748,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1853,7 +1853,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1958,7 +1958,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2063,7 +2063,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2168,7 +2168,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2273,7 +2273,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2378,7 +2378,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2483,7 +2483,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2588,7 +2588,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2693,7 +2693,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/UIvsGameInput/Projectile.prefab b/Assets/Samples/UIvsGameInput/Projectile.prefab index 353ece6d63..4ef7f71982 100644 --- a/Assets/Samples/UIvsGameInput/Projectile.prefab +++ b/Assets/Samples/UIvsGameInput/Projectile.prefab @@ -84,7 +84,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/UIvsGameInput/UIvsGameInput.unity b/Assets/Samples/UIvsGameInput/UIvsGameInput.unity index 3a4a6f8391..ef597f4067 100644 --- a/Assets/Samples/UIvsGameInput/UIvsGameInput.unity +++ b/Assets/Samples/UIvsGameInput/UIvsGameInput.unity @@ -182,7 +182,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -909,7 +909,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1285,7 +1285,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1893,7 +1893,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2092,7 +2092,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2197,7 +2197,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2302,7 +2302,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2486,7 +2486,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2724,7 +2724,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3327,7 +3327,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/UnityRemote/CubeMaterial.mat b/Assets/Samples/UnityRemote/CubeMaterial.mat index 8ac4accef9..d69a0dba6f 100644 --- a/Assets/Samples/UnityRemote/CubeMaterial.mat +++ b/Assets/Samples/UnityRemote/CubeMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: CubeMaterial - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] diff --git a/Assets/Settings.meta b/Assets/Settings.meta new file mode 100644 index 0000000000..45457f8715 --- /dev/null +++ b/Assets/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa41e7d917ef79248bc044ea5c249b1a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-PipelineAsset.asset b/Assets/Settings/URP-PipelineAsset.asset new file mode 100644 index 0000000000..57e57e7fb6 --- /dev/null +++ b/Assets/Settings/URP-PipelineAsset.asset @@ -0,0 +1,114 @@ +%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: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: URP-PipelineAsset + m_EditorClassIdentifier: + k_AssetVersion: 11 + k_AssetPreviousVersion: 11 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: b56d1ee65e4137c4e859545836def71b, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 0 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_SupportsHDR: 1 + m_HDRColorBufferPrecision: 0 + m_MSAA: 1 + m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_EnableLODCrossFade: 1 + m_LODCrossFadeDitheringType: 1 + m_ShEvalMode: 0 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 2048 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 4 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 2048 + m_AdditionalLightsShadowResolutionTierLow: 256 + m_AdditionalLightsShadowResolutionTierMedium: 512 + m_AdditionalLightsShadowResolutionTierHigh: 1024 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.2 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 + m_SoftShadowsSupported: 0 + m_ConservativeEnclosingSphere: 1 + m_NumIterationsEnclosingSphere: 64 + m_SoftShadowQuality: 2 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightCookies: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_StoreActionsOptimization: 0 + m_EnableRenderGraph: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 + m_SupportDataDrivenLensFlare: 1 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_VolumeFrameworkUpdateMode: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} + m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeAdditionalLight: 4 + m_PrefilteringModeAdditionalLightShadows: 1 + m_PrefilterXRKeywords: 0 + m_PrefilteringModeForwardPlus: 1 + m_PrefilteringModeDeferredRendering: 1 + m_PrefilteringModeScreenSpaceOcclusion: 1 + m_PrefilterDebugKeywords: 0 + m_PrefilterWriteRenderingLayers: 0 + m_PrefilterHDROutput: 0 + m_PrefilterSSAODepthNormals: 0 + m_PrefilterSSAOSourceDepthLow: 0 + m_PrefilterSSAOSourceDepthMedium: 0 + m_PrefilterSSAOSourceDepthHigh: 0 + m_PrefilterSSAOInterleaved: 0 + m_PrefilterSSAOBlueNoise: 0 + m_PrefilterSSAOSampleCountLow: 0 + m_PrefilterSSAOSampleCountMedium: 0 + m_PrefilterSSAOSampleCountHigh: 0 + m_PrefilterDBufferMRT1: 0 + m_PrefilterDBufferMRT2: 0 + m_PrefilterDBufferMRT3: 0 + m_PrefilterSoftShadowsQualityLow: 0 + m_PrefilterSoftShadowsQualityMedium: 0 + m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilterSoftShadows: 0 + m_PrefilterScreenCoord: 0 + m_PrefilterNativeRenderPass: 0 + m_ShaderVariantLogLevel: 0 + m_ShadowCascades: 0 diff --git a/Assets/Settings/URP-PipelineAsset.asset.meta b/Assets/Settings/URP-PipelineAsset.asset.meta new file mode 100644 index 0000000000..66a98f5dd6 --- /dev/null +++ b/Assets/Settings/URP-PipelineAsset.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 419b51160a38fc648a23b6a5b447b92e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-Renderer.asset b/Assets/Settings/URP-Renderer.asset new file mode 100644 index 0000000000..36ac573311 --- /dev/null +++ b/Assets/Settings/URP-Renderer.asset @@ -0,0 +1,68 @@ +%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: URP-Renderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} + hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} + m_RendererFeatures: [] + m_RendererFeatureMap: + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 0} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 0} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, + type: 3} + terrainDetailLitPS: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, + type: 3} + terrainDetailGrassPS: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, + type: 3} + terrainDetailGrassBillboardPS: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, + type: 3} + m_AssetVersion: 2 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 2 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 0 + m_CopyDepthMode: 1 + m_AccurateGbufferNormals: 0 + m_IntermediateTextureMode: 1 diff --git a/Assets/Settings/URP-Renderer.asset.meta b/Assets/Settings/URP-Renderer.asset.meta new file mode 100644 index 0000000000..d90b028958 --- /dev/null +++ b/Assets/Settings/URP-Renderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b56d1ee65e4137c4e859545836def71b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders.meta b/Assets/Shaders.meta new file mode 100644 index 0000000000..64025a5c17 --- /dev/null +++ b/Assets/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 205fee01971646a4f8a714639ccd3fcf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/SamplesSimpleLit.shader b/Assets/Shaders/SamplesSimpleLit.shader new file mode 100644 index 0000000000..91a6b550d2 --- /dev/null +++ b/Assets/Shaders/SamplesSimpleLit.shader @@ -0,0 +1,175 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + // URP SubShader — selected when Universal Render Pipeline is active + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + // Built-in RP SubShader — fallback when no SRP is active + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Shaders/SamplesSimpleLit.shader.meta b/Assets/Shaders/SamplesSimpleLit.shader.meta new file mode 100644 index 0000000000..62c26109ac --- /dev/null +++ b/Assets/Shaders/SamplesSimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UniversalRenderPipelineGlobalSettings.asset b/Assets/UniversalRenderPipelineGlobalSettings.asset new file mode 100644 index 0000000000..783520f247 --- /dev/null +++ b/Assets/UniversalRenderPipelineGlobalSettings.asset @@ -0,0 +1,34 @@ +%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: 2ec995e51a6e251468d2a3fd8a686257, type: 3} + m_Name: UniversalRenderPipelineGlobalSettings + m_EditorClassIdentifier: + k_AssetVersion: 3 + m_RenderingLayerNames: + - Default + m_ValidRenderingLayers: 1 + lightLayerName0: + lightLayerName1: + lightLayerName2: + lightLayerName3: + lightLayerName4: + lightLayerName5: + lightLayerName6: + lightLayerName7: + m_StripDebugVariants: 1 + m_StripUnusedPostProcessingVariants: 0 + m_StripUnusedVariants: 1 + m_StripUnusedLODCrossFadeVariants: 1 + m_StripScreenCoordOverrideVariants: 1 + supportRuntimeDebugDisplay: 0 + m_ShaderVariantLogLevel: 0 + m_ExportShaderVariants: 1 diff --git a/Assets/UniversalRenderPipelineGlobalSettings.asset.meta b/Assets/UniversalRenderPipelineGlobalSettings.asset.meta new file mode 100644 index 0000000000..38feeadd01 --- /dev/null +++ b/Assets/UniversalRenderPipelineGlobalSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c7230e15ebbbb640a4fe635e888f015 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Materials/pc_tablet.mat b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Materials/pc_tablet.mat index ae97ee00dd..5ab046f790 100644 --- a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Materials/pc_tablet.mat +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Materials/pc_tablet.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: pc_tablet - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8, type: 3} m_ShaderKeywords: _NORMALMAP _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader new file mode 100644 index 0000000000..91a6b550d2 --- /dev/null +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader @@ -0,0 +1,175 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + // URP SubShader — selected when Universal Render Pipeline is active + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + // Built-in RP SubShader — fallback when no SRP is active + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader.meta b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader.meta new file mode 100644 index 0000000000..488cca7f40 --- /dev/null +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader index be4cf322dd..1f24f80a38 100644 --- a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader @@ -5,6 +5,141 @@ Properties { _BaseScale ("Base Tiling", Vector) = (1,1,1,0) } +// URP SubShader — tri-planar with Lambert lighting +SubShader { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + LOD 150 + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half3 _BaseScale; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float3 positionWS : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float fogFactor : TEXCOORD2; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half3 normalWS = normalize(input.normalWS); + + half4 texXY = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.positionWS.xy * _BaseScale.z); + half4 texXZ = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.positionWS.xz * _BaseScale.y); + half4 texYZ = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.positionWS.yz * _BaseScale.x); + + half3 mask = half3( + dot(normalWS, half3(0, 0, 1)), + dot(normalWS, half3(0, 1, 0)), + dot(normalWS, half3(1, 0, 0))); + + half4 tex = texXY * abs(mask.x) + texXZ * abs(mask.y) + texYZ * abs(mask.z); + half4 albedo = tex * _Color; + + Light mainLight = GetMainLight(); + half NdotL = saturate(dot(normalWS, mainLight.direction)); + half3 diffuse = albedo.rgb * mainLight.color * NdotL; + + half3 ambient = SampleSH(normalWS) * albedo.rgb; + half3 finalColor = ambient + diffuse; + + finalColor = MixFog(finalColor, input.fogFactor); + return half4(finalColor, 1.0); + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } +} + +// Built-in RP SubShader — surface shader with Lambert (fallback) SubShader { Tags { "RenderType"="Opaque" } LOD 150 @@ -25,9 +160,9 @@ struct Input { }; void surf (Input IN, inout SurfaceOutput o) { - fixed4 texXY = tex2D(_MainTex, IN.worldPos.xy * _BaseScale.z);// IN.uv_MainTex); - fixed4 texXZ = tex2D(_MainTex, IN.worldPos.xz * _BaseScale.y);// IN.uv_MainTex); - fixed4 texYZ = tex2D(_MainTex, IN.worldPos.yz * _BaseScale.x);// IN.uv_MainTex); + fixed4 texXY = tex2D(_MainTex, IN.worldPos.xy * _BaseScale.z); + fixed4 texXZ = tex2D(_MainTex, IN.worldPos.xz * _BaseScale.y); + fixed4 texYZ = tex2D(_MainTex, IN.worldPos.yz * _BaseScale.x); fixed3 mask = fixed3( dot (IN.worldNormal, fixed3(0,0,1)), dot (IN.worldNormal, fixed3(0,1,0)), diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat new file mode 100644 index 0000000000..2bb586a98f --- /dev/null +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat.meta b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat.meta new file mode 100644 index 0000000000..8f05a6cf08 --- /dev/null +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BasicTerrain.mat b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BasicTerrain.mat index 470ed523a5..e8644af708 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BasicTerrain.mat +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BasicTerrain.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: BasicTerrain - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BouncyTerrain.mat b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BouncyTerrain.mat index 1a017ffb13..e7ada87c2f 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BouncyTerrain.mat +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/BouncyTerrain.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: BouncyTerrain - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/PlayerBall.mat b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/PlayerBall.mat index b964d99e80..ca94456081 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/PlayerBall.mat +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/PlayerBall.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: PlayerBall - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/RoughTerrain.mat b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/RoughTerrain.mat index 4249ffcf73..d5b39f5a74 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/RoughTerrain.mat +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/RoughTerrain.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: RoughTerrain - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/SlipperyTerrain.mat b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/SlipperyTerrain.mat index f3a70c2afa..66c9e46b6e 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/SlipperyTerrain.mat +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Materials/Rolling/SlipperyTerrain.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: SlipperyTerrain - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Scenes/Tapping.unity b/ExternalSampleProjects/TouchSamples/Assets/Demo/Scenes/Tapping.unity index d946e969ab..5d44c1df94 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Scenes/Tapping.unity +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Scenes/Tapping.unity @@ -5095,7 +5095,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9, type: 2} - {fileID: 0} m_StaticBatchInfo: firstSubMesh: 0 @@ -10314,7 +10314,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9, type: 2} - {fileID: 2100000, guid: f9ebf49d38f9a184eb352c0508010fab, type: 2} m_StaticBatchInfo: firstSubMesh: 0 @@ -15329,7 +15329,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9, type: 2} - {fileID: 0} m_StaticBatchInfo: firstSubMesh: 0 diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Background.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Background.shader index d8db2a445e..cc41504b6b 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Background.shader +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Background.shader @@ -7,6 +7,61 @@ Shader "Samples/Drawing/Background" { _MainTex ("Texture", 2D) = "white" {} } + + // URP SubShader + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" "Premultiplied"="True" } + LOD 100 + + Pass + { + Blend One OneMinusSrcAlpha + ZWrite Off + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 positionCS : SV_POSITION; + }; + + Varyings vert(Attributes input) + { + Varyings output; + output.positionCS = TransformObjectToHClip(input.positionOS.xyz); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv); + return col; + } + ENDHLSL + } + } + + // Built-in RP SubShader (fallback) SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" "Premultiplied"="True" } @@ -47,7 +102,6 @@ Shader "Samples/Drawing/Background" fixed4 frag (v2f i) : SV_Target { - // sample the texture fixed4 col = tex2D(_MainTex, i.uv); return col; } diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader index f3bfae2f8b..0da9c5d0d3 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader @@ -5,6 +5,116 @@ Shader "Hidden/Drawing/Capture" _MainTex ("Texture", 2D) = "white" {} } + // URP SubShader — non-premultiplied variant + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" "Premultiplied"="False" } + LOD 100 + + Pass + { + Blend SrcAlpha OneMinusSrcAlpha, OneMinusDstAlpha One + ZWrite Off + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + float4 color : COLOR0; + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 positionCS : SV_POSITION; + float4 color : COLOR0; + }; + + Varyings vert(Attributes input) + { + Varyings output; + output.positionCS = TransformObjectToHClip(input.positionOS.xyz); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.color = input.color; + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * input.color; + return col; + } + ENDHLSL + } + } + + // URP SubShader — premultiplied variant + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" "Premultiplied"="True" } + LOD 100 + + Pass + { + Blend One OneMinusSrcAlpha, OneMinusDstAlpha One + ZWrite Off + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 positionCS : SV_POSITION; + }; + + Varyings vert(Attributes input) + { + Varyings output; + output.positionCS = TransformObjectToHClip(input.positionOS.xyz); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv); + return col; + } + ENDHLSL + } + } + + // Built-in RP SubShader — non-premultiplied (fallback) SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" "Premultiplied"="False" } @@ -48,7 +158,6 @@ Shader "Hidden/Drawing/Capture" fixed4 frag (v2f i) : SV_Target { - // sample the texture fixed4 col = tex2D(_MainTex, i.uv) * i.color; return col; } @@ -56,6 +165,7 @@ Shader "Hidden/Drawing/Capture" } } + // Built-in RP SubShader — premultiplied (fallback) SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" "Premultiplied"="True" } @@ -96,7 +206,6 @@ Shader "Hidden/Drawing/Capture" fixed4 frag (v2f i) : SV_Target { - // sample the texture fixed4 col = tex2D(_MainTex, i.uv); return col; } diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Tool.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Tool.shader index 567894646a..c57518330a 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Tool.shader +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Tool.shader @@ -4,6 +4,64 @@ Shader "Samples/Drawing/Tool" { _MainTex ("Texture", 2D) = "white" {} } + + // URP SubShader + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" "Premultiplied"="False" } + LOD 100 + + Pass + { + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + float4 color : COLOR0; + }; + + struct Varyings + { + float2 uv : TEXCOORD0; + float4 positionCS : SV_POSITION; + float4 color : COLOR0; + }; + + Varyings vert(Attributes input) + { + Varyings output; + output.positionCS = TransformObjectToHClip(input.positionOS.xyz); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.color = input.color; + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * input.color; + return col; + } + ENDHLSL + } + } + + // Built-in RP SubShader (fallback) SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" "Premultiplied"="False" } @@ -47,7 +105,6 @@ Shader "Samples/Drawing/Tool" fixed4 frag (v2f i) : SV_Target { - // sample the texture fixed4 col = tex2D(_MainTex, i.uv) * i.color; return col; } diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader new file mode 100644 index 0000000000..91a6b550d2 --- /dev/null +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader @@ -0,0 +1,175 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + // URP SubShader — selected when Universal Render Pipeline is active + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + // Built-in RP SubShader — fallback when no SRP is active + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader.meta b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader.meta new file mode 100644 index 0000000000..da9e6caa07 --- /dev/null +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index 5486b34afd..79c4346e45 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,10 +1,10 @@ { "dependencies": { - "com.unity.ai.navigation": "1.1.6", + "com.unity.ai.navigation": "1.1.7", "com.unity.analytics": "3.8.1", "com.unity.cinemachine": "3.1.6", "com.unity.coding": "0.1.0-preview.26", - "com.unity.ide.rider": "3.0.36", + "com.unity.ide.rider": "3.0.38", "com.unity.ide.visualstudio": "2.0.22", "com.unity.settings-manager": "2.1.0", "com.unity.test-framework": "1.4.5", @@ -12,6 +12,7 @@ "com.unity.test-framework.performance": "3.0.3", "com.unity.test-framework.utp-reporter": "1.1.0-preview", "com.unity.textmeshpro": "3.0.7", + "com.unity.render-pipelines.universal": "14.0.11", "com.unity.ugui": "2.0.0", "nuget.mono-cecil": "1.0.0", "com.unity.modules.ai": "1.0.0", diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 78c90e918e..e9afbba506 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -40,7 +40,8 @@ GraphicsSettings: m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_CustomRenderPipeline: {fileID: 0} + m_CustomRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} m_TransparencySortMode: 0 m_TransparencySortAxis: {x: 0, y: 0, z: 1} m_DefaultRenderingPath: 1 @@ -61,10 +62,12 @@ GraphicsSettings: m_FogKeepExp2: 1 m_AlbedoSwatchInfos: [] m_LightsUseLinearIntensity: 0 - m_LightsUseColorTemperature: 0 + m_LightsUseColorTemperature: 1 m_DefaultRenderingLayerMask: 1 m_LogWhenShaderIsCompiled: 0 - m_SRPDefaultSettings: {} + m_SRPDefaultSettings: + UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 3c7230e15ebbbb640a4fe635e888f015, + type: 2} m_LightProbeOutsideHullStrategy: 0 m_CameraRelativeLightCulling: 0 m_CameraRelativeShadowCulling: 0 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 35680235d7..3d94a7d48a 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -44,7 +44,8 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} + customRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} terrainQualityOverrides: 0 terrainPixelError: 1 terrainDetailDensityScale: 1 @@ -93,7 +94,8 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} + customRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} terrainQualityOverrides: 0 terrainPixelError: 1 terrainDetailDensityScale: 1 @@ -142,7 +144,8 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} + customRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} terrainQualityOverrides: 0 terrainPixelError: 1 terrainDetailDensityScale: 1 @@ -191,7 +194,8 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} + customRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} terrainQualityOverrides: 0 terrainPixelError: 1 terrainDetailDensityScale: 1 @@ -240,7 +244,8 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} + customRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} terrainQualityOverrides: 0 terrainPixelError: 1 terrainDetailDensityScale: 1 @@ -289,7 +294,8 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} + customRenderPipeline: {fileID: 11400000, guid: 419b51160a38fc648a23b6a5b447b92e, + type: 2} terrainQualityOverrides: 0 terrainPixelError: 1 terrainDetailDensityScale: 1 diff --git a/ProjectSettings/ShaderGraphSettings.asset b/ProjectSettings/ShaderGraphSettings.asset new file mode 100644 index 0000000000..59c4647f47 --- /dev/null +++ b/ProjectSettings/ShaderGraphSettings.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + 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: de02f9e1d18f588468e474319d09a723, type: 3} + m_Name: + m_EditorClassIdentifier: + shaderVariantLimit: 2048 + customInterpolatorErrorThreshold: 32 + customInterpolatorWarningThreshold: 16 diff --git a/ProjectSettings/URPProjectSettings.asset b/ProjectSettings/URPProjectSettings.asset new file mode 100644 index 0000000000..cd7fd8c61b --- /dev/null +++ b/ProjectSettings/URPProjectSettings.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + 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: 247994e1f5a72c2419c26a37e9334c01, type: 3} + m_Name: + m_EditorClassIdentifier: + m_LastMaterialVersion: 7 From e5d4721abbafa603288c9363d38a36130803a31b Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 25 Mar 2026 09:54:11 +0200 Subject: [PATCH 02/15] Add default materials for legacy built in render pipeline support Add a SimpleLit shader and Default.mat assets (with .meta) across multiple sample folders (InGameHints, ProjectWideActions, RebindingUI, SimpleDemo, SimpleMultiplayer, UIvsGameInput, UnityRemote). Update sample scenes and prefabs to reference the new Default material GUIDs and adjust RebindingUI game materials to use the new shader GUID. This provides a shared lightweight PBR shader and default materials for the sample content. --- Assets/Samples/InGameHints/Default.mat | 30 +++ Assets/Samples/InGameHints/Default.mat.meta | 8 + .../InGameHints/InGameHintsSampleScene.unity | 44 ++--- .../Samples/InGameHints/SimpleLit.shader.meta | 10 + Assets/Samples/ProjectWideActions/Default.mat | 30 +++ .../ProjectWideActions/Default.mat.meta | 8 + .../ProjectWideActionsSampleScene.unity | 2 +- .../ProjectWideActions/SimpleLit.shader | 173 ++++++++++++++++++ .../ProjectWideActions/SimpleLit.shader.meta | 10 + Assets/Samples/RebindingUI/Default.mat | 30 +++ Assets/Samples/RebindingUI/Default.mat.meta | 8 + .../RebindingUI/Game/BulletMaterial.mat | 2 +- .../RebindingUI/Game/EnemyMaterial.mat | 2 +- .../Samples/RebindingUI/Game/Explosion.prefab | 2 +- .../RebindingUI/Game/PlayerMaterial.mat | 2 +- .../RebindingUI/Game/PlayerMaterial2.mat | 2 +- Assets/Samples/RebindingUI/SimpleLit.shader | 173 ++++++++++++++++++ .../Samples/RebindingUI/SimpleLit.shader.meta | 10 + Assets/Samples/SimpleDemo/Default.mat | 30 +++ Assets/Samples/SimpleDemo/Default.mat.meta | 8 + Assets/Samples/SimpleDemo/Environment.prefab | 10 +- Assets/Samples/SimpleDemo/SimpleLit.shader | 173 ++++++++++++++++++ .../Samples/SimpleDemo/SimpleLit.shader.meta | 10 + .../SimpleDemo/SimpleProjectile.prefab | 2 +- Assets/Samples/SimpleMultiplayer/Default.mat | 30 +++ .../SimpleMultiplayer/Default.mat.meta | 8 + .../SimpleMultiplayer/SimpleLit.shader | 173 ++++++++++++++++++ .../SimpleMultiplayer/SimpleLit.shader.meta | 10 + .../SimpleMultiplayerDemo.unity | 48 ++--- Assets/Samples/UIvsGameInput/Default.mat | 30 +++ Assets/Samples/UIvsGameInput/Default.mat.meta | 8 + .../Samples/UIvsGameInput/Projectile.prefab | 2 +- Assets/Samples/UIvsGameInput/SimpleLit.shader | 173 ++++++++++++++++++ .../UIvsGameInput/SimpleLit.shader.meta | 10 + .../Samples/UIvsGameInput/UIvsGameInput.unity | 20 +- Assets/Samples/UnityRemote/CubeMaterial.mat | 2 +- Assets/Samples/UnityRemote/SimpleLit.shader | 173 ++++++++++++++++++ .../Samples/UnityRemote/SimpleLit.shader.meta | 10 + 38 files changed, 1406 insertions(+), 70 deletions(-) create mode 100644 Assets/Samples/InGameHints/Default.mat create mode 100644 Assets/Samples/InGameHints/Default.mat.meta create mode 100644 Assets/Samples/InGameHints/SimpleLit.shader.meta create mode 100644 Assets/Samples/ProjectWideActions/Default.mat create mode 100644 Assets/Samples/ProjectWideActions/Default.mat.meta create mode 100644 Assets/Samples/ProjectWideActions/SimpleLit.shader create mode 100644 Assets/Samples/ProjectWideActions/SimpleLit.shader.meta create mode 100644 Assets/Samples/RebindingUI/Default.mat create mode 100644 Assets/Samples/RebindingUI/Default.mat.meta create mode 100644 Assets/Samples/RebindingUI/SimpleLit.shader create mode 100644 Assets/Samples/RebindingUI/SimpleLit.shader.meta create mode 100644 Assets/Samples/SimpleDemo/Default.mat create mode 100644 Assets/Samples/SimpleDemo/Default.mat.meta create mode 100644 Assets/Samples/SimpleDemo/SimpleLit.shader create mode 100644 Assets/Samples/SimpleDemo/SimpleLit.shader.meta create mode 100644 Assets/Samples/SimpleMultiplayer/Default.mat create mode 100644 Assets/Samples/SimpleMultiplayer/Default.mat.meta create mode 100644 Assets/Samples/SimpleMultiplayer/SimpleLit.shader create mode 100644 Assets/Samples/SimpleMultiplayer/SimpleLit.shader.meta create mode 100644 Assets/Samples/UIvsGameInput/Default.mat create mode 100644 Assets/Samples/UIvsGameInput/Default.mat.meta create mode 100644 Assets/Samples/UIvsGameInput/SimpleLit.shader create mode 100644 Assets/Samples/UIvsGameInput/SimpleLit.shader.meta create mode 100644 Assets/Samples/UnityRemote/SimpleLit.shader create mode 100644 Assets/Samples/UnityRemote/SimpleLit.shader.meta diff --git a/Assets/Samples/InGameHints/Default.mat b/Assets/Samples/InGameHints/Default.mat new file mode 100644 index 0000000000..8a7b4649d2 --- /dev/null +++ b/Assets/Samples/InGameHints/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Samples/InGameHints/Default.mat.meta b/Assets/Samples/InGameHints/Default.mat.meta new file mode 100644 index 0000000000..b16ee6ff35 --- /dev/null +++ b/Assets/Samples/InGameHints/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/InGameHints/InGameHintsSampleScene.unity b/Assets/Samples/InGameHints/InGameHintsSampleScene.unity index 8bac79eb62..5a000ee4a3 100644 --- a/Assets/Samples/InGameHints/InGameHintsSampleScene.unity +++ b/Assets/Samples/InGameHints/InGameHintsSampleScene.unity @@ -368,7 +368,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -501,7 +501,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -713,7 +713,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -819,7 +819,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -952,7 +952,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1085,7 +1085,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1218,7 +1218,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1351,7 +1351,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1484,7 +1484,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1617,7 +1617,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1750,7 +1750,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1883,7 +1883,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2016,7 +2016,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2292,7 +2292,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2425,7 +2425,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2558,7 +2558,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2691,7 +2691,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2824,7 +2824,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2957,7 +2957,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3090,7 +3090,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3223,7 +3223,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3356,7 +3356,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/InGameHints/SimpleLit.shader.meta b/Assets/Samples/InGameHints/SimpleLit.shader.meta new file mode 100644 index 0000000000..302548e0f9 --- /dev/null +++ b/Assets/Samples/InGameHints/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/ProjectWideActions/Default.mat b/Assets/Samples/ProjectWideActions/Default.mat new file mode 100644 index 0000000000..1ec8689196 --- /dev/null +++ b/Assets/Samples/ProjectWideActions/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Samples/ProjectWideActions/Default.mat.meta b/Assets/Samples/ProjectWideActions/Default.mat.meta new file mode 100644 index 0000000000..2003fad83e --- /dev/null +++ b/Assets/Samples/ProjectWideActions/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity b/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity index 6368a997c8..2b7c125e83 100644 --- a/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity +++ b/Assets/Samples/ProjectWideActions/ProjectWideActionsSampleScene.unity @@ -413,7 +413,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/ProjectWideActions/SimpleLit.shader b/Assets/Samples/ProjectWideActions/SimpleLit.shader new file mode 100644 index 0000000000..242fa4065f --- /dev/null +++ b/Assets/Samples/ProjectWideActions/SimpleLit.shader @@ -0,0 +1,173 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/ProjectWideActions/SimpleLit.shader.meta b/Assets/Samples/ProjectWideActions/SimpleLit.shader.meta new file mode 100644 index 0000000000..7a0e0b5296 --- /dev/null +++ b/Assets/Samples/ProjectWideActions/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/RebindingUI/Default.mat b/Assets/Samples/RebindingUI/Default.mat new file mode 100644 index 0000000000..78dcecf5b3 --- /dev/null +++ b/Assets/Samples/RebindingUI/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Samples/RebindingUI/Default.mat.meta b/Assets/Samples/RebindingUI/Default.mat.meta new file mode 100644 index 0000000000..6951666b77 --- /dev/null +++ b/Assets/Samples/RebindingUI/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/RebindingUI/Game/BulletMaterial.mat b/Assets/Samples/RebindingUI/Game/BulletMaterial.mat index 630f5ed2ba..7799774819 100644 --- a/Assets/Samples/RebindingUI/Game/BulletMaterial.mat +++ b/Assets/Samples/RebindingUI/Game/BulletMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: BulletMaterial - m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} + m_Shader: {fileID: 4800000, guid: c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat b/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat index 23fbc0058d..cb49be369c 100644 --- a/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat +++ b/Assets/Samples/RebindingUI/Game/EnemyMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: EnemyMaterial - m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} + m_Shader: {fileID: 4800000, guid: c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/Game/Explosion.prefab b/Assets/Samples/RebindingUI/Game/Explosion.prefab index 72173c89d7..ca14233d1c 100644 --- a/Assets/Samples/RebindingUI/Game/Explosion.prefab +++ b/Assets/Samples/RebindingUI/Game/Explosion.prefab @@ -79,7 +79,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7, type: 2} - {fileID: 10308, guid: 0000000000000000f000000000000000, type: 0} m_StaticBatchInfo: firstSubMesh: 0 diff --git a/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat b/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat index 8bd4937f6d..2690d54c89 100644 --- a/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat +++ b/Assets/Samples/RebindingUI/Game/PlayerMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: PlayerMaterial - m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} + m_Shader: {fileID: 4800000, guid: c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat b/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat index 9cc446d3b4..c8a2dcafa3 100644 --- a/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat +++ b/Assets/Samples/RebindingUI/Game/PlayerMaterial2.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: PlayerMaterial2 - m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} + m_Shader: {fileID: 4800000, guid: c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: diff --git a/Assets/Samples/RebindingUI/SimpleLit.shader b/Assets/Samples/RebindingUI/SimpleLit.shader new file mode 100644 index 0000000000..242fa4065f --- /dev/null +++ b/Assets/Samples/RebindingUI/SimpleLit.shader @@ -0,0 +1,173 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/RebindingUI/SimpleLit.shader.meta b/Assets/Samples/RebindingUI/SimpleLit.shader.meta new file mode 100644 index 0000000000..993ddc84a3 --- /dev/null +++ b/Assets/Samples/RebindingUI/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/SimpleDemo/Default.mat b/Assets/Samples/SimpleDemo/Default.mat new file mode 100644 index 0000000000..847fbdd07c --- /dev/null +++ b/Assets/Samples/SimpleDemo/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Samples/SimpleDemo/Default.mat.meta b/Assets/Samples/SimpleDemo/Default.mat.meta new file mode 100644 index 0000000000..55ca30f20a --- /dev/null +++ b/Assets/Samples/SimpleDemo/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/SimpleDemo/Environment.prefab b/Assets/Samples/SimpleDemo/Environment.prefab index fc95ef56c2..3fa98963ff 100644 --- a/Assets/Samples/SimpleDemo/Environment.prefab +++ b/Assets/Samples/SimpleDemo/Environment.prefab @@ -124,7 +124,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -324,7 +324,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -429,7 +429,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -534,7 +534,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -639,7 +639,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/SimpleDemo/SimpleLit.shader b/Assets/Samples/SimpleDemo/SimpleLit.shader new file mode 100644 index 0000000000..242fa4065f --- /dev/null +++ b/Assets/Samples/SimpleDemo/SimpleLit.shader @@ -0,0 +1,173 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/SimpleDemo/SimpleLit.shader.meta b/Assets/Samples/SimpleDemo/SimpleLit.shader.meta new file mode 100644 index 0000000000..cc20862d0e --- /dev/null +++ b/Assets/Samples/SimpleDemo/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/SimpleDemo/SimpleProjectile.prefab b/Assets/Samples/SimpleDemo/SimpleProjectile.prefab index b41223fb07..39aff06beb 100644 --- a/Assets/Samples/SimpleDemo/SimpleProjectile.prefab +++ b/Assets/Samples/SimpleDemo/SimpleProjectile.prefab @@ -84,7 +84,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/SimpleMultiplayer/Default.mat b/Assets/Samples/SimpleMultiplayer/Default.mat new file mode 100644 index 0000000000..3c44bd0c30 --- /dev/null +++ b/Assets/Samples/SimpleMultiplayer/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Samples/SimpleMultiplayer/Default.mat.meta b/Assets/Samples/SimpleMultiplayer/Default.mat.meta new file mode 100644 index 0000000000..e032e0d956 --- /dev/null +++ b/Assets/Samples/SimpleMultiplayer/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/SimpleMultiplayer/SimpleLit.shader b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader new file mode 100644 index 0000000000..242fa4065f --- /dev/null +++ b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader @@ -0,0 +1,173 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/SimpleMultiplayer/SimpleLit.shader.meta b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader.meta new file mode 100644 index 0000000000..ec8af73811 --- /dev/null +++ b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity b/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity index 2567781408..303c632170 100644 --- a/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity +++ b/Assets/Samples/SimpleMultiplayer/SimpleMultiplayerDemo.unity @@ -183,7 +183,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -288,7 +288,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -487,7 +487,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -592,7 +592,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -697,7 +697,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -802,7 +802,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -907,7 +907,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1012,7 +1012,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1117,7 +1117,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1222,7 +1222,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1327,7 +1327,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1433,7 +1433,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1538,7 +1538,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1643,7 +1643,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1748,7 +1748,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1853,7 +1853,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1958,7 +1958,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2063,7 +2063,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2168,7 +2168,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2273,7 +2273,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2378,7 +2378,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2483,7 +2483,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2588,7 +2588,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2693,7 +2693,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/UIvsGameInput/Default.mat b/Assets/Samples/UIvsGameInput/Default.mat new file mode 100644 index 0000000000..f6d32625ea --- /dev/null +++ b/Assets/Samples/UIvsGameInput/Default.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Default + m_Shader: {fileID: 4800000, guid: e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Glossiness: 0.5 + - _Metallic: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Samples/UIvsGameInput/Default.mat.meta b/Assets/Samples/UIvsGameInput/Default.mat.meta new file mode 100644 index 0000000000..5e66507b13 --- /dev/null +++ b/Assets/Samples/UIvsGameInput/Default.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/UIvsGameInput/Projectile.prefab b/Assets/Samples/UIvsGameInput/Projectile.prefab index 4ef7f71982..c57d755c8d 100644 --- a/Assets/Samples/UIvsGameInput/Projectile.prefab +++ b/Assets/Samples/UIvsGameInput/Projectile.prefab @@ -84,7 +84,7 @@ MeshRenderer: m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/UIvsGameInput/SimpleLit.shader b/Assets/Samples/UIvsGameInput/SimpleLit.shader new file mode 100644 index 0000000000..242fa4065f --- /dev/null +++ b/Assets/Samples/UIvsGameInput/SimpleLit.shader @@ -0,0 +1,173 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/UIvsGameInput/SimpleLit.shader.meta b/Assets/Samples/UIvsGameInput/SimpleLit.shader.meta new file mode 100644 index 0000000000..d9d9ae8d4d --- /dev/null +++ b/Assets/Samples/UIvsGameInput/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/UIvsGameInput/UIvsGameInput.unity b/Assets/Samples/UIvsGameInput/UIvsGameInput.unity index ef597f4067..8822c703fb 100644 --- a/Assets/Samples/UIvsGameInput/UIvsGameInput.unity +++ b/Assets/Samples/UIvsGameInput/UIvsGameInput.unity @@ -182,7 +182,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -909,7 +909,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1285,7 +1285,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1893,7 +1893,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2092,7 +2092,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2197,7 +2197,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2302,7 +2302,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2486,7 +2486,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2724,7 +2724,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3327,7 +3327,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: c8291cad59243b24ba551b0bc44dc40d, type: 2} + - {fileID: 2100000, guid: f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Samples/UnityRemote/CubeMaterial.mat b/Assets/Samples/UnityRemote/CubeMaterial.mat index d69a0dba6f..d7593201b1 100644 --- a/Assets/Samples/UnityRemote/CubeMaterial.mat +++ b/Assets/Samples/UnityRemote/CubeMaterial.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: CubeMaterial - m_Shader: {fileID: 4800000, guid: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6, type: 3} + m_Shader: {fileID: 4800000, guid: e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] diff --git a/Assets/Samples/UnityRemote/SimpleLit.shader b/Assets/Samples/UnityRemote/SimpleLit.shader new file mode 100644 index 0000000000..242fa4065f --- /dev/null +++ b/Assets/Samples/UnityRemote/SimpleLit.shader @@ -0,0 +1,173 @@ +Shader "Samples/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/UnityRemote/SimpleLit.shader.meta b/Assets/Samples/UnityRemote/SimpleLit.shader.meta new file mode 100644 index 0000000000..93916a47c6 --- /dev/null +++ b/Assets/Samples/UnityRemote/SimpleLit.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: From 171d3aafe7b75c123f7b41058fa93b194eb473ff Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 25 Mar 2026 10:54:37 +0200 Subject: [PATCH 03/15] Add punctual shadow support and alpha options Add support for punctual light shadows across sample SimpleLit shaders and improve capture shader blending. - Created Assets/Samples/InGameHints/SimpleLit.shader (full URP+fallback implementation). - For multiple Sample SimpleLit shaders (various sample folders and ExternalSampleProjects): added #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW, introduced float3 _LightPosition, and compute lightDir conditionally (use _LightPosition for punctual lights, otherwise _LightDirection) before ApplyShadowBias. Also adjusted shader names to include sample subfolder paths. - Updated ExternalSampleProjects/InputDeviceTester/WorldCoord Diffuse.shader: added screen shadow and soft shadow multi_compile flags, normalized blend weights for axis-based texturing, use TransformWorldToShadowCoord to get shadowCoord for GetMainLight, and factor in distanceAttenuation and shadowAttenuation into diffuse lighting. - Refactored ExternalSampleProjects/TouchSamples Capture.shader: added properties for _SrcBlend, _DstBlend and _Premultiplied, made Blend use those properties, added local shader_feature for _PREMULTIPLIED_ON, consolidated URP/premultiplied variants, unified built-in fallback paths, and updated fragment logic to correctly handle premultiplied vs non-premultiplied output. These changes improve shadow correctness for punctual lights and add flexible, correct blending modes for capture/predicated premultiplied alpha handling. --- Assets/Samples/InGameHints/SimpleLit.shader | 182 ++++++++++++++++++ .../ProjectWideActions/SimpleLit.shader | 13 +- Assets/Samples/RebindingUI/SimpleLit.shader | 13 +- Assets/Samples/SimpleDemo/SimpleLit.shader | 13 +- .../SimpleMultiplayer/SimpleLit.shader | 13 +- Assets/Samples/UIvsGameInput/SimpleLit.shader | 13 +- Assets/Samples/UnityRemote/SimpleLit.shader | 13 +- Assets/Shaders/SamplesSimpleLit.shader | 11 +- .../Shaders/SimpleLit.shader | 13 +- .../Shaders/WorldCoord Diffuse.shader | 26 ++- .../Demo/Shaders/Drawing/Capture.shader | 144 +++----------- .../Assets/Demo/Shaders/SimpleLit.shader | 13 +- 12 files changed, 327 insertions(+), 140 deletions(-) create mode 100644 Assets/Samples/InGameHints/SimpleLit.shader diff --git a/Assets/Samples/InGameHints/SimpleLit.shader b/Assets/Samples/InGameHints/SimpleLit.shader new file mode 100644 index 0000000000..dbf25dde86 --- /dev/null +++ b/Assets/Samples/InGameHints/SimpleLit.shader @@ -0,0 +1,182 @@ +Shader "Samples/InGameHints/SimpleLit" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + + SubShader + { + Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" "Queue"="Geometry" } + + Pass + { + Name "ForwardLit" + Tags { "LightMode"="UniversalForward" } + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _ADDITIONAL_LIGHTS + #pragma multi_compile_fog + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_MainTex); + SAMPLER(sampler_MainTex); + + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + half _Glossiness; + half _Metallic; + CBUFFER_END + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float3 normalWS : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float fogFactor : TEXCOORD3; + }; + + Varyings vert(Attributes input) + { + Varyings output; + VertexPositionInputs posInputs = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = posInputs.positionCS; + output.positionWS = posInputs.positionWS; + output.normalWS = TransformObjectToWorldNormal(input.normalOS); + output.uv = TRANSFORM_TEX(input.uv, _MainTex); + output.fogFactor = ComputeFogFactor(posInputs.positionCS.z); + return output; + } + + half4 frag(Varyings input) : SV_Target + { + half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * _Color; + + InputData inputData = (InputData)0; + inputData.positionWS = input.positionWS; + inputData.normalWS = normalize(input.normalWS); + inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + + SurfaceData surfaceData = (SurfaceData)0; + surfaceData.albedo = albedo.rgb; + surfaceData.alpha = albedo.a; + surfaceData.metallic = _Metallic; + surfaceData.smoothness = _Glossiness; + surfaceData.occlusion = 1.0; + + half4 color = UniversalFragmentPBR(inputData, surfaceData); + color.rgb = MixFog(color.rgb, input.fogFactor); + return color; + } + ENDHLSL + } + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + ColorMask 0 + + HLSLPROGRAM + #pragma vertex ShadowVert + #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + float3 _LightDirection; + float3 _LightPosition; + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + }; + + Varyings ShadowVert(Attributes input) + { + Varyings output; + float3 posWS = TransformObjectToWorld(input.positionOS.xyz); + float3 normalWS = TransformObjectToWorldNormal(input.normalOS); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); + #if UNITY_REVERSED_Z + output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + output.positionCS.z = max(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + return output; + } + + half4 ShadowFrag(Varyings input) : SV_Target + { + return 0; + } + ENDHLSL + } + } + + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Standard fullforwardshadows + #pragma target 3.0 + + sampler2D _MainTex; + half _Glossiness; + half _Metallic; + fixed4 _Color; + + struct Input + { + float2 uv_MainTex; + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + + FallBack "Diffuse" +} diff --git a/Assets/Samples/ProjectWideActions/SimpleLit.shader b/Assets/Samples/ProjectWideActions/SimpleLit.shader index 242fa4065f..5a7961fb28 100644 --- a/Assets/Samples/ProjectWideActions/SimpleLit.shader +++ b/Assets/Samples/ProjectWideActions/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/ProjectWideActions/SimpleLit" { Properties { @@ -100,11 +100,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +124,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/Assets/Samples/RebindingUI/SimpleLit.shader b/Assets/Samples/RebindingUI/SimpleLit.shader index 242fa4065f..d4034af3ea 100644 --- a/Assets/Samples/RebindingUI/SimpleLit.shader +++ b/Assets/Samples/RebindingUI/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/RebindingUI/SimpleLit" { Properties { @@ -100,11 +100,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +124,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/Assets/Samples/SimpleDemo/SimpleLit.shader b/Assets/Samples/SimpleDemo/SimpleLit.shader index 242fa4065f..055deb5265 100644 --- a/Assets/Samples/SimpleDemo/SimpleLit.shader +++ b/Assets/Samples/SimpleDemo/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/SimpleDemo/SimpleLit" { Properties { @@ -100,11 +100,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +124,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/Assets/Samples/SimpleMultiplayer/SimpleLit.shader b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader index 242fa4065f..3dfd8d14bf 100644 --- a/Assets/Samples/SimpleMultiplayer/SimpleLit.shader +++ b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/SimpleMultiplayer/SimpleLit" { Properties { @@ -100,11 +100,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +124,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/Assets/Samples/UIvsGameInput/SimpleLit.shader b/Assets/Samples/UIvsGameInput/SimpleLit.shader index 242fa4065f..88edabc9d4 100644 --- a/Assets/Samples/UIvsGameInput/SimpleLit.shader +++ b/Assets/Samples/UIvsGameInput/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/UIvsGameInput/SimpleLit" { Properties { @@ -100,11 +100,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +124,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/Assets/Samples/UnityRemote/SimpleLit.shader b/Assets/Samples/UnityRemote/SimpleLit.shader index 242fa4065f..f20c2a3f30 100644 --- a/Assets/Samples/UnityRemote/SimpleLit.shader +++ b/Assets/Samples/UnityRemote/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/UnityRemote/SimpleLit" { Properties { @@ -100,11 +100,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +124,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/Assets/Shaders/SamplesSimpleLit.shader b/Assets/Shaders/SamplesSimpleLit.shader index 91a6b550d2..a46edbd04a 100644 --- a/Assets/Shaders/SamplesSimpleLit.shader +++ b/Assets/Shaders/SamplesSimpleLit.shader @@ -101,11 +101,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -123,7 +125,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader index 91a6b550d2..83f52ec485 100644 --- a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/InputDeviceTester/SimpleLit" { Properties { @@ -101,11 +101,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -123,7 +125,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader index 1f24f80a38..bcc9f40cab 100644 --- a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader @@ -18,7 +18,8 @@ SubShader { HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -67,17 +68,19 @@ SubShader { half4 texXZ = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.positionWS.xz * _BaseScale.y); half4 texYZ = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.positionWS.yz * _BaseScale.x); - half3 mask = half3( + half3 blendWeights = abs(half3( dot(normalWS, half3(0, 0, 1)), dot(normalWS, half3(0, 1, 0)), - dot(normalWS, half3(1, 0, 0))); + dot(normalWS, half3(1, 0, 0)))); + blendWeights /= (blendWeights.x + blendWeights.y + blendWeights.z); - half4 tex = texXY * abs(mask.x) + texXZ * abs(mask.y) + texYZ * abs(mask.z); + half4 tex = texXY * blendWeights.x + texXZ * blendWeights.y + texYZ * blendWeights.z; half4 albedo = tex * _Color; - Light mainLight = GetMainLight(); + float4 shadowCoord = TransformWorldToShadowCoord(input.positionWS); + Light mainLight = GetMainLight(shadowCoord); half NdotL = saturate(dot(normalWS, mainLight.direction)); - half3 diffuse = albedo.rgb * mainLight.color * NdotL; + half3 diffuse = albedo.rgb * mainLight.color * (NdotL * mainLight.distanceAttenuation * mainLight.shadowAttenuation); half3 ambient = SampleSH(normalWS) * albedo.rgb; half3 finalColor = ambient + diffuse; @@ -100,11 +103,13 @@ SubShader { HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -122,7 +127,14 @@ SubShader { Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader index 0da9c5d0d3..b16e4304fa 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/Drawing/Capture.shader @@ -3,22 +3,26 @@ Shader "Hidden/Drawing/Capture" Properties { _MainTex ("Texture", 2D) = "white" {} + [Enum(SrcAlpha,5,One,1)] _SrcBlend ("Source Blend", Float) = 5 + [Enum(OneMinusSrcAlpha,10)] _DstBlend ("Dest Blend", Float) = 10 + [Toggle] _Premultiplied ("Premultiplied Alpha", Float) = 0 } - // URP SubShader — non-premultiplied variant + // URP SubShader SubShader { - Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" "Premultiplied"="False" } + Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" } LOD 100 Pass { - Blend SrcAlpha OneMinusSrcAlpha, OneMinusDstAlpha One + Blend [_SrcBlend] [_DstBlend], OneMinusDstAlpha One ZWrite Off HLSLPROGRAM #pragma vertex vert #pragma fragment frag + #pragma shader_feature_local _PREMULTIPLIED_ON #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" @@ -52,162 +56,70 @@ Shader "Hidden/Drawing/Capture" return output; } - half4 frag(Varyings input) : SV_Target - { - half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv) * input.color; - return col; - } - ENDHLSL - } - } - - // URP SubShader — premultiplied variant - SubShader - { - Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" "Premultiplied"="True" } - LOD 100 - - Pass - { - Blend One OneMinusSrcAlpha, OneMinusDstAlpha One - ZWrite Off - - HLSLPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" - - TEXTURE2D(_MainTex); - SAMPLER(sampler_MainTex); - - CBUFFER_START(UnityPerMaterial) - float4 _MainTex_ST; - CBUFFER_END - - struct Attributes - { - float4 positionOS : POSITION; - float2 uv : TEXCOORD0; - }; - - struct Varyings - { - float2 uv : TEXCOORD0; - float4 positionCS : SV_POSITION; - }; - - Varyings vert(Attributes input) - { - Varyings output; - output.positionCS = TransformObjectToHClip(input.positionOS.xyz); - output.uv = TRANSFORM_TEX(input.uv, _MainTex); - return output; - } - half4 frag(Varyings input) : SV_Target { half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv); - return col; + #if _PREMULTIPLIED_ON + return col; + #else + return col * input.color; + #endif } ENDHLSL } } - // Built-in RP SubShader — non-premultiplied (fallback) + // Built-in RP SubShader (fallback) SubShader { - Tags { "RenderType"="Transparent" "Queue"="Transparent" "Premultiplied"="False" } + Tags { "RenderType"="Transparent" "Queue"="Transparent" } LOD 100 Pass { - Blend SrcAlpha OneMinusSrcAlpha, OneMinusDstAlpha One + Blend [_SrcBlend] [_DstBlend], OneMinusDstAlpha One CGPROGRAM - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - float4 color : COLOR0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - float4 vertex : SV_POSITION; - float4 color : COLOR0; - }; - - sampler2D _MainTex; - float4 _MainTex_ST; - #pragma vertex vert #pragma fragment frag + #pragma shader_feature_local _PREMULTIPLIED_ON #include "UnityCG.cginc" - v2f vert (appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = TRANSFORM_TEX(v.uv, _MainTex); - o.color = v.color; - return o; - } - - fixed4 frag (v2f i) : SV_Target - { - fixed4 col = tex2D(_MainTex, i.uv) * i.color; - return col; - } - ENDCG - } - } - - // Built-in RP SubShader — premultiplied (fallback) - SubShader - { - Tags { "RenderType"="Transparent" "Queue"="Transparent" "Premultiplied"="True" } - LOD 100 - - Pass - { - Blend One OneMinusSrcAlpha, OneMinusDstAlpha One + sampler2D _MainTex; + float4 _MainTex_ST; - CGPROGRAM struct appdata { float4 vertex : POSITION; float2 uv : TEXCOORD0; + float4 color : COLOR0; }; struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; + float4 color : COLOR0; }; - sampler2D _MainTex; - float4 _MainTex_ST; - - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - - v2f vert (appdata v) + v2f vert(appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); o.uv = TRANSFORM_TEX(v.uv, _MainTex); + o.color = v.color; return o; } - fixed4 frag (v2f i) : SV_Target + fixed4 frag(v2f i) : SV_Target { fixed4 col = tex2D(_MainTex, i.uv); - return col; + #if _PREMULTIPLIED_ON + return col; + #else + return col * i.color; + #endif } ENDCG } diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader index 91a6b550d2..e4b61c2fa0 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader @@ -1,4 +1,4 @@ -Shader "Samples/SimpleLit" +Shader "Samples/TouchSamples/SimpleLit" { Properties { @@ -101,11 +101,13 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex ShadowVert #pragma fragment ShadowFrag + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" float3 _LightDirection; + float3 _LightPosition; struct Attributes { @@ -123,7 +125,14 @@ Shader "Samples/SimpleLit" Varyings output; float3 posWS = TransformObjectToWorld(input.positionOS.xyz); float3 normalWS = TransformObjectToWorldNormal(input.normalOS); - output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, _LightDirection)); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDir = normalize(_LightPosition - posWS); + #else + float3 lightDir = _LightDirection; + #endif + + output.positionCS = TransformWorldToHClip(ApplyShadowBias(posWS, normalWS, lightDir)); #if UNITY_REVERSED_Z output.positionCS.z = min(output.positionCS.z, UNITY_NEAR_CLIP_VALUE); #else From 1bbe43389206294c701dd6d6bc09ef55e2903a3f Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 25 Mar 2026 16:02:40 +0200 Subject: [PATCH 04/15] Enable screen/soft shadows and render graph Add _MAIN_LIGHT_SHADOWS_SCREEN and _SHADOWS_SOFT multi_compile pragmas to various SimpleLit sample shaders and set inputData.shadowCoord = TransformWorldToShadowCoord(...) so shaders can use screen and soft shadow paths. Also enable the Render Graph in the URP pipeline asset (m_EnableRenderGraph: 1). Affects multiple sample and external sample SimpleLit shaders and the URP pipeline asset. --- Assets/Samples/InGameHints/SimpleLit.shader | 4 +++- Assets/Samples/ProjectWideActions/SimpleLit.shader | 4 +++- Assets/Samples/RebindingUI/SimpleLit.shader | 4 +++- Assets/Samples/SimpleDemo/SimpleLit.shader | 4 +++- Assets/Samples/SimpleMultiplayer/SimpleLit.shader | 4 +++- Assets/Samples/UIvsGameInput/SimpleLit.shader | 4 +++- Assets/Samples/UnityRemote/SimpleLit.shader | 4 +++- Assets/Settings/URP-PipelineAsset.asset | 2 +- Assets/Shaders/SamplesSimpleLit.shader | 4 +++- .../Assets/InputDeviceTester/Shaders/SimpleLit.shader | 4 +++- .../TouchSamples/Assets/Demo/Shaders/SimpleLit.shader | 4 +++- 11 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Assets/Samples/InGameHints/SimpleLit.shader b/Assets/Samples/InGameHints/SimpleLit.shader index dbf25dde86..1c9d88da04 100644 --- a/Assets/Samples/InGameHints/SimpleLit.shader +++ b/Assets/Samples/InGameHints/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/InGameHints/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/InGameHints/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Samples/ProjectWideActions/SimpleLit.shader b/Assets/Samples/ProjectWideActions/SimpleLit.shader index 5a7961fb28..3cb2ab32f1 100644 --- a/Assets/Samples/ProjectWideActions/SimpleLit.shader +++ b/Assets/Samples/ProjectWideActions/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/ProjectWideActions/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/ProjectWideActions/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Samples/RebindingUI/SimpleLit.shader b/Assets/Samples/RebindingUI/SimpleLit.shader index d4034af3ea..e6a861e9d3 100644 --- a/Assets/Samples/RebindingUI/SimpleLit.shader +++ b/Assets/Samples/RebindingUI/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/RebindingUI/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/RebindingUI/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Samples/SimpleDemo/SimpleLit.shader b/Assets/Samples/SimpleDemo/SimpleLit.shader index 055deb5265..edbf00cc3e 100644 --- a/Assets/Samples/SimpleDemo/SimpleLit.shader +++ b/Assets/Samples/SimpleDemo/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/SimpleDemo/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/SimpleDemo/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Samples/SimpleMultiplayer/SimpleLit.shader b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader index 3dfd8d14bf..692b9ecc81 100644 --- a/Assets/Samples/SimpleMultiplayer/SimpleLit.shader +++ b/Assets/Samples/SimpleMultiplayer/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/SimpleMultiplayer/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/SimpleMultiplayer/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Samples/UIvsGameInput/SimpleLit.shader b/Assets/Samples/UIvsGameInput/SimpleLit.shader index 88edabc9d4..212bf03afc 100644 --- a/Assets/Samples/UIvsGameInput/SimpleLit.shader +++ b/Assets/Samples/UIvsGameInput/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/UIvsGameInput/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/UIvsGameInput/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Samples/UnityRemote/SimpleLit.shader b/Assets/Samples/UnityRemote/SimpleLit.shader index f20c2a3f30..4c589b7b2c 100644 --- a/Assets/Samples/UnityRemote/SimpleLit.shader +++ b/Assets/Samples/UnityRemote/SimpleLit.shader @@ -20,7 +20,8 @@ Shader "Samples/UnityRemote/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -73,6 +74,7 @@ Shader "Samples/UnityRemote/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/Assets/Settings/URP-PipelineAsset.asset b/Assets/Settings/URP-PipelineAsset.asset index 57e57e7fb6..6383dd2ed7 100644 --- a/Assets/Settings/URP-PipelineAsset.asset +++ b/Assets/Settings/URP-PipelineAsset.asset @@ -67,7 +67,7 @@ MonoBehaviour: m_SupportsLightLayers: 0 m_DebugLevel: 0 m_StoreActionsOptimization: 0 - m_EnableRenderGraph: 0 + m_EnableRenderGraph: 1 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 diff --git a/Assets/Shaders/SamplesSimpleLit.shader b/Assets/Shaders/SamplesSimpleLit.shader index a46edbd04a..0ce7a529da 100644 --- a/Assets/Shaders/SamplesSimpleLit.shader +++ b/Assets/Shaders/SamplesSimpleLit.shader @@ -21,7 +21,8 @@ Shader "Samples/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -74,6 +75,7 @@ Shader "Samples/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader index 83f52ec485..924e0eb81c 100644 --- a/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader +++ b/ExternalSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/SimpleLit.shader @@ -21,7 +21,8 @@ Shader "Samples/InputDeviceTester/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -74,6 +75,7 @@ Shader "Samples/InputDeviceTester/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; diff --git a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader index e4b61c2fa0..fe06c0dd11 100644 --- a/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader +++ b/ExternalSampleProjects/TouchSamples/Assets/Demo/Shaders/SimpleLit.shader @@ -21,7 +21,8 @@ Shader "Samples/TouchSamples/SimpleLit" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile_fog @@ -74,6 +75,7 @@ Shader "Samples/TouchSamples/SimpleLit" inputData.positionWS = input.positionWS; inputData.normalWS = normalize(input.normalWS); inputData.viewDirectionWS = GetWorldSpaceNormalizeViewDir(input.positionWS); + inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS); SurfaceData surfaceData = (SurfaceData)0; surfaceData.albedo = albedo.rgb; From 38ccc90efe61288d7d87f6704cd0e1ecc278f773 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Thu, 26 Mar 2026 09:54:52 +0200 Subject: [PATCH 05/15] Add URP requirement to samples and define Update sample .sample.json descriptions to indicate the Universal Render Pipeline (URP) package is required for shader compilation. Add URP_COMPATIBILITY_MODE to Standalone scripting define symbols in ProjectSettings so code can conditionally enable URP compatibility. --- Assets/Samples/InGameHints/.sample.json | 2 +- Assets/Samples/InputDeviceTester/.sample.json | 2 +- Assets/Samples/RebindingUI/.sample.json | 2 +- Assets/Samples/SimpleDemo/.sample.json | 2 +- Assets/Samples/SimpleMultiplayer/.sample.json | 2 +- Assets/Samples/TouchSamples/.sample.json | 2 +- Assets/Samples/UIvsGameInput/.sample.json | 2 +- Assets/Samples/UnityRemote/.sample.json | 2 +- ProjectSettings/ProjectSettings.asset | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/Samples/InGameHints/.sample.json b/Assets/Samples/InGameHints/.sample.json index 5bd2644af4..188d6b1efa 100644 --- a/Assets/Samples/InGameHints/.sample.json +++ b/Assets/Samples/InGameHints/.sample.json @@ -1,4 +1,4 @@ { "displayName": "In-Game Hints", - "description": "Demonstrates how to create in-game hints in the UI which reflect current bindings and active control schemes." + "description": "Demonstrates how to create in-game hints in the UI which reflect current bindings and active control schemes. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/InputDeviceTester/.sample.json b/Assets/Samples/InputDeviceTester/.sample.json index 4a89ef6801..4ea3549c35 100644 --- a/Assets/Samples/InputDeviceTester/.sample.json +++ b/Assets/Samples/InputDeviceTester/.sample.json @@ -1,4 +1,4 @@ { "displayName": "InputDeviceTester", - "description": "A scene containing UI to visualize the controls on various supported input devices." + "description": "A scene containing UI to visualize the controls on various supported input devices. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/RebindingUI/.sample.json b/Assets/Samples/RebindingUI/.sample.json index e84e903262..ee58b907d6 100644 --- a/Assets/Samples/RebindingUI/.sample.json +++ b/Assets/Samples/RebindingUI/.sample.json @@ -1,4 +1,4 @@ { "displayName": "Rebinding UI", - "description": "An example UI component that demonstrates how to create UI for rebinding actions." + "description": "An example UI component that demonstrates how to create UI for rebinding actions. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/SimpleDemo/.sample.json b/Assets/Samples/SimpleDemo/.sample.json index f12e390272..a9b2bd52c5 100644 --- a/Assets/Samples/SimpleDemo/.sample.json +++ b/Assets/Samples/SimpleDemo/.sample.json @@ -1,4 +1,4 @@ { "displayName": "Simple Demo", - "description": "A walkthrough of a simple character controller that demonstrates several techniques for working with the input system. See the README.md file in the sample for details." + "description": "A walkthrough of a simple character controller that demonstrates several techniques for working with the input system. See the README.md file in the sample for details. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/SimpleMultiplayer/.sample.json b/Assets/Samples/SimpleMultiplayer/.sample.json index 522222de32..ccb36c6f16 100644 --- a/Assets/Samples/SimpleMultiplayer/.sample.json +++ b/Assets/Samples/SimpleMultiplayer/.sample.json @@ -1,4 +1,4 @@ { "displayName": "Simple Multiplayer", - "description": "Demonstrates how to set up a simple local multiplayer scenario." + "description": "Demonstrates how to set up a simple local multiplayer scenario. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/TouchSamples/.sample.json b/Assets/Samples/TouchSamples/.sample.json index 6bd08af3c2..f135c4ac6e 100644 --- a/Assets/Samples/TouchSamples/.sample.json +++ b/Assets/Samples/TouchSamples/.sample.json @@ -1,4 +1,4 @@ { "displayName": "Touch Samples", - "description": "A series of sample scenes for using touch input with the Input System package. This sample is not actually part of the package, but needs to be downloaded." + "description": "A series of sample scenes for using touch input with the Input System package. This sample is not actually part of the package, but needs to be downloaded. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/UIvsGameInput/.sample.json b/Assets/Samples/UIvsGameInput/.sample.json index 226f409858..4ce81292da 100644 --- a/Assets/Samples/UIvsGameInput/.sample.json +++ b/Assets/Samples/UIvsGameInput/.sample.json @@ -1,4 +1,4 @@ { "displayName": "UI vs. Game Input", - "description": "An example that shows how to deal with ambiguities that may arise when overlaying interactive UI elements on top of a game scene." + "description": "An example that shows how to deal with ambiguities that may arise when overlaying interactive UI elements on top of a game scene. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/Assets/Samples/UnityRemote/.sample.json b/Assets/Samples/UnityRemote/.sample.json index 1f122261a3..3ffc272b32 100644 --- a/Assets/Samples/UnityRemote/.sample.json +++ b/Assets/Samples/UnityRemote/.sample.json @@ -1,4 +1,4 @@ { "displayName": "Unity Remote", - "description": "An example with a simple scene for trying out the Unity Remote app." + "description": "An example with a simple scene for trying out the Unity Remote app. Requires the Universal Render Pipeline (URP) package to be installed for shader compilation." } \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 50e06c227a..2c10bd2488 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -732,7 +732,7 @@ PlayerSettings: webGLMemoryGeometricGrowthCap: 96 webGLPowerPreference: 2 scriptingDefineSymbols: - Standalone: UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT + Standalone: UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT;URP_COMPATIBILITY_MODE additionalCompilerArguments: {} platformArchitecture: iPhone: 1 From 978fa3e920cf295a9ed9cc9f532b7e0122bcb094 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Thu, 26 Mar 2026 10:25:41 +0200 Subject: [PATCH 06/15] Test if undefined URP version helps resolve CI upgrade issues --- Packages/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index 79c4346e45..4d9c1574b3 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -12,7 +12,7 @@ "com.unity.test-framework.performance": "3.0.3", "com.unity.test-framework.utp-reporter": "1.1.0-preview", "com.unity.textmeshpro": "3.0.7", - "com.unity.render-pipelines.universal": "14.0.11", + "com.unity.render-pipelines.universal": "", "com.unity.ugui": "2.0.0", "nuget.mono-cecil": "1.0.0", "com.unity.modules.ai": "1.0.0", From cf60004a183011091eef501a1945e3da798330d5 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Thu, 26 Mar 2026 10:40:59 +0200 Subject: [PATCH 07/15] Revert "Test if undefined URP version helps resolve CI upgrade issues" This reverts commit 978fa3e920cf295a9ed9cc9f532b7e0122bcb094. --- Packages/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index 4d9c1574b3..79c4346e45 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -12,7 +12,7 @@ "com.unity.test-framework.performance": "3.0.3", "com.unity.test-framework.utp-reporter": "1.1.0-preview", "com.unity.textmeshpro": "3.0.7", - "com.unity.render-pipelines.universal": "", + "com.unity.render-pipelines.universal": "14.0.11", "com.unity.ugui": "2.0.0", "nuget.mono-cecil": "1.0.0", "com.unity.modules.ai": "1.0.0", From 01fd47f64f4f6039f1657e11596b375fca1bb155 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Thu, 26 Mar 2026 10:44:27 +0200 Subject: [PATCH 08/15] Update ProjectSettings.asset --- ProjectSettings/ProjectSettings.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 2c10bd2488..ae51b7a5b8 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -46,7 +46,7 @@ PlayerSettings: defaultScreenHeight: 768 defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 - m_StereoRenderingPath: 1 + m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 unsupportedMSAAFallback: 0 m_SpriteBatchVertexThreshold: 300 From 631d5d1bdfa7063662c4ad63fe6cc98637909fd6 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Thu, 26 Mar 2026 11:50:36 +0200 Subject: [PATCH 09/15] Add URP_COMPATIBILITY_MODE scripting define Add the URP_COMPATIBILITY_MODE scripting define symbol to PlayerSettings across projects. Updates ProjectSettings.asset in the root project and ExternalSampleProjects (InputDeviceTester and TouchSamples) to set scriptingDefineSymbols for Android, iPhone, and tvOS, and ensure Standalone retains URP_COMPATIBILITY_MODE (preserving existing UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT for Standalone). This enables URP compatibility mode across those platforms and sample projects. --- .../InputDeviceTester/ProjectSettings/ProjectSettings.asset | 6 +++++- .../TouchSamples/ProjectSettings/ProjectSettings.asset | 6 +++++- ProjectSettings/ProjectSettings.asset | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ExternalSampleProjects/InputDeviceTester/ProjectSettings/ProjectSettings.asset b/ExternalSampleProjects/InputDeviceTester/ProjectSettings/ProjectSettings.asset index a69797d161..c355b0382c 100644 --- a/ExternalSampleProjects/InputDeviceTester/ProjectSettings/ProjectSettings.asset +++ b/ExternalSampleProjects/InputDeviceTester/ProjectSettings/ProjectSettings.asset @@ -509,7 +509,11 @@ PlayerSettings: webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLWasmStreaming: 0 - scriptingDefineSymbols: {} + scriptingDefineSymbols: + Android: URP_COMPATIBILITY_MODE + Standalone: URP_COMPATIBILITY_MODE + iPhone: URP_COMPATIBILITY_MODE + tvOS: URP_COMPATIBILITY_MODE platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} diff --git a/ExternalSampleProjects/TouchSamples/ProjectSettings/ProjectSettings.asset b/ExternalSampleProjects/TouchSamples/ProjectSettings/ProjectSettings.asset index 14a44a0e16..fd367abe32 100644 --- a/ExternalSampleProjects/TouchSamples/ProjectSettings/ProjectSettings.asset +++ b/ExternalSampleProjects/TouchSamples/ProjectSettings/ProjectSettings.asset @@ -509,7 +509,11 @@ PlayerSettings: webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLWasmStreaming: 0 - scriptingDefineSymbols: {} + scriptingDefineSymbols: + Android: URP_COMPATIBILITY_MODE + Standalone: URP_COMPATIBILITY_MODE + iPhone: URP_COMPATIBILITY_MODE + tvOS: URP_COMPATIBILITY_MODE platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index ae51b7a5b8..7711444041 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -732,7 +732,10 @@ PlayerSettings: webGLMemoryGeometricGrowthCap: 96 webGLPowerPreference: 2 scriptingDefineSymbols: + Android: URP_COMPATIBILITY_MODE Standalone: UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT;URP_COMPATIBILITY_MODE + iPhone: URP_COMPATIBILITY_MODE + tvOS: URP_COMPATIBILITY_MODE additionalCompilerArguments: {} platformArchitecture: iPhone: 1 From c0a47c0d264d232aedfae373f81d0dd83be4a1b5 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Fri, 27 Mar 2026 11:49:14 +0200 Subject: [PATCH 10/15] Update URP pipeline asset settings Adjust URP PipelineAsset flags: disable HDR, terrain holes, LOD cross-fade, light cookies, adaptive performance and data-driven lens flare; enable a set of prefiltering/SSAO/DBuffer/soft-shadow and native render-pass related flags and debug/write rendering layer keywords. These changes modify rendering feature toggles and preprocessing options in Assets/Settings/URP-PipelineAsset.asset and will affect visual quality and rendering behavior (e.g. HDR and certain lighting features turned off, while various prefilter/SSAO and render-pass features are turned on). Verify rendering and performance across target platforms after applying. --- Assets/Settings/URP-PipelineAsset.asset | 60 ++++++++++++------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Assets/Settings/URP-PipelineAsset.asset b/Assets/Settings/URP-PipelineAsset.asset index 6383dd2ed7..0d78991fc6 100644 --- a/Assets/Settings/URP-PipelineAsset.asset +++ b/Assets/Settings/URP-PipelineAsset.asset @@ -22,15 +22,15 @@ MonoBehaviour: m_RequireDepthTexture: 0 m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 - m_SupportsTerrainHoles: 1 - m_SupportsHDR: 1 + m_SupportsTerrainHoles: 0 + m_SupportsHDR: 0 m_HDRColorBufferPrecision: 0 m_MSAA: 1 m_RenderScale: 1 m_UpscalingFilter: 0 m_FsrOverrideSharpness: 0 m_FsrSharpness: 0.92 - m_EnableLODCrossFade: 1 + m_EnableLODCrossFade: 0 m_LODCrossFadeDitheringType: 1 m_ShEvalMode: 0 m_MainLightRenderingMode: 1 @@ -63,16 +63,16 @@ MonoBehaviour: m_UseSRPBatcher: 1 m_SupportsDynamicBatching: 0 m_MixedLightingSupported: 1 - m_SupportsLightCookies: 1 + m_SupportsLightCookies: 0 m_SupportsLightLayers: 0 m_DebugLevel: 0 m_StoreActionsOptimization: 0 m_EnableRenderGraph: 1 - m_UseAdaptivePerformance: 1 + m_UseAdaptivePerformance: 0 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 m_UseFastSRGBLinearConversion: 0 - m_SupportDataDrivenLensFlare: 1 + m_SupportDataDrivenLensFlare: 0 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 @@ -86,29 +86,29 @@ MonoBehaviour: m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLightShadows: 1 m_PrefilterXRKeywords: 0 - m_PrefilteringModeForwardPlus: 1 - m_PrefilteringModeDeferredRendering: 1 - m_PrefilteringModeScreenSpaceOcclusion: 1 - m_PrefilterDebugKeywords: 0 - m_PrefilterWriteRenderingLayers: 0 - m_PrefilterHDROutput: 0 - m_PrefilterSSAODepthNormals: 0 - m_PrefilterSSAOSourceDepthLow: 0 - m_PrefilterSSAOSourceDepthMedium: 0 - m_PrefilterSSAOSourceDepthHigh: 0 - m_PrefilterSSAOInterleaved: 0 - m_PrefilterSSAOBlueNoise: 0 - m_PrefilterSSAOSampleCountLow: 0 - m_PrefilterSSAOSampleCountMedium: 0 - m_PrefilterSSAOSampleCountHigh: 0 - m_PrefilterDBufferMRT1: 0 - m_PrefilterDBufferMRT2: 0 - m_PrefilterDBufferMRT3: 0 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 - m_PrefilterSoftShadows: 0 - m_PrefilterScreenCoord: 0 - m_PrefilterNativeRenderPass: 0 + m_PrefilteringModeForwardPlus: 0 + m_PrefilteringModeDeferredRendering: 0 + m_PrefilteringModeScreenSpaceOcclusion: 0 + m_PrefilterDebugKeywords: 1 + m_PrefilterWriteRenderingLayers: 1 + m_PrefilterHDROutput: 1 + m_PrefilterSSAODepthNormals: 1 + m_PrefilterSSAOSourceDepthLow: 1 + m_PrefilterSSAOSourceDepthMedium: 1 + m_PrefilterSSAOSourceDepthHigh: 1 + m_PrefilterSSAOInterleaved: 1 + m_PrefilterSSAOBlueNoise: 1 + m_PrefilterSSAOSampleCountLow: 1 + m_PrefilterSSAOSampleCountMedium: 1 + m_PrefilterSSAOSampleCountHigh: 1 + m_PrefilterDBufferMRT1: 1 + m_PrefilterDBufferMRT2: 1 + m_PrefilterDBufferMRT3: 1 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 + m_PrefilterSoftShadows: 1 + m_PrefilterScreenCoord: 1 + m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 From c5b6223110b0723d2298d9ed35c7b4815af4f15f Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Fri, 27 Mar 2026 12:36:24 +0200 Subject: [PATCH 11/15] Call DynamicGI.UpdateEnvironment on scene open Add an editor script (Assets/Editor/AmbientProbeSetup.cs) that triggers DynamicGI.UpdateEnvironment on editor load and whenever a scene is opened. Uses [InitializeOnLoad] to subscribe to EditorSceneManager.sceneOpened and schedules an initial update via EditorApplication.delayCall so ambient probes / GI environment are refreshed after scene load. --- Assets/Editor/AmbientProbeSetup.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Assets/Editor/AmbientProbeSetup.cs diff --git a/Assets/Editor/AmbientProbeSetup.cs b/Assets/Editor/AmbientProbeSetup.cs new file mode 100644 index 0000000000..ab55f1f43d --- /dev/null +++ b/Assets/Editor/AmbientProbeSetup.cs @@ -0,0 +1,19 @@ +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.SceneManagement; + +[InitializeOnLoad] +static class AmbientProbeSetup +{ + static AmbientProbeSetup() + { + EditorSceneManager.sceneOpened += OnSceneOpened; + EditorApplication.delayCall += () => DynamicGI.UpdateEnvironment(); + } + + static void OnSceneOpened(Scene scene, OpenSceneMode mode) + { + DynamicGI.UpdateEnvironment(); + } +} From 392c82ad9c8cda5d20fc075159283d79390834d7 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Fri, 27 Mar 2026 13:08:35 +0200 Subject: [PATCH 12/15] Revert "Call DynamicGI.UpdateEnvironment on scene open" This reverts commit c5b6223110b0723d2298d9ed35c7b4815af4f15f. --- Assets/Editor/AmbientProbeSetup.cs | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 Assets/Editor/AmbientProbeSetup.cs diff --git a/Assets/Editor/AmbientProbeSetup.cs b/Assets/Editor/AmbientProbeSetup.cs deleted file mode 100644 index ab55f1f43d..0000000000 --- a/Assets/Editor/AmbientProbeSetup.cs +++ /dev/null @@ -1,19 +0,0 @@ -using UnityEditor; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.SceneManagement; - -[InitializeOnLoad] -static class AmbientProbeSetup -{ - static AmbientProbeSetup() - { - EditorSceneManager.sceneOpened += OnSceneOpened; - EditorApplication.delayCall += () => DynamicGI.UpdateEnvironment(); - } - - static void OnSceneOpened(Scene scene, OpenSceneMode mode) - { - DynamicGI.UpdateEnvironment(); - } -} From 93357cd8168b3b32d6855a47ee163eca07025a7a Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Fri, 27 Mar 2026 13:43:15 +0200 Subject: [PATCH 13/15] Enable linear lighting and color space Set project color space to Linear and enable linear light intensity for correct PBR lighting. Updated ProjectSettings/ProjectSettings.asset (m_ActiveColorSpace -> 1) and ProjectSettings/GraphicsSettings.asset (m_LightsUseLinearIntensity -> 1) to ensure consistent, physically based lighting behavior. --- ProjectSettings/GraphicsSettings.asset | 2 +- ProjectSettings/ProjectSettings.asset | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index e9afbba506..cd2970f7d6 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -61,7 +61,7 @@ GraphicsSettings: m_FogKeepExp: 1 m_FogKeepExp2: 1 m_AlbedoSwatchInfos: [] - m_LightsUseLinearIntensity: 0 + m_LightsUseLinearIntensity: 1 m_LightsUseColorTemperature: 1 m_DefaultRenderingLayerMask: 1 m_LogWhenShaderIsCompiled: 0 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 7711444041..c6e16fa52b 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -47,7 +47,7 @@ PlayerSettings: defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 - m_ActiveColorSpace: 0 + m_ActiveColorSpace: 1 unsupportedMSAAFallback: 0 m_SpriteBatchVertexThreshold: 300 m_MTRendering: 1 From 76554d515067b1bc44cd1ec8d8db139d5ef21c3e Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Fri, 27 Mar 2026 14:01:29 +0200 Subject: [PATCH 14/15] Update CHANGELOG.md --- Packages/com.unity.inputsystem/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 47a24edf7e..9e49b1e794 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed +- Migrated sample scenes to use Universal Render Pipeline (URP) with Built-in Render Pipeline fallback shaders. The URP package is now required to run the samples. (ISX-2343) + ### Added - Support for entering the play mode with domain reload turned off (i.e. Faster Enter Playmode feature) [ISX-2411] From 51ad40d79c9ce2ef7314260244bff8ed626176a8 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Fri, 27 Mar 2026 15:48:58 +0200 Subject: [PATCH 15/15] Update build target for Android Linear color space on Android requires OpenGL ES 3.0+ or Vulkan --- ProjectSettings/ProjectSettings.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c6e16fa52b..d440ac678d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -434,7 +434,7 @@ PlayerSettings: m_APIs: 10000000 m_Automatic: 1 - m_BuildTarget: AndroidPlayer - m_APIs: 0b00000008000000 + m_APIs: 0b000000 m_Automatic: 0 m_BuildTargetVRSettings: - m_BuildTarget: Standalone