diff options
author | Peter Kim <pk15950@gmail.com> | 2021-08-16 05:46:09 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2021-08-16 05:46:09 +0300 |
commit | eb278f5e12cf9db9664a89ed10902fb891846afe (patch) | |
tree | 3a4db029ab7a69fff2598016440148655043e21e /intern/ghost/GHOST_Types.h | |
parent | 899935d5d02463187617d1adc5f0c0f41fe56265 (diff) |
XR: Color Depth Adjustments
This addresses reduced visibility of scenes (as displayed in the VR
headset) that can result from the 8-bit color depth format currently
used for XR swapchain images.
By switching to a swapchain format with higher color depth (RGB10_A2,
RGBA16, RGBA16F) for supported runtimes, visibility in VR should be
noticeably improved.
However, current limitations are lack of support for these higher
color depth formats by some XR runtimes, especially for OpenGL.
Also important to note that GPU_offscreen_create() now explicitly
takes in the texture format (eGPUTextureFormat) instead of a
"high_bitdepth" boolean.
Reviewed By: Julian Eisel, Clément Foucault
Differential Revision: http://developer.blender.org/D9842
Diffstat (limited to 'intern/ghost/GHOST_Types.h')
-rw-r--r-- | intern/ghost/GHOST_Types.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index fb19b9535ad..e46f712cb64 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -669,6 +669,14 @@ typedef struct { void *exit_customdata; } GHOST_XrSessionBeginInfo; +/** Texture format for XR swapchain. */ +typedef enum GHOST_TXrSwapchainFormat { + GHOST_kXrSwapchainFormatRGBA8, + GHOST_kXrSwapchainFormatRGBA16, + GHOST_kXrSwapchainFormatRGBA16F, + GHOST_kXrSwapchainFormatRGB10_A2, +} GHOST_TXrSwapchainFormat; + typedef struct GHOST_XrDrawViewInfo { int ofsx, ofsy; int width, height; @@ -681,6 +689,7 @@ typedef struct GHOST_XrDrawViewInfo { float angle_up, angle_down; } fov; + GHOST_TXrSwapchainFormat swapchain_format; /** Set if the buffer should be submitted with a SRGB transfer applied. */ char expects_srgb_buffer; |