Teleport+Cam tex interpolation issue

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

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 Reply
User avatar
Enjay
 
 
Posts: 26936
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Teleport+Cam tex interpolation issue

Post by Enjay »

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.
User avatar
Major Cooke
Posts: 8206
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Teleport+Cam tex interpolation issue

Post by Major Cooke »

Does this still exist? Last I checked, all special effects are disabled for everything non-player.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Teleport+Cam tex interpolation issue

Post by Graf Zahl »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Teleport+Cam tex interpolation issue

Post by Graf Zahl »

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.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: Teleport+Cam tex interpolation issue

Post by Edward-san »

Is the 'saved_niv' variable you added needed? It's not used at all.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Teleport+Cam tex interpolation issue

Post by Graf Zahl »

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

Return to “Closed Bugs [GZDoom]”