From 8ad13ff4c9e5c589f6787ce03e5779fa09495154 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 16 Nov 2019 15:42:36 -1000 Subject: [PATCH] MP1 material fix after MP3 refactor --- src/Core/Resource/CMaterialPass.cpp | 4 ++-- src/Core/Resource/Factory/CMaterialLoader.cpp | 1 + src/Core/Resource/Factory/CMaterialLoader.h | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Core/Resource/CMaterialPass.cpp b/src/Core/Resource/CMaterialPass.cpp index 80e7ec66..a79e69d7 100644 --- a/src/Core/Resource/CMaterialPass.cpp +++ b/src/Core/Resource/CMaterialPass.cpp @@ -79,8 +79,8 @@ void CMaterialPass::HashParameters(CFNV1A& rHash) rHash.HashLong(mKColorSel); rHash.HashLong(mKAlphaSel); rHash.HashLong(mRasSel); - rHash.HashLong(mTevColorScale); - rHash.HashLong(mTevAlphaScale); + rHash.HashFloat(mTevColorScale); + rHash.HashFloat(mTevAlphaScale); rHash.HashLong(mTexCoordSource); rHash.HashLong((uint) mAnimMode); rHash.HashData(mAnimParams, sizeof(float) * 8); diff --git a/src/Core/Resource/Factory/CMaterialLoader.cpp b/src/Core/Resource/Factory/CMaterialLoader.cpp index ed7113a8..328bc717 100644 --- a/src/Core/Resource/Factory/CMaterialLoader.cpp +++ b/src/Core/Resource/Factory/CMaterialLoader.cpp @@ -75,6 +75,7 @@ CMaterial* CMaterialLoader::ReadPrimeMaterial() // Flags pMat->mOptions = (mpFile->ReadLong() & (uint) EMaterialOption::AllMP1Settings); + pMat->mOptions.SetFlag(EMaterialOption::ColorWrite); // Textures uint32 NumTextures = mpFile->ReadLong(); diff --git a/src/Core/Resource/Factory/CMaterialLoader.h b/src/Core/Resource/Factory/CMaterialLoader.h index ac92511f..50b376c8 100644 --- a/src/Core/Resource/Factory/CMaterialLoader.h +++ b/src/Core/Resource/Factory/CMaterialLoader.h @@ -8,6 +8,8 @@ #include #include +#include + enum class EMP3RenderConfig { NoBloomTransparent,