Advertisement

Flickering when moving the camera.

Started by March 18, 2022 05:59 PM
6 comments, last by Thaumaturge 2 years, 10 months ago

Im trying out Diligent Engine and I can render the sponza scene. However there is some weird flickering when moving the camera. When I zoom out it looks like this: 

Geometry Error

It's the output of the normals from a GBuffer. You can see the errors which have circles around. The geometry seems to “flicker”, but only when I move the camera. When I zoom on into the problematic places, the error disappears: 

No Error 

The same happens when I do simple forward rendering. Also tested with other values, like world position and UV coordinates. The flickering still occurs. I just don't know what I am doing wrong. I know it is hard without code as I don't know where the place of error is, but does anyone of you know what the problem could be? Just an educated guess might suffice. The code is here: https://github.com/DaOnlyOwner/hym

Thanks

Given the look of the thing, and especially that it's only apparent when far from the site at which it occurs, I'm inclined to guess that it's some form of z/depth-fighting.

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

Advertisement

That's really weird I have a 32bit precision depth buffer. There shouldn't be any z fighting here… When I increase to 64bit the problem stays the same. Really weird. Guess I have to investigate.

Okay you were right, my near plane was nearly 0

Well, one possibility is that it has to do with your near- and far- planes: if you have one or both of a very small near-plane value or a very large far-plane value, then you may end up with depth-values clustering in a small part of the depth-spectrum. This may then result in artefacts, as there's little “space” within the cluster in which to differentiate fragments.

[edit] Ah, it seems that you responded while I was preparing my own response--and indeed, it seems that we came to much the same conclusion!

Well, I'm glad that you seem to have found the problem! ^_^

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

Yeah, so thank you for the educated guess. It helped a lot :D

Advertisement

I'm glad that it did so help! ^_^

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

This topic is closed to new replies.

Advertisement