diff --git a/r5dev/materialsystem/cmaterialglue.h b/r5dev/materialsystem/cmaterialglue.h
index f73dd720..2b88c8ff 100644
--- a/r5dev/materialsystem/cmaterialglue.h
+++ b/r5dev/materialsystem/cmaterialglue.h
@@ -1,5 +1,7 @@
#pragma once
+#include "materialsystem/cshaderglue.h"
+
#pragma pack(push, 1) // Without this MSVC might get the idea to align our members to completely fuck the offsets up.
// [ PIXIE ]: The texture GUID's aren't in a specific order, gonna leave them as ptr's so an individual can check them in any memory searcher.
// [ PIXIE ]: Verification needed for earlier seasons, if the struct is the same.
@@ -7,40 +9,40 @@ class CMaterialGlue // [ PIXIE ]: Class seems mostly right, a few members are st
{
public:
void* m_pVTable; //0x0000
- char pad_0008[8]; //0x0008
- std::uint64_t m_GUID; //0x0010
- char* m_pszName; //0x0018
- char* m_pszSurfaceName1; //0x0020
- char* m_pszSurfaceName2; //0x0028
+ uint8_t pad_0008[8]; //0x0008
+ uint64_t m_GUID; //0x0010
+ const char* m_pszName; //0x0018
+ const char* m_pszSurfaceName1; //0x0020
+ const char* m_pszSurfaceName2; //0x0028
CMaterialGlue* m_pDepthShadow; //0x0030
CMaterialGlue* m_pDepthPrepass; //0x0038
CMaterialGlue* m_pDepthVSM; //0x0040
CMaterialGlue* m_pDepthShadowTight; //0x0048
CMaterialGlue* m_pColPass; //0x0050
- void* m_pShaderGlue; //0x0058 [ PIXIE ] TODO: Reverse CShaderGlue.
+ CShaderGlue* m_pShaderGlue; //0x0058
void* m_pTextureGUID1; //0x0060
void* m_pTextureGUID2; //0x0068
- std::int16_t m_UnknownSignature; //0x0070 [ PIXIE ]: This seems to be the start of a modified VTF Header, I have no clue what this member does.
- std::int16_t m_iWidth; //0x0072
- std::int16_t m_iHeight; //0x0074
- std::int16_t m_unused1; //0x0076
- std::uint32_t m_iFlags; //0x0078 [ PIXIE ]: I'm pretty sure those are VTF Image Flags, If you set them to NULL they cause Texture stretching.
- std::int32_t m_unused2; //0x007C
- char pad_0080[8]; //0x0080
- std::uint32_t m_iUnknownFlags1; //0x0088
- char pad_008C[116]; //0x008C
+ int16_t m_UnknownSignature; //0x0070 [ PIXIE ]: This seems to be the start of a modified VTF Header, I have no clue what this member does.
+ int16_t m_iWidth; //0x0072
+ int16_t m_iHeight; //0x0074
+ int16_t m_unused1; //0x0076
+ uint32_t m_iFlags; //0x0078 [ PIXIE ]: I'm pretty sure those are VTF Image Flags, If you set them to NULL they cause Texture stretching.
+ int32_t m_unused2; //0x007C
+ uint8_t pad_0080[8]; //0x0080
+ uint32_t m_iUnknownFlags1; //0x0088
+ uint8_t pad_008C[116]; //0x008C
// They first point to a jump table which holds the texture, then theres another jump onto the actual texture.
void** m_ppDXTexture1; //0x0100
void** m_ppDXTexture2; //0x0108
- char pad_0110[8]; //0x0110
- std::uint32_t m_iUnknown1; //0x0118
- std::uint16_t m_iUnknown2; //0x011C
- std::uint16_t m_iUnknown3; //0x011E
- std::uint16_t m_iUnknown4; //0x0120
- std::uint64_t m_Unknown5; //0x0122
- std::uint32_t m_iUnknown6; //0x012A
- std::uint16_t m_iUnknown7; //0x012E
+ uint8_t pad_0110[8]; //0x0110
+ uint32_t m_iUnknown1; //0x0118
+ uint16_t m_iUnknown2; //0x011C
+ uint16_t m_iUnknown3; //0x011E
+ uint16_t m_iUnknown4; //0x0120
+ uint64_t m_Unknown5; //0x0122
+ uint32_t m_iUnknown6; //0x012A
+ uint16_t m_iUnknown7; //0x012E
}; //Size: 0x0130 confirmed end size.
static_assert(sizeof(CMaterialGlue) == 0x130);
#pragma pack(pop)
diff --git a/r5dev/materialsystem/cshaderglue.cpp b/r5dev/materialsystem/cshaderglue.cpp
new file mode 100644
index 00000000..1b6661eb
--- /dev/null
+++ b/r5dev/materialsystem/cshaderglue.cpp
@@ -0,0 +1,19 @@
+//===========================================================================//
+//
+// Purpose:
+//
+//===========================================================================//
+#include "core/stdafx.h"
+#include "materialsystem/cshaderglue.h"
+
+
+///////////////////////////////////////////////////////////////////////////////
+void CShaderGlue_Attach()
+{
+
+}
+
+void CShaderGlue_Detach()
+{
+
+}
\ No newline at end of file
diff --git a/r5dev/materialsystem/cshaderglue.h b/r5dev/materialsystem/cshaderglue.h
new file mode 100644
index 00000000..71ac3e9a
--- /dev/null
+++ b/r5dev/materialsystem/cshaderglue.h
@@ -0,0 +1,36 @@
+#pragma once
+
+#pragma pack(push, 1)
+class CShaderGlue
+{
+public:
+ void* m_pVTable; //0x0000
+ uint16_t m_nCount1; //0x0008
+ uint16_t m_nCount2; //0x000A
+ uint16_t m_nCount3; //0x000C
+ uint8_t m_nByte1; //0x000E
+ uint8_t m_nByte2; //0x000F
+ char pad_0010[32]; //0x0010 [ PIXIE ]: Unknown, Due to compiler deciding to copy over 16 bytes at once in the replace function I have no clue what the data size is.
+ void* m_pVertexShader; //0x0030 [ PIXIE ]: Points to another structure which holds a double ptr to d3d11.dll
+ void* m_pPixelShader; //0x0038 [ PIXIE ]: Points to another structure which holds a double ptr to d3d11.dll
+}; //Size: 0x0040
+static_assert(sizeof(CShaderGlue) == 0x40);
+#pragma pack(pop)
+
+/* ==== CSHADERGLUE ================================================================================================================================================== */
+
+void CShaderGlue_Attach();
+void CShaderGlue_Detach();
+///////////////////////////////////////////////////////////////////////////////
+class VShaderGlue : public IDetour
+{
+ virtual void GetAdr(void) const { }
+ virtual void GetFun(void) const { }
+ virtual void GetVar(void) const { }
+ virtual void GetCon(void) const { }
+ virtual void Attach(void) const { }
+ virtual void Detach(void) const { }
+};
+///////////////////////////////////////////////////////////////////////////////
+
+REGISTER(VShaderGlue);
\ No newline at end of file
diff --git a/r5dev/vproj/gamesdk.vcxproj b/r5dev/vproj/gamesdk.vcxproj
index 985521cf..eaaf5dae 100644
--- a/r5dev/vproj/gamesdk.vcxproj
+++ b/r5dev/vproj/gamesdk.vcxproj
@@ -63,6 +63,7 @@
+
@@ -201,6 +202,7 @@
+
diff --git a/r5dev/vproj/gamesdk.vcxproj.filters b/r5dev/vproj/gamesdk.vcxproj.filters
index 1059b490..662e5a94 100644
--- a/r5dev/vproj/gamesdk.vcxproj.filters
+++ b/r5dev/vproj/gamesdk.vcxproj.filters
@@ -540,6 +540,9 @@
sdk\tier0
+
+ sdk\materialsystem
+
@@ -1583,6 +1586,9 @@
sdk\public\include
+
+ sdk\materialsystem
+