From dad356b0c350c93617921468353964eb3869667b Mon Sep 17 00:00:00 2001 From: rexx <67599507+r-ex@users.noreply.github.com> Date: Mon, 18 Jul 2022 22:00:03 +0100 Subject: [PATCH] rename materialglue/shaderglue members --- r5dev/materialsystem/cmaterialglue.h | 4 ++-- r5dev/materialsystem/cshaderglue.h | 2 +- r5dev/vgui/vgui_debugpanel.cpp | 5 +++-- r5dev/vstdlib/callback.cpp | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/r5dev/materialsystem/cmaterialglue.h b/r5dev/materialsystem/cmaterialglue.h index 8dbc707f..55995bf5 100644 --- a/r5dev/materialsystem/cmaterialglue.h +++ b/r5dev/materialsystem/cmaterialglue.h @@ -21,8 +21,8 @@ public: CMaterialGlue* m_pColPass; //0x0050 CShaderGlue* m_pShaderGlue; //0x0058 void* m_pTextureGUID1; //0x0060 - void* m_pTextureGUID2; //0x0068 - 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. + void* m_pStreamableTextures; //0x0068 + int16_t m_nStreamableTextureCount; //0x0070 int16_t m_iWidth; //0x0072 int16_t m_iHeight; //0x0074 int16_t m_unused1; //0x0076 diff --git a/r5dev/materialsystem/cshaderglue.h b/r5dev/materialsystem/cshaderglue.h index bac4928f..ac9b9625 100644 --- a/r5dev/materialsystem/cshaderglue.h +++ b/r5dev/materialsystem/cshaderglue.h @@ -10,7 +10,7 @@ public: char pad_0008[8]; //0x0008 Dispatcher Context, Some SEH try and catch thing. uint64_t m_nUnknown1; //0x0010 uint16_t m_nCount1; //0x0018 - uint16_t m_nCount2; //0x001A + uint16_t m_nTextureInputCount; //0x001A uint16_t m_nNumSamplers; //0x001C [ PIXIE ]: Used by ID3D11DeviceContext::PSSetSamplers to set NumSamplers uint8_t m_nStartSlot; //0x001E [ PIXIE ]: Used by ID3D11DeviceContext::PSSetShaderResources to set StartSlot. uint8_t m_nNumViews; //0x001F [ PIXIE ]: Used by ID3D11DeviceContext::PSSetShaderResources to set NumViews. diff --git a/r5dev/vgui/vgui_debugpanel.cpp b/r5dev/vgui/vgui_debugpanel.cpp index fb32bdf0..57f9735e 100644 --- a/r5dev/vgui/vgui_debugpanel.cpp +++ b/r5dev/vgui/vgui_debugpanel.cpp @@ -200,12 +200,13 @@ void CLogSystem::DrawCrosshairMaterial(void) const static Color c = { 255, 255, 255, 255 }; static const char* szLogbuf[4096]{}; - snprintf((char*)szLogbuf, 4096, "name: %s\nguid: %llx\ndimensions: %d x %d\nsurface: %s/%s\nsig: %i", + snprintf((char*)szLogbuf, 4096, "name: %s\nguid: %llx\ndimensions: %d x %d\nsurface: %s/%s\nstc: %i\ntc: %i", material->m_pszName, material->m_GUID, material->m_iWidth, material->m_iHeight, material->m_pszSurfaceName1, material->m_pszSurfaceName2, - material->m_UnknownSignature); + material->m_nStreamableTextureCount, + material->m_pShaderGlue->m_nTextureInputCount); CMatSystemSurface_DrawColoredText(g_pMatSystemSurface, v_Rui_GetFontFace(), m_nFontHeight, cl_materialinfo_offset_x->GetInt(), cl_materialinfo_offset_y->GetInt(), c.r(), c.g(), c.b(), c.a(), (char*)szLogbuf); } diff --git a/r5dev/vstdlib/callback.cpp b/r5dev/vstdlib/callback.cpp index c9014ee9..1284cc93 100644 --- a/r5dev/vstdlib/callback.cpp +++ b/r5dev/vstdlib/callback.cpp @@ -861,7 +861,7 @@ void Mat_CrossHair_f(const CCommand& args) DevMsg(eDLL_T::MS, "-+ Material --------------------------------------------------\n"); DevMsg(eDLL_T::MS, " |-- ADDR: '%llX'\n", material); DevMsg(eDLL_T::MS, " |-- GUID: '%llX'\n", material->m_GUID); - DevMsg(eDLL_T::MS, " |-- Signature: '%d'\n", material->m_UnknownSignature); + DevMsg(eDLL_T::MS, " |-- Streamable Texture Count: '%d'\n", material->m_nStreamableTextureCount); DevMsg(eDLL_T::MS, " |-- Material Width: '%d'\n", material->m_iWidth); DevMsg(eDLL_T::MS, " |-- Material Height: '%d'\n", material->m_iHeight); DevMsg(eDLL_T::MS, " |-- Flags: '%llX'\n", material->m_iFlags); @@ -889,7 +889,7 @@ void Mat_CrossHair_f(const CCommand& args) DevMsg(eDLL_T::MS, "-+ Texture GUID map ------------------------------------------\n"); material->m_pTextureGUID1 ? DevMsg(eDLL_T::MS, " |-- TextureMap 1 Addr: '%llX'\n", material->m_pTextureGUID1) : DevMsg(eDLL_T::MS, " |-- TextureMap 1 Addr: 'NULL'\n"); - material->m_pTextureGUID2 ? DevMsg(eDLL_T::MS, " |-- TextureMap 2 Addr: '%llX'\n", material->m_pTextureGUID2) : DevMsg(eDLL_T::MS, " |-- TextureMap 2 Addr: 'NULL'\n"); + material->m_pStreamableTextures ? DevMsg(eDLL_T::MS, " |-- TextureMap 2 Addr: '%llX'\n", material->m_pStreamableTextures) : DevMsg(eDLL_T::MS, " |-- TextureMap 2 Addr: 'NULL'\n"); DevMsg(eDLL_T::MS, "--------------------------------------------------------------\n"); }