Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
96 stars 9 forks source link

Sky stretching #410

Open nstlaurent opened 3 years ago

nstlaurent commented 3 years ago

The sky is probably stretched a bit too much. Especially noticeable in eviternity where the moon cannot be seen. GZDoom does some stretching, but quite a bit less. Helion: screenshot_Helion_eviternity GZDoom: screenshot_gzdoom_eviternity

Calinou commented 8 months ago

Sky stretching seems to be implemented as of https://github.com/Helion-Engine/Helion/commit/632a0fb93e62bb3eab9c48f8c9e7742c1cadeb05, although gaps are noticeable with FOV values higher than the default. Example with 120°, which exaggerates the issue:

Screenshot_20240108_223659

On this particular spot, the lowest FOV where the issue is noticeable is 101° (on a 16:9 display).

Using mirrorred repeat for the repeated portion of the sky might help make the issue less noticeable.

nstlaurent commented 8 months ago

I see the problem. The sky rendering is still assuming 90 FOV. It wasn't updated to take the configurable FOV into account.

nstlaurent commented 8 months ago

Should be fixed with 45139af

Calinou commented 8 months ago

Should be fixed with 45139af

Works great, thanks!

There's some visible tesselation in the sky with high resolutions if you look closely between the mountains:

Screenshot_20240109_013524

See highlighted areas in red:

Screenshot_20240109_013524a

This can probably be fixed with a higher subdivision level for the sphere, which should only have a very small performance cost.

nstlaurent commented 8 months ago

This is a symptom of using nearest filtering. You would have to change to bilinear or trilinear. I also just noticed that changing the texture filtering in the menu doesn't update the sky until restart so I will need to fix that.

Calinou commented 8 months ago

This is a symptom of using nearest filtering. You would have to change to bilinear or trilinear.

I don't mean the aliasing in the sky texture, but the lack of geometric detail on the sphere used to draw the sky. It's like the sky was drawn in a low-detail sphere where you can see its facets:

nstlaurent commented 8 months ago

It's using 32 points vertical and horizontal which generates 6,144 vertices. Doubling the point count just moves some of the noticeable points but you can still see them if you look. And doubling the point count explodes the vertex count to 24,576. I can see the same thing in GZDoom.