[Won't change] HUD camera textures broken in GL2

Bugs that have been investigated and resolved somehow.

Moderators: Developers, ZDoom.org Team

HUD camera textures broken in GL2

Postby phantombeta » Sat Jul 29, 2017 9:05 pm

Literally what it says in the title.
In 1.8 and 1.9 HUD camera textures work fine. In the latest dev build they don't, and appear as black.
I tested 1.8 and 1.9 both normally with my GPU and with this, just to be sure and stuff.
I dunno if the GL2 renderer is still supported, but this is a regression and some mods break without that, so this should be fixed. (IMO)

This can be seen with the Death's Head's altfire in Russian Overkill and with High Noon Drifter's blursphere replacement. (Sorry, I don't have any test WADs this time)
Weirdly enough, they work fine in Hideous Destructor.
User avatar
phantombeta
Fear the black wings of death
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland (BRASIL CARAI)
Discord: phantombeta#2461

Re: HUD camera textures broken in GL2

Postby Graf Zahl » Sat Aug 12, 2017 7:09 am

Do the camera textures work in game?
The difference between 1.x and 2.x is where they get constructed. GZDoom 1.x renders them to the main screen and extracts a texture from there. This is a bad way to do things.
GZDoom 2.x renders them to a dedicated framebuffer and converts that into a texture. It may be that this feature is not properly supported on the affected hardware. If that is indeed the cause here you are out of luck, but it's something I cannot test.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: HUD camera textures broken in GL2

Postby phantombeta » Sat Aug 12, 2017 10:41 am

Camera textures do work fine in walls, they just don't work in the HUD.
Mesa3D also renders both wall and HUD camera textures fine in 1.9, but renders HUD camera textures completely black in the current version of the GL2 renderer/legacy render path. (Same happens in actual hardware)
User avatar
phantombeta
Fear the black wings of death
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland (BRASIL CARAI)
Discord: phantombeta#2461

Re: HUD camera textures broken in GL2

Postby Graf Zahl » Sat Aug 12, 2017 11:55 am

Do you have a test WAD?
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: HUD camera textures broken in GL2

Postby phantombeta » Sat Aug 12, 2017 2:21 pm

Here it is.
While making this test WAD, I found something out. This bug only happens if the camera texture's resolution is higher than the currently set GZDoom resolution.
Specifically, if either the width or the height is higher, the bug happens. (Not 100% if it happens on higher heights, but definitely happens on higher widths, as 1152x864 causes it, even though it has a higher pixel count than 1280x720)

Steps to reproduce:
  • Run WAD
  • Change to a resolution lower than 1280x720
  • Use the switches
To unfreeze the player and remove the camera texture from the screen, press the jump button.
The first switch uses a camera on a camera texture without any actual texture, just the definition in ANIMDEFS. The second one has the texture defined in TEXTURES, and the third one has an actual image.

Also, while making this test WAD I found another bug. (Also GL2 only)
If you change resolutions while in a map, a bunch of stuff disappears. (The map geometry disappears, and most (non-HUD/menu) sprites disappear)
I'm not sure /what/ is going on with that. It also doesn't happen everywhere. For example, start Doom II MAP02 and do it, and it won't happen. However, turn 180 to face the wall behind you and do it and it happens. Turn 180 again to face where you were facing before, and it goes away.
Attachments
HUDCamTexTestWad.wad
(13.02 KiB) Downloaded 3 times
User avatar
phantombeta
Fear the black wings of death
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland (BRASIL CARAI)
Discord: phantombeta#2461

Re: HUD camera textures broken in GL2

Postby Graf Zahl » Sat Aug 12, 2017 3:31 pm

This will only happen if the camera texture is larger than the actual screen. The reason is that the legacy renderer cannot use the framebuffer implementation that's being used for modern OpenGL. If such a case is encountered the camera texture will not be rendered and left black.

Don't expect me to put any work into that render path. It will inevitably degrade further when it gets into the way of properly dealing with modern hardware.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: Bing [Bot] and 1 guest