The International Simutrans Forum

Development => Bug Reports => Topic started by: Spacethingy on August 12, 2016, 12:37:30 AM

Title: [r7856] Planes go invisible when flying over tunnel entrances and bridges
Post by: Spacethingy on August 12, 2016, 12:37:30 AM
I've been noticing planes vanishing for a while now; I've only just realised that its when they fly over tunnel entrances and bridges:



It makes the plane stay invisible until it changes direction (especially see the lowest plane in the video).
Title: Re: [r7856] Planes go invisible when flying over tunnel entrances and bridges
Post by: Dwachs on February 04, 2017, 09:25:44 AM
Here is a patch. It is quite a hack. Should I submit this?

Title: Re: [r7856] Planes go invisible when flying over tunnel entrances and bridges
Post by: prissi on February 04, 2017, 01:23:43 PM
You are the expert. When I last touched that code, the image was simply set to empty for a vehicle in a tunnel.
Title: Re: [r7856] Planes go invisible when flying over tunnel entrances and bridges
Post by: Yona-TYT on February 04, 2017, 06:44:16 PM
Maybe I can try to solve this: http://forum.simutrans.com/index.php?topic=15036.msg148285#msg148285 (http://forum.simutrans.com/index.php?topic=15036.msg148285#msg148285)  ;)
Title: Re: [r7856] Planes go invisible when flying over tunnel entrances and bridges
Post by: TurfIt on February 04, 2017, 07:35:46 PM
Isn't almost the entirety of the rendering code now a 'hack' of special cases trying to minimize the artifacts.  ;D  Whatever works...

Would the save_cr and toggle function not make more sense in simgraph along with the rest of the clipping stuff?
For multithreaded performance, save_cr needs padding to get any writes by different threads off the same cacheline. Same as was done with the clips[] struct.
Title: Re: [r7856] Planes go invisible when flying over tunnel entrances and bridges
Post by: Dwachs on February 07, 2017, 06:54:26 PM
Thanks for the comment. I put this into simgraph. The airplane bugs should be fixed in r8070. I tried to cleanup the code and the macro definitions.