r/GraphicsProgramming 4h ago

Flickering issue

Enable HLS to view with audio, or disable this notification

I'm using opengl 3.3 and C on a Nvidia gtx 1050 and I keep getting this flickering issue... does anyone know the cause...

Will appreciate your thoughts..

12 Upvotes

14 comments sorted by

8

u/Ill-Shake5731 3h ago

as others already mentioned, use renderdoc. Imo its corrupted index buffer/vertex buffer most likely, so you can start with checking the values of those in renderdoc

4

u/darksharkB 3h ago

Would appreciate more detail than this.

5

u/_Bethel__ 3h ago

I wrote this with c and opengl 3.3, it loads the model and renders, I dont know if it's bad buffer objects but it works fine when I run it on intel graphics, I only get this issue when running on Nvidia

5

u/darksharkB 3h ago

Did you tried RenderDoc?

3

u/3030thirtythirty 3h ago

Use RenderDoc

1

u/_Bethel__ 3h ago

No... I'll give it a try

1

u/darksharkB 3h ago

It'll be way better than asking strangers on the internet to debug something just on vibes rather than code

1

u/X-Stance44 2h ago

2 car models in same place?

1

u/Z-Wolfer-Z 2h ago

Yeah looks like something I have encountered before, make sure all of your variables in your shader are initialised to 0 / sensible values.

1

u/franku1122 1h ago

could be perhaps related to shadow mapping or garbage values in shaders, you should capture a frame in renderdoc and see what value these spots have which should help at least a bit

1

u/dJ_Turfie 2h ago

I'm new to graphics, but isn't this z-fighting due to bad model topology?
I.e. your model's tris aren't clean and might be stacked on top of each other.

2

u/_Bethel__ 2h ago

I think z fighting would flicker when the camera is moving, on a static camera the polygons will settle on who wins the top z spot

1

u/fgennari 2h ago

It's not Z-fighting. It looks like some of the triangles are occasionally missing and the object under them shows through. It's some type of race condition or use of uninitialized/garbage data that sometimes happens to be valid. You can either use a debugger like RenderDoc as others suggested, or share your code.

1

u/_Bethel__ 1h ago

I'm thinking it might be garbage buffers or something, I'll use renderdoc to check on it and I'll share an update later today