2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:04:55 +00:00

macOS build fixes

This commit is contained in:
Jack Andersen
2019-05-10 13:08:58 -10:00
parent 4554fc06bc
commit bf3ac9e34b
11 changed files with 688 additions and 17 deletions

View File

@@ -84,8 +84,20 @@ static std::string _BuildVS(const SModelShadersInfo& info) {
vertOut << "#define URDE_UV_SLOTS "sv << unsigned(info.m_tag.getUvCount()) << '\n';
vertOut << "#define URDE_SKIN_SLOTS "sv << unsigned(info.m_tag.getSkinSlotCount()) << '\n';
vertOut << "#define URDE_WEIGHT_SLOTS "sv << unsigned(info.m_tag.getWeightCount()) << '\n';
vertOut << "#define URDE_TCG_EXPR "sv;
vertOut << "#define URDE_VERT_DATA_DECL "
"layout(location=0) in vec3 posIn;"
"layout(location=1) in vec3 normIn;"sv;
if (info.m_tag.getColorCount())
vertOut << "layout(location=2) in vec4 colIn["sv << unsigned(info.m_tag.getColorCount()) << "];"sv;
if (info.m_tag.getUvCount())
vertOut << "layout(location="sv << 2 + info.m_tag.getColorCount() <<
") in vec2 uvIn["sv << unsigned(info.m_tag.getUvCount()) << "];"sv;
if (info.m_tag.getWeightCount())
vertOut << "layout(location="sv << 2 + info.m_tag.getColorCount() + info.m_tag.getUvCount() <<
") in vec4 weightIn["sv << unsigned(info.m_tag.getWeightCount()) << "];"sv;
vertOut << "#define URDE_TCG_EXPR "sv;
using UVAnimType = BlendMaterial::UVAnimType;
using PassType = BlendMaterial::PassType;
int mtxIdx = 0;