Z-Fighting

Carnage1986

Member
Apr 8, 2014
92
0
0
What is this and how can we describe this? All flickering obejcts and textures are due to this issue? How can we know that the glitch we saw on the screen is z-fighting or not?
 

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
Z fighting is when two objects appear to be alternating as to which is in front, normally dependent on view angle and distance.

Flickering textures are normally due to non temporal based AA.
 

Carnage1986

Member
Apr 8, 2014
92
0
0
How can i get rid of it?

I tried these but i couldn't solved my issue:

1/Change Anti-Aliasing settings.

2/Change LOD settings.

3/Change F.O.V settings.

Can a faulty graphic cards or driver cause this problem?
 
Last edited:

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
If its objects bouncing back and forth there isn't much you can do about it, that is up to the designers and developers of the game.

However if its individual pixels that are shimmering then its more likely Anti aliasing. Turning off all anti aliasing can sometimes remove the problem and with an Nvidia card you can try TXAA which in theory will reduce the temporal shimmering caused by antialiasing in motion.
 

bystander36

Diamond Member
Apr 1, 2013
5,154
132
106
If it is aliasing causing it, SSAA can also fix it, though extremely demanding to use. Downsampling can also work. These shimmering issues that don't get fixed with MSAA, are often a result of aliasing in the texture and transparencies, which MSAA does not touch.

In some cases, if it is transparencies, Adaptive MSAA can work, or Nvidias Transparency AA set to SSAA.
 

Pottuvoi

Senior member
Apr 16, 2012
416
2
81
Cause of z-fighting is lack of numerical precision of Z-buffer.
This is visible when two surfaces are close to each other.

There are two ways programmer can fight this.

Increase Z-Buffer precision from 24bit to 32bit. (sadly hardware doesn't support 48/64bit Z-buffer.)

Change how z-buffer range is handled, this is currently the best way.
IE.
http://outerra.blogspot.fi/2012/11/maximizing-depth-buffer-range-and.html

One way to combat the problem is proper art authoring and making sure that surfaces do have some empty space between them. (this can cause things like floating decals etc.)


If surface has visible specular aliasing the problem is not about z-fighting, but insufficient shader antialiasing.
Proper way to address this is change shader slightly.
http://advances.realtimerendering.com/s2012/Ubisoft/Rock-Solid%20Shading.pdf
http://blog.selfshadow.com/2011/07/22/specular-showdown/

Only way player can hope to fight this is to use of supersampling. (Although even >100 samples may not be enough for some cases.)
 
Last edited:

Carnage1986

Member
Apr 8, 2014
92
0
0
What game do you see this in and what video card do you have?

Gta Vice City, GTA San Andreas, The Sims 3, Batman Arkham City@ GT 740M.

Deadpool@GT 430

Changing the graphic detail in games doesn't help me. I will try to inject supersampling. Thanks for replies.