mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-19 18:05:52 +00:00
Depth buffer fix
This commit is contained in:
parent
b175df5154
commit
58c85d8c30
@ -453,6 +453,7 @@ bool PAKRouter<BRIDGETYPE>::extractResources(const BRIDGETYPE& pakBridge, bool f
|
|||||||
if (extractor.weight != w)
|
if (extractor.weight != w)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* This is used to ensure parallel extracts won't collide files */
|
/* This is used to ensure parallel extracts won't collide files */
|
||||||
if (precedenceSharesOnly)
|
if (precedenceSharesOnly)
|
||||||
{
|
{
|
||||||
@ -466,6 +467,7 @@ bool PAKRouter<BRIDGETYPE>::extractResources(const BRIDGETYPE& pakBridge, bool f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string bestName = getBestEntryName(*item);
|
std::string bestName = getBestEntryName(*item);
|
||||||
hecl::SystemStringView bestNameView(bestName);
|
hecl::SystemStringView bestNameView(bestName);
|
||||||
|
@ -738,7 +738,7 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read and make RGBA */
|
/* Read and make RGBA */
|
||||||
for (png_uint_32 r=0 ; r<height ; ++r)
|
for (int r=height-1 ; r>=0 ; --r)
|
||||||
{
|
{
|
||||||
png_read_row(pngRead, rowBuf.get(), nullptr);
|
png_read_row(pngRead, rowBuf.get(), nullptr);
|
||||||
switch (colorType)
|
switch (colorType)
|
||||||
|
@ -59,6 +59,7 @@ void ViewManager::ParticleView::resized(const boo::SWindowRect& root, const boo:
|
|||||||
|
|
||||||
void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
||||||
{
|
{
|
||||||
|
gfxQ->clearTarget(false, true);
|
||||||
if (m_vm.m_modelTest.IsLoaded())
|
if (m_vm.m_modelTest.IsLoaded())
|
||||||
{
|
{
|
||||||
CModelFlags flags;
|
CModelFlags flags;
|
||||||
|
@ -119,6 +119,7 @@ void CGraphics::SetViewMatrix()
|
|||||||
/* Load position matrix */
|
/* Load position matrix */
|
||||||
/* Inverse-transpose */
|
/* Inverse-transpose */
|
||||||
g_GXModelViewInvXpose = g_GXModelView.inverse();
|
g_GXModelViewInvXpose = g_GXModelView.inverse();
|
||||||
|
g_GXModelViewInvXpose.m_origin.zeroOut();
|
||||||
g_GXModelViewInvXpose.m_basis.transpose();
|
g_GXModelViewInvXpose.m_basis.transpose();
|
||||||
/* Load normal matrix */
|
/* Load normal matrix */
|
||||||
}
|
}
|
||||||
@ -156,16 +157,15 @@ zeus::CMatrix4f CGraphics::CalculatePerspectiveMatrix(float fovy, float aspect,
|
|||||||
|
|
||||||
zeus::CMatrix4f CGraphics::GetPerspectiveProjectionMatrix()
|
zeus::CMatrix4f CGraphics::GetPerspectiveProjectionMatrix()
|
||||||
{
|
{
|
||||||
CProjectionState& ref = g_Proj;
|
|
||||||
float rml = g_Proj.x8_right - g_Proj.x4_left;
|
float rml = g_Proj.x8_right - g_Proj.x4_left;
|
||||||
float rpl = g_Proj.x8_right + g_Proj.x4_left;
|
float rpl = g_Proj.x8_right + g_Proj.x4_left;
|
||||||
float tmb = g_Proj.xc_top - g_Proj.x10_bottom;
|
float tmb = g_Proj.xc_top - g_Proj.x10_bottom;
|
||||||
float tpb = g_Proj.xc_top + g_Proj.x10_bottom;
|
float tpb = g_Proj.xc_top + g_Proj.x10_bottom;
|
||||||
float fmn = g_Proj.x18_far - g_Proj.x14_near;
|
float nmf = g_Proj.x14_near - g_Proj.x18_far;
|
||||||
float fpn = g_Proj.x18_far + g_Proj.x14_near;
|
float fpn = g_Proj.x18_far + g_Proj.x14_near;
|
||||||
return zeus::CMatrix4f(2.f * g_Proj.x14_near / rml, 0.f, rpl / rml, 0.f,
|
return zeus::CMatrix4f(2.f * g_Proj.x14_near / rml, 0.f, rpl / rml, 0.f,
|
||||||
0.f, 2.f * g_Proj.x14_near / tmb, tpb / tmb, 0.f,
|
0.f, 2.f * g_Proj.x14_near / tmb, tpb / tmb, 0.f,
|
||||||
0.f, 0.f, -fpn / fmn, -2.f * g_Proj.x18_far * g_Proj.x14_near / fmn,
|
0.f, 0.f, fpn / nmf, 2.f * g_Proj.x18_far * g_Proj.x14_near / nmf,
|
||||||
0.f, 0.f, -1.f, 0.f);
|
0.f, 0.f, -1.f, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ CModel::CModel(std::unique_ptr<u8[]>&& in, u32 dataLen, IObjectStore* store)
|
|||||||
{
|
{
|
||||||
hecl::Runtime::ShaderTag tag(mat.heclIr,
|
hecl::Runtime::ShaderTag tag(mat.heclIr,
|
||||||
hmdlMeta.colorCount, hmdlMeta.uvCount, hmdlMeta.weightCount,
|
hmdlMeta.colorCount, hmdlMeta.uvCount, hmdlMeta.weightCount,
|
||||||
0, mat.uvAnims.size(), false, false, true);
|
0, mat.uvAnims.size(), true, true, true);
|
||||||
matSet.m_shaders.push_back(CGraphics::g_ShaderCacheMgr->buildShader(tag, mat.heclIr, "CMDL", ctx));
|
matSet.m_shaders.push_back(CGraphics::g_ShaderCacheMgr->buildShader(tag, mat.heclIr, "CMDL", ctx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
hecl
2
hecl
@ -1 +1 @@
|
|||||||
Subproject commit 26f586dbc2a7a614abe0fb5b86bb2bc32c43b5f9
|
Subproject commit 35db2400e471e01014808e51730c091562055035
|
Loading…
x
Reference in New Issue
Block a user