1
$\begingroup$

Does anyone understand normal maps and what would color a uniformly 0 normal map be?

I'd like to convert a standard shader into an unlit shader, so (I think?) the idea is that the normal map should not contribute to the lighting.

$\endgroup$
1
$\begingroup$

In the most common normal map encoding, an RGB value of (0.5,0.5,1) would be uniformly flat. If the shader is meant to be unlit, you should be able to remove anything in the code that’s using the surface normal, light / view direction, etc.

$\endgroup$
6
  • $\begingroup$ say you don't have access to modify the shader but just have to fudge it by putting textures in existing shader texture slots? $\endgroup$
    – ina
    Nov 15 '19 at 2:58
  • $\begingroup$ also may i ask why the B value is 1? $\endgroup$
    – ina
    Nov 15 '19 at 2:59
  • 1
    $\begingroup$ Because its normalised to fit in RGB range (0..1), when expanded to a normalised vector range (-1 to 1) by performing N=(colour-0.5)*2 then that RGB becomes (0,0,1) which is the default normal $\endgroup$
    – PaulHK
    Dec 9 '19 at 8:24
  • 2
    $\begingroup$ @ina You usually can't magically make a normal mapping lighting shader into an unlit shader just by setting some magic normal map texture. In any case, that would require some more knowledge about how that shader works exactly beyond just that it's a "standard normal map shader". $\endgroup$ Apr 7 '20 at 14:32
  • $\begingroup$ Also in this case I am trying to convert the Unity Standard Shader to Unlit docs.unity3d.com/Manual/shader-StandardShader.html $\endgroup$
    – ina
    Apr 8 '20 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.