Skip to main content
Inspiring
November 6, 2015

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

Which shader/material should be used for Gear VR, standard (with or without specular) or mobile (diffuse or bumped specular) ?
    This topic has been closed for replies.

    10 replies

    motorsepAuthor
    Inspiring
    November 6, 2015
    bump! Please advise.
    Inspiring
    November 6, 2015
    I'm not sure. Maybe try both and look at your performance.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Inspiring
    November 7, 2015
    Note that Unity's built-in VertexLit shaders are broken in Android Lollipop with recent Unity versions (on the Note 4 at least).
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux) Jungle Juice Sven Co-op
    motorsepAuthor
    Inspiring
    November 7, 2015
    "cybereality" wrote:
    I'm not sure. Maybe try both and look at your performance.


    How would I check performance while wearing Gear VR ?
    motorsepAuthor
    Inspiring
    November 8, 2015
    @cybereality: So, how do I gauge performance while wearing Gear VR ?
    November 10, 2015
    "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
    Up and Coming
    November 11, 2015
    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.
    motorsepAuthor
    Inspiring
    November 12, 2015
    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)
    Up and Coming
    November 13, 2015
    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.
    motorsepAuthor
    Inspiring
    November 13, 2015
    Sorry, I am just starting with Unity. How do I use that code to make those alpha-masked parts glow on my wall model for example (and perhaps flicker/pulsate) ?

    Is it costly to use realtime lights that don't cast any shadows? For example, Doom 3 has so called blend lights that are quite "cheap", since they don't do any per pixel lighting. Is there anything like that in Unity 5 for mobile platforms ?

    Thanks.