1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
//========= Copyright Valve Corporation, All rights reserved. ============//
#ifndef AFTERSHOCK_HELPER_H
#define AFTERSHOCK_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 AftershockVars_t
{
AftershockVars_t() { memset( this, 0xFF, sizeof(AftershockVars_t) ); }
int m_nColorTint;
int m_nRefractAmount;
int m_nBumpmap;
int m_nBumpFrame;
int m_nBumpTransform;
int m_nSilhouetteThickness;
int m_nSilhouetteColor;
int m_nGroundMin;
int m_nGroundMax;
int m_nBlurAmount;
int m_nTime;
};
// Default values (Arrays should only be vec[4])
static const float kDefaultColorTint[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
static const float kDefaultRefractAmount = 0.1f;
static const float kDefaultSilhouetteThickness = 0.2f;
static const float kDefaultSilhouetteColor[4] = { 0.3f, 0.3f, 0.5f, 1.0f };
static const float kDefaultGroundMin = -0.3f;
static const float kDefaultGroundMax = -0.1f;
static const float kDefaultBlurAmount = 0.01f;
void InitParamsAftershock( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, AftershockVars_t &info );
void InitAftershock( CBaseVSShader *pShader, IMaterialVar** params, AftershockVars_t &info );
void DrawAftershock( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
IShaderShadow* pShaderShadow, AftershockVars_t &info, VertexCompressionType_t vertexCompression );
#endif // AFTERSHOCK_HELPER_H
|