What Shadow Tutorial Did It For You?

Started by
13 comments, last by kovacsp 18 years, 4 months ago
Quote:Original post by kovacsp
Quote:Original post by jollyjeffers
When I first looked into shadowing, it was all about SV's - but SM's have really matured now, and I personally think that I'll be using them in my current/future work.


Exactly what type of shadow maps do you think of?

Hadn't really gotten that far - as much because they're fairly usage-dependent, and I don't know quite what I'll be using them for yet [smile]

Quote:Original post by kovacsp
It's just my personal opinion, but after reading through perspective shadow maps, light space perspective shadow maps, trapezoidal shadow maps, etc, I still have the feeling that they're still trying to hack around something that is not really suitable for the purpose.

Yup, I get exactly the same feeling. Shadow Volumes might be a bit "old school" now, but they do come across as being a more general-purpose one-size-fits-all approach.

Then again, they do seem to look much nicer when done properly...

Quote:The book shader3 talks about possion disk shadow blur, which has to be the easiest to implement.

Basically you render the object to a render texture (in solid black with white background), then apply possion disk filter (using a shader) to the texture, then project back to the scene.

That sounds quite a lot like this article...

I was wondering if that approach could be applied to stencil volumes actually. Not 100% sure you can do it easily though due to the whole stencil buffer part [smile]

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Advertisement
Well, it clicked for me with a CPU-based shadow volume tutorial on Code Sampler. It may not be very efficient and you'll need to generate a shadow volume for each shadow-casting mesh, but it's fairly simple to implement. The code itself is well documented and a bit optimized, so it's at least a good start into shadow rendering.

Here's the link: http://www.codesampler.com/dx9src/dx9src_7.htm (at the bottom of the page)
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!
Quote:Original post by jollyjeffers
That sounds quite a lot like this article...

I was wondering if that approach could be applied to stencil volumes actually. Not 100% sure you can do it easily though due to the whole stencil buffer part [smile]


Hey, I'm glad you asked. It is possible, and I did it already! [smile]
Have a look at my publication on this topic: Soft Edged Stentil Shadow in CAD Applications

kp

------------------------------------------------------------Neo, the Matrix should be 16-byte aligned for better performance!
Quote:Original post by kovacsp
Quote:Original post by jollyjeffers
That sounds quite a lot like this article...

I was wondering if that approach could be applied to stencil volumes actually. Not 100% sure you can do it easily though due to the whole stencil buffer part [smile]


Hey, I'm glad you asked. It is possible, and I did it already! [smile]
Have a look at my publication on this topic: Soft Edged Stentil Shadow in CAD Applications

kp

That's an interesting paper. Thanks for pointing it out! I've bookmarked it for proper-reading later on [smile]

Although, seems like the performance hit was heavy... 274fps -> 68fps [oh]

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:
Although, seems like the performance hit was heavy... 274fps -> 68fps [oh]

The blur is quite painful, yes..
but I can do it faster now :)

kp
------------------------------------------------------------Neo, the Matrix should be 16-byte aligned for better performance!

This topic is closed to new replies.

Advertisement