From 887bd1bd76f544bc775533d2ec39146105253bc4 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Thu, 20 Sep 2018 18:53:00 +0300 Subject: [PATCH] non-sRGB gamma correction post fix for VR mode --- src/app.cc | 6 ++++++ src/post.cc | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app.cc b/src/app.cc index a116e68..3a77eef 100644 --- a/src/app.cc +++ b/src/app.cc @@ -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(); } diff --git a/src/post.cc b/src/post.cc index 885a212..a4d13cf 100644 --- a/src/post.cc +++ b/src/post.cc @@ -16,7 +16,6 @@ void slow_post(unsigned int sdr) glPushAttrib(GL_ENABLE_BIT); glDisable(GL_DEPTH_TEST); - glDisable(GL_LIGHTING); glUseProgram(sdr); -- 1.7.10.4