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:
parent
bda1f95a14
commit
2b29cdc79a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user