diff --git a/gnome/src/virtualmonitorsactor.js b/gnome/src/virtualmonitorsactor.js index 007853c..e446112 100644 --- a/gnome/src/virtualmonitorsactor.js +++ b/gnome/src/virtualmonitorsactor.js @@ -562,9 +562,9 @@ export const VirtualMonitorEffect = GObject.registerClass({ // project the vector onto a flat surface, return it's vertical position relative to the vertical fov, where 0.0 is // the top and 1.0 is the bottom. vectors that project outside the vertical range of the display will have values - // outside this range. + // outside this range, but capped float vectorToScanline(float fovVerticalRadians, vec3 v) { - return 1.0 - (-v.y / (tan(fovVerticalRadians / 2.0) * v.z) + 1.0) / 2.0; + return clamp(1.0 - (-v.y / (tan(fovVerticalRadians / 2.0) * v.z) + 1.0) / 2.0, -0.5, 1.5); } `;