mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-04 15:55:51 +00:00
Fix TexMtx uniform for GLSL
This commit is contained in:
parent
e2523d1268
commit
bc170f1dc0
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 44e8317d49cd5be5776a48ebc9715495cb47552a
|
Subproject commit 1d02741879d7d8c956ce2c5ace31048ae790a6d3
|
@ -98,9 +98,12 @@ std::string GLSL::GenerateVertUniformStruct(unsigned skinSlots, unsigned texMtxs
|
|||||||
{
|
{
|
||||||
retval += hecl::Format("UBINDING1 uniform HECLTexMtxUniform\n"
|
retval += hecl::Format("UBINDING1 uniform HECLTexMtxUniform\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" mat4 mtx;\n"
|
" struct\n"
|
||||||
" mat4 postMtx;\n"
|
" {"
|
||||||
"} texMtxs[%u];\n", texMtxs);
|
" mat4 mtx;\n"
|
||||||
|
" mat4 postMtx;\n"
|
||||||
|
" } texMtxs[%u];\n"
|
||||||
|
"};\n", texMtxs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@ -151,7 +154,7 @@ std::string GLSL::makeVert(const char* glslVer, unsigned col, unsigned uv, unsig
|
|||||||
retval += hecl::Format(" vtf.tcgs[%u] = %s;\n", tcgIdx,
|
retval += hecl::Format(" vtf.tcgs[%u] = %s;\n", tcgIdx,
|
||||||
EmitTexGenSource2(tcg.m_src, tcg.m_uvIdx).c_str());
|
EmitTexGenSource2(tcg.m_src, tcg.m_uvIdx).c_str());
|
||||||
else
|
else
|
||||||
retval += hecl::Format(" vtf.tcgs[%u] = (texMtxs[%u].postMtx * normalize(texMtxs[%u].mtx * %s)).xy;\n", tcgIdx, tcg.m_mtx,
|
retval += hecl::Format(" vtf.tcgs[%u] = normalize((texMtxs[%u].postMtx * (texMtxs[%u].mtx * %s)).xy);\n", tcgIdx, tcg.m_mtx,
|
||||||
tcg.m_mtx, EmitTexGenSource4(tcg.m_src, tcg.m_uvIdx).c_str());
|
tcg.m_mtx, EmitTexGenSource4(tcg.m_src, tcg.m_uvIdx).c_str());
|
||||||
++tcgIdx;
|
++tcgIdx;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user