Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Normal map ignoring ambient light

Discussion in 'Shaders' started by S-Miyahon, Jul 31, 2017.

  1. S-Miyahon

    S-Miyahon

    Joined:
    Jun 30, 2016
    Posts:
    12

    So, I'm trying to write a splatmap shader for a lightmapped piece of snowy rock. As you can see in the picture, the normal maps in my shader (right) are ignoring the blue ambient light in the scene. They're pitch-black as you can see.
    (Another thing that is worrying me is the fact that the normal map is acting like an emission texture when I'm turning the normal intensity way up.)
    Is fixing this as simple as adding an argument somewhere to have the normal maps treated correctly? Some help would be much appreciated.
     
    Last edited: Jul 31, 2017
  2. FlaxenFlash

    FlaxenFlash

    Joined:
    Oct 15, 2015
    Posts:
    27
    Do you normalise your normal before passing it back? I think I ran into a similar issue where I forgot to normalise it and so it was sort of multiplying the light intensity. Hard to say much more without seeing the shader itself