Vertex normal from view space position

Started by
0 comments, last by MJP 12 years, 7 months ago
Hi. I've been wanting to implement SSAO without having to store the vertex normal in addition to the normal from the normal map, a brief look on the internet came up with being able to calculate this using view space position and the ddx/ddy functions. I've tried this but the result looks incorrect as below:

[attachment=5440:onormals.jpg]

I store linear view-space depth and reconstruct the position calculating the view-ray and using the stored depth from the g-buffer. Could anyone point me in the right direction to get this working?
Advertisement
The directions look okay, just the intensity seems off. Are you normalizing your vectors correctly?

This topic is closed to new replies.

Advertisement