How to draw a static scene's shadow?

Started by
15 comments, last by bltiger 22 years ago
I have read some articles, it suggest me to use stencil buffer, but stencil buffer need hardware support, How can I draw the shadow? Can anybody give some sample code?
Advertisement
Can I get some help?
I''m pretty sure DX SDK has a sample on how to do shadows.
---visit #directxdev on afternet <- not just for directx, despite the name
But I think the samples need hardware support
Multitexturing?
Shadowing is a huge topic that we couldn''t possibly explain here. I suggest a Google search, or check out articles at NVidia''s developer pages.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
quote:
How to draw a static scene''s shadow?


if it''s a truly static scene (nothing will ever move in it) then you should just precalculate everything using some kind of raytracing and use light maps.

You could knife you geometry where the shadows fall, and burn the shadow colour into the approperate verts colour.

(Watch out for gourard effects though - usually solved with more sub division)
Here,in the article section there is a good article about shadows by Michael Skinner.
Hasinur Rahman Rezawww.trimatrik.com
Thanks for your help,

My scene is a truly static scene (nothing will ever move in it) ,

I do not know how can i calc the lightmap,

Can I get some sample code about lightmap?

This topic is closed to new replies.

Advertisement