Original Post
Hi...again!
As you probably know already, I´m trying to create shadows, using shadowmaps! Thx to all the ppl that have guided me to a bunch of NVidia papers, they have helped me, but It´s still unclear to me how I should implement it myself.
I have a MD3-model, a terrain and 1 light (lets call it the "sun").
I want to cast the models shadow onto the terrain, so I have decided to use shadow maps. I have read a lot of papers on the subject on NVidia and other''s homepages, but I still can''t figure out how it works...
This is what I think I should do so far:
Disable Textures.
Goto light´s position.
Draw my Model.
Enable Textures.
Save the depth-buffer to texture memory.
Goto cameraes position.
Clear the screen.
Draw Model again w/textures.
Draw Terrain.
Project depth-buffer texture. <-- !???
Im not at all sure wether this pseudo-code is correct!? If it is how should I then Project my depth-buffer texture?
If it isent correct please write the correct pseudo-code and how to project the final depth-buffer texture (if that´s the way to do it)!
Best regards
Roquqkie
PS. please no more links to NVidia, only links to less confusing code!