I'm working on a deferred shading renderer in OpenGL, where I write all geometry output to Colour, Normal and Depth textures and then apply lighting effects later.

Everything seems fine except once every few weeks, constant zigzag-like patterns appear past a certain depth (below the player's knees in the screenshot below). These zigzag patterns are at the same screen coordinates regardless of my pitch and yaw in the game:

OpenGL zig-zag artifacts

I'm not sure what information to provide to resolve this issue, as it seems to me like a GPU error. Each zigzag square is 16x16 pixels, which could be the warp size on my NVIDIA GTX 960. Restarting the program resolves the problem and it doesn't happen again for a few weeks.

My guess is that sections of the fragment shader are failing to write to multiple render targets as I see the same pattern on the Colour, Normal and Depth textures.

The blue colour you can see on the left side of the zigzag pattern is the water at the bottom of the map, which is rendered after the post-processing stage and does not have these artifacts.

Any help with this would be greatly appreciated.

  • 3
    \$\begingroup\$ Looks like Z-fighting perhaps. \$\endgroup\$ Commented Feb 24, 2019 at 17:02
  • \$\begingroup\$ When I had weird artifacts, they were usually caused by reading and writing to the same texture in a single shader invocation. I'd guess it's either that, or your videocard is toast. :P \$\endgroup\$ Commented Feb 26, 2019 at 23:56

1 Answer 1


To me it actually looks and sounds like bad video memory or core issue. Sometimes video cards can start to corrupt their outputs as the silicon degrades. If other cards do not show this artifact, then consider a new video card.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .