From f83e8bb8a0346e5b9d69cb3ebdb21c08005d03b2 Mon Sep 17 00:00:00 2001 From: Brian Rodway Date: Tue, 8 Apr 2025 08:26:09 +0000 Subject: [PATCH 01/12] Revert "[Port] [2022.3] [URP] Fixed emission-enabling evaluation." --- .../Editor/ShaderGUI/BaseShaderGUI.cs | 3 ++- .../Editor/UniversalRenderPipelineMaterialUpgrader.cs | 2 +- .../Scenes/161_FP16_BackBuffer/ParticleWhiteTransparent.mat | 6 +----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ShaderGUI/BaseShaderGUI.cs b/Packages/com.unity.render-pipelines.universal/Editor/ShaderGUI/BaseShaderGUI.cs index 5d75bcf04b8..57d54a62259 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/ShaderGUI/BaseShaderGUI.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/ShaderGUI/BaseShaderGUI.cs @@ -840,7 +840,8 @@ public static void SetMaterialKeywords(Material material, Action shadi if (material.HasProperty(Property.EmissionColor)) MaterialEditor.FixupEmissiveFlag(material); - bool shouldEmissionBeEnabled = (material.globalIlluminationFlags & MaterialGlobalIlluminationFlags.AnyEmissive) != 0; + bool shouldEmissionBeEnabled = + (material.globalIlluminationFlags & MaterialGlobalIlluminationFlags.EmissiveIsBlack) == 0; // Not sure what this is used for, I don't see this property declared by any Unity shader in our repo... // I'm guessing it is some kind of legacy material upgrade support thing? Or maybe just dead code now... diff --git a/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineMaterialUpgrader.cs b/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineMaterialUpgrader.cs index 287c1658e2e..15f93c2d219 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineMaterialUpgrader.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineMaterialUpgrader.cs @@ -598,7 +598,7 @@ internal static void UpdateMaterialKeywords(Material material) // or is enabled and may be modified at runtime. This state depends on the values of the current flag and emissive color. // The fixup routine makes sure that the material is in the correct state if/when changes are made to the mode or color. MaterialEditor.FixupEmissiveFlag(material); - bool shouldEmissionBeEnabled = (material.globalIlluminationFlags & MaterialGlobalIlluminationFlags.AnyEmissive) != 0; + bool shouldEmissionBeEnabled = (material.globalIlluminationFlags & MaterialGlobalIlluminationFlags.EmissiveIsBlack) == 0; CoreUtils.SetKeyword(material, "_EMISSION", shouldEmissionBeEnabled); UniversalRenderPipelineMaterialUpgrader.DisableKeywords(material); } diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/161_FP16_BackBuffer/ParticleWhiteTransparent.mat b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/161_FP16_BackBuffer/ParticleWhiteTransparent.mat index f77f45ba9ee..37ce54e1baf 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/161_FP16_BackBuffer/ParticleWhiteTransparent.mat +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/161_FP16_BackBuffer/ParticleWhiteTransparent.mat @@ -15,7 +15,7 @@ Material: - _EMISSION - _SURFACE_TYPE_TRANSPARENT m_InvalidKeywords: [] - m_LightmapFlags: 2 + m_LightmapFlags: 0 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 @@ -86,9 +86,7 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - - _AddPrecomputedVelocity: 0 - _AlphaClip: 0 - - _AlphaToMask: 0 - _Blend: 0 - _BlendModePreserveSpecular: 0 - _BumpScale: 1 @@ -116,7 +114,6 @@ Material: - _SrcBlendAlpha: 1 - _Surface: 1 - _WorkflowMode: 1 - - _XRMotionVectorsPass: 1 - _ZWrite: 0 m_Colors: - _BaseColor: {r: 1, g: 1, b: 1, a: 0.12941177} @@ -124,7 +121,6 @@ Material: - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] - m_AllowLocking: 1 --- !u!114 &6421356677785975880 MonoBehaviour: m_ObjectHideFlags: 11 From 31d870d9b7d6598d04da0cc6b96e0cfa9388f70e Mon Sep 17 00:00:00 2001 From: Jonathan Brodsky Date: Wed, 9 Apr 2025 14:52:38 +0000 Subject: [PATCH 02/12] [Port][2022.3] 40370 fix Terrain Trees with custom Tree Height return to their default height when zoomed in --- .../153_Terrain.asset | Bin 18260 -> 18536 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Lighting/Assets/Scenes/153_Lighting_EnlightenTerrain/153_Terrain.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_Lighting/Assets/Scenes/153_Lighting_EnlightenTerrain/153_Terrain.asset index a1460f9c111307c02e4ee61f77555c905e758a08..f5f6c937a9f03471dff10b6e2cfc2754e254503e 100644 GIT binary patch delta 3717 zcmaJ@Yiv|S6rS1cw!3zrlRU zMdz^A!JcDX_UzPTf(+-8f!()fqzaD<+#}tA9(fM* zC*j`>>xcsgL^9M1(S z8YM|QfYX>g7+M5Rd@cljM&cC-ctj&OCnvySeG>5U0JhkKTeyIgGJqu<2O}GW05F5~ z5`PuOVJWRe;6+T>EhoGdKY`;|%`YWh*#~|pi9~+@9F9Wlb;P4~Z2|C4q6OfO58`hi z?$z+YsK&}` zrAmBd0pNJ+5Dgj)z!Z4BU8l>p*VFtR09?QIyRUJZp> z#8++bh=`Ru3tU*W;V>) z;T5B-g@=+TSkdSlSOBXt7ZyN*weTbgz-?S1@vsRO30cORY1xtZExR7)dcnx1#*S;f z15f-~R?-2%Vlpt;IukBFfm*N|I35Kn8dTR77wtwESEIGT+eQdvGdx(mO^8Q@Gg>^; zSluRxzl&o7oXPhP*Uuy&@KrL-Bt}@zN!9ITCAqKwMhHiML`=94uwM#@B0hkC_YpS) z;8!VLzz3!UtmL2+fT{n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+-4EA z$<{!p+RTb!62=n9Qk#uyWiyBJB#augjzZ-G@Cz`8C@-8UoYqsVIDH!^S56;$3nm4c zqc+mapfjeZrwMhbhkBETdNVYmddm>%bfJFRLv8m^J4iik>;I@{;*!iqH7!+{tiT|~ zz`ZIJ?&UZ?@Mha67jL#5I)ltGF=&KXi7HXQ)1&?!kNRCyZ{JNbUMoQx^ggQTGf^S) z7{s7%h(9U#N}M0O!7BN-wjfW3rAp=_F)D+J&y={WE2L_iAN-wHzGLFLN_&Rj2X3qL z8J@|Xp)bYj*AVZJ;0iNp_fl??;0ZH653&w}7}Qt?YUmbF7P~ts%L(uy z8u=d#=Loof`PHK~j)2}|ljXesR!;cI_A~G5>T>(E9?P@R3;wq51M4>lB^&{XlTF%5 zIjcAV7GTcVL5=|XWRoTERy`;5ooul+Ha5C_etBiNyg=iOTX;;fmH^+PHWEf~1l+}Z zwJV+@ARxtLX(-*w2?<|qvvqWIxP3-Fxi9zQDjCTaYPS(!Zi-23%d~O?Y{ER@K_y4P zVf5K_FOL&4YL3_*KYr}?@$FqA_cQ0-BA!(79szzu?V_doIRb{KnzXIEia7$tr$)+Va4s;P zU%YtH?enPaxHUnYmO5%mo3*wsj3Yp6HEG9mRB;4YFfYHkk0T)6YO-_|ZRCW;%JM<) zRp$4%+|QwFb=KL%wHyKUsO{5baRhvhxw9;nBj76f3^VNGgr%oaZLO`X?tX&uQ~2FI chLqrLlXZOBE{=dGZqjb~<7JL;&EO{ee==T# Date: Wed, 23 Apr 2025 13:54:31 +0000 Subject: [PATCH 03/12] [2022.3][UUM-102798] Fix NullReferenceException when saving in Editor --- .../Runtime/2D/Passes/Render2DLightingPass.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Passes/Render2DLightingPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Passes/Render2DLightingPass.cs index 6805f56456d..b805f123e3f 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Passes/Render2DLightingPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Passes/Render2DLightingPass.cs @@ -347,7 +347,7 @@ public override void Execute(ScriptableRenderContext context, ref RenderingData var isLitView = true; #if UNITY_EDITOR - if (renderingData.cameraData.isSceneViewCamera) + if (renderingData.cameraData.isSceneViewCamera && UnityEditor.SceneView.currentDrawingSceneView != null) isLitView = UnityEditor.SceneView.currentDrawingSceneView.sceneLighting; if (renderingData.cameraData.camera.cameraType == CameraType.Preview) From 79fe1c68fd6d719d4590f780648d1db5a5d2e868 Mon Sep 17 00:00:00 2001 From: Ben Cloward Date: Fri, 25 Apr 2025 11:49:12 +0000 Subject: [PATCH 04/12] UUM-103722 - fixed guid collisions with a couple of textures --- .../NodeReference/Artistic/Blend.shadergraph | 16 +- .../Input/SplitTextureTransform.shadergraph | 2 +- .../NodeReference/Input/Time.shadergraph | 6 +- .../NodeReference/Input/UV.shadergraph | 2 +- .../NodeReference/Math/Add.shadergraph | 2 +- .../NodeReference/Math/Lerp.shadergraph | 2 +- .../NodeReference/Math/Subtract.shadergraph | 2 +- .../Textures/FlipbookTest.png.meta | 2 +- .../NodeReference/Textures/SmallNoiseMask.tga | Bin 12138 -> 0 bytes .../Textures/SmallNoiseMask.tga.meta | 147 ------------------ .../NodeReference/Textures/flowmap.png | Bin 35407 -> 0 bytes .../NodeReference/Textures/flowmap.png.meta | 146 ----------------- .../NodeReference/UV/Flipbook.shadergraph | 8 +- .../UV/PolarCoordinates.shadergraph | 4 +- .../NodeReference/UV/RadialShear.shadergraph | 2 +- .../NodeReference/UV/Rotate.shadergraph | 2 +- .../NodeReference/UV/Spherize.shadergraph | 2 +- .../NodeReference/UV/Triplanar.shadergraph | 2 +- .../NodeReference/UV/Twirl.shadergraph | 2 +- 19 files changed, 28 insertions(+), 321 deletions(-) delete mode 100644 Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga delete mode 100644 Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga.meta delete mode 100644 Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png delete mode 100644 Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png.meta diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Artistic/Blend.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Artistic/Blend.shadergraph index 891b3bbfb66..1fc73a72e54 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Artistic/Blend.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Artistic/Blend.shadergraph @@ -1212,7 +1212,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -1309,7 +1309,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -2031,7 +2031,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -2601,7 +2601,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -2828,7 +2828,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -3198,7 +3198,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -6186,7 +6186,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -7089,7 +7089,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/SplitTextureTransform.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/SplitTextureTransform.shadergraph index 080427c7d81..633ca1274a4 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/SplitTextureTransform.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/SplitTextureTransform.shadergraph @@ -2008,7 +2008,7 @@ "m_SerializableColors": [] }, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" } } diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/Time.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/Time.shadergraph index c41291e2a55..c58b8f19df2 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/Time.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/Time.shadergraph @@ -1635,7 +1635,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -5660,7 +5660,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -6745,7 +6745,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/UV.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/UV.shadergraph index 87a879e6801..1637ebfb0f6 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/UV.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Input/UV.shadergraph @@ -3650,7 +3650,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Add.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Add.shadergraph index 099f74bd503..bfa47d4cde9 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Add.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Add.shadergraph @@ -316,7 +316,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Lerp.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Lerp.shadergraph index 43e975aca3d..d59449a59b7 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Lerp.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Lerp.shadergraph @@ -2806,7 +2806,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Subtract.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Subtract.shadergraph index 8cb55a6782d..2cf75b3e451 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Subtract.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Math/Subtract.shadergraph @@ -292,7 +292,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/FlipbookTest.png.meta b/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/FlipbookTest.png.meta index c4fae1489b2..8e65613209a 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/FlipbookTest.png.meta +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/FlipbookTest.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a7ff24a0f3bd4dd4aaf9265ba8da09ba +guid: b8aa35b1f4ce5ee5bbf0376cb9eb10cb TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga b/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga deleted file mode 100644 index 3b309c51fcbd8945f3f86462187645c272b10687..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12138 zcma*td8}X49tH4IrNiwV+FLqn>$O5t6~qv2RD)LQkfBp40 z-+bff`oj-D)aB`?pEmZ@S6|)fbdEUUh{cN+&!0bklT9|6I(6#Uv15CCdq<2IF>Kf{ zN7rM5~qK=ha7$M z(MX(h(n+VDdg|$?pN>a!_St6-lv2()=bVc!y6DO)ue{-g8*ab-_WSO;Pb>(BM=(MG z>8r24`tr*!7sy9A`^jx2p$Al`qJIH@bj2?Mg8IM%58Qa;jTc;S0SON}=pc}`+itr# zbLMQY!3N{Uk4K@eudlS|od*X8(Mk;F&YipS&O3|Qe*5ir=%I%mb<|PE9(ybjC!Tns zks8tH#m7lR&OP_si!Z+Ts;jOtQ%F4W$RkfY@dWv}rNcB+@u56Qe+FKar@w2l;3?pB z71LX9z4h|TFE>Bo2mY(3t2amnWQX!YQYmA`X>;INWyIZG1~O(?9muV~;=n_>)gQi3=XY zN1)oCQG&izek}Z7e)*+nFdqCU>&=2lj+l^ z&z?Pd>#euupxt)c4F#PJIN$)$Vg8*i-Ij2kx&Yz$lwKj76L zG13fvTvtF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a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga.meta b/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga.meta deleted file mode 100644 index 35949ffc3dd..00000000000 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/SmallNoiseMask.tga.meta +++ /dev/null @@ -1,147 +0,0 @@ -fileFormatVersion: 2 -guid: 2fe31a8312ab8524ebd8601be367f0c8 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 10 - textureShape: 1 - singleChannelComponent: 1 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 64 - resizeAlgorithm: 0 - textureFormat: 63 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: WebGL - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Windows Store Apps - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png b/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png deleted file mode 100644 index d3abf5bc620bda38497e221fe277bffacf06076a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35407 zcmV(;K-<5GP)Q%77nY0*BaDeSEL2rPVE!YRG}XAVCno|NI|jFoRh$YX+FD z5A5IO|Es?!zfJxN`7_ri&u_x>17Cg?t@>f(|EN9z{xh*20K!+#&+X%}asHw2hf4RP z=${B#JR;T)^ZMw_KiQT(ZN3`tFAnD?gVx4p(m!d=C-OD>n*HVZ@0ZrcbEJDx`c39H zPj5$CkEHESz1~{WFkW{QaZDOT+3#V~V#OW9Q$PzFgiLhX2wG);@-2kBd&a z*v)Ste|G@pAK>46y4R@5VF=Hd=~=*j_ytsdg}hShB!K><#0-nRe=dpxaN-6h)a>$t zygg3;hvuIe@)_{azhkb2P+LEGM7fLL6|8+cN0^y)%1@MI*5t>Tp1^$o;2)13QMf?T z)MJ;c-6inU*R2Bi%6JW&N=d zKvfU?CgS&Hsu2$#)A6r}^+x=0F!JOo9XT zSm(N^uc|s{3PTaT^Q5uv2M~I@syAp>M1Qye#;5Iv`pE@q6$CBxtgOng+^^G}ftPoA zcju54qv-}!BkQgXxl{O>WsBChpz$#I>3a(T~^YkC(t|-H^`4 z{si;g$Vj5}jdG)LRZ0xekCjsyqrW^|Ws-oudG`4XzgjB#^VJbk66HMbttc%nVqOz; zE-CfQ#71j1#9bc7Zb%fRai@BenicFw`7>~h{`_=UT?NmttCd(>>hru|NBI5WfW$HD z`Uk20Ik`O4`YH4sS_hBZQF1oSc%Yt*2-$w~Fhf5^zqFX`a*~bi)z?JWs`fPZlt{17 z3tqgxZ4(shhYUqmT9jwZJZv}~RjWV_^Kj6-IWcdlPTvpsl4Uk3G@=IIXY~83i?IQhJGm*lOg6@THg;jPV*UkRvu&P+j+sas5BjjnE^ERIQIRiX3!Z?Th zKJ%e3>&aN<^Im(GC=YLE01FJAH$XQu_gG?2nSfiAI6bayP=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E?-Mr;yIM}eFOVI}X9*@Y*=T0uO3&h-XdLILL z*oWy#ir1huq&G|Qrs??;SCEpehKd(|@S*=Kqfro?M+qNmB zC{*p^PW*s;K973 zKR!C8g!r%HVX1Osn0k9M_z9`VUgwaHF}x?h2A8h&u}K@Wk8HmG zc`uf;W#6RmYyfOu5us{_i_IBeb?@Qv0A#A>UX^{K~y~5mPnHvSH^Y%VIYAD`~6AQr+$q9@3 z+Xc*+64rx?%*-INRbB&%yyo?~vL)@Du`o?B}n&3{BVMS%gb=q96wVU}jCGN?B=+QO0 z4CO>~xs4q9DAa}T)a#=w4A(%jS4HqWIcsrND%;?@1Z`29`=a4q;Wmim?lmyE>G%C1>L$6@ohe5($y=%bhvL zfXhK_RCY;Y{c*@jM)_gwH>n~BKqt&Izt^M(I37p32ta{-*?8pa4rzE*cer}vIv)R zLtJx)F*6x%om@g>NA1`%m4e%408RgxMt-YPd56MM4Hw3K%jonrL!= zLRy$U1z98J4=P&EUqn+tcNy`E6A`02a^6UN>E}xR!Aydo7A8Ll*vYn#*&*+^L{j*U zijA_>p#FtM=s1YpB7}j&=^?LMA5K_6S1bHJ;zX$ZA$N_{)dNh){w1`WpznaH|I4Yg z)0}#Md@&GakzWN{l|zct7EWwlp!Y|;{g zawHN!to0j<$n$m7^e4bi<;*EWpka2DVgN9eJ7eT>t-d=2 P00000NkvXXu0mjf(fJtk diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png.meta b/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png.meta deleted file mode 100644 index 6521f6c92b3..00000000000 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/Textures/flowmap.png.meta +++ /dev/null @@ -1,146 +0,0 @@ -fileFormatVersion: 2 -guid: 0f8b659603075564c8b3b82db6ccef13 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 2 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: WebGL - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Windows Store Apps - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Flipbook.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Flipbook.shadergraph index fd1ad939ae4..278ebe5a316 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Flipbook.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Flipbook.shadergraph @@ -1095,7 +1095,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -2522,7 +2522,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -3231,7 +3231,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -4050,7 +4050,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/PolarCoordinates.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/PolarCoordinates.shadergraph index 4120b13efe2..d20ab5a3b7c 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/PolarCoordinates.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/PolarCoordinates.shadergraph @@ -2725,7 +2725,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 @@ -3125,7 +3125,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/RadialShear.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/RadialShear.shadergraph index 8b22c0d895d..e97ba4cc26d 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/RadialShear.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/RadialShear.shadergraph @@ -1236,7 +1236,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Rotate.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Rotate.shadergraph index 9a4622076f9..976204a031a 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Rotate.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Rotate.shadergraph @@ -1967,7 +1967,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Spherize.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Spherize.shadergraph index 8f7da11c980..afb7a900486 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Spherize.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Spherize.shadergraph @@ -1583,7 +1583,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Triplanar.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Triplanar.shadergraph index 28f83af971b..0e28ba1081e 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Triplanar.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Triplanar.shadergraph @@ -1704,7 +1704,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 diff --git a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Twirl.shadergraph b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Twirl.shadergraph index 254360e5391..3b105f48fa1 100644 --- a/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Twirl.shadergraph +++ b/Packages/com.unity.shadergraph/Samples~/NodeReference/UV/Twirl.shadergraph @@ -2477,7 +2477,7 @@ "m_StageCapability": 3, "m_BareResource": false, "m_Texture": { - "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"a7ff24a0f3bd4dd4aaf9265ba8da09ba\",\"type\":3}}", + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"b8aa35b1f4ce5ee5bbf0376cb9eb10cb\",\"type\":3}}", "m_Guid": "" }, "m_DefaultType": 0 From 6c6627afbf7b052d7f9ed6405d568143610292c6 Mon Sep 17 00:00:00 2001 From: Kirill Titov Date: Fri, 25 Apr 2025 11:49:12 +0000 Subject: [PATCH 05/12] [Port] [2022.3] Fixed Volume performance regression for Unity Editor and Development builds --- .../Debugging/DebugDisplaySettingsVolumes.cs | 8 ++--- .../Runtime/Volume/VolumeComponent.cs | 10 +----- .../Runtime/Volume/VolumeDebugData.cs | 33 +++++++++++++++++++ .../Runtime/Volume/VolumeDebugData.cs.meta | 3 ++ .../Runtime/Volume/VolumeParameter.cs | 2 +- 5 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs create mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs.meta diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs index 0ff6303ba12..ef240ec408c 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs @@ -399,15 +399,11 @@ private static void GenerateTableRows(DebugUI.Table table, List parameters, { VolumeParameter volumeParameter = (VolumeParameter)field.GetValue(o); #if UNITY_EDITOR || DEVELOPMENT_BUILD - var attr = (DisplayInfoAttribute[])field.GetCustomAttributes(typeof(DisplayInfoAttribute), true); - if (attr.Length != 0) - { - volumeParameter.debugId = attr[0].name; - } - else - { - volumeParameter.debugId = field.Name; - } + VolumeDebugData.AddVolumeParameterDebugId(volumeParameter, field); #endif parameters.Add(volumeParameter); } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs new file mode 100644 index 00000000000..7dad87b04aa --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Reflection; + +namespace UnityEngine.Rendering +{ +#if UNITY_EDITOR || DEVELOPMENT_BUILD + internal static class VolumeDebugData + { + static Lazy> debugIds = new(() => new Dictionary()); + + internal static string GetVolumeParameterDebugId(VolumeParameter parameter) + { + return debugIds.Value.TryGetValue(parameter.fieldHash, out var debugId) ? debugId : string.Empty; + } + + internal static void AddVolumeParameterDebugId(VolumeParameter parameter, FieldInfo field) + { + var fieldHash = field.GetHashCode(); + parameter.fieldHash = fieldHash; + if (debugIds.Value.ContainsKey(fieldHash)) + return; + + var displayInfo = field.GetCustomAttribute(true); + var debugId = displayInfo != null ? displayInfo.name : field.Name; +#if UNITY_EDITOR + debugId = UnityEditor.ObjectNames.NicifyVariableName(debugId); // In the editor, make the name more readable +#endif + debugIds.Value.Add(fieldHash, debugId); + } + } +#endif +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs.meta b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs.meta new file mode 100644 index 00000000000..f3d5f4cf0e3 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeDebugData.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a359de1dc98b4f1db3fffb9601eb785b +timeCreated: 1743511791 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs index 0a08f1ba9a8..989ced33837 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs @@ -19,7 +19,7 @@ namespace UnityEngine.Rendering public abstract class VolumeParameter : ICloneable { #if UNITY_EDITOR || DEVELOPMENT_BUILD - internal string debugId { get; set; } + internal int fieldHash { get; set; } #endif ///

From 61a9c28ecdb7d276f2013d85053821546fccc6d0 Mon Sep 17 00:00:00 2001 From: Mark Green Date: Tue, 29 Apr 2025 17:32:43 +0000 Subject: [PATCH 06/12] [Port] [2022.3/staging] DOCG-6822 Add missing upscale settings in HDRP docs (v2) --- .../Documentation~/Dynamic-Resolution.md | 9 +-- .../Documentation~/HDRP-Asset.md | 65 +++++++++++++------ .../Documentation~/HDRP-Camera.md | 20 ++++-- 3 files changed, 64 insertions(+), 30 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Dynamic-Resolution.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Dynamic-Resolution.md index 45bf98bf01e..66d4431cc94 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Dynamic-Resolution.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Dynamic-Resolution.md @@ -118,10 +118,11 @@ HDRP provides the following upscale filter methods: | **Upscale Filter Name** | Description | | ------------------------------------ | ------------------------------------------------------------ | -| Catmull-Rom | Catmull-Rom uses four bilinear samples. This uses the least resources, but it can cause blurry images after HDRP performs the upscaling step.

Catmull-Rom has no dependencies and runs at the end of the post-processing pipeline. | -| Contrast Adaptive Sharpen (CAS) | Contrast Adaptive Sharpen (CAS) uses **FidelityFX (CAS) AMD™**. This method produces a sharp image with an aggressive sharpening step. Do not use this option when the dynamic resolution screen percentage is less than 50%. For information about FidelityFX and Contrast Adaptive Sharpening, see[ AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).

Contrast Adaptive Sharpen (CAS) has no dependencies and runs at the end of the post-processing pipeline. | -| FidelityFX Super Resolution 1.0 | FidelityFX Super Resolution 1.0 uses a spatial super-resolution method that balances quality and performance. For more information, see [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).

FidelityFX Super Resolution 1.0 has no dependencies and runs at the end of the post-processing pipeline.
FidelityFX Super Resolution 1.0 also runs when at 100% resolution as it can have beneficial sharpening effects.
For more information, see the section [Notes on FidelityFX Super Resolution 1.0](Dynamic-Resolution.md#notes-on-fidelityfx-super-resolution-1.0-(FSR))| -| Temporal Anti-Aliasing (TAA) Upscale | Temporal Anti-Aliasing (TAA) Upscale uses temporal integration to produce a sharp image. Unity performs this method alongside the normal anti-aliasing.
HDRP executes this upscale filter before post processing and at the same time as the TAA step. This means you can only use the TAA anti-aliasing method. This filter is not compatible with other anti-aliasing methods.

Temporal Anti-Aliasing (TAA) Upscale performs antialiasing on each frame. This means that it also runs when you enable Dynamic Resolution, even when the screen percentage is at 100% resolution.
For more information, see the section [Notes on TAA Upscale](Dynamic-Resolution.md#Notes). | +| **Catmull-Rom** | Catmull-Rom uses four bilinear samples. This uses the least resources, but it can cause blurry images after HDRP performs the upscaling step.

Catmull-Rom has no dependencies and runs at the end of the post-processing pipeline. | +| **Contrast Adaptive Sharpen (CAS)** | Contrast Adaptive Sharpen (CAS) uses **FidelityFX (CAS) AMD™**. This method produces a sharp image with an aggressive sharpening step. Do not use this option when the dynamic resolution screen percentage is less than 50%. For information about FidelityFX and Contrast Adaptive Sharpening, refer to [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).

Contrast Adaptive Sharpen (CAS) has no dependencies and runs at the end of the post-processing pipeline. | +| **AMD FidelityFX Super Resolution 1.0 (FSR1)** | FidelityFX Super Resolution 1.0 uses a spatial super-resolution method that balances quality and performance. For more information, refer to [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).

FSR1 has no dependencies and runs at the end of the post-processing pipeline.

FSR1 also runs when at 100% resolution as it can have beneficial sharpening effects.

For more information, refer to the section [Notes on FidelityFX Super Resolution 1.0](Dynamic-Resolution.md#notes-on-fidelityfx-super-resolution-10-fsr)| +| **Temporal Anti-Aliasing (TAA) Upscale** | Temporal Anti-Aliasing (TAA) Upscale uses temporal integration to produce a sharp image. Unity performs this method alongside the normal anti-aliasing.

HDRP executes this upscale filter before post processing and at the same time as the TAA step. This means you can only use the TAA anti-aliasing method. This filter is not compatible with other anti-aliasing methods.

Temporal Anti-Aliasing (TAA) Upscale performs antialiasing on each frame. This means that it also runs when you enable Dynamic Resolution, even when the screen percentage is at 100% resolution.

For more information, see the section [Notes on TAA Upscale](Dynamic-Resolution.md#notes-on-temporal-anti-aliasing-taa-upscale). | +| **NVIDIA Deep Learning Super Sampling (DLSS)** | HDRP supports DLSS only on the following platforms:
  • DirectX 11 on Windows 64-bit
  • DirectX 12 on Windows 64-bit
  • Vulkan on Windows 64-bit
Refer to [DLSS in HDRP](deep-learning-super-sampling-in-hdrp.md). | ## Overriding upscale options with code diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md index feb0c341f92..f0c23330aae 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md @@ -76,31 +76,56 @@ These settings control the draw distance and resolution of the decals atlas that | **- Layers** | Enable the checkbox to allow decals to only affect specific layers. | - ### Dynamic Resolution +For more information about dynamic resolution and upscale filters, refer to [Dynamic Resolution](Dynamic-Resolution.md). + | **Property** | **Description** | | ------------------------------------------- | ------------------------------------------------------------ | | **Enable** | Enable the checkbox to make HDRP support dynamic resolution in your Unity Project. | -| **- Enable DLSS** | Enable the checkbox to make HDRP support NVIDIA Deep Learning Super Sampling (DLSS).
This property only appears if you enable the NVIDIA package (com.unity.modules.nvidia) in your Unity project. | -| **-- Mode** | Use the drop-down to select which performance mode DLSS operates on. The options are:
• **Balanced**: - Balances performance with quality.
• **MaxPerf**: - Fast performance, lower quality.
• **MaxQuality**: - High quality, lower performance.
• **UltraPerformance**: - Fastest performance, lowest quality. | -| **-- Injection Point** | Use the drop-down to select at which point DLSS runs in the rendering pipeline:
• **Before Post**: - DLSS runs when all post processing effects are at full resolution.
• **After Depth Of Field**: - Depth of field runs at a low resolution and DLSS upscales everything in the next rendering step. All other post processing effects run at full resolution.
• **After Post Process**: - DLSS runs at the end of the pipeline when all post process are at low resolution.
• | -| **-- Use Optimal Settings** | Enable the checkbox to make DLSS control the Sharpness and Screen Percentage automatically. | -| **-- Sharpness** | Controls how the DLSS upsampler renders edges on the image. More sharpness usually means more contrast and a clearer image but can increase flickering and fireflies. Unity ignores this property if you enable **Use Optimal Settings**. | -| **- Dynamic Resolution Type** | Use the drop-down to select the type of dynamic resolution HDRP uses:
• **Software**: This option allocates render targets to accommodate the maximum resolution possible, then rescales the viewport accordingly. This allows the viewport to render at varying resolutions.
• **Hardware**: This option treats the render targets, up until the back buffer, as if they are all the scaled size. This means HDRP clears the render targets faster. | -| **- Upscale Filter** | Use the drop-down to select the filter that HDRP uses for upscaling unless overridden by user via script.
• **Catmull-Rom**: A bicubic upsample with 4 taps.
• **Contrast Adaptive Sharpen**: An ultra sharp upsample. This option is not meant for screen percentages less than 50% and still sharpens when the screen percentage is set to 100%. This uses **FidelityFX (CAS) AMD™**: For information about FidelityFX and Contrast Adaptive Sharpening, see [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).
• **FidelityFX Super Resolution 1.0 AMD™**: a spatial super-resolution technology that leverages cutting-edge algorithms to produce impressive upscaling quality at very fast performance. | -| **- Use Mip Bias** | Apply a negative bias on the texture samplers of deferred, opaque and transparent passes. This improves detail on textures but increases the texture fetching cost. Cost varies per platform. | -| **- Minimum Screen Percentage** | The minimum screen percentage that dynamic resolution can reach. | -| **- Maximum Screen Percentage** | The maximum screen percentage that dynamic resolution can reach. This value must be higher than the **Min Screen Percentage**. | -| **- Force Screen Percentage** | Enable the checkbox to force HDRP to use a specific screen percentage for dynamic resolution. This feature is useful for debugging dynamic resolution. | -| **- Forced Screen Percentage** | The specific screen percentage that HDRP uses for dynamic resolution. This property is only visible when you enable the **Force Screen Percentage**.. | -| **- Low Res Transparency Min Threshold** | The minimum percentage threshold allowed to clamp low resolution transparency. When the resolution percentage falls below this threshold, HDRP will clamp the low resolution to this percentage. | -| **- Ray Tracing Half Resolution Threshold** | The minimum percentage threshold allowed to render ray tracing effects at half resolution. When the resolution percentage falls below this threshold, HDRP will render ray tracing effects at full resolution. | -| **Water** | Controls for the Water System. | -| **- Enable** | Enable the Water System.| -| **- Simulation Resolution** | Set the resolution of the water simulation. Higher values use more system resources but provide higher visual quality. | -| **- Script Interactions** | Enable to have HDRP calculate the height of the water simulation on the CPU. Also makes it possible for you to query height data for specific points on the water's surface. You can use this data for customizations like your own buoyancy implementation, for example. | - +| **Enable DLSS** | Enables NVIDIA Deep Learning Super Sampling (DLSS). This option is available only if you enable the NVIDIA built-in package in the [Package Manager window](https://docs.unity3d.com/Manual/upm-ui.html). For more information, refer to [DLSS settings](#dlss-settings). | +| **Dynamic Resolution Type** | Sets how HDRP renders at a lower resolution. The options are:
  • **Software**: Allocates render targets to accommodate the maximum resolution possible, then rescales the viewport accordingly. This allows the viewport to render at varying resolutions.
  • **Hardware**: Treats the render targets up to the back buffer as if they're all the scaled size. This means HDRP clears the render targets faster.
| +| **Default Upscale Filter** | Sets the upscale filter HDRP uses to increase the resolution after rendering at a lower resolution.

The options are:
  • **Catmull-Rom**: A bicubic upsample with 4 taps.
  • **Contrast Adaptive Sharpen**: An ultra-sharp upsample. This option is not meant for screen percentages less than 50% and still sharpens when you set the screen percentage to 100%. This filter uses FidelityFX (CAS) AMD™.
  • **FidelityFX Super Resolution 1.0 AMD™ (FSR1)**: A spatial super-resolution technology that leverages cutting-edge algorithms to produce high upscaling quality at very fast performance.
  • **TAA Upscale**: A temporal anti-aliasing upscaler that uses information from previous frames to produce high-quality visuals.
If you enable **Enable DLSS**, this property becomes **Default Fallback Upscale Filter**. HDRP uses this filter if your build platform doesn't support DLSS.| +| **Injection Point** | Sets when HDRP applies the Catmull-Rom upscale filter. This property is available here only if you set **Default Upscale Filter** to **Catmull-Rom**. For more information, refer to [Injection points dropdown](#injection-points). | +| **Override FSR Sharpness** | Enables an **FSR Sharpness** slider that lets you set the sharpness of the FSR1 upscale filter. A value of 1.0 means maximum sharpness. A value of 0 means no sharpening. You can also set the sharpness per camera in the [Camera Inspector window](hdrp-camera-component-reference.md). This property is available only if you set **Default Upscale Filter** to **FidelityFX Super Resolution 1.0**. | +| **TAA Upscale Injection Point** | Sets when HDRP applies the TAA Upscaling filter. This property is available here only if you set **Default Upscale Filter** to **TAA Upscaling**. For more information, refer to [Injection points dropdown](#injection-points). | +| **Use Mip Bias** | Apply a negative bias on the texture samplers of deferred, opaque, and transparent passes. This improves detail on textures but increases the texture fetching cost. Cost varies per platform. | +| **Force Screen Percentage** | The specific screen percentage that HDRP uses for dynamic resolution. This property is only visible when you enable the **Force Screen Percentage**. | +| **Minimum Screen Percentage** | The minimum screen percentage that dynamic resolution can reach. | +| **Maximum Screen Percentage** | The maximum screen percentage that dynamic resolution can reach. This value must be higher than the **Min Screen Percentage**. | +| **Low Res Transparency Min Threshold** | Sets the minimum resolution that HDRP can render transparency, as a percentage of full screen resolution. | +| **Low Res Screen Space GI Min Threshold** | Sets the minimum resolution that HDRP can render screen-space global illumination, as a percentage of full screen resolution. | +| **Ray Tracing Half Resolution Threshold** | Sets the minimum resolution that HDRP can render ray tracing at half resolution. If the resolution falls below this threshold, HDRP renders ray tracing at full resolution. | + + +#### DLSS settings + +The following properties are available only if you enable **Enable DLSS**. + +| **Property** | **Description** | +|-|-| +| **DLSS Mode** | Sets whether DLSS prioritizes quality or performance. The options are:
  • **Maximum Quality**
  • **Balanced**
  • **Maximum Performance**
  • **Ultra Performance**
| +| **DLSS Injection Point** | Sets when DLSS runs in the rendering pipeline. For more information, refer to [Injection points dropdown](#injection-points). | +| **DLSS Use Optimal Settings** | Enables DLSS controlling screen percentage automatically. | + + +#### Injection points dropdown + +| **Option** | **Description** | +|-|-| +|**Before Post Process**|HDRP upscales when post-processing effects are at full resolution.| +|**After Depth Of Field**|HDRP upscales when depth of field is at low resolution, but post-processing effects are at full resolution.| +|**After Post Process**|HDRP upscales at the end of the pipeline, when post-processing effects are at low resolution.| + +## Water + +Controls for the Water System. + +| **Property** | **Description** | +|-|-| +| **Enable** | Enable the Water System.| +| **Simulation Resolution** | Set the resolution of the water simulation. Higher values use more system resources but provide higher visual quality. | +| **Script Interactions** | Enable to have HDRP calculate the height of the water simulation on the CPU. Also makes it possible for you to query height data for specific points on the water's surface. You can use this data for customizations like your own buoyancy implementation, for example. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Camera.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Camera.md index d77812f01b8..19e80b1881f 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Camera.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Camera.md @@ -47,18 +47,14 @@ The Camera Inspector includes the following groups of properties: | |**Barrel Clipping** | Use the slider to set the strength of the “cat eye” effect. You can see this effect on bokeh as a result of lens shadowing (distortion along the edges of the frame). This property affects the look of the [Depth of Field](Post-Processing-Depth-of-Field.md) bokeh. | | |**Anamorphism** | Use the slider to stretch the sensor to simulate an anamorphic look. Positive values distort the Camera vertically, negative values distort the Camera horizontally. This property affects the look of the [Depth of Field](Post-Processing-Depth-of-Field.md) bokeh and the [Bloom](Post-Processing-Bloom.md) effect if you enable its *Anamorphic* property. | + ## Rendering | **Property** ||**Description**| | --------- | - | :-------------------------------------------------------------------- | | **Allow Dynamic Resolution** || Enable the checkbox to make this Camera support dynamic resolution for buffers linked to it. | -| **Allow DLSS** || Enable this property to allow this Camera to use NVIDIA Deep Learning Super Sampling (DLSS). To use NVIDIA DLSS, enable the NVIDIA package (com.unity.modules.nvidia) in your Unity project and enable DLSS in your [HDRP Asset](HDRP-Asset.md). | -| |**Use Custom Quality** | Indicates whether this Camera overrides the DLSS quality mode specified in the [HDRP Asset](HDRP-Asset.md). When you enable this property, HDRP uses the **Mode** property. | -| |**Mode** | Specifies the performance quality mode override for performance quality mode for DLSS.The options are:
• **Balanced**: - Balances performance with quality.
• **MaxPerf**: Fast performance, lower quality.
• **MaxQuality**: High quality, lower performance.
• **UltraPerformance**: Fastest performance, lowest quality.
This property only appears if you enable **Use Custom Quality**. | -| |**Use Custom Attributes** | Enable this property to make this Camera override the DLSS attributes specified in the [HDRP Asset](HDRP-Asset.md). | -| |**Use Optimal Settings** | Enable this property to allow DLSS to automatically control the sharpness and screen percentage for this Camera. This property only appears if you enable **Use Custom Attributes**. | -| |**Sharpness** | The pixel sharpness that the DLSS upscaler uses for this Camera.
This property only appears if you enable **Use Custom Attributes**. | +| **Allow DLSS** || Enables NVIDIA Deep Learning Super Sampling (DLSS). This property has an effect only if you add DLSS to your [HDRP Asset](HDRP-Asset.md). For more information, refer to [DLSS settings](#dlss-settings). | | **Post Anti-aliasing** || This Camera can use [multisample anti-aliasing (MSAA)](Anti-Aliasing.md#MSAA), at the same time as post-process anti-aliasing. This is because MSAA is a hardware feature. To control post-process anti-aliasing, use the [Frame Settings](Frame-Settings.md).
• **No Anti-aliasing**: This Camera processes MSAA but doesn't process any post-process anti-aliasing.
• **Fast Approximate Anti-aliasing (FXAA)**: Smooths edges on a per-pixel level. This is the most efficient anti-aliasing technique in HDRP.
• **Temporal Anti-aliasing (TAA)**: Uses frames from a history buffer to smooth edges more effectively than fast approximate anti-aliasing.
• **Subpixel Morphological Anti-aliasing (SMAA)**: Finds patterns in borders of the image and blends the pixels on these borders according to the pattern. | || **SMAA Quality Preset** | Use the drop-down to select the quality of SMAA. The difference in resource intensity is small between **Low** and **High**.
• **Low**: The lowest SMAA quality. This is the least resource-intensive option.
• **Medium**: A good balance between SMAA quality and resource intensity.
• **High**: The highest SMAA quality. This is the most resource-intensive option. This property only appears when you select **Subpixel Morphological Anti-aliasing (SMAA)** from the **Anti-aliasing** drop-down. | | |**TAA Quality Preset** | The quality level of TAA. The default settings for higher presets aren't guaranteed to produce better results than lower presets. The result depends on the content in your scene. However, the high quality presets give you more options that you can use to adapt the anti-aliasing to your content. | @@ -74,6 +70,18 @@ The Camera Inspector includes the following groups of properties: | **Occlusion Culling** | |Enable the checkbox to make this Camera not render GameObjects that aren't currently visible. For more information, see the [Occlusion Culling documentation](). | | **Exposure Target** | |The GameObject to center the [Auto Exposure](Override-Exposure.md) procedural mask around. | + +### DLSS settings + +The following properties are available only if you enable **Allow DLSS**. + +| **Property** | **Description** | +|-|-| +| **Use DLSS Custom Quality** | Indicates whether this Camera overrides the DLSS quality mode specified in the [HDRP Asset](HDRP-Asset.md). | +| **DLSS Mode** | Sets whether DLSS prioritizes quality or performance. The options are:
  • **Maximum Quality**
  • **Balanced**
  • **Maximum Performance**
  • **Ultra Performance**
This property is available only if you enable **Use DLSS Custom Quality**. | +| **Use DLSS Custom Attributes** | Overrides the DLSS properties specified in the [HDRP Asset](HDRP-Asset.md), on this camera. | +| **DLSS Use Optimal Settings** | Enables DLSS controlling sharpness and screen percentage automatically. This property is available only if you enable **Use DLSS Custom Attributes**. | + ## Environment From f5ec9a9da178a5eed1a2eaf3ed83277b8dde8eea Mon Sep 17 00:00:00 2001 From: Mark Green Date: Tue, 29 Apr 2025 17:32:43 +0000 Subject: [PATCH 07/12] [Port] [2022.3] DOCG-7032 Add note about emissive decals --- .../Documentation~/Ray-Tracing-Getting-Started.md | 2 +- .../Documentation~/Ray-Tracing-Path-Tracing.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md index a2f7a204286..e9d4cc10687 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md @@ -271,7 +271,7 @@ There is no support for ray tracing on platforms other than DX12 for now. HDRP ray tracing in Unity has the following limitations: - Doesn't support vertex animation. -- Doesn't support decals. +- Doesn't support emissive [Decals](Decal.md). To disable emission, go to the Decal Material Inspector window and disable **Affect Emissive**. - Doesn't support Box-shaped spot lights. - Doesn't support the volumetric part of the [fog](Override-Fog.md). - Doesn't support tessellation. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Path-Tracing.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Path-Tracing.md index f3eabc7c323..151ef4c95f8 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Path-Tracing.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Path-Tracing.md @@ -197,7 +197,8 @@ HDRP path tracing in Unity 2020.2 has the following limitations: - Tessellation. - Tube and Disc-shaped Area Lights. - Translucent Opaque Materials. - - Several of HDRP's Materials. This includes Eye, Hair, and Decal. + - Several of HDRP's Materials. This includes Eye and Hair. + - Emissive [Decals](Decal.md). To disable emission, go to the Decal Material Inspector window and disable **Affect Emissive**. - Per-pixel displacement (parallax occlusion mapping, height map, depth offset). - MSAA. - [Graphics.DrawMesh](https://docs.unity3d.com/ScriptReference/Graphics.DrawMesh.html) or [Graphics.RenderMesh](https://docs.unity3d.com/2022.1/Documentation/ScriptReference/Graphics.RenderMesh.html), because rasterization and ray tracing are different ways of generating an image. From 811b7b13f6fc4d5f413ec378dbacece23f310af9 Mon Sep 17 00:00:00 2001 From: April Roszkowski Date: Wed, 30 Apr 2025 01:24:04 +0000 Subject: [PATCH 08/12] [UUM-71322] Fix a BiRP SG bug when targeting GLES2 --- .../Includes/LegacySurfaceVertex.hlsl | 1 + .../ShaderLibrary/Shim/AutoLightShim.hlsl | 302 +++++++ .../Shim/AutoLightShim.hlsl.meta | 7 + .../ShaderLibrary/Shim/HLSLSupportShim.hlsl | 1 + .../BuiltIn/ShaderLibrary/Shim/Shims.hlsl | 5 +- .../Shim/UnityShadowLibraryShim.hlsl | 791 ++++++++++++++++++ .../Shim/UnityShadowLibraryShim.hlsl.meta | 7 + 7 files changed, 1112 insertions(+), 2 deletions(-) create mode 100644 Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl create mode 100644 Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl.meta create mode 100644 Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl create mode 100644 Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl.meta diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/LegacySurfaceVertex.hlsl b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/LegacySurfaceVertex.hlsl index c73be651426..a2abf182c35 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/LegacySurfaceVertex.hlsl +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/LegacySurfaceVertex.hlsl @@ -21,6 +21,7 @@ struct v2f_surf { //#endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO + V2F_SHADOW_CASTER_NOPOS }; #endif // UNITY_LEGACY_SURFACE_VERTEX diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl new file mode 100644 index 00000000000..deb0952dadc --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl @@ -0,0 +1,302 @@ +#pragma once + +// This file acts as the bridge to avoid including AutoLight.cginc which contains uses of macros incompatible with SRP + +// Use the include guard to force AutoLight.cginc to not get included +#define AUTOLIGHT_INCLUDED + +// ---------------- +// Shadow helpers +// ---------------- + +// If none of the keywords are defined, assume directional? +#if !defined(POINT) && !defined(SPOT) && !defined(DIRECTIONAL) && !defined(POINT_COOKIE) && !defined(DIRECTIONAL_COOKIE) + #define DIRECTIONAL 1 +#endif + +// ---- Screen space direction light shadows helpers (any version) +#if defined (SHADOWS_SCREEN) + + #if defined(UNITY_NO_SCREENSPACE_SHADOWS) + UNITY_DECLARE_SHADOWMAP(_ShadowMapTexture); + #define TRANSFER_SHADOW(a) a._ShadowCoord = mul( unity_WorldToShadow[0], mul( unity_ObjectToWorld, v.vertex ) ); + #define TRANSFER_SHADOW_WPOS(a, wpos) a._ShadowCoord = mul( unity_WorldToShadow[0], float4(wpos.xyz, 1.0f) ); + inline fixed unitySampleShadow (unityShadowCoord4 shadowCoord) + { + #if defined(SHADOWS_NATIVE) + fixed shadow = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, shadowCoord.xyz); + shadow = _LightShadowData.r + shadow * (1-_LightShadowData.r); + return shadow; + #else + // This macro call is one difference from AutoLight.cginc + unityShadowCoord dist = UNITY_SAMPLE_DEPTH_TEXTURE(_ShadowMapTexture, shadowCoord.xy); + // tegra is confused if we use _LightShadowData.x directly + // with "ambiguous overloaded function reference max(mediump float, float)" + unityShadowCoord lightShadowDataX = _LightShadowData.x; + unityShadowCoord threshold = shadowCoord.z; + return max(dist > threshold, lightShadowDataX); + #endif + } + + #else // UNITY_NO_SCREENSPACE_SHADOWS + UNITY_DECLARE_SCREENSPACE_SHADOWMAP(_ShadowMapTexture); + #define TRANSFER_SHADOW(a) a._ShadowCoord = ComputeScreenPos(a.pos); + #define TRANSFER_SHADOW_WPOS(a, wpos) a._ShadowCoord = ComputeScreenPos(a.pos); + inline fixed unitySampleShadow (unityShadowCoord4 shadowCoord) + { + fixed shadow = UNITY_SAMPLE_SCREEN_SHADOW(_ShadowMapTexture, shadowCoord); + return shadow; + } + + #endif + + #define SHADOW_COORDS(idx1) unityShadowCoord4 _ShadowCoord : TEXCOORD##idx1; + #define SHADOW_ATTENUATION(a) unitySampleShadow(a._ShadowCoord) +#endif + +// ----------------------------- +// Shadow helpers (5.6+ version) +// ----------------------------- +// This version depends on having worldPos available in the fragment shader and using that to compute light coordinates. +// if also supports ShadowMask (separately baked shadows for lightmapped objects) + +half UnityComputeForwardShadows(float2 lightmapUV, float3 worldPos, float4 screenPos) +{ + //fade value + float zDist = dot(_WorldSpaceCameraPos - worldPos, UNITY_MATRIX_V[2].xyz); + float fadeDist = UnityComputeShadowFadeDistance(worldPos, zDist); + half realtimeToBakedShadowFade = UnityComputeShadowFade(fadeDist); + + //baked occlusion if any + half shadowMaskAttenuation = UnitySampleBakedOcclusion(lightmapUV, worldPos); + + half realtimeShadowAttenuation = 1.0f; + //directional realtime shadow + #if defined (SHADOWS_SCREEN) + #if defined(UNITY_NO_SCREENSPACE_SHADOWS) && !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) + realtimeShadowAttenuation = unitySampleShadow(mul(unity_WorldToShadow[0], unityShadowCoord4(worldPos, 1))); + #else + //Only reached when LIGHTMAP_ON is NOT defined (and thus we use interpolator for screenPos rather than lightmap UVs). See HANDLE_SHADOWS_BLENDING_IN_GI below. + realtimeShadowAttenuation = unitySampleShadow(screenPos); + #endif + #endif + + #if defined(UNITY_FAST_COHERENT_DYNAMIC_BRANCHING) && defined(SHADOWS_SOFT) && !defined(LIGHTMAP_SHADOW_MIXING) + //avoid expensive shadows fetches in the distance where coherency will be good + UNITY_BRANCH + if (realtimeToBakedShadowFade < (1.0f - 1e-2f)) + { + #endif + + //spot realtime shadow + #if (defined (SHADOWS_DEPTH) && defined (SPOT)) + #if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) + unityShadowCoord4 spotShadowCoord = mul(unity_WorldToShadow[0], unityShadowCoord4(worldPos, 1)); + #else + unityShadowCoord4 spotShadowCoord = screenPos; + #endif + realtimeShadowAttenuation = UnitySampleShadowmap(spotShadowCoord); + #endif + + //point realtime shadow + #if defined (SHADOWS_CUBE) + realtimeShadowAttenuation = UnitySampleShadowmap(worldPos - _LightPositionRange.xyz); + #endif + + #if defined(UNITY_FAST_COHERENT_DYNAMIC_BRANCHING) && defined(SHADOWS_SOFT) && !defined(LIGHTMAP_SHADOW_MIXING) + } + #endif + + return UnityMixRealtimeAndBakedShadows(realtimeShadowAttenuation, shadowMaskAttenuation, realtimeToBakedShadowFade); +} + +#if defined(SHADER_API_D3D11) || defined(SHADER_API_D3D12) || defined(SHADER_API_PSSL) || defined(UNITY_COMPILER_HLSLCC) +# define UNITY_SHADOW_W(_w) _w +#else +# define UNITY_SHADOW_W(_w) (1.0/_w) +#endif + +#if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) +# define UNITY_READ_SHADOW_COORDS(input) 0 +#else +# define UNITY_READ_SHADOW_COORDS(input) READ_SHADOW_COORDS(input) +#endif + +#if defined(HANDLE_SHADOWS_BLENDING_IN_GI) // handles shadows in the depths of the GI function for performance reasons +# define UNITY_SHADOW_COORDS(idx1) SHADOW_COORDS(idx1) +# define UNITY_TRANSFER_SHADOW(a, coord) TRANSFER_SHADOW(a) +# define UNITY_SHADOW_ATTENUATION(a, worldPos) SHADOW_ATTENUATION(a) +#elif defined(SHADOWS_SCREEN) && !defined(LIGHTMAP_ON) && !defined(UNITY_NO_SCREENSPACE_SHADOWS) // no lightmap uv thus store screenPos instead + // can happen if we have two directional lights. main light gets handled in GI code, but 2nd dir light can have shadow screen and mask. + // - Disabled on ES2 because WebGL 1.0 seems to have junk in .w (even though it shouldn't) +# if defined(SHADOWS_SHADOWMASK) && !defined(SHADER_API_GLES) +# define UNITY_SHADOW_COORDS(idx1) unityShadowCoord4 _ShadowCoord : TEXCOORD##idx1; +# define UNITY_TRANSFER_SHADOW(a, coord) {a._ShadowCoord.xy = coord * unity_LightmapST.xy + unity_LightmapST.zw; a._ShadowCoord.zw = ComputeScreenPos(a.pos).xy;} +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(a._ShadowCoord.xy, worldPos, float4(a._ShadowCoord.zw, 0.0, UNITY_SHADOW_W(a.pos.w))); +# else +# define UNITY_SHADOW_COORDS(idx1) SHADOW_COORDS(idx1) +# define UNITY_TRANSFER_SHADOW(a, coord) TRANSFER_SHADOW(a) +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(0, worldPos, a._ShadowCoord) +# endif +#else +# define UNITY_SHADOW_COORDS(idx1) unityShadowCoord4 _ShadowCoord : TEXCOORD##idx1; +# if defined(SHADOWS_SHADOWMASK) +# define UNITY_TRANSFER_SHADOW(a, coord) a._ShadowCoord.xy = coord.xy * unity_LightmapST.xy + unity_LightmapST.zw; +# if (defined(SHADOWS_DEPTH) || defined(SHADOWS_SCREEN) || defined(SHADOWS_CUBE) || UNITY_LIGHT_PROBE_PROXY_VOLUME) +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(a._ShadowCoord.xy, worldPos, UNITY_READ_SHADOW_COORDS(a)) +# else +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(a._ShadowCoord.xy, 0, 0) +# endif +# else +# if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) +# define UNITY_TRANSFER_SHADOW(a, coord) +# else +# define UNITY_TRANSFER_SHADOW(a, coord) TRANSFER_SHADOW(a) +# endif +# if (defined(SHADOWS_DEPTH) || defined(SHADOWS_SCREEN) || defined(SHADOWS_CUBE)) +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(0, worldPos, UNITY_READ_SHADOW_COORDS(a)) +# else +# if UNITY_LIGHT_PROBE_PROXY_VOLUME +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(0, worldPos, UNITY_READ_SHADOW_COORDS(a)) +# else +# define UNITY_SHADOW_ATTENUATION(a, worldPos) UnityComputeForwardShadows(0, 0, 0) +# endif +# endif +# endif +#endif + +#ifdef POINT +sampler2D_float _LightTexture0; +unityShadowCoord4x4 unity_WorldToLight; +# define UNITY_LIGHT_ATTENUATION(destName, input, worldPos) \ + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(worldPos, 1)).xyz; \ + fixed shadow = UNITY_SHADOW_ATTENUATION(input, worldPos); \ + fixed destName = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r * shadow; +#endif + +#ifdef SPOT +sampler2D_float _LightTexture0; +unityShadowCoord4x4 unity_WorldToLight; +sampler2D_float _LightTextureB0; +inline fixed UnitySpotCookie(unityShadowCoord4 LightCoord) +{ + return tex2D(_LightTexture0, LightCoord.xy / LightCoord.w + 0.5).w; +} +inline fixed UnitySpotAttenuate(unityShadowCoord3 LightCoord) +{ + return tex2D(_LightTextureB0, dot(LightCoord, LightCoord).xx).r; +} +#if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) +#define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(worldPos, 1)) +#else +#define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord4 lightCoord = input._LightCoord +#endif +# define UNITY_LIGHT_ATTENUATION(destName, input, worldPos) \ + DECLARE_LIGHT_COORD(input, worldPos); \ + fixed shadow = UNITY_SHADOW_ATTENUATION(input, worldPos); \ + fixed destName = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz) * shadow; +#endif + +#ifdef DIRECTIONAL +# define UNITY_LIGHT_ATTENUATION(destName, input, worldPos) fixed destName = UNITY_SHADOW_ATTENUATION(input, worldPos); +#endif + +#ifdef POINT_COOKIE +samplerCUBE_float _LightTexture0; +unityShadowCoord4x4 unity_WorldToLight; +sampler2D_float _LightTextureB0; +# if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) +# define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(worldPos, 1)).xyz +# else +# define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord3 lightCoord = input._LightCoord +# endif +# define UNITY_LIGHT_ATTENUATION(destName, input, worldPos) \ + DECLARE_LIGHT_COORD(input, worldPos); \ + fixed shadow = UNITY_SHADOW_ATTENUATION(input, worldPos); \ + fixed destName = tex2D(_LightTextureB0, dot(lightCoord, lightCoord).rr).r * texCUBE(_LightTexture0, lightCoord).w * shadow; +#endif + +#ifdef DIRECTIONAL_COOKIE +sampler2D_float _LightTexture0; +unityShadowCoord4x4 unity_WorldToLight; +# if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) +# define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord2 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(worldPos, 1)).xy +# else +# define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord2 lightCoord = input._LightCoord +# endif +# define UNITY_LIGHT_ATTENUATION(destName, input, worldPos) \ + DECLARE_LIGHT_COORD(input, worldPos); \ + fixed shadow = UNITY_SHADOW_ATTENUATION(input, worldPos); \ + fixed destName = tex2D(_LightTexture0, lightCoord).w * shadow; +#endif + + +// ----------------------------- +// Light/Shadow helpers (4.x version) +// ----------------------------- +// This version computes light coordinates in the vertex shader and passes them to the fragment shader. + +// ---- Spot light shadows +#if defined (SHADOWS_DEPTH) && defined (SPOT) +#define SHADOW_COORDS(idx1) unityShadowCoord4 _ShadowCoord : TEXCOORD##idx1; +#define TRANSFER_SHADOW(a) a._ShadowCoord = mul (unity_WorldToShadow[0], mul(unity_ObjectToWorld,v.vertex)); +#define TRANSFER_SHADOW_WPOS(a, wpos) a._ShadowCoord = mul (unity_WorldToShadow[0], float4(wpos.xyz, 1.0f)); +#define SHADOW_ATTENUATION(a) UnitySampleShadowmap(a._ShadowCoord) +#endif + +// ---- Point light shadows +#if defined (SHADOWS_CUBE) +#define SHADOW_COORDS(idx1) unityShadowCoord3 _ShadowCoord : TEXCOORD##idx1; +#define TRANSFER_SHADOW(a) a._ShadowCoord.xyz = mul(unity_ObjectToWorld, v.vertex).xyz - _LightPositionRange.xyz; +#define TRANSFER_SHADOW_WPOS(a, wpos) a._ShadowCoord.xyz = wpos.xyz - _LightPositionRange.xyz; +#define SHADOW_ATTENUATION(a) UnitySampleShadowmap(a._ShadowCoord) +#define READ_SHADOW_COORDS(a) unityShadowCoord4(a._ShadowCoord.xyz, 1.0) +#endif + +// ---- Shadows off +#if !defined (SHADOWS_SCREEN) && !defined (SHADOWS_DEPTH) && !defined (SHADOWS_CUBE) +#define SHADOW_COORDS(idx1) +#define TRANSFER_SHADOW(a) +#define TRANSFER_SHADOW_WPOS(a, wpos) +#define SHADOW_ATTENUATION(a) 1.0 +#define READ_SHADOW_COORDS(a) 0 +#else +#ifndef READ_SHADOW_COORDS +#define READ_SHADOW_COORDS(a) a._ShadowCoord +#endif +#endif + +#ifdef POINT +# define DECLARE_LIGHT_COORDS(idx) unityShadowCoord3 _LightCoord : TEXCOORD##idx; +# define COMPUTE_LIGHT_COORDS(a) a._LightCoord = mul(unity_WorldToLight, mul(unity_ObjectToWorld, v.vertex)).xyz; +# define LIGHT_ATTENUATION(a) (tex2D(_LightTexture0, dot(a._LightCoord,a._LightCoord).rr).r * SHADOW_ATTENUATION(a)) +#endif + +#ifdef SPOT +# define DECLARE_LIGHT_COORDS(idx) unityShadowCoord4 _LightCoord : TEXCOORD##idx; +# define COMPUTE_LIGHT_COORDS(a) a._LightCoord = mul(unity_WorldToLight, mul(unity_ObjectToWorld, v.vertex)); +# define LIGHT_ATTENUATION(a) ( (a._LightCoord.z > 0) * UnitySpotCookie(a._LightCoord) * UnitySpotAttenuate(a._LightCoord.xyz) * SHADOW_ATTENUATION(a) ) +#endif + +#ifdef DIRECTIONAL +# define DECLARE_LIGHT_COORDS(idx) +# define COMPUTE_LIGHT_COORDS(a) +# define LIGHT_ATTENUATION(a) SHADOW_ATTENUATION(a) +#endif + +#ifdef POINT_COOKIE +# define DECLARE_LIGHT_COORDS(idx) unityShadowCoord3 _LightCoord : TEXCOORD##idx; +# define COMPUTE_LIGHT_COORDS(a) a._LightCoord = mul(unity_WorldToLight, mul(unity_ObjectToWorld, v.vertex)).xyz; +# define LIGHT_ATTENUATION(a) (tex2D(_LightTextureB0, dot(a._LightCoord,a._LightCoord).rr).r * texCUBE(_LightTexture0, a._LightCoord).w * SHADOW_ATTENUATION(a)) +#endif + +#ifdef DIRECTIONAL_COOKIE +# define DECLARE_LIGHT_COORDS(idx) unityShadowCoord2 _LightCoord : TEXCOORD##idx; +# define COMPUTE_LIGHT_COORDS(a) a._LightCoord = mul(unity_WorldToLight, mul(unity_ObjectToWorld, v.vertex)).xy; +# define LIGHT_ATTENUATION(a) (tex2D(_LightTexture0, a._LightCoord).w * SHADOW_ATTENUATION(a)) +#endif + +#define UNITY_LIGHTING_COORDS(idx1, idx2) DECLARE_LIGHT_COORDS(idx1) UNITY_SHADOW_COORDS(idx2) +#define LIGHTING_COORDS(idx1, idx2) DECLARE_LIGHT_COORDS(idx1) SHADOW_COORDS(idx2) +#define UNITY_TRANSFER_LIGHTING(a, coord) COMPUTE_LIGHT_COORDS(a) UNITY_TRANSFER_SHADOW(a, coord) +#define TRANSFER_VERTEX_TO_FRAGMENT(a) COMPUTE_LIGHT_COORDS(a) TRANSFER_SHADOW(a) diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl.meta b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl.meta new file mode 100644 index 00000000000..945d467f2f4 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/AutoLightShim.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 722625f51da829945b59cd41d374a3a5 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl index 0e14f06a527..5cd95a5770f 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl @@ -35,6 +35,7 @@ #define UNITY_PROJ_COORD(a) a #define UNITY_SAMPLE_DEPTH_TEXTURE(tex, coord) SAMPLE_DEPTH_TEXTURE(tex, sampler##tex, coord) +#define SAMPLE_DEPTH_TEXTURE_PROJ(sampler, uv) (tex2Dproj(sampler, uv).r) // 2D textures #define UNITY_DECLARE_TEX2D(tex) TEXTURE2D(tex); SAMPLER(sampler##tex) diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/Shims.hlsl b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/Shims.hlsl index 477ba4fab8c..f5a6348ca40 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/Shims.hlsl +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/Shims.hlsl @@ -18,12 +18,13 @@ #include "SurfaceShaderProxy.hlsl" #include "UnityShaderVariables.cginc" -#include "UnityShaderUtilities.cginc" #include "UnityCG.cginc" +#include "UnityShadowLibraryShim.hlsl" +#include "UnityShaderUtilities.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" -#include "AutoLight.cginc" +#include "AutoLightShim.hlsl" #ifdef POINT # define COPY_FROM_LIGHT_COORDS(dest, src) dest = src._LightCoord diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl new file mode 100644 index 00000000000..bacaf46e337 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl @@ -0,0 +1,791 @@ +#pragma once + +// This file acts as the bridge to avoid including UnityShadowLibrary.cginc which contains uses of macros incompatible with SRP + +// Use the include guard to force UnityShadowLibrary.cginc to not get included +#define UNITY_BUILTIN_SHADOW_LIBRARY_INCLUDED + +// Shadowmap helpers. +#if defined( SHADOWS_SCREEN ) && defined( LIGHTMAP_ON ) + #define HANDLE_SHADOWS_BLENDING_IN_GI 1 +#endif + +#define unityShadowCoord float +#define unityShadowCoord2 float2 +#define unityShadowCoord3 float3 +#define unityShadowCoord4 float4 +#define unityShadowCoord4x4 float4x4 + +half UnitySampleShadowmap_PCF7x7(float4 coord, float3 receiverPlaneDepthBias); // Samples the shadowmap based on PCF filtering (7x7 kernel) +half UnitySampleShadowmap_PCF5x5(float4 coord, float3 receiverPlaneDepthBias); // Samples the shadowmap based on PCF filtering (5x5 kernel) +half UnitySampleShadowmap_PCF3x3(float4 coord, float3 receiverPlaneDepthBias); // Samples the shadowmap based on PCF filtering (3x3 kernel) +float3 UnityGetReceiverPlaneDepthBias(float3 shadowCoord, float biasbiasMultiply); // Receiver plane depth bias + +// ------------------------------------------------------------------ +// Spot light shadows +// ------------------------------------------------------------------ + +#if defined (SHADOWS_DEPTH) && defined (SPOT) + + // declare shadowmap + #if !defined(SHADOWMAPSAMPLER_DEFINED) + UNITY_DECLARE_SHADOWMAP(_ShadowMapTexture); + #define SHADOWMAPSAMPLER_DEFINED + #endif + + // shadow sampling offsets and texel size + #if defined (SHADOWS_SOFT) + float4 _ShadowOffsets[4]; + float4 _ShadowMapTexture_TexelSize; + #define SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + #endif + +inline fixed UnitySampleShadowmap (float4 shadowCoord) +{ + #if defined (SHADOWS_SOFT) + + half shadow = 1; + + // No hardware comparison sampler (ie some mobile + xbox360) : simple 4 tap PCF + #if !defined (SHADOWS_NATIVE) + float3 coord = shadowCoord.xyz / shadowCoord.w; + float4 shadowVals; + // This is one difference from UnityShadowLibrary.cginc + shadowVals.x = UNITY_SAMPLE_DEPTH_TEXTURE(_ShadowMapTexture, coord + _ShadowOffsets[0].xy); + shadowVals.y = UNITY_SAMPLE_DEPTH_TEXTURE(_ShadowMapTexture, coord + _ShadowOffsets[1].xy); + shadowVals.z = UNITY_SAMPLE_DEPTH_TEXTURE(_ShadowMapTexture, coord + _ShadowOffsets[2].xy); + shadowVals.w = UNITY_SAMPLE_DEPTH_TEXTURE(_ShadowMapTexture, coord + _ShadowOffsets[3].xy); + half4 shadows = (shadowVals < coord.zzzz) ? _LightShadowData.rrrr : 1.0f; + shadow = dot(shadows, 0.25f); + #else + // Mobile with comparison sampler : 4-tap linear comparison filter + #if defined(SHADER_API_MOBILE) + float3 coord = shadowCoord.xyz / shadowCoord.w; + half4 shadows; + shadows.x = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, coord + _ShadowOffsets[0]); + shadows.y = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, coord + _ShadowOffsets[1]); + shadows.z = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, coord + _ShadowOffsets[2]); + shadows.w = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, coord + _ShadowOffsets[3]); + shadow = dot(shadows, 0.25f); + // Everything else + #else + float3 coord = shadowCoord.xyz / shadowCoord.w; + float3 receiverPlaneDepthBias = UnityGetReceiverPlaneDepthBias(coord, 1.0f); + shadow = UnitySampleShadowmap_PCF3x3(float4(coord, 1), receiverPlaneDepthBias); + #endif + shadow = lerp(_LightShadowData.r, 1.0f, shadow); + #endif + #else + // 1-tap shadows + #if defined (SHADOWS_NATIVE) + half shadow = UNITY_SAMPLE_SHADOW_PROJ(_ShadowMapTexture, shadowCoord); + shadow = lerp(_LightShadowData.r, 1.0f, shadow); + #else + half shadow = SAMPLE_DEPTH_TEXTURE_PROJ(_ShadowMapTexture, UNITY_PROJ_COORD(shadowCoord)) < (shadowCoord.z / shadowCoord.w) ? _LightShadowData.r : 1.0; + #endif + + #endif + + return shadow; +} + +#endif // #if defined (SHADOWS_DEPTH) && defined (SPOT) + +// ------------------------------------------------------------------ +// Point light shadows +// ------------------------------------------------------------------ + +#if defined (SHADOWS_CUBE) + +#if defined(SHADOWS_CUBE_IN_DEPTH_TEX) + UNITY_DECLARE_TEXCUBE_SHADOWMAP(_ShadowMapTexture); +#else + UNITY_DECLARE_TEXCUBE(_ShadowMapTexture); + inline float SampleCubeDistance (float3 vec) + { + return UnityDecodeCubeShadowDepth(UNITY_SAMPLE_TEXCUBE_LOD(_ShadowMapTexture, vec, 0)); + } + +#endif + +inline half UnitySampleShadowmap (float3 vec) +{ + #if defined(SHADOWS_CUBE_IN_DEPTH_TEX) + float3 absVec = abs(vec); + float dominantAxis = max(max(absVec.x, absVec.y), absVec.z); // TODO use max3() instead + dominantAxis = max(0.00001, dominantAxis - _LightProjectionParams.z); // shadow bias from point light is apllied here. + dominantAxis *= _LightProjectionParams.w; // bias + float mydist = -_LightProjectionParams.x + _LightProjectionParams.y/dominantAxis; // project to shadow map clip space [0; 1] + + #if defined(UNITY_REVERSED_Z) + mydist = 1.0 - mydist; // depth buffers are reversed! Additionally we can move this to CPP code! + #endif + #else + float mydist = length(vec) * _LightPositionRange.w; + mydist *= _LightProjectionParams.w; // bias + #endif + + #if defined (SHADOWS_SOFT) + float z = 1.0/128.0; + float4 shadowVals; + // No hardware comparison sampler (ie some mobile + xbox360) : simple 4 tap PCF + #if defined (SHADOWS_CUBE_IN_DEPTH_TEX) + shadowVals.x = UNITY_SAMPLE_TEXCUBE_SHADOW(_ShadowMapTexture, float4(vec+float3( z, z, z), mydist)); + shadowVals.y = UNITY_SAMPLE_TEXCUBE_SHADOW(_ShadowMapTexture, float4(vec+float3(-z,-z, z), mydist)); + shadowVals.z = UNITY_SAMPLE_TEXCUBE_SHADOW(_ShadowMapTexture, float4(vec+float3(-z, z,-z), mydist)); + shadowVals.w = UNITY_SAMPLE_TEXCUBE_SHADOW(_ShadowMapTexture, float4(vec+float3( z,-z,-z), mydist)); + half shadow = dot(shadowVals, 0.25); + return lerp(_LightShadowData.r, 1.0, shadow); + #else + shadowVals.x = SampleCubeDistance (vec+float3( z, z, z)); + shadowVals.y = SampleCubeDistance (vec+float3(-z,-z, z)); + shadowVals.z = SampleCubeDistance (vec+float3(-z, z,-z)); + shadowVals.w = SampleCubeDistance (vec+float3( z,-z,-z)); + half4 shadows = (shadowVals < mydist.xxxx) ? _LightShadowData.rrrr : 1.0f; + return dot(shadows, 0.25); + #endif + #else + #if defined (SHADOWS_CUBE_IN_DEPTH_TEX) + half shadow = UNITY_SAMPLE_TEXCUBE_SHADOW(_ShadowMapTexture, float4(vec, mydist)); + return lerp(_LightShadowData.r, 1.0, shadow); + #else + half shadowVal = UnityDecodeCubeShadowDepth(UNITY_SAMPLE_TEXCUBE(_ShadowMapTexture, vec)); + half shadow = shadowVal < mydist ? _LightShadowData.r : 1.0; + return shadow; + #endif + #endif + +} +#endif // #if defined (SHADOWS_CUBE) + + +// ------------------------------------------------------------------ +// Baked shadows +// ------------------------------------------------------------------ + +#if UNITY_LIGHT_PROBE_PROXY_VOLUME + +half4 LPPV_SampleProbeOcclusion(float3 worldPos) +{ + const float transformToLocal = unity_ProbeVolumeParams.y; + const float texelSizeX = unity_ProbeVolumeParams.z; + + //The SH coefficients textures and probe occlusion are packed into 1 atlas. + //------------------------- + //| ShR | ShG | ShB | Occ | + //------------------------- + + float3 position = (transformToLocal == 1.0f) ? mul(unity_ProbeVolumeWorldToObject, float4(worldPos, 1.0)).xyz : worldPos; + + //Get a tex coord between 0 and 1 + float3 texCoord = (position - unity_ProbeVolumeMin.xyz) * unity_ProbeVolumeSizeInv.xyz; + + // Sample fourth texture in the atlas + // We need to compute proper U coordinate to sample. + // Clamp the coordinate otherwize we'll have leaking between ShB coefficients and Probe Occlusion(Occ) info + texCoord.x = max(texCoord.x * 0.25f + 0.75f, 0.75f + 0.5f * texelSizeX); + + return UNITY_SAMPLE_TEX3D_SAMPLER(unity_ProbeVolumeSH, unity_ProbeVolumeSH, texCoord); +} + +#endif //#if UNITY_LIGHT_PROBE_PROXY_VOLUME + +// ------------------------------------------------------------------ +// Used by the forward rendering path +fixed UnitySampleBakedOcclusion (float2 lightmapUV, float3 worldPos) +{ + #if defined (SHADOWS_SHADOWMASK) + #if defined(LIGHTMAP_ON) + fixed4 rawOcclusionMask = UNITY_SAMPLE_TEX2D(unity_ShadowMask, lightmapUV.xy); + #else + fixed4 rawOcclusionMask = fixed4(1.0, 1.0, 1.0, 1.0); + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1.0) + rawOcclusionMask = LPPV_SampleProbeOcclusion(worldPos); + else + rawOcclusionMask = UNITY_SAMPLE_TEX2D(unity_ShadowMask, lightmapUV.xy); + #else + rawOcclusionMask = UNITY_SAMPLE_TEX2D(unity_ShadowMask, lightmapUV.xy); + #endif + #endif + return saturate(dot(rawOcclusionMask, unity_OcclusionMaskSelector)); + + #else + + //In forward dynamic objects can only get baked occlusion from LPPV, light probe occlusion is done on the CPU by attenuating the light color. + fixed atten = 1.0f; + #if defined(UNITY_INSTANCING_ENABLED) && defined(UNITY_USE_SHCOEFFS_ARRAYS) + // ...unless we are doing instancing, and the attenuation is packed into SHC array's .w component. + atten = unity_SHC.w; + #endif + + #if UNITY_LIGHT_PROBE_PROXY_VOLUME && !defined(LIGHTMAP_ON) && !UNITY_STANDARD_SIMPLE + fixed4 rawOcclusionMask = atten.xxxx; + if (unity_ProbeVolumeParams.x == 1.0) + rawOcclusionMask = LPPV_SampleProbeOcclusion(worldPos); + return saturate(dot(rawOcclusionMask, unity_OcclusionMaskSelector)); + #endif + + return atten; + #endif +} + +// ------------------------------------------------------------------ +// Used by the deferred rendering path (in the gbuffer pass) +fixed4 UnityGetRawBakedOcclusions(float2 lightmapUV, float3 worldPos) +{ + #if defined (SHADOWS_SHADOWMASK) + #if defined(LIGHTMAP_ON) + return UNITY_SAMPLE_TEX2D(unity_ShadowMask, lightmapUV.xy); + #else + half4 probeOcclusion = unity_ProbesOcclusion; + + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1.0) + probeOcclusion = LPPV_SampleProbeOcclusion(worldPos); + #endif + + return probeOcclusion; + #endif + #else + return fixed4(1.0, 1.0, 1.0, 1.0); + #endif +} + +// ------------------------------------------------------------------ +// Used by both the forward and the deferred rendering path +half UnityMixRealtimeAndBakedShadows(half realtimeShadowAttenuation, half bakedShadowAttenuation, half fade) +{ + // -- Static objects -- + // FWD BASE PASS + // ShadowMask mode = LIGHTMAP_ON + SHADOWS_SHADOWMASK + LIGHTMAP_SHADOW_MIXING + // Distance shadowmask mode = LIGHTMAP_ON + SHADOWS_SHADOWMASK + // Subtractive mode = LIGHTMAP_ON + LIGHTMAP_SHADOW_MIXING + // Pure realtime direct lit = LIGHTMAP_ON + + // FWD ADD PASS + // ShadowMask mode = SHADOWS_SHADOWMASK + LIGHTMAP_SHADOW_MIXING + // Distance shadowmask mode = SHADOWS_SHADOWMASK + // Pure realtime direct lit = LIGHTMAP_ON + + // DEFERRED LIGHTING PASS + // ShadowMask mode = LIGHTMAP_ON + SHADOWS_SHADOWMASK + LIGHTMAP_SHADOW_MIXING + // Distance shadowmask mode = LIGHTMAP_ON + SHADOWS_SHADOWMASK + // Pure realtime direct lit = LIGHTMAP_ON + + // -- Dynamic objects -- + // FWD BASE PASS + FWD ADD ASS + // ShadowMask mode = LIGHTMAP_SHADOW_MIXING + // Distance shadowmask mode = N/A + // Subtractive mode = LIGHTMAP_SHADOW_MIXING (only matter for LPPV. Light probes occlusion being done on CPU) + // Pure realtime direct lit = N/A + + // DEFERRED LIGHTING PASS + // ShadowMask mode = SHADOWS_SHADOWMASK + LIGHTMAP_SHADOW_MIXING + // Distance shadowmask mode = SHADOWS_SHADOWMASK + // Pure realtime direct lit = N/A + + #if !defined(SHADOWS_DEPTH) && !defined(SHADOWS_SCREEN) && !defined(SHADOWS_CUBE) + #if defined(LIGHTMAP_ON) && defined (LIGHTMAP_SHADOW_MIXING) && !defined (SHADOWS_SHADOWMASK) + //In subtractive mode when there is no shadow we kill the light contribution as direct as been baked in the lightmap. + return 0.0; + #else + return bakedShadowAttenuation; + #endif + #endif + + #if (SHADER_TARGET <= 20) || UNITY_STANDARD_SIMPLE + //no fading nor blending on SM 2.0 because of instruction count limit. + #if defined(SHADOWS_SHADOWMASK) || defined(LIGHTMAP_SHADOW_MIXING) + return min(realtimeShadowAttenuation, bakedShadowAttenuation); + #else + return realtimeShadowAttenuation; + #endif + #endif + + #if defined(LIGHTMAP_SHADOW_MIXING) + //Subtractive or shadowmask mode + realtimeShadowAttenuation = saturate(realtimeShadowAttenuation + fade); + return min(realtimeShadowAttenuation, bakedShadowAttenuation); + #endif + + //In distance shadowmask or realtime shadow fadeout we lerp toward the baked shadows (bakedShadowAttenuation will be 1 if no baked shadows) + return lerp(realtimeShadowAttenuation, bakedShadowAttenuation, fade); +} + +// ------------------------------------------------------------------ +// Shadow fade +// ------------------------------------------------------------------ + +float UnityComputeShadowFadeDistance(float3 wpos, float z) +{ + float sphereDist = distance(wpos, unity_ShadowFadeCenterAndType.xyz); + return lerp(z, sphereDist, unity_ShadowFadeCenterAndType.w); +} + +// ------------------------------------------------------------------ +half UnityComputeShadowFade(float fadeDist) +{ + return saturate(fadeDist * _LightShadowData.z + _LightShadowData.w); +} + + +// ------------------------------------------------------------------ +// Bias +// ------------------------------------------------------------------ + +/** +* Computes the receiver plane depth bias for the given shadow coord in screen space. +* Inspirations: +* http://mynameismjp.wordpress.com/2013/09/10/shadow-maps/ +* http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Isidoro-ShadowMapping.pdf +*/ +float3 UnityGetReceiverPlaneDepthBias(float3 shadowCoord, float biasMultiply) +{ + // Should receiver plane bias be used? This estimates receiver slope using derivatives, + // and tries to tilt the PCF kernel along it. However, when doing it in screenspace from the depth texture + // (ie all light in deferred and directional light in both forward and deferred), the derivatives are wrong + // on edges or intersections of objects, leading to shadow artifacts. Thus it is disabled by default. + float3 biasUVZ = 0; + +#if defined(UNITY_USE_RECEIVER_PLANE_BIAS) && defined(SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED) + float3 dx = ddx(shadowCoord); + float3 dy = ddy(shadowCoord); + + biasUVZ.x = dy.y * dx.z - dx.y * dy.z; + biasUVZ.y = dx.x * dy.z - dy.x * dx.z; + biasUVZ.xy *= biasMultiply / ((dx.x * dy.y) - (dx.y * dy.x)); + + // Static depth biasing to make up for incorrect fractional sampling on the shadow map grid. + const float UNITY_RECEIVER_PLANE_MIN_FRACTIONAL_ERROR = 0.01f; + float fractionalSamplingError = dot(_ShadowMapTexture_TexelSize.xy, abs(biasUVZ.xy)); + biasUVZ.z = -min(fractionalSamplingError, UNITY_RECEIVER_PLANE_MIN_FRACTIONAL_ERROR); + #if defined(UNITY_REVERSED_Z) + biasUVZ.z *= -1; + #endif +#endif + + return biasUVZ; +} + +/** +* Combines the different components of a shadow coordinate and returns the final coordinate. +* See UnityGetReceiverPlaneDepthBias +*/ +float3 UnityCombineShadowcoordComponents(float2 baseUV, float2 deltaUV, float depth, float3 receiverPlaneDepthBias) +{ + float3 uv = float3(baseUV + deltaUV, depth + receiverPlaneDepthBias.z); + uv.z += dot(deltaUV, receiverPlaneDepthBias.xy); + return uv; +} + +// ------------------------------------------------------------------ +// PCF Filtering helpers +// ------------------------------------------------------------------ + +/** +* Assuming a isoceles rectangle triangle of height "triangleHeight" (as drawn below). +* This function return the area of the triangle above the first texel. +* +* |\ <-- 45 degree slop isosceles rectangle triangle +* | \ +* ---- <-- length of this side is "triangleHeight" +* _ _ _ _ <-- texels +*/ +float _UnityInternalGetAreaAboveFirstTexelUnderAIsocelesRectangleTriangle(float triangleHeight) +{ + return triangleHeight - 0.5; +} + +/** +* Assuming a isoceles triangle of 1.5 texels height and 3 texels wide lying on 4 texels. +* This function return the area of the triangle above each of those texels. +* | <-- offset from -0.5 to 0.5, 0 meaning triangle is exactly in the center +* / \ <-- 45 degree slop isosceles triangle (ie tent projected in 2D) +* / \ +* _ _ _ _ <-- texels +* X Y Z W <-- result indices (in computedArea.xyzw and computedAreaUncut.xyzw) +*/ +void _UnityInternalGetAreaPerTexel_3TexelsWideTriangleFilter(float offset, out float4 computedArea, out float4 computedAreaUncut) +{ + //Compute the exterior areas + float offset01SquaredHalved = (offset + 0.5) * (offset + 0.5) * 0.5; + computedAreaUncut.x = computedArea.x = offset01SquaredHalved - offset; + computedAreaUncut.w = computedArea.w = offset01SquaredHalved; + + //Compute the middle areas + //For Y : We find the area in Y of as if the left section of the isoceles triangle would + //intersect the axis between Y and Z (ie where offset = 0). + computedAreaUncut.y = _UnityInternalGetAreaAboveFirstTexelUnderAIsocelesRectangleTriangle(1.5 - offset); + //This area is superior to the one we are looking for if (offset < 0) thus we need to + //subtract the area of the triangle defined by (0,1.5-offset), (0,1.5+offset), (-offset,1.5). + float clampedOffsetLeft = min(offset,0); + float areaOfSmallLeftTriangle = clampedOffsetLeft * clampedOffsetLeft; + computedArea.y = computedAreaUncut.y - areaOfSmallLeftTriangle; + + //We do the same for the Z but with the right part of the isoceles triangle + computedAreaUncut.z = _UnityInternalGetAreaAboveFirstTexelUnderAIsocelesRectangleTriangle(1.5 + offset); + float clampedOffsetRight = max(offset,0); + float areaOfSmallRightTriangle = clampedOffsetRight * clampedOffsetRight; + computedArea.z = computedAreaUncut.z - areaOfSmallRightTriangle; +} + +/** + * Assuming a isoceles triangle of 1.5 texels height and 3 texels wide lying on 4 texels. + * This function return the weight of each texels area relative to the full triangle area. + */ +void _UnityInternalGetWeightPerTexel_3TexelsWideTriangleFilter(float offset, out float4 computedWeight) +{ + float4 dummy; + _UnityInternalGetAreaPerTexel_3TexelsWideTriangleFilter(offset, computedWeight, dummy); + computedWeight *= 0.44444;//0.44 == 1/(the triangle area) +} + +/** +* Assuming a isoceles triangle of 2.5 texel height and 5 texels wide lying on 6 texels. +* This function return the weight of each texels area relative to the full triangle area. +* / \ +* _ _ _ _ _ _ <-- texels +* 0 1 2 3 4 5 <-- computed area indices (in texelsWeights[]) +*/ +void _UnityInternalGetWeightPerTexel_5TexelsWideTriangleFilter(float offset, out float3 texelsWeightsA, out float3 texelsWeightsB) +{ + //See _UnityInternalGetAreaPerTexel_3TexelTriangleFilter for details. + float4 computedArea_From3texelTriangle; + float4 computedAreaUncut_From3texelTriangle; + _UnityInternalGetAreaPerTexel_3TexelsWideTriangleFilter(offset, computedArea_From3texelTriangle, computedAreaUncut_From3texelTriangle); + + //Triangle slop is 45 degree thus we can almost reuse the result of the 3 texel wide computation. + //the 5 texel wide triangle can be seen as the 3 texel wide one but shifted up by one unit/texel. + //0.16 is 1/(the triangle area) + texelsWeightsA.x = 0.16 * (computedArea_From3texelTriangle.x); + texelsWeightsA.y = 0.16 * (computedAreaUncut_From3texelTriangle.y); + texelsWeightsA.z = 0.16 * (computedArea_From3texelTriangle.y + 1); + texelsWeightsB.x = 0.16 * (computedArea_From3texelTriangle.z + 1); + texelsWeightsB.y = 0.16 * (computedAreaUncut_From3texelTriangle.z); + texelsWeightsB.z = 0.16 * (computedArea_From3texelTriangle.w); +} + +/** +* Assuming a isoceles triangle of 3.5 texel height and 7 texels wide lying on 8 texels. +* This function return the weight of each texels area relative to the full triangle area. +* / \ +* _ _ _ _ _ _ _ _ <-- texels +* 0 1 2 3 4 5 6 7 <-- computed area indices (in texelsWeights[]) +*/ +void _UnityInternalGetWeightPerTexel_7TexelsWideTriangleFilter(float offset, out float4 texelsWeightsA, out float4 texelsWeightsB) +{ + //See _UnityInternalGetAreaPerTexel_3TexelTriangleFilter for details. + float4 computedArea_From3texelTriangle; + float4 computedAreaUncut_From3texelTriangle; + _UnityInternalGetAreaPerTexel_3TexelsWideTriangleFilter(offset, computedArea_From3texelTriangle, computedAreaUncut_From3texelTriangle); + + //Triangle slop is 45 degree thus we can almost reuse the result of the 3 texel wide computation. + //the 7 texel wide triangle can be seen as the 3 texel wide one but shifted up by two unit/texel. + //0.081632 is 1/(the triangle area) + texelsWeightsA.x = 0.081632 * (computedArea_From3texelTriangle.x); + texelsWeightsA.y = 0.081632 * (computedAreaUncut_From3texelTriangle.y); + texelsWeightsA.z = 0.081632 * (computedAreaUncut_From3texelTriangle.y + 1); + texelsWeightsA.w = 0.081632 * (computedArea_From3texelTriangle.y + 2); + texelsWeightsB.x = 0.081632 * (computedArea_From3texelTriangle.z + 2); + texelsWeightsB.y = 0.081632 * (computedAreaUncut_From3texelTriangle.z + 1); + texelsWeightsB.z = 0.081632 * (computedAreaUncut_From3texelTriangle.z); + texelsWeightsB.w = 0.081632 * (computedArea_From3texelTriangle.w); +} + +// ------------------------------------------------------------------ +// PCF Filtering +// ------------------------------------------------------------------ + +/** +* PCF gaussian shadowmap filtering based on a 3x3 kernel (9 taps no PCF hardware support) +*/ +half UnitySampleShadowmap_PCF3x3NoHardwareSupport(float4 coord, float3 receiverPlaneDepthBias) +{ + half shadow = 1; + +#ifdef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + // when we don't have hardware PCF sampling, then the above 5x5 optimized PCF really does not work. + // Fallback to a simple 3x3 sampling with averaged results. + float2 base_uv = coord.xy; + float2 ts = _ShadowMapTexture_TexelSize.xy; + shadow = 0; + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(-ts.x, -ts.y), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(0, -ts.y), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(ts.x, -ts.y), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(-ts.x, 0), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(0, 0), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(ts.x, 0), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(-ts.x, ts.y), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(0, ts.y), coord.z, receiverPlaneDepthBias)); + shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(ts.x, ts.y), coord.z, receiverPlaneDepthBias)); + shadow /= 9.0; +#endif + + return shadow; +} + +/** +* PCF tent shadowmap filtering based on a 3x3 kernel (optimized with 4 taps) +*/ +half UnitySampleShadowmap_PCF3x3Tent(float4 coord, float3 receiverPlaneDepthBias) +{ + half shadow = 1; + +#ifdef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + + #ifndef SHADOWS_NATIVE + // when we don't have hardware PCF sampling, fallback to a simple 3x3 sampling with averaged results. + return UnitySampleShadowmap_PCF3x3NoHardwareSupport(coord, receiverPlaneDepthBias); + #endif + + // tent base is 3x3 base thus covering from 9 to 12 texels, thus we need 4 bilinear PCF fetches + float2 tentCenterInTexelSpace = coord.xy * _ShadowMapTexture_TexelSize.zw; + float2 centerOfFetchesInTexelSpace = floor(tentCenterInTexelSpace + 0.5); + float2 offsetFromTentCenterToCenterOfFetches = tentCenterInTexelSpace - centerOfFetchesInTexelSpace; + + // find the weight of each texel based + float4 texelsWeightsU, texelsWeightsV; + _UnityInternalGetWeightPerTexel_3TexelsWideTriangleFilter(offsetFromTentCenterToCenterOfFetches.x, texelsWeightsU); + _UnityInternalGetWeightPerTexel_3TexelsWideTriangleFilter(offsetFromTentCenterToCenterOfFetches.y, texelsWeightsV); + + // each fetch will cover a group of 2x2 texels, the weight of each group is the sum of the weights of the texels + float2 fetchesWeightsU = texelsWeightsU.xz + texelsWeightsU.yw; + float2 fetchesWeightsV = texelsWeightsV.xz + texelsWeightsV.yw; + + // move the PCF bilinear fetches to respect texels weights + float2 fetchesOffsetsU = texelsWeightsU.yw / fetchesWeightsU.xy + float2(-1.5,0.5); + float2 fetchesOffsetsV = texelsWeightsV.yw / fetchesWeightsV.xy + float2(-1.5,0.5); + fetchesOffsetsU *= _ShadowMapTexture_TexelSize.xx; + fetchesOffsetsV *= _ShadowMapTexture_TexelSize.yy; + + // fetch ! + float2 bilinearFetchOrigin = centerOfFetchesInTexelSpace * _ShadowMapTexture_TexelSize.xy; + shadow = fetchesWeightsU.x * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.x * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); +#endif + + return shadow; +} + +/** +* PCF tent shadowmap filtering based on a 5x5 kernel (optimized with 9 taps) +*/ +half UnitySampleShadowmap_PCF5x5Tent(float4 coord, float3 receiverPlaneDepthBias) +{ + half shadow = 1; + +#ifdef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + + #ifndef SHADOWS_NATIVE + // when we don't have hardware PCF sampling, fallback to a simple 3x3 sampling with averaged results. + return UnitySampleShadowmap_PCF3x3NoHardwareSupport(coord, receiverPlaneDepthBias); + #endif + + // tent base is 5x5 base thus covering from 25 to 36 texels, thus we need 9 bilinear PCF fetches + float2 tentCenterInTexelSpace = coord.xy * _ShadowMapTexture_TexelSize.zw; + float2 centerOfFetchesInTexelSpace = floor(tentCenterInTexelSpace + 0.5); + float2 offsetFromTentCenterToCenterOfFetches = tentCenterInTexelSpace - centerOfFetchesInTexelSpace; + + // find the weight of each texel based on the area of a 45 degree slop tent above each of them. + float3 texelsWeightsU_A, texelsWeightsU_B; + float3 texelsWeightsV_A, texelsWeightsV_B; + _UnityInternalGetWeightPerTexel_5TexelsWideTriangleFilter(offsetFromTentCenterToCenterOfFetches.x, texelsWeightsU_A, texelsWeightsU_B); + _UnityInternalGetWeightPerTexel_5TexelsWideTriangleFilter(offsetFromTentCenterToCenterOfFetches.y, texelsWeightsV_A, texelsWeightsV_B); + + // each fetch will cover a group of 2x2 texels, the weight of each group is the sum of the weights of the texels + float3 fetchesWeightsU = float3(texelsWeightsU_A.xz, texelsWeightsU_B.y) + float3(texelsWeightsU_A.y, texelsWeightsU_B.xz); + float3 fetchesWeightsV = float3(texelsWeightsV_A.xz, texelsWeightsV_B.y) + float3(texelsWeightsV_A.y, texelsWeightsV_B.xz); + + // move the PCF bilinear fetches to respect texels weights + float3 fetchesOffsetsU = float3(texelsWeightsU_A.y, texelsWeightsU_B.xz) / fetchesWeightsU.xyz + float3(-2.5,-0.5,1.5); + float3 fetchesOffsetsV = float3(texelsWeightsV_A.y, texelsWeightsV_B.xz) / fetchesWeightsV.xyz + float3(-2.5,-0.5,1.5); + fetchesOffsetsU *= _ShadowMapTexture_TexelSize.xxx; + fetchesOffsetsV *= _ShadowMapTexture_TexelSize.yyy; + + // fetch ! + float2 bilinearFetchOrigin = centerOfFetchesInTexelSpace * _ShadowMapTexture_TexelSize.xy; + shadow = fetchesWeightsU.x * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.x * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.x * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); +#endif + + return shadow; +} + +/** +* PCF tent shadowmap filtering based on a 7x7 kernel (optimized with 16 taps) +*/ +half UnitySampleShadowmap_PCF7x7Tent(float4 coord, float3 receiverPlaneDepthBias) +{ + half shadow = 1; + +#ifdef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + + #ifndef SHADOWS_NATIVE + // when we don't have hardware PCF sampling, fallback to a simple 3x3 sampling with averaged results. + return UnitySampleShadowmap_PCF3x3NoHardwareSupport(coord, receiverPlaneDepthBias); + #endif + + // tent base is 7x7 base thus covering from 49 to 64 texels, thus we need 16 bilinear PCF fetches + float2 tentCenterInTexelSpace = coord.xy * _ShadowMapTexture_TexelSize.zw; + float2 centerOfFetchesInTexelSpace = floor(tentCenterInTexelSpace + 0.5); + float2 offsetFromTentCenterToCenterOfFetches = tentCenterInTexelSpace - centerOfFetchesInTexelSpace; + + // find the weight of each texel based on the area of a 45 degree slop tent above each of them. + float4 texelsWeightsU_A, texelsWeightsU_B; + float4 texelsWeightsV_A, texelsWeightsV_B; + _UnityInternalGetWeightPerTexel_7TexelsWideTriangleFilter(offsetFromTentCenterToCenterOfFetches.x, texelsWeightsU_A, texelsWeightsU_B); + _UnityInternalGetWeightPerTexel_7TexelsWideTriangleFilter(offsetFromTentCenterToCenterOfFetches.y, texelsWeightsV_A, texelsWeightsV_B); + + // each fetch will cover a group of 2x2 texels, the weight of each group is the sum of the weights of the texels + float4 fetchesWeightsU = float4(texelsWeightsU_A.xz, texelsWeightsU_B.xz) + float4(texelsWeightsU_A.yw, texelsWeightsU_B.yw); + float4 fetchesWeightsV = float4(texelsWeightsV_A.xz, texelsWeightsV_B.xz) + float4(texelsWeightsV_A.yw, texelsWeightsV_B.yw); + + // move the PCF bilinear fetches to respect texels weights + float4 fetchesOffsetsU = float4(texelsWeightsU_A.yw, texelsWeightsU_B.yw) / fetchesWeightsU.xyzw + float4(-3.5,-1.5,0.5,2.5); + float4 fetchesOffsetsV = float4(texelsWeightsV_A.yw, texelsWeightsV_B.yw) / fetchesWeightsV.xyzw + float4(-3.5,-1.5,0.5,2.5); + fetchesOffsetsU *= _ShadowMapTexture_TexelSize.xxxx; + fetchesOffsetsV *= _ShadowMapTexture_TexelSize.yyyy; + + // fetch ! + float2 bilinearFetchOrigin = centerOfFetchesInTexelSpace * _ShadowMapTexture_TexelSize.xy; + shadow = fetchesWeightsU.x * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.w * fetchesWeightsV.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.w, fetchesOffsetsV.x), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.x * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.w * fetchesWeightsV.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.w, fetchesOffsetsV.y), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.x * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.w * fetchesWeightsV.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.w, fetchesOffsetsV.z), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.x * fetchesWeightsV.w * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.x, fetchesOffsetsV.w), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.y * fetchesWeightsV.w * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.y, fetchesOffsetsV.w), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.z * fetchesWeightsV.w * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.z, fetchesOffsetsV.w), coord.z, receiverPlaneDepthBias)); + shadow += fetchesWeightsU.w * fetchesWeightsV.w * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(bilinearFetchOrigin, float2(fetchesOffsetsU.w, fetchesOffsetsV.w), coord.z, receiverPlaneDepthBias)); +#endif + + return shadow; +} + +/** +* PCF gaussian shadowmap filtering based on a 3x3 kernel (optimized with 4 taps) +* +* Algorithm: http://the-witness.net/news/2013/09/shadow-mapping-summary-part-1/ +* Implementation example: http://mynameismjp.wordpress.com/2013/09/10/shadow-maps/ +*/ +half UnitySampleShadowmap_PCF3x3Gaussian(float4 coord, float3 receiverPlaneDepthBias) +{ + half shadow = 1; + +#ifdef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + + #ifndef SHADOWS_NATIVE + // when we don't have hardware PCF sampling, fallback to a simple 3x3 sampling with averaged results. + return UnitySampleShadowmap_PCF3x3NoHardwareSupport(coord, receiverPlaneDepthBias); + #endif + + const float2 offset = float2(0.5, 0.5); + float2 uv = (coord.xy * _ShadowMapTexture_TexelSize.zw) + offset; + float2 base_uv = (floor(uv) - offset) * _ShadowMapTexture_TexelSize.xy; + float2 st = frac(uv); + + float2 uw = float2(3 - 2 * st.x, 1 + 2 * st.x); + float2 u = float2((2 - st.x) / uw.x - 1, (st.x) / uw.y + 1); + u *= _ShadowMapTexture_TexelSize.x; + + float2 vw = float2(3 - 2 * st.y, 1 + 2 * st.y); + float2 v = float2((2 - st.y) / vw.x - 1, (st.y) / vw.y + 1); + v *= _ShadowMapTexture_TexelSize.y; + + half sum = 0; + + sum += uw[0] * vw[0] * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u[0], v[0]), coord.z, receiverPlaneDepthBias)); + sum += uw[1] * vw[0] * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u[1], v[0]), coord.z, receiverPlaneDepthBias)); + sum += uw[0] * vw[1] * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u[0], v[1]), coord.z, receiverPlaneDepthBias)); + sum += uw[1] * vw[1] * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u[1], v[1]), coord.z, receiverPlaneDepthBias)); + + shadow = sum / 16.0f; +#endif + + return shadow; +} + +/** +* PCF gaussian shadowmap filtering based on a 5x5 kernel (optimized with 9 taps) +* +* Algorithm: http://the-witness.net/news/2013/09/shadow-mapping-summary-part-1/ +* Implementation example: http://mynameismjp.wordpress.com/2013/09/10/shadow-maps/ +*/ +half UnitySampleShadowmap_PCF5x5Gaussian(float4 coord, float3 receiverPlaneDepthBias) +{ + half shadow = 1; + +#ifdef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED + + #ifndef SHADOWS_NATIVE + // when we don't have hardware PCF sampling, fallback to a simple 3x3 sampling with averaged results. + return UnitySampleShadowmap_PCF3x3NoHardwareSupport(coord, receiverPlaneDepthBias); + #endif + + const float2 offset = float2(0.5, 0.5); + float2 uv = (coord.xy * _ShadowMapTexture_TexelSize.zw) + offset; + float2 base_uv = (floor(uv) - offset) * _ShadowMapTexture_TexelSize.xy; + float2 st = frac(uv); + + float3 uw = float3(4 - 3 * st.x, 7, 1 + 3 * st.x); + float3 u = float3((3 - 2 * st.x) / uw.x - 2, (3 + st.x) / uw.y, st.x / uw.z + 2); + u *= _ShadowMapTexture_TexelSize.x; + + float3 vw = float3(4 - 3 * st.y, 7, 1 + 3 * st.y); + float3 v = float3((3 - 2 * st.y) / vw.x - 2, (3 + st.y) / vw.y, st.y / vw.z + 2); + v *= _ShadowMapTexture_TexelSize.y; + + half sum = 0.0f; + + half3 accum = uw * vw.x; + sum += accum.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.x, v.x), coord.z, receiverPlaneDepthBias)); + sum += accum.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.y, v.x), coord.z, receiverPlaneDepthBias)); + sum += accum.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.z, v.x), coord.z, receiverPlaneDepthBias)); + + accum = uw * vw.y; + sum += accum.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.x, v.y), coord.z, receiverPlaneDepthBias)); + sum += accum.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.y, v.y), coord.z, receiverPlaneDepthBias)); + sum += accum.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.z, v.y), coord.z, receiverPlaneDepthBias)); + + accum = uw * vw.z; + sum += accum.x * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.x, v.z), coord.z, receiverPlaneDepthBias)); + sum += accum.y * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.y, v.z), coord.z, receiverPlaneDepthBias)); + sum += accum.z * UNITY_SAMPLE_SHADOW(_ShadowMapTexture, UnityCombineShadowcoordComponents(base_uv, float2(u.z, v.z), coord.z, receiverPlaneDepthBias)); + shadow = sum / 144.0f; + +#endif + + return shadow; +} + +half UnitySampleShadowmap_PCF3x3(float4 coord, float3 receiverPlaneDepthBias) +{ + return UnitySampleShadowmap_PCF3x3Tent(coord, receiverPlaneDepthBias); +} + +half UnitySampleShadowmap_PCF5x5(float4 coord, float3 receiverPlaneDepthBias) +{ + return UnitySampleShadowmap_PCF5x5Tent(coord, receiverPlaneDepthBias); +} + +half UnitySampleShadowmap_PCF7x7(float4 coord, float3 receiverPlaneDepthBias) +{ + return UnitySampleShadowmap_PCF7x7Tent(coord, receiverPlaneDepthBias); +} diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl.meta b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl.meta new file mode 100644 index 00000000000..ec47be2e59a --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/UnityShadowLibraryShim.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bfd7d54886c05e54cb8c49733c587e43 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 6b226a86f0c7525fbb544c7f6192023ef9f48f65 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Mon, 12 May 2025 15:45:05 +0000 Subject: [PATCH 09/12] [Port] [2022.3] Update PPv2Converter.cs --- .../Editor/Converter/PPv2/PPv2Converter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Converter/PPv2/PPv2Converter.cs b/Packages/com.unity.render-pipelines.universal/Editor/Converter/PPv2/PPv2Converter.cs index 8820598395c..ba27eb5de86 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Converter/PPv2/PPv2Converter.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Converter/PPv2/PPv2Converter.cs @@ -52,7 +52,7 @@ public override void OnInitialize(InitializeConverterContext context, Action cal // Components First using var componentContext = Search.SearchService.CreateContext("asset", "urp=convert-ppv2component a=URPConverterIndex"); - using var componentItems = Search.SearchService.Request(componentContext); + using var componentItems = Search.SearchService.Request(componentContext, SearchFlags.Synchronous); { AddSearchItemsAsConverterAssetEntries(componentItems, context); } @@ -60,7 +60,7 @@ public override void OnInitialize(InitializeConverterContext context, Action cal // Then ScriptableObjects using var scriptableObjectContext = Search.SearchService.CreateContext("asset", "urp=convert-ppv2scriptableobject a=URPConverterIndex "); - using var scriptableObjectItems = Search.SearchService.Request(scriptableObjectContext); + using var scriptableObjectItems = Search.SearchService.Request(scriptableObjectContext, SearchFlags.Synchronous); { AddSearchItemsAsConverterAssetEntries(scriptableObjectItems, context); } From 69fb2d41e2e049652c303c2b99ee60e5067e51df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Malrat?= Date: Mon, 12 May 2025 15:45:06 +0000 Subject: [PATCH 10/12] [Port] [2022.3] [UUM-104541] Fixed a leak of m_AtlasAllocator in ReflectionProbeManager --- .../Runtime/ReflectionProbeManager.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs index dd47c9987d9..265be0d1dde 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs @@ -325,6 +325,8 @@ public void Dispose() { m_AtlasTexture0.Release(); } + m_AtlasAllocator.Dispose(); + Object.DestroyImmediate(m_AtlasTexture0); Object.DestroyImmediate(m_AtlasTexture1); From d8a2c0af867295a8190cb95a338b225825699d41 Mon Sep 17 00:00:00 2001 From: Mark Green Date: Thu, 15 May 2025 19:02:02 +0000 Subject: [PATCH 11/12] [Port] [2022.3] Graphics docs feedback fixes Apr 2025 --- .../Documentation~/Operator-ProbabilitySampling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ProbabilitySampling.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ProbabilitySampling.md index d64d16167d1..807df150c96 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ProbabilitySampling.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ProbabilitySampling.md @@ -6,7 +6,7 @@ Menu Path : **Operator > Logic > Probability Sampling** The **Probability Sampling** Operator performs a kind of switch/case operation where a weight controls the probability of selecting a case. If all weights are equal, this Operator produces a uniform distribution of the different output values. -![img](Images/Operator-ProbabilitySamplingExample.gif) + ## Operator settings From d07856cd15739a096cf038eea73977c922a02599 Mon Sep 17 00:00:00 2001 From: Layla Arab Date: Sun, 18 May 2025 08:00:36 +0000 Subject: [PATCH 12/12] Fix empty shadowmap not being cleared in URP on console platforms --- .../AdditionalLightsShadowCasterPass.cs | 19 ++++++++++++++++--- .../Passes/MainLightShadowCasterPass.cs | 19 +++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs index 9ddad06f7f5..a9ce944741f 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs @@ -62,6 +62,8 @@ public ShadowResolutionRequest(int _visibleLightIndex, int _perLightShadowSliceI internal RTHandle m_AdditionalLightsShadowmapHandle; private bool m_CreateEmptyShadowmap; + private bool m_EmptyShadowmapNeedsClear = false; + private RTHandle m_EmptyAdditionalLightShadowmapTexture; private const int k_EmptyShadowMapDimensions = 1; private const string k_AdditionalLightShadowMapTextureName = "_AdditionalLightsShadowmapTexture"; @@ -142,7 +144,8 @@ public AdditionalLightsShadowCasterPass(RenderPassEvent evt) m_ShadowResolutionRequests.Capacity = maxVisibleAdditionalLights; } - m_EmptyAdditionalLightShadowmapTexture = RTHandles.Alloc(Texture2D.blackTexture); + m_EmptyAdditionalLightShadowmapTexture = ShadowUtils.AllocShadowRT(1, 1, k_ShadowmapBufferBits, 1, 0, name: "_EmptyAdditionalLightShadowmapTexture"); + m_EmptyShadowmapNeedsClear = true; } /// @@ -151,6 +154,7 @@ public AdditionalLightsShadowCasterPass(RenderPassEvent evt) public void Dispose() { m_AdditionalLightsShadowmapHandle?.Release(); + m_EmptyAdditionalLightShadowmapTexture?.Release(); } private int GetPunctualLightShadowSlicesCount(in LightType lightType) @@ -850,6 +854,10 @@ bool SetupForEmptyRendering(ref RenderingData renderingData) m_CreateEmptyShadowmap = true; useNativeRenderPass = false; + // Required for scene view camera(URP renderer not initialized) + if(ShadowUtils.ShadowRTReAllocateIfNeeded(ref m_EmptyAdditionalLightShadowmapTexture, 1, 1, k_ShadowmapBufferBits, name: "_EmptyAdditionalLightShadowmapTexture")) + m_EmptyShadowmapNeedsClear = true; + // initialize _AdditionalShadowParams for (int i = 0; i < m_AdditionalLightIndexToShadowParams.Length; ++i) m_AdditionalLightIndexToShadowParams[i] = c_DefaultShadowParams; @@ -860,13 +868,18 @@ bool SetupForEmptyRendering(ref RenderingData renderingData) /// public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { - - if (m_CreateEmptyShadowmap) + if (m_CreateEmptyShadowmap && !m_EmptyShadowmapNeedsClear) { // Reset pass RTs to null ResetTarget(); return; } + if (m_CreateEmptyShadowmap) + { + ConfigureTarget(m_EmptyAdditionalLightShadowmapTexture); + m_EmptyShadowmapNeedsClear = false; + } + else ConfigureTarget(m_AdditionalLightsShadowmapHandle); ConfigureClear(ClearFlag.All, Color.black); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/MainLightShadowCasterPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/MainLightShadowCasterPass.cs index 2a3a5ff21ec..801b5e7740c 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/MainLightShadowCasterPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/MainLightShadowCasterPass.cs @@ -43,6 +43,7 @@ private static class MainLightShadowConstantBuffer Vector4[] m_CascadeSplitDistances; bool m_CreateEmptyShadowmap; + private bool m_EmptyShadowmapNeedsClear = false; int renderTargetWidth; int renderTargetHeight; @@ -76,7 +77,8 @@ public MainLightShadowCasterPass(RenderPassEvent evt) m_MainLightShadowmapID = Shader.PropertyToID(k_MainLightShadowMapTextureName); - m_EmptyMainLightShadowmapTexture = RTHandles.Alloc(Texture2D.blackTexture); + m_EmptyMainLightShadowmapTexture = ShadowUtils.AllocShadowRT(1, 1, k_ShadowmapBufferBits, 1, 0, name: "_EmptyLightShadowmapTexture"); + m_EmptyShadowmapNeedsClear = true; } /// @@ -163,7 +165,10 @@ bool SetupForEmptyRendering(ref RenderingData renderingData) m_CreateEmptyShadowmap = true; useNativeRenderPass = false; - ShadowUtils.ShadowRTReAllocateIfNeeded(ref m_EmptyMainLightShadowmapTexture, k_EmptyShadowMapDimensions, k_EmptyShadowMapDimensions, k_ShadowmapBufferBits, name: k_EmptyMainLightShadowMapTextureName); + + // Required for scene view camera(URP renderer not initialized) + if(ShadowUtils.ShadowRTReAllocateIfNeeded(ref m_EmptyMainLightShadowmapTexture, 1, 1, k_ShadowmapBufferBits, name: "_EmptyLightShadowmapTexture")) + m_EmptyShadowmapNeedsClear = true; return true; } @@ -171,14 +176,20 @@ bool SetupForEmptyRendering(ref RenderingData renderingData) /// public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { - - if (m_CreateEmptyShadowmap) + if (m_CreateEmptyShadowmap && !m_EmptyShadowmapNeedsClear) { // Reset pass RTs to null ResetTarget(); return; } + if (m_CreateEmptyShadowmap) + { + ConfigureTarget(m_EmptyMainLightShadowmapTexture); + m_EmptyShadowmapNeedsClear = false; + } + else ConfigureTarget(m_MainLightShadowmapTexture); + ConfigureClear(ClearFlag.All, Color.black); }