Skip to content

Commit

Permalink
Set RT wrapping mode to clamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohelm97 authored Jun 5, 2023
1 parent 3d77fd0 commit 3f524a7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions UnifiedUniversalBlur/Scripts/UniversalBlurPass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public void Setup(Action<PassData> passDataOptions, float downsample, in Renderi
rtDesc.height = Mathf.RoundToInt(rtDesc.height / downsample);

#if UNITY_2022_1_OR_NEWER
RenderingUtils.ReAllocateIfNeeded(ref m_tmpRT1, rtDesc, name: "_PassRT1");
RenderingUtils.ReAllocateIfNeeded(ref m_tmpRT2, rtDesc, name: "_PassRT2");
RenderingUtils.ReAllocateIfNeeded(ref m_tmpRT1, rtDesc, name: "_PassRT1", wrapMode: TextureWrapMode.Clamp);
RenderingUtils.ReAllocateIfNeeded(ref m_tmpRT2, rtDesc, name: "_PassRT2", wrapMode: TextureWrapMode.Clamp);
#else
RenderEmulation.ReAllocateIfNeeded(ref m_tmpRT1, rtDesc, name: "_PassRT1");
RenderEmulation.ReAllocateIfNeeded(ref m_tmpRT2, rtDesc, name: "_PassRT2");
RenderEmulation.ReAllocateIfNeeded(ref m_tmpRT1, rtDesc, name: "_PassRT1", wrapMode: TextureWrapMode.Clamp);
RenderEmulation.ReAllocateIfNeeded(ref m_tmpRT2, rtDesc, name: "_PassRT2", wrapMode: TextureWrapMode.Clamp);
#endif

m_PassData.tmpRT1 = m_tmpRT1;
Expand Down Expand Up @@ -144,4 +144,4 @@ internal class PassData
public RTHandle tmpRT2;
}
}
}
}

0 comments on commit 3f524a7

Please sign in to comment.