Search Unity

Bumped Specular - Android problem

Discussion in 'Shaders' started by Corwah, Sep 28, 2014.

  1. Corwah

    Corwah

    Joined:
    Jul 7, 2014
    Posts:
    5
    Lets make it short:
    When I use bump specular shader from standard asset (mobile) the normal map is doing nothing unless I use directional light. But In my case thats not possible. Any way how to make normal map doing its job and still use point light?
     
  2. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    You probably need to increase the number of pixel lights in your quality settings. Pixel lights require additional passes in forward rendering (which is what you're using). The first pass only handles a pixel directional light, though. Setting the pixel light limit to 2 will allow you to see a pixel light of any type in addition to a pixel directional light.
     
    Corwah likes this.
  3. mouurusai

    mouurusai

    Joined:
    Dec 2, 2011
    Posts:
    350
    Mobile/Bumped Specular
     
    Corwah likes this.
  4. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Ah I missed "mobile". My solution should still work if you use the non-mobile version of Bumped Specular.
     
  5. Corwah

    Corwah

    Joined:
    Jul 7, 2014
    Posts:
    5
    Hi thank you both. : ) I dont mind using regular version of the shader. It will be just one particular object, so performance impact is not huge deal here.
     
  6. Corwah

    Corwah

    Joined:
    Jul 7, 2014
    Posts:
    5
    Hmm, so I've been testing. But increasing number of pixel lights lead nowhere. Even if I use regular bump spec shader. In unity preview all looks good. But once I build and test it, its just plain mesh with spec, without the normal map : /
     
  7. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Are your Android quality settings perhaps different from the ones you're using in the editor?
     
  8. Corwah

    Corwah

    Joined:
    Jul 7, 2014
    Posts:
    5
    Brilliant. And I am retard. So the solution: more or equal than 2 pixel light in quality settings, non mobile shader and ffs dont forget to switch quality settings for androind, not only for editor.

    Thank you all very much, it has bugged me for week or so.
     
  9. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    These sorts of situations are a real pain to debug in Unity, even if you have a pretty good idea of how the whole pipeline works. A really cool tool would be something that told you which lights were affecting a mesh, in what way, and why.