From 15c1a7636164567fd0d324003fe8848f8247f0a6 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Fri, 7 May 2021 23:19:04 +1000 Subject: Add stereoscopic rendering through multiview --- modules/glslang/register_types.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/glslang') diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index 8979eabfc3..730c6b89f7 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -116,6 +116,10 @@ static Vector _compile_shader_glsl(RenderingDevice::ShaderStage p_stage } } + if (p_capabilities->supports_multiview) { + preamble += "#define has_VK_KHR_multiview 1\n"; + } + if (preamble != "") { shader.setPreamble(preamble.c_str()); } -- cgit v1.2.3