Skip to content

Commit 8ad13ff

Browse files
committed
MP1 material fix after MP3 refactor
1 parent dfc9d1d commit 8ad13ff

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/Core/Resource/CMaterialPass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ void CMaterialPass::HashParameters(CFNV1A& rHash)
7979
rHash.HashLong(mKColorSel);
8080
rHash.HashLong(mKAlphaSel);
8181
rHash.HashLong(mRasSel);
82-
rHash.HashLong(mTevColorScale);
83-
rHash.HashLong(mTevAlphaScale);
82+
rHash.HashFloat(mTevColorScale);
83+
rHash.HashFloat(mTevAlphaScale);
8484
rHash.HashLong(mTexCoordSource);
8585
rHash.HashLong((uint) mAnimMode);
8686
rHash.HashData(mAnimParams, sizeof(float) * 8);

src/Core/Resource/Factory/CMaterialLoader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ CMaterial* CMaterialLoader::ReadPrimeMaterial()
7575

7676
// Flags
7777
pMat->mOptions = (mpFile->ReadLong() & (uint) EMaterialOption::AllMP1Settings);
78+
pMat->mOptions.SetFlag(EMaterialOption::ColorWrite);
7879

7980
// Textures
8081
uint32 NumTextures = mpFile->ReadLong();

src/Core/Resource/Factory/CMaterialLoader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <Common/FileIO.h>
99
#include <assimp/scene.h>
1010

11+
#include <optional>
12+
1113
enum class EMP3RenderConfig
1214
{
1315
NoBloomTransparent,

0 commit comments

Comments
 (0)