Fix Vulkan shader errors by not using nested definitions

This commit is contained in:
Phillip Stephens 2016-07-10 11:44:33 -07:00
parent bc170f1dc0
commit bc91e4597d
1 changed files with 7 additions and 6 deletions

View File

@ -96,13 +96,14 @@ std::string GLSL::GenerateVertUniformStruct(unsigned skinSlots, unsigned texMtxs
skinSlots, skinSlots); skinSlots, skinSlots);
if (texMtxs) if (texMtxs)
{ {
retval += hecl::Format("UBINDING1 uniform HECLTexMtxUniform\n" retval += hecl::Format("struct HECLTCGMatrix\n"
"{\n" "{\n"
" struct\n" " mat4 mtx;\n"
" {" " mat4 postMtx;\n"
" mat4 mtx;\n" "};\n"
" mat4 postMtx;\n" "UBINDING1 uniform HECLTexMtxUniform\n"
" } texMtxs[%u];\n" "{\n"
" HECLTCGMatrix texMtxs[%u];\n"
"};\n", texMtxs); "};\n", texMtxs);
} }