Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualTelanor

Posted 20 February 2013 - 02:22 AM

Yea, its always been mul(pos, matrix) for all the shaders.  Swapping them doesn't fix it.

 

The player depth is written like this:

 

VSDepthOutput VS_Depth(VertexShaderInput input)
{
    VSDepthOutput output;

    float4 worldPosition = mul(input.Position, World);
    float4 cameraPosition = mul(worldPosition, View);
    float4 position = mul(cameraPosition, Projection);

    output.Position = position;
    output.Depth = cameraPosition.z;

    return output;
}
 
float PS_Depth(VSDepthOutput input) : SV_TARGET0
{
    float depth = -input.Depth / FarPlane;

    return depth;
}

#1Telanor

Posted 20 February 2013 - 02:20 AM

Yea, its always been mul(pos, matrix) for all the shaders.  Swapping them doesn't fix it.


PARTNERS