When shaded model fills the screen the fps drops - possibly due to normal map. Why?

Hello, I’ve encountered an issue. I’m curious if you have any idea how to fix this.
I have a relatively low-poly scene with a few PBR shaders exported via the babylonjs 3ds max tool with the 3D scene. I’m running the scene on the Oculus Quest. The scene is laggy. I started strapping down things to see what’s the problem and it seems that my floor texture is the issue (or at least one of the issues).

If a model doesn’t fill up the view frustum the frame rate is 60fps, the moment the view frustum is filled with the model the fps tanks. This means that when the model is large the fps tanks.

These videos illustrate my issue: https://drive.google.com/drive/folders/1YqibxW62rmN2JXoe09xnKiQ65pY77pf3?usp=sharing

File “fine.mp4” shows how it looks like when it’s working fine (small model). “lowFPS” demonstrates the issue. “maps.zip” contains the textures used.

I also exported the same scene with the box and the floor with a standard shader and diffuse + normal. Same issue, so this is probably not PBR related. I then removed the normal map and the issue was solved. Why would this happen and how can I solve it?

Hello, depending on your hardware you could be limited by 3 factors:

  • cpu: this happens when you have a lot of meshes forcing the system to compute a lot of matrices
  • GPU (vertex): this is rare but could happen when you have a LOT of vertices
  • GPU (pixel): this is what we also call fillrate. This is your case here, the pixel shader is a bit complex and must be applied to all the pixel on the scree. The best way to deal with it is to reduce the resolution (try calling engine.setHardwareScalingLevel(2))

did you find what was causing the problem ?