MadDeCoDeR / Classic-RBDOOM-3-BFG

DOOM: BFA (Big Freaking Anniversary) Edition (former Classic RBDoom 3 BFG) is a source port based on RBDOOM-3-BFG and enchance the experience of Ultimate DOOM, DOOM 2 and DOOM 3.
GNU General Public License v3.0
211 stars 22 forks source link

Setting r_clear to RGB Value Causes Clear Color to be White, Affects Load Screen #132

Closed mmillar-bolis closed 10 months ago

mmillar-bolis commented 10 months ago

Describe the Bug: Under default circumstances, r_clear is set to 2 (black). According to documentation and comment output at the console, r_clear has three options:

  1. 1 - Purple
  2. 2 - Black
  3. rgb - Three space-separated integer values, each between 0-255, to specify a custom color.

Setting an RGB value doesn't appear to function correctly. Any RGB value given results in the Clear color turning white.

To Reproduce: Steps to reproduce the behavior:

  1. Set r_clear to an RGB value, either as a command line option, or in autoexec.cfg, or at any point that the console is accessible.
  2. Set screen width to a ratio that exceeds 16:9.
  3. Load a level and use noclip to peer outside of the level geometry.

Expected Behavior: Setting r_clear to an example value of 192 192 192 should produce a gray background.

Optionally, it would be nice if the Clear value did not affect the borders of the Loading Screen when using a display ratio other than 16:9.

Screenshots: screenshot001 screenshot002

Desktop:

mmillar-bolis commented 10 months ago

Hey, just letting you know I tried Nightly build fb6fdaf and the RGB values worked perfectly!

If the load screen background is out of scope, just let me know and I'll close the issue out.

MadDeCoDeR commented 10 months ago

How did you achieve that? The loading screen was supposed to fill the whole screen. I suppose it's using the clear color you set it to use. NOTE: the r_clear color sets the clear color for the whole renderer

mmillar-bolis commented 10 months ago

How did you achieve that?

Oddly enough, I haven't changed any settings related to aspect ratio. My display's native resolution is 2560x1080 and the program appears to detect that and automatically set r_vidMode accordingly, as far as I can tell. On my display, the program has only ever displayed loading screens in the above manner.

Out of curiosity, I dumped a loading screen image, arbitrarily picking maps/admin.resources and from it extracting /generated/images/guis/assets/loadscreens/admin#__0200.bimage. The resolution of that loading screen image is 900x480 which is an aspect ratio of 15:8.

In the screenshot above, I was not running the program in fullscreen mode, but with set r_fullscreen 0; set r_windowWidth 2560; set r_windowHeight 1024. The loading screen image is sized up to 1920x1024 which is also a 15:8 aspect ratio.

I'm not sure, but perhaps you have the loading screen images only stretch to fill a vertical bounds but not a horizontal? I'm honestly asking as I have no idea why the loading screen maintains it's native aspect ratio on my display, rather than stretch the image to fill all of the horizontal space.


The r_clear color sets the clear color for the whole renderer

Okay, so the engine renderer handles drawing the loading screen, that makes sense. Yeah, I assumed as well that it's just using the clear color that I set. If the loading screen background being the clear color is not something that can or should be changed, I have already come up with an easy workaround for myself by just keeping set r_clear 2 and wrapping noclip:

set _noclip_wrapper_on "noclip 1; set r_clear 32 32 32; set noclip_wrapper vstr _noclip_wrapper_off"
set _noclip_wrapper_off "noclip 0; set r_clear 2; set noclip_wrapper vstr _noclip_wrapper_on"
set noclip_wrapper "vstr _noclip_wrapper_on"

Works great; Easy-peasy. :)


So, are you concerned about the loading screen image not horizontally stretching on 2560x1080 displays, or should I go ahead and close this issue since it's otherwise perfectly resolved?

MadDeCoDeR commented 10 months ago

When it's done check the nightly build of the commit 7cadbd00e3b835f475382d748017032a776a51eb

mmillar-bolis commented 10 months ago

Just tried 7cadbd0! Now that is very cool; everything is nice and dark on the loading screen, but I can still peek outside of levels with noclip. Hey, thanks again!