Only define SUPPORTS_RAYTRACING if it was detected

This commit is contained in:
Magnus Norddahl 2022-06-14 03:01:58 +02:00 committed by Christoph Oelckers
parent e0907f62d5
commit 5aa0fb536f

View file

@ -351,6 +351,7 @@ std::unique_ptr<VulkanShader> VkShaderManager::LoadVertShader(FString shadername
std::unique_ptr<VulkanShader> VkShaderManager::LoadFragShader(FString shadername, const char *frag_lump, const char *material_lump, const char *light_lump, const char *defines, bool alphatest, bool gbufferpass)
{
FString code = GetTargetGlslVersion();
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
code << "\n#define SUPPORTS_RAYTRACING\n";
code << defines;
code << "\n$placeholder$"; // here the code can later add more needed #defines.