From: Mikko Rasa Date: Mon, 14 Dec 2015 22:39:15 +0000 (+0200) Subject: Apply some extra distance in case of bulging curvature X-Git-Url: http://git.tdb.fi/?p=geometrycompositor.git;a=commitdiff_plain;h=c9663d9934d9f5d357428666fc318c026c142408 Apply some extra distance in case of bulging curvature It doesn't work perfectly for spherical curvature, but reasaonably enough with values that are likely to be of practical use. --- diff --git a/source/main.c b/source/main.c index b7bd8a3..c6f7c3f 100644 --- a/source/main.c +++ b/source/main.c @@ -627,6 +627,8 @@ void update_monitor_vertices(CompositedScreen *screen, CompositedMonitor *monito sin_ksv = monitor->keystone_vertical/sqrt(1.0f+monitor->keystone_vertical*monitor->keystone_vertical); cos_ksv = sqrt(1.0f-sin_ksv*sin_ksv); distance = monitor->perspective+sin_ksv*((sin_ksv>0)-monitor->vertical_center)/aspect; + if(monitor->curvature_depth<0) + distance += -monitor->curvature_depth; eye[0] = 0.0f; eye[1] = (monitor->vertical_center-0.5f)/aspect+sin_ksv*distance;