[Bf-blender-cvs] [0615321ca08] soc-2019-openxr: Fix too dark rendering on the Monado runtime

Julian Eisel noreply at git.blender.org
Wed Oct 16 14:39:03 CEST 2019


Commit: 0615321ca085833c6b08b7260f6af0bf21288265
Author: Julian Eisel
Date:   Wed Oct 16 14:35:51 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rB0615321ca085833c6b08b7260f6af0bf21288265

Fix too dark rendering on the Monado runtime

Just like the Windows Mixed Reality runtime, we have to apply a sRGB
OETF to get visually correct-ish looking colors.
We plan to further investigate if it's really WMR and Monado being wrong
here, or if it's Oculus (which doesn't need this additional transform),
but there are some details to check.

===================================================================

M	intern/ghost/intern/GHOST_XrSession.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp
index 1cb321544a2..5ee3045ff37 100644
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@ -428,7 +428,8 @@ static bool ghost_xr_draw_view_expects_srgb_buffer(const GHOST_XrContext *contex
   /* WMR seems to be faulty and doesn't do OETF transform correctly. So expect a SRGB buffer to
    * compensate. You get way too dark rendering without this, it's pretty obvious (even in the
    * default startup scene). */
-  return context->getOpenXRRuntimeID() == OPENXR_RUNTIME_WMR;
+  return (context->getOpenXRRuntimeID() == OPENXR_RUNTIME_WMR) ||
+         (context->getOpenXRRuntimeID() == OPENXR_RUNTIME_MONADO);
 }
 
 void GHOST_XrSession::drawView(XrSwapchain swapchain,



More information about the Bf-blender-cvs mailing list