[Fixed] [g9925cc380] Raze Backend update breaks drawing

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[g9925cc380] Raze Backend update breaks drawing

Postby 3saster » Fri Nov 27, 2020 11:57 am

Run the attached mod on a fresh GZDoom ini on Doom 2. The statusbar should display normally, but starting from this Raze back-end update, the numbers on it seem to become a garbage texture, with random colours. I would provide a more minimal example (I minified it what I could), but I literally cannot make one cleanly (filter\game-doomchex\zscript\statusbars is where the relevent main drawing happens). This bug is sometimes "fixed" by commenting out random lines of code that run in the mod, even if they don't have anything to do with the garbage texture being drawn, so something is definitely going wrong. Below is a picture.
You do not have the required permissions to view the files attached to this post.
User avatar
3saster
 
Joined: 11 May 2018
Location: Canada

Re: [g9925cc380] Raze Backend update breaks drawing

Postby drfrag » Fri Nov 27, 2020 12:57 pm

It actually happens with the default status bar the first time you start a game until the wipe ends. And even once it stayed until i changed the resolution in windowed mode but now i can't reproduce that.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: [g9925cc380] Raze Backend update breaks drawing

Postby Lord Misfit » Fri Nov 27, 2020 1:27 pm

I hate to pile onto this with a not-quite-identical report, but I also have an issue related to the Raze backend update, though mine is less of things disappearing, and more of font translations being borked on the inventory-bar's DrawString command specifically.



The top part of the image shows that the numbers and "/" in each of the status bar items are different colors, and the idea is that depending on how many of an item [% of maximum, or having 0 or all of that item's maximum] that the first number on top of each item is a different color (dark-red, orange, yellow, green, blue from 0% to full of the item).
Also note that on the right side [the other part that's not darkened], the fullscreen display is being used to show the item selected and it's current / max amounts, they also have a similar coloring system, where the top number's color is based on having 0, a % of, or the max of that item.

This is taken with 4.6pre16.

The bottom half of the image is from 4.6pre-20, after the Raze backend update. First note that the fullscreen display of the current item is still working as it should, with the top color still blue [indicating that you have the max of that item currently], however the status bar fonts are now ALL showing green instead of being translated, numbers and "/" character alike. Checking the font images I'm using for this, the "green" color is the "default" color for the font characters in my files, and all of the images for the font are 16million color PNGs, however the images for the font on the right side which uses the fullscreen rendering, those images are ALSO 16m color PNG files, and they still translate colors the way they did in 4.6pre-16.

Now, I tried messing with the palettes of the font images that the statusbar uses themselves, but that didn't seem to change their outputs in game. I also noticed when I load a game, for like one tic, the old colors on the Statusbar show, but then go untranslated (this turning green in the display).

I have reason to believe the change is connected to lines 189, 191, 215 and 217 of "src/common/2d/v_drawtext.cpp", where there are changes like
Code: Select allExpand view
bool palettetrans = (normalcolor == CR_UNDEFINED && parms.TranslationId != 0);
and
Code: Select allExpand view
if (!palettetrans) parms.TranslationId = redirected ? -1 : font->GetColorTranslation((EColorRange)normalcolor, &color);


I have no idea how or what I can do to change my font-character images [if need be] for the new code to allow translations on them again, or if this is an oversight bug on the engine's behalf. x.x

If you really want the statusbar code I use, I'll see what I can do, but isolating some stuff from the mod might be tricky because I have to figure out all the images to keep and how to make the statusbar code work independent of the mod itself, hence why I haven't yet put a download for anything.
User avatar
Lord Misfit
Servant of Aetherius? Servant of Siel?
 
Joined: 27 Dec 2006
Location: Canton, OH
Discord: Lord Misfit#9594

Re: [g9925cc380] Raze Backend update breaks drawing

Postby Accensus » Sun Dec 06, 2020 7:21 am

Add another affected mod to the list. Each time I launch the game the font looks funky in a different way, but funky nonetheless. Strangely enough this is only the case with the HUD. The color options use the same font as the HUD and those look fine.
Image
User avatar
Accensus
Vector, locked in.
 
Joined: 11 Feb 2016
Location: Somalia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [g9925cc380] Raze Backend update breaks drawing

Postby Rachael » Sun Dec 06, 2020 9:16 am

Add another one to the list.



Yes, that's bare bones Hexen.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [g9925cc380] Raze Backend update breaks drawing

Postby Graf Zahl » Sun Dec 06, 2020 9:16 am

Looks like there's some uninitialized alpha being used.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [g9925cc380] Raze Backend update breaks drawing

Postby Graf Zahl » Fri Dec 11, 2020 4:11 am

Fixed. There was a parameter missing in DrawString's declaration, switching off the JIT in the debugger immediately prompted an error.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest