Jump to content
  • Advertisement
Sign in to follow this  
smutlu

ambient Occlusion

This topic is 3593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to implement one of the ambient occlusion algorithms as described in here. But in first step I have to read the depth buffer and save the normals in eye space in a texture. But I do not know how to save the normals in a texture. (http://www.gamerendering.com/category/image-enhancements/) Does there anybody know how to save the normals in a texture? Moreover is there a clear totorial for Screen Space Ambient Occlusion? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
In order to store the normals in a texture you need to use a render target (if you are using newer hardware look at Frame Buffer Objects).

Once you create an FBO, you can have a shader grab the normals when you render the object, and instead of writing them to the screen, you write them into a texture that is within the FBO.

This will get you started.
http://www.gamedev.net/reference/articles/article2331.asp

and then i suggest going to the Nvidia website and looking at their sdk, they have some examples of using FBOs.

If you have older hardware, you need to use a pbuffer (i think).
Hopefully you dont have to go that route.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!