Mike notes
Shadows
Hi bo3b - yeah this is not the right shader for shadow rendering ;-) It's not always obvious, but a few clues are:
- There is a ShadowMap sampler in there somewhere
- There is a SomethingXXXToShadow or SomethinXXXToLight matrix in there (or the reverse!)
- A World Coordinate is contructed from EyePos or CamPos, and a 3-comp texcoord
- There is an InvView or InvProjView in there (usually generating something in world coords)
- Recognize that you may not see the word "shadow" in a shader that actually plots shadows. As noted above you often need to look for matrices with "light" in them. This makes more sense because these matrices do a coordinate transformation to the "view" of where the light source is that either casts shadows or enhances the light on a surface, say like a spotlight (very much the same as the View transformation moving to the POV of the camera).
I hope this stuff helps, I basically don't realize consciously nowadays what it is that I look for so writing this stuff down is useful for me too :-)