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

[BUG] GZDoom misalignes/stretches sky texture with heights above 240 pixels #2904

Open
1 task done
Meerschweinmann opened this issue Jan 19, 2025 · 4 comments
Open
1 task done

Comments

@Meerschweinmann
Copy link

GZDoom version

4.14.0

Which game are you running with GZDoom?

Doom

What Operating System are you using?

Windows 11

Please describe your specific OS version

Windows 11 pro

Relevant hardware info

AMD Ryzen 6850HS

Have you checked that no other similar issue already exists?

  • I have searched and not found similar issues.

A clear and concise description of what the bug is.

I have been working on tall and animated vanilla skies.

It seems that GZDoom has problems with the alignement when the texture is above 240 pixels height.
When the texture has 240 pixels height it aligns like the vanilla textures.

When the texture is one pixel above 240 pixels height it begins to stretch the sky vertically.
It does not matter if the height is 241 or above 400 pixels, the stretch is the same.

Here are two demo WADs for E3M1, because you start in an open area where the sky can be seen without moving.
One file contains a 240pixel heigh sky texture and the other a 468 pixel high sky texture:

GZ_E3M1_sky_test.zip

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Load GZDoom with one of the files.
  2. Start E3M1
  3. Do it again with the other file and compare :)
  4. You can confirm with the Vanilla DOOM texture too.

Your configuration

Provide a Log

No response

@Meerschweinmann Meerschweinmann changed the title [BUG] GZDoom misalignes sky texture with heights above 240 pixels [BUG] GZDoom misalignes/stretches sky texture with heights above 240 pixels Jan 19, 2025
@Meerschweinmann
Copy link
Author

Meerschweinmann commented Jan 20, 2025

Update after counting pixels.

When the sky texture has 240 pixels height, GZDoom shows 216 pixels sky area from upper to lower screen border.

When the sky texture has more then 240 pixels height (tested 241 and 512 pixels height), GZDoom shows only 192 pixels sky area from upper to lower screen border.

Both tests with hardware accelerated renderer.

@Meerschweinmann
Copy link
Author

Meerschweinmann commented Jan 20, 2025

One thing i have noticed after playing around with the different renderers and the sky texture i have to count pixels.

The software renderer shows 540 pixel high sky textures. The hardware accelerated only 480 pixel high textures.

That is factor 1.125 more then the hardware renderer can show.

Is it a coincidence that the sky from my message before is stretched by factor 1.125 too when using textures higher 240 pixels?
216 pixels viewable height vs 192 is factor 1.125 too.

Is it possible that the reason of this sky texture stretch with textures higher 240 is that the hardware renderers maximum sky height should be 540 pixels height for the sky sphere, like the software renderer does, instead of 480?

@Meerschweinmann
Copy link
Author

Meerschweinmann commented Jan 20, 2025

Here is the E1M1 WAD that helps me counting sky heights. The texture was originally in a Doomworld thread from user ukiro, but i extended it to 544 pixels height for testing source ports sky behavior.

When editing the TEXTURE1 lump's SKY1 texture you can test different heights.

The test room is in map slot E1M1

SKYTEST_544_E1M1.zip

@Meerschweinmann
Copy link
Author

Meerschweinmann commented Feb 28, 2025

While i had played around with how to align GLDEFS skyboxes in Blender to make a skybox template, i found out something about the "sky textures higher 240 pixels problem".

It is definitively a different stretch when the texture is bigger then 240 pixels. Not, as previously suspected, that it could be that the renderer should show 540 pixels instead of 480.

In both cases, texture 240 pixels and bigger 240 pixels, the total height GZDoom shows mouselook up to down is 480 pixels. But texture bigger 240 pixels is differently stretched.

For this test i used a texture that is 240 pixels high, and then the same texture copied 3 times above resulting in a 720 pixel high texture.

240 pixels high:

Image
Image
Image

Bigger 240 pixels:

Image
Image
Image

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

No branches or pull requests

2 participants