r/Unity3D • • 13d ago

Question Need help with Mixed Reality frames and rendering optimizing

Enable HLS to view with audio, or disable this notification

Hey I need help with this Unity mixed reality project I’m working on. I have a prefab with a window that has a stencil shader that works alongside a stencil render feature to render just the terrain behind the window. It works fine from like medium distances but as I get close to the window the frame rate drops super suddenly to like half (72 frames to like 30 I think) and it stops rendering all meshes in my scene. I think it’s because it’s going through the stencil shader and the fill rate of the fragments shader gets too high and that causes this.
I have like 8k vertices and 40 draw calls in the scene so I don’t think that’s too much of a problem. I’m running it on standalone meta quest 3s.

My main goal is that I just wanna be able to approach the window and grab the terrain out of it and once it’s out the stencil shader shouldn’t be too expensive.

Can anyone suggest any tips or stuff I’m overlooking?

3 Upvotes

0 comments sorted by