Enable include directive and use the latest version of glsl, if available
This commit is contained in:
parent
dfae2a25b0
commit
e9620e64a4
1 changed files with 2 additions and 1 deletions
|
|
@ -116,7 +116,8 @@ FString VkPPShader::LoadShaderCode(const FString &lumpName, const FString &defin
|
|||
FString code = GetStringFromLump(lump);
|
||||
|
||||
FString patchedCode;
|
||||
patchedCode.AppendFormat("#version %d\n", 450);
|
||||
patchedCode.AppendFormat("#version %d core\n", fb->GetDevice()->Instance->ApiVersion >= VK_API_VERSION_1_2 ? 460 : 450);
|
||||
patchedCode << "#extension GL_GOOGLE_include_directive : enable\n";
|
||||
patchedCode << defines;
|
||||
patchedCode << "#line 1\n";
|
||||
patchedCode << code;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue