Projecting a texture layer as shadow ?

Started by
2 comments, last by BaSSraf 19 years, 1 month ago
Hey guys, I sort of know how to create shadows from triangulated objects etc.. But I have some textures quads with multiple textures per quad and one of these texture layers is the shadow. Currently the shadow is nothing more than a texture with a positional offset. Is there a "standard" method for projecting this texture layer on the scene so I get a "real" shadow which takes the lighting position into account and possibly even the type of light? (spots) Am I looking at a projective texture? (and how to project it regarding the light(s) ?). I'm using directx, any ideas, links even :) ?
huraay!
Advertisement
Quote:Original post by BaSSraf
Am I looking at a projective texture? (and how to project it regarding the light(s) ?).
Yup, sounds like it. What you're looking to do is to set up your texture coordinates such that they're the vertex's world-space position projected into the light's view frustum (i.e. you build a view + projection matrix from the light's point of view).

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Thx SP, I think i'll manage that, any way to have it "wrap" around objects behind it?

Techniques to use?

huraay!
The dumbass that I am just realized that its just shadowmapping i'm looking for :)
huraay!

This topic is closed to new replies.

Advertisement