- fix render visibility calculation following changes in 0bd460d9e3.

* Output from PrintVis() in 9dfd3ddd02 showed resulting global visibility as 0.078125.
* Following 0bd460d9e3, resulting global visibility shown as 0.041667.
* Scaling g_visibility by (8.f / 15.f) (0.533333) restores resulting global visibility to 0.078125.
This commit is contained in:
Mitchell Richters 2020-06-21 14:08:09 +10:00 committed by Christoph Oelckers
parent 3325ef272e
commit d80a32d379

View file

@ -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 * (4.f / (65536.f * 65536.f))); renderSetVisibility(((float)(g_visibility) / (8.f / 15.f) / r_ambientlight) * fviewingrange * (4.f / (65536.f * 65536.f)));
} }
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);