• Create Account

### #ActualTispe

Posted 09 November 2013 - 12:38 PM

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

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