HUD camera textures broken in GL2

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: HUD camera textures broken in GL2

Re: HUD camera textures broken in GL2

by Graf Zahl » Sat Aug 12, 2017 2: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.

Re: HUD camera textures broken in GL2

by phantombeta » Sat Aug 12, 2017 1: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 95 times

Re: HUD camera textures broken in GL2

by Graf Zahl » Sat Aug 12, 2017 10:55 am

Do you have a test WAD?

Re: HUD camera textures broken in GL2

by phantombeta » Sat Aug 12, 2017 9: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)

Re: HUD camera textures broken in GL2

by Graf Zahl » Sat Aug 12, 2017 6: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.

HUD camera textures broken in GL2

by phantombeta » Sat Jul 29, 2017 8: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.

Top