Tree shadow

Hi, I need to draw tree shadow on any object (my terrain has hilliness, and there are also other objects). My trees are made by rectangles with textures (cross-trees). I saw that the best technique is projective texture. Can somebody tell me where can I find a code sample

Answer this question

Tree shadow

  • rradtke

    Jack Hoxley wrote:

    "Projective Texture" - more generally referred to as "Shadow Mapping" ...

    Actually projective texturing is different from shadow mapping. Given how crude his trees are, projecting a simple tree shaped shadow texture on to his terrain might actually be the best way to go.


  • Jiffy

    "Projective Texture" - more generally referred to as "Shadow Mapping" comes in a variety of flavours. Getting a good/robust shadow mapping implementation is far from trivial and there's a lot of research into different techniques to combat the various problems.

    Your favourite search engine will pull up a huge number of hits if you run some simple searches - "Shadow Map", "Projective Shadows", "Perspective Shadow Maps" etc...

    There is also the ShadowMap sample in the DirectX SDK.

    Good luck!
    Jack



  • zcz

    I must say the the sample that is included with the SDK is not of much use because it runns too slowly making it dificult to study.
    It is meant for DX10 and that's why it is sooooooooo slow

  • Tree shadow