Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Weird performance problem with SSAO

$
0
0
Hey folks. So I'm having this problem in which if my camera is close to a surface, the SSAO pass suddenly spikes up to around taking 16 milliseconds. When still looking towards the same surface, but less close. The framerate resolves itself and becomes regular again. This happens with ANY surface of my model, I am a bit clueless in regards to what could cause this. Any ideas? In attached image: y axis is time in ms, x axis is current frame. The dips in SSAO milliseconds are when I moved away from the surface, the peaks happen when I am very close to the surface. Edit: So I've done some more in-depth profiling with Nvidia nsight. So these are the facts from my results Count of command buffers goes from 4 (far away from surface) to ~20(close to surface). The command buffer duration in % goes from around ~30% to ~99% Sometimes the CPU duration takes up to 0.03 to 0.016 milliseconds per frame while comparatively usually it takes around 0.002 milliseconds. I am using a vertex shader which generates my full-screen quad and afterwards I do my SSAO calculations in my pixel shader, could this be a GPU driver bug? I'm a bit lost myself. It seems there could be a CPU/GPU resource stall. But why would the amount of command buffers be variable depending on distance from a surface? Edit n2: Any resolution above 720p starts to have this issue, and I am fairly certain my SSAO is not that performance heavy it would crap itself at a bit higher resolutions.

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>