[332] Z fighting in reflective sectors

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

[332] Z fighting in reflective sectors

Post by Nash »

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.
Attachments
zfight.jpg
zfight.jpg (41.01 KiB) Viewed 1261 times
test.zip
(6.09 KiB) Downloaded 54 times
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: [332] Z fighting in reflective sectors

Post by Enjay »

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.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: [332] Z fighting in reflective sectors

Post by Nash »

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...
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: [332] Z fighting in reflective sectors

Post by Nash »

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
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [332] Z fighting in reflective sectors

Post by Graf Zahl »

So it's the shader fog. Radial fog doesn't work without a shader.
User avatar
Edward850
Posts: 63
Joined: Fri Mar 20, 2009 21:48

Re: [332] Z fighting in reflective sectors

Post by Edward850 »

Nash wrote:EDIT: I just noticed thread http://forum.drdteam.org/viewtopic.php? ... 41&start=0 - probably the same thing...
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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [332] Z fighting in reflective sectors

Post by Graf Zahl »

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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: [332] Z fighting in reflective sectors

Post by Enjay »

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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [332] Z fighting in reflective sectors

Post by Graf Zahl »

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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: [332] Z fighting in reflective sectors

Post by Enjay »

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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [332] Z fighting in reflective sectors

Post by Graf Zahl »

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.
#
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: [332] Z fighting in reflective sectors

Post by Enjay »

Thanks, that does indeed allow the floors to look as intended.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [332] Z fighting in reflective sectors

Post by Graf Zahl »

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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: [332] Z fighting in reflective sectors

Post by Enjay »

Graf Zahl wrote:(and possibly all other NVidia users.)
Checking with my Burghead map and the other maps where I had seen the problem, r525 does indeed seem to resolve it.

And I'm just uploading a build of r525 for others to check with.
User avatar
Firebrand
Dev Builds Team
Posts: 126
Joined: Mon Aug 10, 2009 21:00
Location: Mexico
Contact:

Re: [332] Z fighting in reflective sectors

Post by Firebrand »

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.....
Locked

Return to “Closed Bugs”