summaryrefslogtreecommitdiff
path: root/modules/glslang
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-05-07 23:19:04 +1000
committerBastiaan Olij <mux213@gmail.com>2021-06-13 22:52:20 +1000
commit15c1a7636164567fd0d324003fe8848f8247f0a6 (patch)
tree767d594d4d5cc01a103f347a514081959af3aa9d /modules/glslang
parent600b4c9c7b11622e4eb5ed1e5fd70b3d3f66170e (diff)
Add stereoscopic rendering through multiview
Diffstat (limited to 'modules/glslang')
-rw-r--r--modules/glslang/register_types.cpp4
1 files changed, 4 insertions, 0 deletions
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<uint8_t> _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());
}