Thomas
If your light is fixed then just pre-compute the shadow and store it in a
texture.
It is not fixed. It should simulate the sun. And I have still no idea how
to solve it. Everything is about shadows that object throw to another, but
not on itself.
To have a starting point, you could google for "Terrain Shadow Maps".
The problem has many variables, finding the best technique unfortunately
depends on many of them.
At some point in the past, I was successful with shadow volumes even for
relatively complex terrains. Sentences like "Terrain lighting", perhaps
combined with "stencil buffer" could be also helpful. At last, I think
to remember some related former SIGGRAPH papers
(http://kesen.huang.googlepages.com/)
Micha
Thanks Micha. I got some hints now. Do you remember if you solved ist with
shaders(GPU) or with "regular" logic (CPU) ?
Thomas
First thing, I've to admit that I did it in OpenGL... . CPU-based,
because I had to use hardware with very limited shader support (Radeon
9600 series) at that time, utilizing the GPU didn't make sense in this
environment.
For CPU-related stuff the following articles were helpful (check the
references inside, too):
http://software.intel.com/en-us/articles/multi-threaded-shadow-volumes-on-mainstream-graphics-hardware/
http://cache-www.intel.com/cd/00/00/29/37/293752_293752.pdf
Micha