cancel
Showing results for 
Search instead for 
Did you mean: 

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

Shruggger
Level 3

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-

 

Screenshot 2021-05-30 113107.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

DarkTable
Level 7

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.

View solution in original post

3 REPLIES 3

DarkTable
Level 7

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.

View solution in original post

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.

What did you change about garbage collection?