Archived

This topic is now archived and is closed to further replies.

kill

Projecting geometry on a plane

Recommended Posts

Hi. I''m using dx''s D3DXMatrixShadow() function that projects geometry on a plane. I have two questions about the function. It accepts two parameters, a 4D vector that defines a plane (cooficients of the ax + by + cz + dw = 0 equation) and a 4D vector that describes the position of the light. My questions are the following: 1. What should I set the w cooficient in the light vector? I can''t seem to understand what it''s used for. 2. What are the a, b, c, d cooficients for the xz plane? Thanks.

Share this post


Link to post
Share on other sites
Perhaps the size of the light. Perhaps it controls the penumbra. A shadow consists of both a umbra and penumbra. If you where in the umbra then you couldn''t see any of the light source. If you were in the penumbra then you could see some of the light source. So perhaps it is effectively the radius of the light

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
w probably indicates if the light is directional or not - 0.0 would be a point light, anything else means that the light is coming from the direction indicated by the vector xyz. Either that, or it''s the other way around, with 0.0 being directional and everything else being a point light.

The formula for the xz plane would be 0.0 * x + 1.0 * y + 0.0 * z + 0.0 * w

j

Share this post


Link to post
Share on other sites