From bfe69266f11b956918769545c0ad3839d9298fcb Mon Sep 17 00:00:00 2001 From: Rose Hirigoyen Date: Thu, 28 Nov 2024 02:45:54 +0000 Subject: [PATCH] [Backport 6000.0] Revert Changes from UUM-29958 I made a fix for https://jira.unity3d.com/browse/UUM-68986 that was too aggressive - clearing the material property block after each blit actually clears properties that are needed between blits, in the case for example of edge detection. This created another bug (https://jira.unity3d.com/browse/UUM-85970) where TexelSize property was cleared between two blits in the same pass. Luckily, in the meantime, a better fix was implemented in Unity 6 and 7 (#51608) This works better because it doesn't clear property blocks after each blit, only when a RenderTargetIdentifier is used, which is less aggressive than the fix I had in the first place --- .../Runtime/Utilities/Blitter.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs index a7464021326..27d7fa2be8d 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs @@ -249,7 +249,6 @@ static internal void DrawTriangle(RasterCommandBuffer cmd, Material material, in static internal void DrawTriangle(CommandBuffer cmd, Material material, int shaderPass) { DrawTriangle(cmd, material, shaderPass, s_PropertyBlock); - s_PropertyBlock.Clear(); } static internal void DrawTriangle(CommandBuffer cmd, Material material, int shaderPass, MaterialPropertyBlock propertyBlock) @@ -273,7 +272,6 @@ static internal void DrawQuad(RasterCommandBuffer cmd, Material material, int sh static internal void DrawQuad(CommandBuffer cmd, Material material, int shaderPass) { DrawQuad(cmd, material, shaderPass, s_PropertyBlock); - s_PropertyBlock.Clear(); } static internal void DrawQuad(CommandBuffer cmd, Material material, int shaderPass, MaterialPropertyBlock propertyBlock)