Skip to content

Commit

Permalink
fix: in URP, dynamic resolution does not work when render scale is cl…
Browse files Browse the repository at this point in the history
…ose to 1
  • Loading branch information
mob-sakai committed Sep 29, 2024
1 parent 6347ba5 commit afed40a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Packages/src/Runtime/Utilities/SoftMaskUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ private static void InitializeOnLoadMethod()
s.x = Mathf.Clamp(Mathf.CeilToInt(s.x / 0.05f) * 0.05f, 0.25f, 1.0f);
s.y = Mathf.Clamp(Mathf.CeilToInt(s.y / 0.05f) * 0.05f, 0.25f, 1.0f);
#if URP_ENABLE
if (GraphicsSettings.currentRenderPipeline is UniversalRenderPipelineAsset urpAsset
&& Mathf.Abs(urpAsset.renderScale - 1) <= 0.05f)
{
s = Vector2.one;
}
#endif
if (s_CurrentDynamicResolutionScale != s)
{
s_CurrentDynamicResolutionScale = s;
Expand Down

0 comments on commit afed40a

Please sign in to comment.