[Fixed] Dancing torches in Heretic on Carmack

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Dancing torches in Heretic on Carmack

Postby drfrag » Wed Apr 01, 2020 10:34 am

HEAD, latest master, last SVN. :) Now they move, since g4.3pre-358-g236b47693.
It's specially noticeable with the two braziers? (statues) near the start in E1M1. Is this a known problem?
Last edited by drfrag on Thu Apr 02, 2020 4:06 am, edited 2 times in total.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Dancing torches in Heretic on Carmack

Postby drfrag » Wed Apr 01, 2020 4:41 pm

For now i know that the issue was present in 4.3.1 and not in 4.2.4 but that's not much.
Last edited by drfrag on Thu Apr 02, 2020 4:08 am, edited 1 time in total.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Dancing torches in Heretic on Carmack

Postby drfrag » Thu Apr 02, 2020 4:08 am

I've done the bisect using devbuilds, it's much faster.
The first commit affected was:
Code: Select allExpand view
- change ProjectedWallTexcoords to use gradients for its texture coordinate calculations
- change SpriteDrawerArgs to draw a full sprite instead of one column at a time
- add r_noaccel cvar to allow forced software rendering of the psprites (useful for debugging and also one person on the forum actually requested this feature)
- remove FWallTmapVals and calculate texture coordinates directly from FWallCoords
- move portal clipping out of the inner sprite drawing loop

https://github.com/coelckers/gzdoom/com ... 96b7817952
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Dancing torches in Heretic on Carmack

Postby drfrag » Thu Apr 02, 2020 5:06 am

And of course i've got no idea of what's going on, there are a lot of changes there. Seems only fire braziers and wall torches are affected (and Doom torches too), what makes them so special?
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Dancing Torches in DOOM -- Software Renderer

Postby Hugh Bomblepin » Wed Feb 10, 2021 3:45 am

I saw another post about Heretic from drfrag, but I have also noticed this "dancing sprite" bug in Doom. It's a new problem starting with version 4.3 and up. If you look at an older version of GZDoom, or QZ/LZDoom, the problem isn't there (but other bugs that have since been fixed still exist in those older versions). It specifically affects objects like the skull torches, evil eyes and beating hearts. It doesn't seem to affect the skulls with candles. Can this get fixed for the next build of GZDoom?

I posted this bug on the Doomworld forums, and got this response from dpJudas:

"The dancing sprites effect is caused by rounding errors when sampling from textures or when deciding which screen pixels are covered by a wall/flat/triangle. ZDoom has (or had? can't remember if my fix made it into zdoom itself) those rounding errors, I then fixed them back in the day, and then I apparently managed to break it again in that commit. In ZDoom it wasn't only the sprites that were affected btw. The midtextures in particular had a tendency to wrap too early. Same thing happened with flats (the teleporters made out of 4 textures at the end in E1M8 is the most obvious example of that). Also the general stability of the picture when moving around is much better without those rounding errors. In short: this bug could probably be fixed by adding +0.5f or removing a +0.5f a single place somewhere in the sampling or screen column/row code. Maybe one of the active GZDoom developers will do that..."
Hugh Bomblepin
 

Re: Dancing torches in Heretic on Carmack

Postby drfrag » Wed Feb 10, 2021 6:30 am

I've merged the topics. The Doomworld thread is here: https://www.doomworld.com/forum/topic/1 ... -question/
That hint is very generic and i'm not the smartest guy around here. :P
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Dancing torches in Heretic on Carmack

Postby Graf Zahl » Wed Feb 10, 2021 7:00 am

Unfortunately that's a hefty commit that changes stuff in a way where I cannot even see anymore what the point of it all was. Overall I tend to agree with the assessment that this is a problem with the rounding math - and aside from reverting the software renderer to an older state from before this commit I really see no way to get it fixed easily - provided that even works with all the other changes to the render code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Dancing torches in Heretic on Carmack

Postby drfrag » Wed Feb 10, 2021 8:58 am

It's a minor thing anyway and the effect must be due to the heavy height changes in those sprites. That commit introduced other problems but luckily somehow i managed to fix the lightning for the player weapon sprites. Fixing this requires a good knowledge of the software renderer and i don't think adding and removing 0.5s everywhere by trial and error will help.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Dancing torches in Heretic on Carmack

Postby Rachael » Wed Feb 10, 2021 9:22 am

I'm taking a look at this. I think I have a decent idea of exactly where to add said 0.5's, if I get it to work I'll close this topic accordingly. I'm just posting this before something drastic does happen, like reverting that entire commit.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Dancing torches in Heretic on Carmack

Postby Graf Zahl » Wed Feb 10, 2021 9:43 am

That commit is far too big to be reverted. It's also far too big for anyone without in-depth knowledge of how software rendering works to find the problem.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Dancing torches in Heretic on Carmack

Postby Hugh Bomblepin » Wed Feb 10, 2021 2:48 pm

Rachael and drfrag, this is Captain Keen from Doomworld (er, Hugh Bomblepin?)

Thank you!!
Hugh Bomblepin
 

Re: Dancing torches in Heretic on Carmack

Postby drfrag » Fri Feb 12, 2021 6:41 am

@dpJudas: Thanks very much for the fix, you rule! :D
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Dancing torches in Heretic on Carmack

Postby dpJudas » Fri Feb 12, 2021 7:17 am

You're welcome. :)
dpJudas
 
 
 
Joined: 28 May 2016

Re: Dancing torches in Heretic on Carmack

Postby Hugh Bomblepin » Mon Feb 15, 2021 2:38 pm

This is Captain Keen again. I just tried out the latest pre-release build, and the issue is indeed fixed. Thank you!!
Hugh Bomblepin
 


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest