I have been working on a game as my first project with XNA 4.0. I am wanting to add a main light source (The Sun), that casts shadows on my objects. Most of the tutorials I see out there, are for 3d Models. However, I built my game on TriangleStrips to build cubes. Below you can see the play dug a single cube.
And here the player dug deep down:
As you can see, theres no lighting or shading at all. I want to be able to make it darker as you dig, making it realistic.
And here, the player places a couple of blocks that I want to shade the bottoms of the extended cubes, and cast a shadow on the cubes below.
I've spent the good part of the day learning the origins of HLSL, how it works, and created my own Effect file, and have completely removed the usage of the BasicEffect. (I couldn't get the pre-built in lighting features of the BasicEffect to do what I wanted). Can someone help me out, or point me into the right direction? I have googled, and the examples I've found were either for 3d models, or for a prior version of XNA, or the code was for OpenGL. :/ Thanks in Advance