Skip to content

Commit

Permalink
Further sky stretching fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed May 11, 2023
1 parent 0c63826 commit 4789064
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/r_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,11 @@ static void do_draw_plane(visplane_t *pl)
// [FG] stretch short skies
if (stretchsky && dc_texheight < 200)
{
dc_iscale = dc_iscale * dc_texheight / SKYSTRETCH_HEIGHT;
dc_texturemid = dc_texturemid * dc_texheight / SKYSTRETCH_HEIGHT;
// [Nugget] Adjust sky stretching based on FOV
int skystretch_height = SKYSTRETCH_HEIGHT + (87 * BETWEEN(0, MAXFOV-ORIGFOV, fov-ORIGFOV) / (MAXFOV-ORIGFOV));

dc_iscale = dc_iscale * dc_texheight / skystretch_height;
dc_texturemid = dc_texturemid * dc_texheight / skystretch_height;
colfunc = R_DrawColumn;
}
else
Expand Down

0 comments on commit 4789064

Please sign in to comment.