mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 22:27:41 +00:00
Add postMtx to uniform, update athena
This commit is contained in:
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: 4e61051354...46e5d76fd3
@@ -87,7 +87,8 @@ std::string HLSL::GenerateVertUniformStruct(unsigned skinSlots, unsigned texMtxs
|
|||||||
" float4x4 proj;\n",
|
" float4x4 proj;\n",
|
||||||
skinSlots, skinSlots);
|
skinSlots, skinSlots);
|
||||||
if (texMtxs)
|
if (texMtxs)
|
||||||
retval += hecl::Format(" float4x4 texMtxs[%u];\n", texMtxs);
|
retval += hecl::Format(" float4x4 texMtxs[%u];\n"
|
||||||
|
" float4x4 postMtxs[%u];\n", texMtxs, texMtxs);
|
||||||
return retval + "};\n";
|
return retval + "};\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,8 +138,8 @@ std::string HLSL::makeVert(unsigned col, unsigned uv, unsigned w,
|
|||||||
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] = mul(texMtxs[%u], %s).xy;\n", tcgIdx, tcg.m_mtx,
|
retval += hecl::Format(" vtf.tcgs[%u] = mul(postMtxs[%u], mul(texMtxs[%u], %s)).xy;\n", tcgIdx, 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,6 +213,7 @@ std::string HLSL::makeFrag(const ShaderFunction& lighting,
|
|||||||
postSrc +
|
postSrc +
|
||||||
"\nfloat4 main(in VertToFrag vtf) : SV_Target0\n{\n";
|
"\nfloat4 main(in VertToFrag vtf) : SV_Target0\n{\n";
|
||||||
|
|
||||||
|
|
||||||
if (m_lighting)
|
if (m_lighting)
|
||||||
{
|
{
|
||||||
if (lighting.m_entry)
|
if (lighting.m_entry)
|
||||||
|
|||||||
Reference in New Issue
Block a user