diff --git a/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp b/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp index 838c078e3..e0de225dc 100644 --- a/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp +++ b/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp @@ -878,8 +878,16 @@ PPCustomShaderInstance::PPCustomShaderInstance(PostProcessShader *desc) : Desc(d // Setup pipeline FString pipelineInOut; - pipelineInOut += "layout(location=0) in vec2 TexCoord;\n"; - pipelineInOut += "layout(location=0) out vec4 FragColor;\n"; + if (screen->IsVulkan()) + { + pipelineInOut += "layout(location=0) in vec2 TexCoord;\n"; + pipelineInOut += "layout(location=0) out vec4 FragColor;\n"; + } + else + { + pipelineInOut += "in vec2 TexCoord;\n"; + pipelineInOut += "out vec4 FragColor;\n"; + } FString prolog; prolog += uniformTextures; diff --git a/src/rendering/vulkan/system/vk_framebuffer.h b/src/rendering/vulkan/system/vk_framebuffer.h index 98d8c9412..05302da13 100644 --- a/src/rendering/vulkan/system/vk_framebuffer.h +++ b/src/rendering/vulkan/system/vk_framebuffer.h @@ -63,6 +63,7 @@ public: VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev); ~VulkanFrameBuffer(); + bool IsVulkan() override { return true; } void Update(); diff --git a/src/v_video.h b/src/v_video.h index d1178d4c0..823af8b4b 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -381,6 +381,7 @@ public: DFrameBuffer (int width=1, int height=1); virtual ~DFrameBuffer(); virtual void InitializeState() = 0; // For stuff that needs 'screen' set. + virtual bool IsVulkan() { return false; } void SetSize(int width, int height); void SetVirtualSize(int width, int height)