Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Not marking a texture as normal map

Discussion in 'Shaders' started by Udit_N, Jun 3, 2015.

  1. Udit_N

    Udit_N

    Joined:
    Mar 9, 2015
    Posts:
    17
    I created a shader in unity which is reflective as well as transparent, there I had to input a normal map of the texture without marking it as normal map which gave me the desired look and I was satisfied with that, but as usual unity asked me to fix it by marking it as normal map, but then it didn't gave me the desired look of the object. So my question to you is that is it necessary to mark the texture as normal map always or there won't be any problem or bugs if I don't do that
     
  2. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    When Unity marks stuff as a normal map, it'll usually set the option to generate a normal map from greyscale height/bump map by default. You probably don't want that. I have no idea why it does that, it's very annoying.
     
  3. Udit_N

    Udit_N

    Joined:
    Mar 9, 2015
    Posts:
    17
    @Farfarer is it always necessary to fix it by marking it as normal map. Sometimes I do that but in this case I am satisfied with what I am getting and I don't feel like marking it as normal map
     
  4. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Assuming you're using UnpackNormal function in your shader, you should be setting it to a normal map, yeah.
     
  5. Udit_N

    Udit_N

    Joined:
    Mar 9, 2015
    Posts:
    17
    This is the shader scrypt I've edited, please help
     

    Attached Files:

  6. Udit_N

    Udit_N

    Joined:
    Mar 9, 2015
    Posts:
    17
    earing1.png earing2.png
    The image on left hand is without the normal map fixed and the right one is with the normal map fixed, I'am satisfied with the first one
     
  7. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Fair enough.

    As far as I can tell, the one on the right is more correct, but it's hard to tell without seeing your mesh and normal map.
     
unityunity