cancel
Showing results for 
Search instead for 
Did you mean: 

Unity 5: standard vs mobile material/shader for Gear VR ?

motorsep
Rising Star
Which shader/material should be used for Gear VR, standard (with or without specular) or mobile (diffuse or bumped specular) ?
10 REPLIES 10

motorsep
Rising Star
bump! Please advise.

cybereality
Grand Champion
I'm not sure. Maybe try both and look at your performance.

SvenViking
Protege
Note that Unity's built-in VertexLit shaders are broken in Android Lollipop with recent Unity versions (on the Note 4 at least).

motorsep
Rising Star
"cybereality" wrote:
I'm not sure. Maybe try both and look at your performance.


How would I check performance while wearing Gear VR ?

motorsep
Rising Star
@cybereality: So, how do I gauge performance while wearing Gear VR ?

Anonymous
Not applicable
"motorsep" wrote:
@cybereality: So, how do I gauge performance while wearing Gear VR ?
Check out the unity docs for instructions on WiFi profiling for Android:

http://docs.unity3d.com/Manual/Profiler.html

owenwp
Expert Protege
Standard has significant slowdowns on mobile. You will probably have a very hard time hitting 60fps unless you use the mobile shaders, that's why they are there.

As a rule you want to avoid doing any lighting at all if possible, using only lightmaps, or even just plain unlit texture mapping if your art style allows for it. If you want more than that you will probably need to write your own tightly optimized shaders, the built in realtime unity lighting is expensive unless you keep it very simple.

motorsep
Rising Star
Thanks owenwp!

How would I use emission texture with mobile shaders? Would I have to modify mobile shaders?

Btw, is it still "expensive" to use single direct light to have dynamic shadows cast by dynamic objects ? (characters)

owenwp
Expert Protege
You might need a custom shader, I dont think any of the built in mobile ones do multi-texturing. It would also be a lot more efficient if you didn't use a separate emissive texture, but instead used the alpha channel of the diffuse texture to make parts of it emissive.

o.emissive = diffuse.rgb * diffuse.a

A single directional light is fairly inexpensive, since it is optimized to be done in the main rendering pass. Giving that light shadows is fairly costly though, but maybe doable if you keep the number of shadow casting and receiving objects small. Every caster and receiver is an extra draw call. Try to keep shadow distance small and use only one cascade.