diff --git a/components/bgsm/file.cpp b/components/bgsm/file.cpp index 870d9e4067..1ad1918ccf 100644 --- a/components/bgsm/file.cpp +++ b/components/bgsm/file.cpp @@ -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) diff --git a/components/bgsm/file.hpp b/components/bgsm/file.hpp index 117b135e4f..db0059cd29 100644 --- a/components/bgsm/file.hpp +++ b/components/bgsm/file.hpp @@ -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;