[332] Z fighting in reflective sectors
Moderator: Graf Zahl
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
[332] Z fighting in reflective sectors
Attached is a WAD that I was messing around with in DB2. Fire the pistol and suddenly there's tons of Z fighting going on in the reflective floor, as seen in screenshot.
Windows Vista Ultimate x64 (latest updates installed)
ATI 4870 X2 @ Catalyst 9.5 (latest)
EDIT:
Happens in Torm's sapphire WAD as well.
Further observations:
Disabling dynamic lights eliminates the Z fighting.
Firing the pistol (or any weapon that generates lights) in another sector also seems to eliminate the Z fighting. Doesn't happen without dynamic lights.
Windows Vista Ultimate x64 (latest updates installed)
ATI 4870 X2 @ Catalyst 9.5 (latest)
EDIT:
Happens in Torm's sapphire WAD as well.
Further observations:
Disabling dynamic lights eliminates the Z fighting.
Firing the pistol (or any weapon that generates lights) in another sector also seems to eliminate the Z fighting. Doesn't happen without dynamic lights.
- Attachments
-
- zfight.jpg (41.01 KiB) Viewed 1258 times
-
- test.zip
- (6.09 KiB) Downloaded 54 times
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: [332] Z fighting in reflective sectors
Hmmm... I occasionally get a brief flicker of the effect but not enough to test properly. On a hunch, because it has caused problems associated with dynamic lights before, does disabling shaders for fog make any difference.
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: [332] Z fighting in reflective sectors
None of the shader options make any difference.
EDIT: I just noticed thread http://forum.drdteam.org/viewtopic.php? ... 41&start=0 - probably the same thing...
EDIT: I just noticed thread http://forum.drdteam.org/viewtopic.php? ... 41&start=0 - probably the same thing...
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: [332] Z fighting in reflective sectors
Discovered something.
Shader fog + radial fog = Z fight
No shader fog + radial fog = Z fight
Shader fog + standard fog = Z fight
No shader fog + standard fog = no Z fight
Shader fog + radial fog = Z fight
No shader fog + radial fog = Z fight
Shader fog + standard fog = Z fight
No shader fog + standard fog = no Z fight
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: [332] Z fighting in reflective sectors
So it's the shader fog. Radial fog doesn't work without a shader.
- Edward850
- Posts: 63
- Joined: Fri Mar 20, 2009 21:48
Re: [332] Z fighting in reflective sectors
Nope, they appear to be different problems, which kind of annoys me because that problem only seems to exist for me. Its rather strange actually, as I get the flicker in your test wad (and the fix fixes it), but the flicker in my wad seems to be completely unrelated to this.Nash wrote:EDIT: I just noticed thread http://forum.drdteam.org/viewtopic.php? ... 41&start=0 - probably the same thing...
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: [332] Z fighting in reflective sectors
I suspect a driver bug. It works fine without any active shaders but with shaders on one crucial feature this requires appears to be inoperable.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: [332] Z fighting in reflective sectors
Assuming that this is the same bug as the one I reported with the shiny desk in my Burghead mod, FWiW, updating to the latest NVidia drivers (191.07) has not resolved the issue.
Is it something that is likely to be fixable from the GZdoom end or will it have to wait for a driver fix? It just so happens that I am working on a level with a few reflective floors so I've gone back to an older version of GZdoom for the purposes of testing the map in question.
Is it something that is likely to be fixable from the GZdoom end or will it have to wait for a driver fix? It just so happens that I am working on a level with a few reflective floors so I've gone back to an older version of GZdoom for the purposes of testing the map in question.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: [332] Z fighting in reflective sectors
I can't fix it. The clipping planes just don't seem to work with shaders on and they are crucial for the reflective floor feature.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: [332] Z fighting in reflective sectors
Oh well, here's hoping that NVidia fix it then - if they are even aware of it
I'll just keep using the older revision for this particular map.

- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: [332] Z fighting in reflective sectors
You don't have to. You can start GZDoom with '-sm2' to force a shader usage for older cards. It's meant to be a debug #define but here it seems to be useful, too.
#
#
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: [332] Z fighting in reflective sectors
Thanks, that does indeed allow the floors to look as intended.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: [332] Z fighting in reflective sectors
Some good news and some very disturbing ones.
1. The good news: I googled after this problem and it's a well known issue. There's a little known method how to handle this and it indeed works fine for me (and possibly all other NVidia users.)
2. And now the disturbing news: ATI chose to ignore the specs and cook up their own (non-)soölution. So the NVidia fix doesn't work on ATI.
So for ATI I will need some feedback to see if it works without the fix active. A good map to test is Tormentor's Sapphire. Around -1800,1800 there's some alcoves with reflective floors and ceilings. If they both display correctly it's working. If they show glitches it's not.
PS. It's really amazing how much faster the new NVidia drivers are. The last time I checked this map was with 169.xx and this place was lagging horribly on my card. Now with 191.07 it's at full 85 fps, even with r_mirror_recursions set to 2.
1. The good news: I googled after this problem and it's a well known issue. There's a little known method how to handle this and it indeed works fine for me (and possibly all other NVidia users.)
2. And now the disturbing news: ATI chose to ignore the specs and cook up their own (non-)soölution. So the NVidia fix doesn't work on ATI.
So for ATI I will need some feedback to see if it works without the fix active. A good map to test is Tormentor's Sapphire. Around -1800,1800 there's some alcoves with reflective floors and ceilings. If they both display correctly it's working. If they show glitches it's not.
PS. It's really amazing how much faster the new NVidia drivers are. The last time I checked this map was with 169.xx and this place was lagging horribly on my card. Now with 191.07 it's at full 85 fps, even with r_mirror_recursions set to 2.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: [332] Z fighting in reflective sectors
Checking with my Burghead map and the other maps where I had seen the problem, r525 does indeed seem to resolve it.Graf Zahl wrote:(and possibly all other NVidia users.)
And I'm just uploading a build of r525 for others to check with.
- Firebrand
- Dev Builds Team
- Posts: 126
- Joined: Mon Aug 10, 2009 21:00
- Location: Mexico
- Contact:
Re: [332] Z fighting in reflective sectors
I have an ATI HD3850 I ran a quick test with the test map supplied by the OP, everything works fine
.

I'm the ruler of the Fire Power.....