Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Skybox and FOV thingy #2209

Open
JS299990 opened this issue Feb 21, 2025 · 8 comments
Open

[Feature Request] Skybox and FOV thingy #2209

JS299990 opened this issue Feb 21, 2025 · 8 comments

Comments

@JS299990
Copy link

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.

@elf-alchemist
Copy link
Contributor

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/

@MrAlaux
Copy link
Collaborator

MrAlaux commented Feb 21, 2025

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:

2025-02-21.20-03-39-1.mp4
More previews

Image

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

Image

@fabiangreffrath
Copy link
Owner

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?

@MrAlaux
Copy link
Collaborator

MrAlaux commented Feb 22, 2025

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.

@fabiangreffrath
Copy link
Owner

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
Copy link
Owner

Bildschirmaufzeichnung.vom.2025-02-22.13-54-22.mp4

@MrAlaux
Copy link
Collaborator

MrAlaux commented Feb 22, 2025

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
Copy link
Collaborator

MrAlaux commented Feb 22, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants