Noise Recalculation for Ambient Occlusion

Started by
2 comments, last by dvds414 7 years, 7 months ago

I posted this in another area of the forum, but no one was able to give me any feedback. Perhaps here will be better.

I have written a shader to successfully do ambient occlusion in XNA and it has given me this result: https://gyazo.com/0bf260d8cdf9853a93440ca1a645eed7

The ambient occlusion here is not very intense and that is intentional. My question is should I recalculate my noise map every frame for the more "random" feel of indirect lighting? Or should I just use one static noise map like I currently am. Instead of even recalculating a noise map every time I could just create a coordinate offset every time for the sampling, I guess that's an option. Does anyone here have an opinion or some knowledge if this is commonly done? Or should I leave my shader as is?

Advertisement

I don't think there is much benefit to recalculating the random texture every frame. If anything, you could calculate a random vector once per frame, and then rotate your sampled random vectors around, and you will get a similar effect.

However, if you don't see any artifacts, and you are happy with how it looks, then whey would you be thinking of updating the texture every frame?

I found that changing the random vector per frame ended up being too noisy, unless you have a strong blur implemented. Even with a static camera/scene, you'll still see the ao bouncing around because the random value changes. If you use the same random value, then in a static scene, the ao will also be static.

Thank you both for your input there and I guess I didn't think about how weird that may look on a static scene. I dont think there is any artifacts in the picture I provided so I guess there is no reason to recalculate the noise.

This topic is closed to new replies.

Advertisement