mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
- factor in xdimenscale and viewingrangerecip when calculating renderSetVisibility().
* Changes performed in0bd460d9e3
didn't take into account xdimenscale and viewingrangerecip like the days of old and this wasn't picked up ind80a32d379
ord80a32d379
, where the applied fixes only appeared to work because they worked for me at 2560x1440p.
This commit is contained in:
parent
fc017f5868
commit
bbacc9e816
3 changed files with 3 additions and 2 deletions
|
@ -108,5 +108,6 @@ EDUKE32_STATIC_ASSERT(DAMETH_NARROW_MASKPROPS(DAMETH_MASKPROPS) == DAMETH_MASK);
|
||||||
|
|
||||||
extern float fcosglobalang, fsinglobalang;
|
extern float fcosglobalang, fsinglobalang;
|
||||||
extern float fxdim, fydim, fydimen, fviewingrange;
|
extern float fxdim, fydim, fydimen, fviewingrange;
|
||||||
|
extern int32_t viewingrangerecip;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ static int32_t globaluclip, globaldclip;
|
||||||
//char globparaceilclip, globparaflorclip;
|
//char globparaceilclip, globparaflorclip;
|
||||||
|
|
||||||
int32_t xyaspect;
|
int32_t xyaspect;
|
||||||
static int32_t viewingrangerecip;
|
int32_t viewingrangerecip;
|
||||||
|
|
||||||
static char globalxshift, globalyshift;
|
static char globalxshift, globalyshift;
|
||||||
static int32_t globalxpanning, globalypanning;
|
static int32_t globalxpanning, globalypanning;
|
||||||
|
|
|
@ -266,7 +266,7 @@ static void polymost_updaterotmat(void)
|
||||||
};
|
};
|
||||||
multiplyMatrix4f(matrix, tiltmatrix);
|
multiplyMatrix4f(matrix, tiltmatrix);
|
||||||
renderSetViewMatrix(matrix);
|
renderSetViewMatrix(matrix);
|
||||||
renderSetVisibility(((float)(g_visibility) / r_ambientlight) * fviewingrange * (7.5f / (65536.f * 65536.f)));
|
renderSetVisibility(mulscale16(g_visibility, mulscale16(xdimenscale, viewingrangerecip)) * fviewingrange * (1.f / (65536.f * 65536.f)) / r_ambientlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void polymost_flatskyrender(vec2f_t const* const dpxy, int32_t const n, int32_t method, const vec2_16_t& tilesiz);
|
static void polymost_flatskyrender(vec2f_t const* const dpxy, int32_t const n, int32_t method, const vec2_16_t& tilesiz);
|
||||||
|
|
Loading…
Reference in a new issue