mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- set proper visibility factor and viewport.
This commit is contained in:
parent
b492cbcebb
commit
65097c4098
2 changed files with 4 additions and 2 deletions
|
@ -270,7 +270,8 @@ static void polymost_updaterotmat(void)
|
|||
};
|
||||
multiplyMatrix4f(matrix, tiltmatrix);
|
||||
renderSetViewMatrix(matrix);
|
||||
renderSetVisibility(MulScale(g_visibility, MulScale(xdimenscale, viewingrangerecip, 16), 16) * fviewingrange * (1.f / (65536.f * 65536.f)) / r_ambientlight);
|
||||
float fxdimen = FixedToFloat(xdimenscale);
|
||||
renderSetVisibility(g_visibility * fxdimen * (1.f / (65536.f)) / r_ambientlight);
|
||||
}
|
||||
|
||||
const vec2_16_t tileSize(size_t index)
|
||||
|
|
|
@ -661,11 +661,12 @@ void render_drawrooms(vec3_t& position, int sectnum, fixed_t q16angle, fixed_t q
|
|||
rotation.Yaw = -90.f + q16ang(q16angle).asdeg();
|
||||
rotation.Pitch = -HorizToPitch(q16horizon);
|
||||
rotation.Roll = rollang;
|
||||
GLInterface.SetViewport(windowxy1.x, windowxy1.y, windowxy2.x - windowxy1.x + 1, windowxy2.y - windowxy1.y + 1);
|
||||
SetProjection(rotation, fov);
|
||||
SetViewMatrix(rotation, position.x / 16.f, -position.y / 16.f, -position.z / 256.f, mirror, planemirror);
|
||||
|
||||
renderSetViewpoint(position.x / 16.f, -position.y / 16.f, -position.z / 256.f);
|
||||
renderSetVisibility((1.f / (65536.f * 65536.f)) * g_visibility / r_ambientlight);// MulScale(g_visibility, MulScale(xdimenscale * viewingrangerecip * fviewingrange / r_ambientlight);
|
||||
renderSetVisibility((2 / 65536.f) * g_visibility / r_ambientlight); // (2 / 65536.f) is a magic factor to produce the same brightness as Polymost.
|
||||
renderBeginScene();
|
||||
|
||||
Clipper clipper;
|
||||
|
|
Loading…
Reference in a new issue