Need help on MADFINGER > DIFFUSE > SIMPLE Shader

Hello,

I am very new in Shaders, you can say i know absolutely nothing. I am making a mobile game and after going through Shadowgun’s example scene, i copied its shaders and mainly i used

MADFINGER > DIFFUSE > SIMPLE Shader

When i pressed edit, i saw this code -

Shader "MADFINGER/Diffuse/Simple" { 
Properties {
      _MainTex ("Base (RGB)", 2D) = "white"
   }
   SubShader {
      Pass {
            SetTexture [_MainTex] 
      } 
   } 
}

I wish to have an option to add normal map in here. Please help me ow do i do it ?
and guide me like what can i do more in here to enhance the looks.

any help ?

What you have there is one of the simplest shaders you can write in Unity. It samples one texture, and that’s it: no lighting, tinting, or anything else.

Normal maps are generally only used when the orientation of your object’s surface matters. Lighting and view-dependent effects are examples of situations where you might use a normal map.

What sort of effect do you want a normal map to have on your material? If it’s to give things more detailed texture when lit, then you are probably better off finding an existing normal mapped shader than trying to expand the one you pasted. Unity has built-in shaders that use normal maps (anything with “Bumped” in the name), and Shadowgun has some shaders which use them too.

i know unity’s inbuilt mobile shaders,

just to understand the basic i wished to expand this of my own with little small steps

For example -

Step 1:: wanna add a normal map to make my buildings look detailed
Step 2:: my scene is a night scene, u can guide me some cool effect to add in it

So by doing these 2 things i can get an intro to what a shader is and i can stretch even more…

hope this helps and this is the best way i understand

Adding normal maps to the above shader isn’t possible–you’d have to write an entirely new shader in Cg or GLSL. Since you’re not using lighting, though, a normal map probably isn’t the best solution. You might want to try adding a detail texture, which you can do in the fixed function language that the existing shader uses.

I recommend watching at least the first four of Jessy’s Shaderlab tutorials, and perhaps reading the section of the manual on texture combiners.