Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTispe

Posted 09 November 2013 - 12:38 PM

In the shadow map VS shader:

 


OUT.Z = mul(float4(IN.Pos, 1.0f), WorldView).z;

 

I think you need WorldViewProj here. But call it LightViewProj instead for proper naming convention for the second pass.

 

Also you need to pass two floats zw, not just z. Then in PS you need to divide z by w:

OUT.Depth = IN.z / IN.w;

#2Tispe

Posted 09 November 2013 - 12:30 PM

In the shadow map VS shader:

 


OUT.Z = mul(float4(IN.Pos, 1.0f), WorldView).z;

 

I think you need WorldViewProj here. But call it LightViewProj instead for proper naming convention for the second pass.


#1Tispe

Posted 09 November 2013 - 12:29 PM


OUT.Z = mul(float4(IN.Pos, 1.0f), WorldView).z;

 

I think you need WorldViewProj here.


PARTNERS