woof icon indicating copy to clipboard operation
woof copied to clipboard

[Feature Request] Skybox and FOV thingy

Open JS299990 opened this issue 1 year ago • 8 comments

Would it be possible to make it so skyboxes scale with FOV? If you play with a FOV higher than the default it will leave gaps in the background, the higher the FOV the bigger the gap.

Here's a low effort screenshot. It's barely noticeable on e1m1 but very noticeable on other maps:

Image

GZDoom added a "fix" for this a little while ago. Looks pretty good.

JS299990 avatar Feb 21 '25 17:02 JS299990

You can check out the height-extended skies from the following project, as well. The latest release goes to the maximum height that Woof supports with freelook.

https://www.doomworld.com/forum/topic/148537-ultra-widerpix854-329-super-ultrawide-assets-and-skies-for-the-doom-and-raven-games/

elf-alchemist avatar Feb 21 '25 17:02 elf-alchemist

You can check out the height-extended skies from the following project, as well.

Needless to say, that isn't a universal solution.

Quick reminder that Nugget has a feature to fix this, which I could port over. See:

https://github.com/user-attachments/assets/5604e1bc-e455-41ef-b3a5-b04abb278175

More previews

Image

Image Notice how the sky is not squished for FOV < 90.

Image

MrAlaux avatar Feb 21 '25 23:02 MrAlaux

This looks indeed quite good (though not perfect, if you look e.g. at the top of the mountain of the left side relative to the menu text). Could you point us to the code or file a PR, please?

fabiangreffrath avatar Feb 22 '25 07:02 fabiangreffrath

Could you point us to the code or file a PR, please?

I'll file a PR myself later. I made other changes to sky stretching that this might rely on, though I doubt it.

MrAlaux avatar Feb 22 '25 07:02 MrAlaux

Isn't this pretty much it?

--- a/src/r_main.c
+++ b/src/r_main.c
@@ -633,7 +633,7 @@ void R_ExecuteSetViewSize (void)
   while (FixedMul(pspriteiscale, pspritescale) < FRACUNIT)
     pspriteiscale++;
 
-  if (custom_fov == FOV_DEFAULT)
+  if (custom_fov >= FOV_DEFAULT)
   {
     skyiscale = FixedDiv(SCREENWIDTH, viewwidth_nonwide);
   }

fabiangreffrath avatar Feb 22 '25 12:02 fabiangreffrath

https://github.com/user-attachments/assets/5d223c57-2356-4d57-a021-8b53e4a38786

fabiangreffrath avatar Feb 22 '25 12:02 fabiangreffrath

Isn't this pretty much it?

--- a/src/r_main.c +++ b/src/r_main.c @@ -633,7 +633,7 @@ void R_ExecuteSetViewSize (void) while (FixedMul(pspriteiscale, pspritescale) < FRACUNIT) pspriteiscale++;

  • if (custom_fov == FOV_DEFAULT)
  • if (custom_fov >= FOV_DEFAULT) { skyiscale = FixedDiv(SCREENWIDTH, viewwidth_nonwide); }

Huh, I never thought of that.

MrAlaux avatar Feb 22 '25 15:02 MrAlaux

Thinking about it more, I believe your patch would always stretch the sky, even if the sky texture is tall enough to accomodate a higher FOV. Do you want that? I personally vouch for stretching skies only as much as necessary.

MrAlaux avatar Feb 22 '25 20:02 MrAlaux