MantisBT - Zandronum
View Issue Details
0002074Zandronum[All Projects] Bugpublic2015-01-20 19:552015-02-01 20:37
Hypnotoad 
 
normalmajoralways
closedwon't fix 
2.0-beta 
2.0 
0002074: Fog (sector_setfade) rendered incorrectly in openGL, breaks backwards compatibility
The fog rendering seems to have significantly changed from 1.3 to 2.0, making some maps look considerably worse. As an example, here is what a map I made called "The Last Hurrah" looks like in 1.3, notice how the distance nicely disappears into the fog and provides a nice colour gradient:

'http://i.imgur.com/yZGLWmr.png [^]'
'http://i.imgur.com/JoBehy2.jpg [^]'
'http://i.imgur.com/Q9Lhwa5.png [^]'

Now look at equivalent screenshots from 2.0:

'http://i.imgur.com/Q5tpFgV.png [^]'
'http://i.imgur.com/jqleEEb.png [^]'
'http://i.imgur.com/y4jNS9Y.png [^]'

No longer does the distance disappear into the fog, and you can instead see the full horizon, additionally there is no longer any colour gradient, which looks quite ugly. This isn't the only map affected by this.

There is also some strange bug indicated by these pictures:

1.3:
'http://i.imgur.com/wdCY1Cn.jpg [^]'

2.0:
'http://i.imgur.com/uN5Erow.jpg [^]'
(notice the strange dark cylinders)

I have attached a basic example wad with fog, which you can compare in 1.3 and 2.0. The map is map64.
No tags attached.
? fogtest.wad (3,074) 2015-01-20 19:55
https://zandronum.com/tracker/file_download.php?file_id=1386&type=bug
? setfade_horizon.wad (2,696) 2015-01-21 08:00
https://zandronum.com/tracker/file_download.php?file_id=1387&type=bug
Issue History
2015-01-20 19:55HypnotoadNew Issue
2015-01-20 19:55HypnotoadFile Added: fogtest.wad
2015-01-20 20:45Edward-sanNote Added: 0011462
2015-01-20 20:46Edward-sanNote Edited: 0011462bug_revision_view_page.php?bugnote_id=11462#r6468
2015-01-20 21:01Edward-sanStatusnew => confirmed
2015-01-20 21:01Edward-sanResolutionopen => waiting for zdoom
2015-01-20 21:01Edward-sanOSWindows =>
2015-01-20 21:01Edward-sanOS VersionXP/Vista/7 =>
2015-01-20 21:01Edward-sanPlatformMicrosoft =>
2015-01-21 00:04DuskStatusconfirmed => acknowledged
2015-01-21 07:09Torr SamahoNote Added: 0011469
2015-01-21 07:10Torr SamahoTarget Version => 2.0
2015-01-21 08:00Edward-sanFile Added: setfade_horizon.wad
2015-01-21 08:01Edward-sanNote Added: 0011472
2015-01-22 13:41Edward-sanNote Added: 0011498
2015-01-22 13:41Edward-sanStatusacknowledged => feedback
2015-01-22 13:41Edward-sanResolutionwaiting for zdoom => open
2015-01-22 15:23HypnotoadNote Added: 0011499
2015-01-22 15:23HypnotoadStatusfeedback => new
2015-01-25 09:39Torr SamahoNote Added: 0011524
2015-01-25 09:39Torr SamahoStatusnew => feedback
2015-01-25 14:28HypnotoadNote Added: 0011540
2015-01-25 14:28HypnotoadStatusfeedback => new
2015-01-25 15:56Torr SamahoNote Added: 0011542
2015-02-01 20:37DuskNote Added: 0011584
2015-02-01 20:37DuskStatusnew => closed
2015-02-01 20:37DuskResolutionopen => won't fix

Notes
(0011462)
Edward-san   
2015-01-20 20:45   
(edited on: 2015-01-20 20:46)
After removing an unneeded consolecommand from the script in the example wad, I could reproduce the issue in gzdoom trunk. Reporting it now.

(0011469)
Torr Samaho   
2015-01-21 07:09   
Edward-san, can you upload your updated example wad, so that we can keep it in the ticket?
(0011472)
Edward-san   
2015-01-21 08:01   
Done.
(0011498)
Edward-san   
2015-01-22 13:41   
It ended bad with that example wad. Maybe if you manage to bring another example wad which is compliant to what graf said and is still buggy, let me know. I leave this open also for the other mentioned issues here.
(0011499)
Hypnotoad   
2015-01-22 15:23   
Can I request something like compat_oldGLfog to restore Zandronum's/Skulltag's original fog rendering then.
(0011524)
Torr Samaho   
2015-01-25 09:39   
We should try to avoid emulating GZDoom bugs that were fixed in GZDoom. Based on Graf's comment this should be fixable by dropping the light level from 255 to 254. Is this correct?
(0011540)
Hypnotoad   
2015-01-25 14:28   
I'll try it out and let you know, but it's a huge shame as this bug has been in Skulltag for as long as I can remember, so a number of old projects may be potentially badly affected by this change in behavior in rendering in this update.

It's an old trick, since fog in software always looked very nasty (more like a 'blanket of color'), a setting where the fog only shows in GL and less so in software (by setting high brightness in the sector) became quite useful.
(0011542)
Torr Samaho   
2015-01-25 15:56   
I always hate breaking backwards compatibility, but here the choice was made in GZDoom. If possible, I'd stay consistent with what GZDoom is doing. Probably the affected map authors should discuss this with the (G)ZDoom devs.
(0011584)
Dusk   
2015-02-01 20:37   
Closing because:
- the map has not seen a final release
- the fog never rendered in 1.3 software and for features software supports, software is correct
- the problem is trivial to fix in the level, change light level from 255 to 254