summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/portal_refract_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/portal_refract_helper.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'materialsystem/stdshaders/portal_refract_helper.h')
-rw-r--r--materialsystem/stdshaders/portal_refract_helper.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/portal_refract_helper.h b/materialsystem/stdshaders/portal_refract_helper.h
new file mode 100644
index 0000000..3c54858
--- /dev/null
+++ b/materialsystem/stdshaders/portal_refract_helper.h
@@ -0,0 +1,46 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+
+#ifndef PORTALREFRACT_HELPER_H
+#define PORTALREFRACT_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 PortalRefractVars_t
+{
+ PortalRefractVars_t() { memset( this, 0xFF, sizeof(PortalRefractVars_t) ); }
+
+ int m_nStage;
+ int m_nPortalOpenAmount;
+ int m_nPortalStatic;
+ int m_nPortalMaskTexture;
+ int m_nTextureTransform;
+ int m_nPortalColorTexture;
+ int m_nPortalColorScale;
+ int m_nTime;
+};
+
+// Default values (Arrays should only be vec[4])
+static const float kDefaultPortalStatic = 0.0f;
+static const float kDefaultPortalOpenAmount = 0.0f;
+static const float kDefaultPortalColorScale = 1.0f;
+
+void InitParamsPortalRefract( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, PortalRefractVars_t &info );
+void InitPortalRefract( CBaseVSShader *pShader, IMaterialVar** params, PortalRefractVars_t &info );
+void DrawPortalRefract( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
+ IShaderShadow* pShaderShadow, PortalRefractVars_t &info );
+
+#endif // PortalRefract_HELPER_H