Original Post
When creating the cubic shadow map's depth, what do I use as the world matrix and the world view projection matrix? Are these built off the light's position in world space or object space?
float4 positionWS = mul( input.Position, [color="#ff0000"]World? );
Output.Position = mul( input.Position, [color="#ff0000"]WorldViewProjection? );
Output.Depth = [color="#ff0000"]LightPosition? - positionWS;
Currently I've tracked my problem down to getting the same values for my depth and difference in the shader that renders the shadows. This means that I'm passing the wrong matricies to my depth shader.
float4 positionWS = mul( input.Position, [color="#ff0000"]World? );
Output.Position = mul( input.Position, [color="#ff0000"]WorldViewProjection? );
Output.Depth = [color="#ff0000"]LightPosition? - positionWS;
Currently I've tracked my problem down to getting the same values for my depth and difference in the shader that renders the shadows. This means that I'm passing the wrong matricies to my depth shader.