Skip to main content
Shruggger
New Participant
May 30, 2021
Solved

OVR Lint: Please use 2 or fewer passes in materials. Unity URP

  • May 30, 2021
  • 3 replies
  • 4265 views

I have an issue thats causing really bad frame spikes. When I started my game using the Universal Render Pipeline template in Unity, I thought it was targeted at mobile applications. Seems I might have been wrong. 

 

The issue is that I have no clue how to lower the material passes (if even possible at all) in my project. I don't want to downgrade to built-in since the Universal Render Pipeline makes everything super easy. Does anyone know how I could fix this issue? I'll attach a screenshot of my OVR lint tool below-

 

    This topic has been closed for replies.
    Best answer by

    I think (not positive) that this material passes warning can be ignored for URP. If I'm remembering right, the big design change for URP over standard pipeline was multiple cheap passes instead of one expensive pass. Oculus' lint tool was written to find issues with the standard pipeline, so this one probably isn't relevant.

     

    I'd search the Unity forums for confirmation though. ( https://forum.unity.com/ )

     

    Your framerate spikes might be coming from elsewhere. Try turning on the OVRMetrics overlay (using Oculus Developer Hub is the easiest way) and see what the GPU and CPU usage levels are. And see what the FPS over time looks like.

     

    If the FPS is constantly under 72, see if the GPU or CPU numbers are in the red. That will tell you if it's rendering or logic that's crushing your framerate.

     

    If framerate is dipping periodically, no matter what you're doing, that could be from garbage collection. If you're frequently instantiating and destroying objects (projectiles are a classic source) that can generate a lot of garbage that impacts performance.

    3 replies

    Answer
    May 30, 2021

    I think (not positive) that this material passes warning can be ignored for URP. If I'm remembering right, the big design change for URP over standard pipeline was multiple cheap passes instead of one expensive pass. Oculus' lint tool was written to find issues with the standard pipeline, so this one probably isn't relevant.

     

    I'd search the Unity forums for confirmation though. ( https://forum.unity.com/ )

     

    Your framerate spikes might be coming from elsewhere. Try turning on the OVRMetrics overlay (using Oculus Developer Hub is the easiest way) and see what the GPU and CPU usage levels are. And see what the FPS over time looks like.

     

    If the FPS is constantly under 72, see if the GPU or CPU numbers are in the red. That will tell you if it's rendering or logic that's crushing your framerate.

     

    If framerate is dipping periodically, no matter what you're doing, that could be from garbage collection. If you're frequently instantiating and destroying objects (projectiles are a classic source) that can generate a lot of garbage that impacts performance.

    Shruggger
    ShrugggerAuthor
    New Participant
    May 30, 2021

    Thank you so much for the reply!

    I found the reason for the low framerate was due to a garbage collection issue. All is resolved and now running smoothly.

    Inspiring
    June 24, 2021

    What did you change about garbage collection?