[GearVR] Frame render time jumps up when DefaultLit material covers 100% of a screen

The issue I’ve experienced recently. Whenever my view is completely covered by a static mesh with DefaultLit material on it (I’m standing really close to the wall and looking directly onto it, for example) Frame render time jumps up, even though Draw thread isn’t affected. If I look along the wall, so it is in the frame to be sure it’s rendered, everything is ok. And it appears gradually the more percent of a screen is covered from about 60% to 100% at the peak. It looks like some kind of Fill rate issue. The only stat I’ve found to show this is SlateDrawWindowsCommand which is pretty abstract.

As you can see below it’s an empty scene with simple skydome (Unlit material) and a wall with default tiled material (any DefaultLit material will do the job) So the wall covers only part of a screen and render time is fine.

And this is example of 100% covered screen. Render thread has dropped significantly (rounded to 22 ms by ‘stat raw’)

I’ve posted this question on Oculus dev forum as well, and bump this in case of any updates.

A little update:

  • the more complex the material is, the easier it is to spot this issue (normal map will do the job)
  • be sure to use Gear VR specific BP nodes for CPU and GPU throttling and lower GPU modifier to 1 or even 0 - in my case GPU ‘1’ is on the screens, while GPU ‘2’ negates the issue (can be used in Level blueprint)
  • material should be directly lit, several intersecting lights is the best way to test, while with indirect lighting issue seems to not be as noticeable
  • seems like it has nothing to do neither with texel density and texture size, nor with lightmap resolution

Just to draw a bottom line on this topic for a future generations - it is a fill rate issue.

TL;DR - GearVR (Galaxy S6 at least) can’t handle static lighting in UE4. You have to use Unlit materials and for the lighting you have to pre-bake lightmaps in 3D software (3Ds Max for us) and blend them with diffuse texture in the UE4 material. Look at shader complexity. Below 40 instructions is your goal for an environment master material.

GearVR has very narrow texture bandwidth. So it can’t handle complex shaders and since Default Lit shader is somewhere around 100+ instructions it’s a no-no for a GearVR. I have to mention - it is possible to get stable 60 fps with static lighting, but it is impossible to run such game for 45 minutes without overheating (15 mins was my best)

It’s a bummer, I know, everyone thought static lighting is performance free, but in mobile VR there’s no such thing as ‘free’. On the minus side - it’s tricky and a bit tedious to make lighting in the 3D software if you’re not a pro at it. On the plus side however - UE4’s static lighting quality is worth then pretty much any 3D software renderer, so you might end up with prettier lighting.

Cheers!