[3.4.1] Cameratexture blacked out under some circumstances

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: [3.4.1] Cameratexture blacked out under some circumstances

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Matt » Tue Jul 17, 2018 1:21 am

_mental_ wrote:For hardware renderer it was fixed in modern branch with commit 2c86c4e.
Confirmed fixed. Thanks!!!

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by _mental_ » Tue Jul 17, 2018 1:15 am

For hardware renderer it was fixed in modern branch with commit 2c86c4e.

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Matt » Tue Jul 17, 2018 1:03 am

Still not fixed as of 1ef9938. :(

EDIT: Tried 7817e6a directly to see if maybe a subsequent commit might've re-broken it. No such luck, still getting the corner on reload (and what I'm getting looks exactly like phantombeta's video except that blacked out area never turns to sky for me).

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Enjay » Sun Jul 15, 2018 3:32 am

Graf Zahl wrote:@Enjay: What map is that? Posting images of such a great testing example without a link to the map itself is really not nice. :(
It's actually not a great generalised testing map because it needs a particular set of custom resources to be loaded (mostly Return from Oblivion stuff + extras). Aside from the small number of camera textures, it's mostly for testing switches and animations in the mod.

Good to see the bug squished though. :)

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Graf Zahl » Sun Jul 15, 2018 2:23 am

Fixed, I think. What puzzles me here is that the error only manifested itself now. I could trace it back to the actual implementation of framebuffer-based camera textures. Apparently some part of the older setup just happened to make it work with some buffer that was larger than the texture so it never glitched.

So it apparently was pure happenstance that nobody ever noticed it before.

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by phantombeta » Sun Jul 15, 2018 1:58 am

@Graf
Have you tried starting a new game after doing it once already or changing maps then checking again? It doesn't show immediately, you have to change maps at least once.
Here's a video demonstrating it:

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Graf Zahl » Sun Jul 15, 2018 1:41 am

@Enjay: What map is that? Posting images of such a great testing example without a link to the map itself is really not nice. :(

That said, _Mental_'s demo map looks correctly for me with all builds I tested, starting from the commit this supposedly stated on, to 3.4.1 and today's WIP. And since I cannot reproduce the problem I need some help.

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by _mental_ » Sun Jul 15, 2018 1:16 am

HUD camera texture is broken in software renderer too but in a different way. It's not updated at all and remains black if GZDoom was started with software renderer.

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Matt » Thu Jul 12, 2018 12:05 am

Well, at least we know it's the cameratextures and not something about how things are drawn on the HUD.

I would guess it's got something to do with a check for the bounding area of the cameratexture that was being done in FGLTexture but omitted in FHardwareTexture. I have no idea which of those it could possibly be though.

(I noticed that the old Bind calls both "Clean" and "CreateHwTexture" under the "texture has become invalid" block, but the new BindOrCreate function only has "Clean" in there. Is this at all related to the bug?)

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Enjay » Thu Jun 28, 2018 1:10 pm

Matt wrote:Has anyone checked if this happens with cameratextures placed on a map as well?
It does, but it seems inconsistent. I saw the problem with a map a few days ago when I first read this report. I checked the map and one of the camera textures was half black. I've checked the map since and it wasn't showing the problem. I just checked again and still no problem, then I had an idea. The first time I saw the problem, I had come from the previous map (which has a number of camera textures), so I did that again and this time I got the problem on one camera texture:

it should look like...
Image

but looked like...
Image
(later, I repeated the test and this time it was a different camera texture that got messed up.)


Then I warped back to the first map and all the camera textures (which had previously been fine) were now messed up:
Image


Then warping back to the second map, things had got worse:
Image

The above are just test maps that I use for a variety of purposes; nothin' fancy.

Matt wrote:(And does anyone know off the top of their head of any maps that employ multiple different-sized camera textures?)
There is a chance something I have released does this because I quite often use a bunch of different sized camera textures, but I can't be certain of an example off the top of my head.

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Matt » Thu Jun 28, 2018 12:02 pm

Has anyone checked if this happens with cameratextures placed on a map as well?

(And does anyone know off the top of their head of any maps that employ multiple different-sized camera textures?)

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by _mental_ » Fri Jun 22, 2018 7:29 am

It's started with c37ff22 exactly. The problem is with more than one camera textures of different widths/heights.
Simplified test case is in attachment. Works with arbitrary Doom map, just enter any level twice.
Spoiler: Code and screenshot
Attachments
camtex2.zip
(638 Bytes) Downloaded 88 times

Re: [3.4.1] Cameratexture blacked out under some circumstanc

by Matt » Sat Jun 16, 2018 12:30 am

The last pre-3.4 commit that I can confirm does not suffer this bug is 2ae8d39 from April 24.

The two that immediately follow it, 0dcc6ec and 8d62ebd, weren't tested because the first won't compile (something about a previously declared int) and the second would crash every time I tried to start a map, so I can't tell if either of them might be where this started, but c37ff22 is affected by this bug.

[3.4.1] Cameratexture blacked out under some circumstances

by Matt » Thu Jun 14, 2018 10:47 pm

To replicate:

1. download the attached and DUMP 2

2. gzdoom -file <the attached mod> DUMP-2v2.pk3 -nomusic -noautoload

3. New game, mash enter until at map01

4. Go to Map08 using idclev08, map map08, or changemap map08

Expected: the cameratexture appears as on map01.
Actual: only one corner of the cameratexture appears, the rest blacked out.

Screenshots:
Spoiler:
Once it appears it never goes away, even if you start a new game, until you quit GZDoom.

This works fine in 3.3.2 and is bugged in 3.4.0.

If I break the ANIMDEFS reference in DUMP2, the HUD cameratexture works fine.

When the bug appears and I try to switch renderers, it persists.
Attachments
testctstatbar.zip
(1.28 KiB) Downloaded 56 times

Top