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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user