Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbelfegor

Posted 18 July 2013 - 11:25 AM

I said output view space position, so it is like this:

VS
output.depthPosition.xyz = mul(float4(position.xyz,1), mul(worldMatrix, viewMatrix)).xyz;
PS
output.Depth = float4(input.depthPosition.xyz, 1.0f);

although you must have proper render target (or "view" whatever they call it in dx11) format that can hold at least 3 floating point components.

 

And why do you invert your normals now?

output.NormalW = mul(float4(-normal.xyz,0), mul(worldMatrix, viewMatrix));

Then when you fix those issues, play with ssao "sampling radius" to match your world scale (in case you don't get expected results).


#1belfegor

Posted 18 July 2013 - 11:18 AM

I said output view space position, so it is like this:

VS
output.depthPosition.xyz = mul(float4(position.xyz,1), mul(worldMatrix, viewMatrix)).xyz;
PS
output.Depth = float4(input.depthPosition.xyz, 1.0f);

although you must have proper render target (or "view" whatever they call it in dx11) format that can hold at least 3 floating point components.

 

And why do you invert your normals now?

output.NormalW = mul(float4(-normal.xyz,0), mul(worldMatrix, viewMatrix));

PARTNERS