diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/emissive_scroll_blended_pass_helper.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'materialsystem/stdshaders/emissive_scroll_blended_pass_helper.h')
| -rw-r--r-- | materialsystem/stdshaders/emissive_scroll_blended_pass_helper.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/emissive_scroll_blended_pass_helper.h b/materialsystem/stdshaders/emissive_scroll_blended_pass_helper.h new file mode 100644 index 0000000..a8fdd03 --- /dev/null +++ b/materialsystem/stdshaders/emissive_scroll_blended_pass_helper.h @@ -0,0 +1,45 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// + +#ifndef EMISSIVE_SCROLL_BLENDED_PASS_HELPER_H +#define EMISSIVE_SCROLL_BLENDED_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 EmissiveScrollBlendedPassVars_t +{ + EmissiveScrollBlendedPassVars_t() { memset( this, 0xFF, sizeof(EmissiveScrollBlendedPassVars_t) ); } + + int m_nBlendStrength; // Amount this layer is blended in globally + int m_nBaseTexture; + int m_nFlowTexture; + int m_nEmissiveTexture; + int m_nEmissiveTint; + int m_nEmissiveScrollVector; + int m_nTime; +}; + +// Default values (Arrays should only be vec[4]) +static const float kDefaultEmissiveBlendStrength = 0.0f; +static const float kDefaultEmissiveTint[4] = { 1.0f, 1.0f, 1.0f, 0.0f } ; +static const float kDefaultEmissiveScrollVector[4] = { 0.11f, 0.124f, 0.0f, 0.0f } ; + +void InitParamsEmissiveScrollBlendedPass( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, EmissiveScrollBlendedPassVars_t &info ); +void InitEmissiveScrollBlendedPass( CBaseVSShader *pShader, IMaterialVar** params, EmissiveScrollBlendedPassVars_t &info ); +void DrawEmissiveScrollBlendedPass( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI, + IShaderShadow* pShaderShadow, EmissiveScrollBlendedPassVars_t &info, VertexCompressionType_t vertexCompression ); + +#endif // EMISSIVE_SCROLL_BLENDED_PASS_HELPER_H |