#### Archived

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

# Projecting geometry on a plane

This topic is 5978 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 on other sites
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 on other sites
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."

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631426
• Total Posts
3000019
×