I have done height based color mapping for a terrain.When I set material property for a terrain the entire terrain is turning to the color.I calculated color in fragment shader through height based mapping.How to set material properties of the surface??By the way Im using blinn-phong model for directional lighting.
If you use Blinn-Phong lighting model you should know that you need to compute normals of the terrain surface. Then will be able to shade correctly the terrain surface.