Original Post
Hey guys I have been following the terrain tutorials on Rastertek.com. I'm on Tutorial #3 http://www.rastertek.com/tertut03.html where he teaches how to add basic lighting to terrain. What I have been doing is following his code examples and putting it into my code base which is basically the same as his but slightly more compact. Right Now I have a terrain class named TerrainComponent.cpp and it handles loading the terrain from a heightmap, creating the pixel and vertex shaders for the terrain, and rendering it.The problem is that my terrain is coming out completely white with no lighting at all! Here is a solid and a wire frame screenshot of my terrain:


Here is the screenshot from Rastertek's tutorial:

The code is a little long so I attached a zip file containing TerrainComponent.cpp and the terrain vertex and pixel shaders.
I have compared my code to his for hours and hours and I cannot find what I am doing wrong. Please help!!
P.S. Let me know if you need to see more code.


Here is the screenshot from Rastertek's tutorial:

The code is a little long so I attached a zip file containing TerrainComponent.cpp and the terrain vertex and pixel shaders.
I have compared my code to his for hours and hours and I cannot find what I am doing wrong. Please help!!
P.S. Let me know if you need to see more code.