1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-01 19:00:34 +02:00

Make it so that the function to get the scissor portal rect expands to the size of the viewport if either the width or height exceed the viewport. (#273)

This commit is contained in:
SaracenOne
2020-09-21 20:11:10 +01:00
committed by GitHub
parent bda1f95a14
commit 2b29cdc79a

View File

@@ -1928,6 +1928,13 @@ struct Level : IGame {
s.z -= s.x; s.z -= s.x;
s.w -= s.y; s.w -= s.y;
// Use the viewport rect if one of the dimensions is the same size
// as the viewport. This may fix clipping bugs while still allowing
// impossible geometry tricks.
if (s.z - s.x >= vp.z - vp.x || s.w - s.y >= vp.w - vp.y) {
return vp;
}
return s; return s;
} }