non-sRGB gamma correction post fix for VR mode
[laserbrain_demo] / src / app.cc
index 047c1eb..3a77eef 100644 (file)
@@ -311,8 +311,8 @@ static void update(float dt)
                jmove_lensq -= jdeadsq;
 
                float mag = len * len;
-               dir.x += mag * joy_move.x / len * 2.0 * speed;
-               dir.z += mag * joy_move.y / len * 2.0 * speed;
+               dir.x += mag * joy_move.x / len * speed;
+               dir.z += mag * joy_move.y / len * speed;
        }
        if(jlook_lensq > jdeadsq) {
                float len = sqrt(jlook_lensq);
@@ -562,6 +562,12 @@ void app_display()
                vp_width = win_width;
                vp_height = win_height;
 
+               if(!gfbo && !fb_srgb && sdr_post_gamma) {
+                       glViewport(0, 0, win_width, win_height);
+                       slow_post(sdr_post_gamma);
+                       glUseProgram(0);
+               }
+
                if(should_swap) {
                        app_swap_buffers();
                }