This is a UDK material to re-construct (view space) normals from scene depth.
Unfortunately the depth buffer suffers from serious precision errors in DX9 mode which limits the use of this technique quite a lot. For post process effects like SSAO or SSGI it might be best practice to combine 'depth only' approaches with 'normals from depth'.
DX9:
DX11:
A blur pass after reconstructing the normals helps to reduce artifacts but also lowers the precision, espacially for fine details and across object edges.
Do you have the code for the custom node posted somewhere?
ReplyDeleteHi, I named the custom nodes by their code so you can tell from the screenshot.
ReplyDelete1) return mul(IN,,ViewProjectionMatrix);
2) return ddx(IN);
3) return ddy(IN);
Oh, thanks I see it now : )
ReplyDelete