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
57
58
59
60
61
62
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef REFRACT_DX9_HELPER_H
#define REFRACT_DX9_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 Refract_DX9_Vars_t
{
Refract_DX9_Vars_t() { memset( this, 0xFF, sizeof( *this ) ); }
int m_nBaseTexture;
int m_nFrame;
int m_nRefractAmount;
int m_nRefractTint;
int m_nNormalMap;
int m_nNormalMap2;
int m_nBumpFrame;
int m_nBumpFrame2;
int m_nBumpTransform;
int m_nBumpTransform2;
int m_nBlurAmount;
int m_nFadeOutOnSilhouette;
int m_nEnvmap;
int m_nEnvmapFrame;
int m_nEnvmapTint;
int m_nEnvmapContrast;
int m_nEnvmapSaturation;
int m_nRefractTintTexture;
int m_nRefractTintTextureFrame;
int m_nFresnelReflection;
int m_nNoWriteZ;
int m_nMasked;
int m_nVertexColorModulate;
int m_nForceAlphaWrite;
};
void InitParamsRefract_DX9( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName,
Refract_DX9_Vars_t &info );
void InitRefract_DX9( CBaseVSShader *pShader, IMaterialVar** params, Refract_DX9_Vars_t &info );
void DrawRefract_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
IShaderShadow* pShaderShadow, Refract_DX9_Vars_t &info, VertexCompressionType_t vertexCompression );
#endif // REFRACT_DX9_HELPER_H
|