1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-01-17 21:09:00 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1928,6 +1928,13 @@ struct Level : IGame {
s.z -= s.x;
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;
}