Projecting geometry on a plane
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.
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
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
The formula for the xz plane would be 0.0 * x + 1.0 * y + 0.0 * z + 0.0 * w
j
Yep, you''re right. Ye ole documentation says: "If Vlight.w is 0, then the ray from the origin to Vlight represents a directional light. If it is 1, then Vlight represents a point light."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement