Skip to content

Commit

Permalink
[Backport 6000.0] Revert Changes from UUM-29958
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RoseHirigoyen authored and Evergreen committed Nov 28, 2024
1 parent a7fe74d commit bfe6926
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit bfe6926

Please sign in to comment.