mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Parse shared part of material files
This commit is contained in:
parent
4a03555d53
commit
124df1be61
@ -6,6 +6,40 @@ namespace Bgsm
|
||||
{
|
||||
void MaterialFile::read(BGSMStream& stream)
|
||||
{
|
||||
stream.read(mVersion);
|
||||
stream.read(mClamp);
|
||||
stream.read(mUVOffset);
|
||||
stream.read(mUVScale);
|
||||
stream.read(mTransparency);
|
||||
stream.read(mAlphaBlend);
|
||||
stream.read(mSourceBlendMode);
|
||||
stream.read(mDestinationBlendMode);
|
||||
stream.read(mAlphaTestThreshold);
|
||||
stream.read(mAlphaTest);
|
||||
stream.read(mDepthWrite);
|
||||
stream.read(mSSR);
|
||||
stream.read(mWetnessControlSSR);
|
||||
stream.read(mDecal);
|
||||
stream.read(mTwoSided);
|
||||
stream.read(mDecalNoFade);
|
||||
stream.read(mNonOccluder);
|
||||
stream.read(mRefraction);
|
||||
stream.read(mRefractionFalloff);
|
||||
stream.read(mRefractionPower);
|
||||
if (mVersion < 10)
|
||||
{
|
||||
stream.read(mEnvMap);
|
||||
stream.read(mEnvMapMaskScale);
|
||||
}
|
||||
else
|
||||
{
|
||||
stream.read(mDepthBias);
|
||||
}
|
||||
stream.read(mGrayscaleToPaletteColor);
|
||||
if (mVersion >= 6)
|
||||
{
|
||||
stream.read(mMaskWrites);
|
||||
}
|
||||
}
|
||||
|
||||
void BGSMFile::read(BGSMStream& stream)
|
||||
|
@ -27,10 +27,10 @@ namespace Bgsm
|
||||
std::uint32_t mClamp;
|
||||
osg::Vec2f mUVOffset, mUVScale;
|
||||
float mTransparency;
|
||||
std::uint8_t mSourceBlendMode;
|
||||
bool mAlphaBlend;
|
||||
std::uint32_t mSourceBlendMode;
|
||||
std::uint32_t mDestinationBlendMode;
|
||||
std::uint32_t mAlphaTestMode;
|
||||
std::uint8_t mAlphaTestRef;
|
||||
std::uint8_t mAlphaTestThreshold;
|
||||
bool mAlphaTest;
|
||||
bool mDepthWrite, mDepthTest;
|
||||
bool mSSR;
|
||||
|
Loading…
Reference in New Issue
Block a user