summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/weapon_sheen_pass_helper.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/weapon_sheen_pass_helper.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'materialsystem/stdshaders/weapon_sheen_pass_helper.h')
-rw-r--r--materialsystem/stdshaders/weapon_sheen_pass_helper.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/weapon_sheen_pass_helper.h b/materialsystem/stdshaders/weapon_sheen_pass_helper.h
new file mode 100644
index 0000000..91dd333
--- /dev/null
+++ b/materialsystem/stdshaders/weapon_sheen_pass_helper.h
@@ -0,0 +1,51 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+
+#ifndef WEAPON_SHEEN_PASS_HELPER_H
+#define WEAPON_SHEEN_PASS_HELPER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <string.h>
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class CBaseVSShader;
+class IMaterialVar;
+class IShaderDynamicAPI;
+class IShaderShadow;
+
+//-----------------------------------------------------------------------------
+// Init params/ init/ draw methods
+//-----------------------------------------------------------------------------
+struct WeaponSheenPassVars_t
+{
+ WeaponSheenPassVars_t() { memset( this, 0xFF, sizeof(WeaponSheenPassVars_t) ); }
+
+ int m_nSheenMap;
+ int m_nSheenMapMask;
+ int m_nSheenMapMaskFrame;
+ int m_nSheenMapTint;
+ int m_nSheenMapMaskScaleX;
+ int m_nSheenMapMaskScaleY;
+ int m_nSheenMapMaskOffsetX;
+ int m_nSheenMapMaskOffsetY;
+ int m_nSheenMapMaskDirection;
+ int m_nSheenIndex;
+
+ int m_nBumpmap;
+ int m_nBumpFrame;
+ int m_nBumpTransform;
+};
+
+static const float kDefaultSheenColorTint[4] = { 0.0f, 1.0f, 0.0f, 1.0f };
+
+void InitParamsWeaponSheenPass( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, WeaponSheenPassVars_t &info );
+void InitWeaponSheenPass( CBaseVSShader *pShader, IMaterialVar** params, WeaponSheenPassVars_t &info );
+void DrawWeaponSheenPass( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
+ IShaderShadow* pShaderShadow, WeaponSheenPassVars_t &info, VertexCompressionType_t vertexCompression );
+
+bool ShouldDrawMaterialSheen ( IMaterialVar** params, WeaponSheenPassVars_t &info );
+
+#endif // WEAPON_SHEEN_PASS_HELPER_H