You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
230 lines
5.4 KiB
230 lines
5.4 KiB
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
|
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
|
// defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPTINT && $LIGHTING_PREVIEW && $FASTPATHENVMAPTINT
|
|
// defined $LIGHTING_PREVIEW && defined $FASTPATHENVMAPCONTRAST && $LIGHTING_PREVIEW && $FASTPATHENVMAPCONTRAST
|
|
// defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
|
|
// ($FLASHLIGHT || $FLASHLIGHTSHADOWS) && $LIGHTING_PREVIEW
|
|
#include "shaderlib/cshader.h"
|
|
class shatteredglass_ps20b_Static_Index
|
|
{
|
|
private:
|
|
int m_nCUBEMAP;
|
|
#ifdef _DEBUG
|
|
bool m_bCUBEMAP;
|
|
#endif
|
|
public:
|
|
void SetCUBEMAP( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nCUBEMAP = i;
|
|
#ifdef _DEBUG
|
|
m_bCUBEMAP = true;
|
|
#endif
|
|
}
|
|
void SetCUBEMAP( bool i )
|
|
{
|
|
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
|
|
m_nCUBEMAP = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bCUBEMAP = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nVERTEXCOLOR;
|
|
#ifdef _DEBUG
|
|
bool m_bVERTEXCOLOR;
|
|
#endif
|
|
public:
|
|
void SetVERTEXCOLOR( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nVERTEXCOLOR = i;
|
|
#ifdef _DEBUG
|
|
m_bVERTEXCOLOR = true;
|
|
#endif
|
|
}
|
|
void SetVERTEXCOLOR( bool i )
|
|
{
|
|
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
|
|
m_nVERTEXCOLOR = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bVERTEXCOLOR = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nENVMAPMASK;
|
|
#ifdef _DEBUG
|
|
bool m_bENVMAPMASK;
|
|
#endif
|
|
public:
|
|
void SetENVMAPMASK( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nENVMAPMASK = i;
|
|
#ifdef _DEBUG
|
|
m_bENVMAPMASK = true;
|
|
#endif
|
|
}
|
|
void SetENVMAPMASK( bool i )
|
|
{
|
|
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
|
|
m_nENVMAPMASK = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bENVMAPMASK = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nBASEALPHAENVMAPMASK;
|
|
#ifdef _DEBUG
|
|
bool m_bBASEALPHAENVMAPMASK;
|
|
#endif
|
|
public:
|
|
void SetBASEALPHAENVMAPMASK( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nBASEALPHAENVMAPMASK = i;
|
|
#ifdef _DEBUG
|
|
m_bBASEALPHAENVMAPMASK = true;
|
|
#endif
|
|
}
|
|
void SetBASEALPHAENVMAPMASK( bool i )
|
|
{
|
|
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
|
|
m_nBASEALPHAENVMAPMASK = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bBASEALPHAENVMAPMASK = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nHDRTYPE;
|
|
#ifdef _DEBUG
|
|
bool m_bHDRTYPE;
|
|
#endif
|
|
public:
|
|
void SetHDRTYPE( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 2 );
|
|
m_nHDRTYPE = i;
|
|
#ifdef _DEBUG
|
|
m_bHDRTYPE = true;
|
|
#endif
|
|
}
|
|
void SetHDRTYPE( bool i )
|
|
{
|
|
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 );
|
|
m_nHDRTYPE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bHDRTYPE = true;
|
|
#endif
|
|
}
|
|
public:
|
|
// CONSTRUCTOR
|
|
shatteredglass_ps20b_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
|
|
{
|
|
#ifdef _DEBUG
|
|
m_bCUBEMAP = false;
|
|
#endif // _DEBUG
|
|
m_nCUBEMAP = 0;
|
|
#ifdef _DEBUG
|
|
m_bVERTEXCOLOR = false;
|
|
#endif // _DEBUG
|
|
m_nVERTEXCOLOR = 0;
|
|
#ifdef _DEBUG
|
|
m_bENVMAPMASK = false;
|
|
#endif // _DEBUG
|
|
m_nENVMAPMASK = 0;
|
|
#ifdef _DEBUG
|
|
m_bBASEALPHAENVMAPMASK = false;
|
|
#endif // _DEBUG
|
|
m_nBASEALPHAENVMAPMASK = 0;
|
|
#ifdef _DEBUG
|
|
m_bHDRTYPE = false;
|
|
#endif // _DEBUG
|
|
m_nHDRTYPE = 0;
|
|
}
|
|
int GetIndex()
|
|
{
|
|
// Asserts to make sure that we aren't using any skipped combinations.
|
|
// Asserts to make sure that we are setting all of the combination vars.
|
|
#ifdef _DEBUG
|
|
bool bAllStaticVarsDefined = m_bCUBEMAP && m_bVERTEXCOLOR && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bHDRTYPE;
|
|
Assert( bAllStaticVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 2 * m_nCUBEMAP ) + ( 4 * m_nVERTEXCOLOR ) + ( 8 * m_nENVMAPMASK ) + ( 16 * m_nBASEALPHAENVMAPMASK ) + ( 32 * m_nHDRTYPE ) + 0;
|
|
}
|
|
};
|
|
#define shaderStaticTest_shatteredglass_ps20b psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_HDRTYPE + 0
|
|
class shatteredglass_ps20b_Dynamic_Index
|
|
{
|
|
private:
|
|
int m_nPIXELFOGTYPE;
|
|
#ifdef _DEBUG
|
|
bool m_bPIXELFOGTYPE;
|
|
#endif
|
|
public:
|
|
void SetPIXELFOGTYPE( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nPIXELFOGTYPE = i;
|
|
#ifdef _DEBUG
|
|
m_bPIXELFOGTYPE = true;
|
|
#endif
|
|
}
|
|
void SetPIXELFOGTYPE( bool i )
|
|
{
|
|
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
|
|
m_nPIXELFOGTYPE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bPIXELFOGTYPE = true;
|
|
#endif
|
|
}
|
|
public:
|
|
// CONSTRUCTOR
|
|
shatteredglass_ps20b_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
|
|
{
|
|
#ifdef _DEBUG
|
|
m_bPIXELFOGTYPE = true;
|
|
#endif // _DEBUG
|
|
m_nPIXELFOGTYPE = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ;
|
|
}
|
|
int GetIndex()
|
|
{
|
|
// Asserts to make sure that we aren't using any skipped combinations.
|
|
// Asserts to make sure that we are setting all of the combination vars.
|
|
#ifdef _DEBUG
|
|
bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE;
|
|
Assert( bAllDynamicVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 1 * m_nPIXELFOGTYPE ) + 0;
|
|
}
|
|
};
|
|
#define shaderDynamicTest_shatteredglass_ps20b 0
|
|
|
|
static const ShaderComboInformation_t s_DynamicComboArray_ShatteredGlass_ps20b[1] =
|
|
{
|
|
{ "PIXELFOGTYPE", 0, 1 },
|
|
};
|
|
|
|
static const ShaderComboInformation_t s_StaticComboArray_ShatteredGlass_ps20b[5] =
|
|
{
|
|
{ "CUBEMAP", 0, 1 },
|
|
{ "VERTEXCOLOR", 0, 1 },
|
|
{ "ENVMAPMASK", 0, 1 },
|
|
{ "BASEALPHAENVMAPMASK", 0, 1 },
|
|
{ "HDRTYPE", 0, 2 },
|
|
};
|
|
static const ShaderComboSemantics_t ShatteredGlass_ps20b_combos =
|
|
{
|
|
"ShatteredGlass_ps20b", s_DynamicComboArray_ShatteredGlass_ps20b, 1, s_StaticComboArray_ShatteredGlass_ps20b, 5
|
|
};
|
|
|
|
class ConstructMe_ShatteredGlass_ps20b
|
|
{
|
|
public:
|
|
ConstructMe_ShatteredGlass_ps20b()
|
|
{
|
|
GetShaderDLL()->AddShaderComboInformation( &ShatteredGlass_ps20b_combos );
|
|
}
|
|
};
|
|
|
|
static ConstructMe_ShatteredGlass_ps20b s_ConstructMe_ShatteredGlass_ps20b;
|