Teleport+Cam tex interpolation issue

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Teleport+Cam tex interpolation issue

Re: Teleport+Cam tex interpolation issue

by Graf Zahl » Sat Mar 05, 2016 6:10 am

Yes, I forgot to save after removing the last test code.

Re: Teleport+Cam tex interpolation issue

by Edward-san » Sat Mar 05, 2016 5:55 am

Is the 'saved_niv' variable you added needed? It's not used at all.

Re: Teleport+Cam tex interpolation issue

by Graf Zahl » Sat Mar 05, 2016 5:45 am

I finally managed to fully understand what happens here.

Due to requiring the same resources as the main view, camera textures work slightly differently in GZDoom.
ZDoom draws them after the main view so that at this point the interpolation is already off and none of this can happen.
In GZDoom that's not really possible because if no framebuffer is available the camera has to be composed on the main view's framebuffer - and for obvious reasons that can only be done BEFORE the main screen is drawn. So effectively the cameras clobbered the interpolation flag, which unfortunately is not kept in a place local to the actual player but in a global variable, meaning that the next view that gets set up will eat and reset it.

So I just did the brute force solution in GZDoom: Save and clear the flag before rendering the camera textures, then restore it afterward.

Re: Teleport+Cam tex interpolation issue

by Graf Zahl » Fri Jan 29, 2016 7:37 pm

Yes, this does still exist and I want to take care of it when I refactor how interpolations are handled. Which is after the release.

Re: Teleport+Cam tex interpolation issue

by Major Cooke » Fri Jan 29, 2016 7:19 pm

Does this still exist? Last I checked, all special effects are disabled for everything non-player.

Teleport+Cam tex interpolation issue

by Enjay » Thu Dec 25, 2014 3:59 pm

As I understand it from Graf's explanation, interpolation is meant to be switched off while teleporting. However, if a camera texture is in view, interpolation is not switched off and so parts of the map between the teleport origin and destination can be seen.
Graf Zahl wrote: Normally view interpolation is turned off for teleporting. But as it so happens, this teleport occurs within view of a camera texture - so the camera texture intercepts the flag not to interpolate, resets it and causes the regular view to be interpolated normally - which is clearly unwanted.

Please report this at the ZDoom forum, I'd prefer if Randy could give some input, too, how to change this
Here is a part of a PM I sent to Graf with some details of the issue. I first noticed the bug back in 2007 but this is the first time that I was able to give Graf something concrete to look at.
Enjay wrote:Additional:
While I remember, you might be able to investigate something else while you are at it. A long time ago, I reported that when teleporting on a map, you could see other parts of the map briefly as you go from the teleport line to the destination. This is the map in question. Unfortunately, with most of the resources missing, the teleport seems to happen more quickly but I *think* the effect still happens. It only lasts a fraction of a second but I think it's there. With the full mod loaded, it is still very brief but it stays on screen long enough to definitely be visible.

I was able to catch the effect in this video, albeit that it only shows up for one frame in the compressed version:

http://www.aspectsweb.co.uk/enjay/graf/telep.mp4

and, in case you don't have video editing software to look at it, here are the three frames: before teleporting, during and after, screengrabbed from Windows Movie Maker with the above video loaded.

Image
Image
Image
If you need the map too, I can PM you a link but, basically, that view with the yellow key in the middle shouldn't exist.

Top