csgo-2018-source/materialsystem/stdshaders/fxctmp9/vertexlit_and_unlit_generic_bump_ps20.inc
2021-07-24 21:11:47 -07:00

740 lines
18 KiB
C++

// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
// ( $SFM == 0 ) && ( $UBERLIGHT == 1 )
// ( $FLASHLIGHT != 0 ) && ( $NUM_LIGHTS > 0 )
// (! $DETAILTEXTURE) && ( $DETAIL_BLEND_MODE != 0 )
// ( $DIFFUSELIGHTING == 0 ) && ( $LIGHTWARPTEXTURE == 1 )
// ( $SELFILLUMFRESNEL == 1 ) && ( $LIGHTWARPTEXTURE == 1 )
// ( $SELFILLUM == 0 ) && ( $SELFILLUMFRESNEL == 1 )
// ( $FLASHLIGHT == 1 ) && ( $SELFILLUMFRESNEL == 1 )
// ( $SELFILLUMFRESNEL == 1 ) && ( $DETAILTEXTURE == 1 )
// ( $SELFILLUMFRESNEL == 1 ) && ( $NORMALMAPALPHAENVMAPMASK == 1 )
// ( $CASCADED_SHADOW_MAPPING == 0 ) && ( $CASCADE_SIZE != 0 )
// ( $CASCADED_SHADOW_MAPPING != 0 ) && ( $SFM != 0 )
// ( $CASCADED_SHADOW_MAPPING != 0 ) && ( $FLASHLIGHT != 0 )
// ( $CASCADED_SHADOW_MAPPING == 0 ) && ( $CSM_MODE != 0 )
// 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
// 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
// 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 vertexlit_and_unlit_generic_bump_ps20_Static_Index
{
private:
int m_nSFM;
#ifdef _DEBUG
bool m_bSFM;
#endif
public:
void SetSFM( int i )
{
Assert( i >= 0 && i <= 0 );
m_nSFM = i;
#ifdef _DEBUG
m_bSFM = true;
#endif
}
void SetSFM( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nSFM = i ? 1 : 0;
#ifdef _DEBUG
m_bSFM = true;
#endif
}
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_nDIFFUSELIGHTING;
#ifdef _DEBUG
bool m_bDIFFUSELIGHTING;
#endif
public:
void SetDIFFUSELIGHTING( int i )
{
Assert( i >= 0 && i <= 1 );
m_nDIFFUSELIGHTING = i;
#ifdef _DEBUG
m_bDIFFUSELIGHTING = true;
#endif
}
void SetDIFFUSELIGHTING( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nDIFFUSELIGHTING = i ? 1 : 0;
#ifdef _DEBUG
m_bDIFFUSELIGHTING = true;
#endif
}
private:
int m_nLIGHTWARPTEXTURE;
#ifdef _DEBUG
bool m_bLIGHTWARPTEXTURE;
#endif
public:
void SetLIGHTWARPTEXTURE( int i )
{
Assert( i >= 0 && i <= 1 );
m_nLIGHTWARPTEXTURE = i;
#ifdef _DEBUG
m_bLIGHTWARPTEXTURE = true;
#endif
}
void SetLIGHTWARPTEXTURE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nLIGHTWARPTEXTURE = i ? 1 : 0;
#ifdef _DEBUG
m_bLIGHTWARPTEXTURE = true;
#endif
}
private:
int m_nSELFILLUM;
#ifdef _DEBUG
bool m_bSELFILLUM;
#endif
public:
void SetSELFILLUM( int i )
{
Assert( i >= 0 && i <= 1 );
m_nSELFILLUM = i;
#ifdef _DEBUG
m_bSELFILLUM = true;
#endif
}
void SetSELFILLUM( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nSELFILLUM = i ? 1 : 0;
#ifdef _DEBUG
m_bSELFILLUM = true;
#endif
}
private:
int m_nSELFILLUMFRESNEL;
#ifdef _DEBUG
bool m_bSELFILLUMFRESNEL;
#endif
public:
void SetSELFILLUMFRESNEL( int i )
{
Assert( i >= 0 && i <= 1 );
m_nSELFILLUMFRESNEL = i;
#ifdef _DEBUG
m_bSELFILLUMFRESNEL = true;
#endif
}
void SetSELFILLUMFRESNEL( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nSELFILLUMFRESNEL = i ? 1 : 0;
#ifdef _DEBUG
m_bSELFILLUMFRESNEL = true;
#endif
}
private:
int m_nNORMALMAPALPHAENVMAPMASK;
#ifdef _DEBUG
bool m_bNORMALMAPALPHAENVMAPMASK;
#endif
public:
void SetNORMALMAPALPHAENVMAPMASK( int i )
{
Assert( i >= 0 && i <= 1 );
m_nNORMALMAPALPHAENVMAPMASK = i;
#ifdef _DEBUG
m_bNORMALMAPALPHAENVMAPMASK = true;
#endif
}
void SetNORMALMAPALPHAENVMAPMASK( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nNORMALMAPALPHAENVMAPMASK = i ? 1 : 0;
#ifdef _DEBUG
m_bNORMALMAPALPHAENVMAPMASK = true;
#endif
}
private:
int m_nHALFLAMBERT;
#ifdef _DEBUG
bool m_bHALFLAMBERT;
#endif
public:
void SetHALFLAMBERT( int i )
{
Assert( i >= 0 && i <= 0 );
m_nHALFLAMBERT = i;
#ifdef _DEBUG
m_bHALFLAMBERT = true;
#endif
}
void SetHALFLAMBERT( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nHALFLAMBERT = i ? 1 : 0;
#ifdef _DEBUG
m_bHALFLAMBERT = true;
#endif
}
private:
int m_nFLASHLIGHT;
#ifdef _DEBUG
bool m_bFLASHLIGHT;
#endif
public:
void SetFLASHLIGHT( int i )
{
Assert( i >= 0 && i <= 1 );
m_nFLASHLIGHT = i;
#ifdef _DEBUG
m_bFLASHLIGHT = true;
#endif
}
void SetFLASHLIGHT( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nFLASHLIGHT = i ? 1 : 0;
#ifdef _DEBUG
m_bFLASHLIGHT = true;
#endif
}
private:
int m_nDETAILTEXTURE;
#ifdef _DEBUG
bool m_bDETAILTEXTURE;
#endif
public:
void SetDETAILTEXTURE( int i )
{
Assert( i >= 0 && i <= 1 );
m_nDETAILTEXTURE = i;
#ifdef _DEBUG
m_bDETAILTEXTURE = true;
#endif
}
void SetDETAILTEXTURE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nDETAILTEXTURE = i ? 1 : 0;
#ifdef _DEBUG
m_bDETAILTEXTURE = true;
#endif
}
private:
int m_nDETAIL_BLEND_MODE;
#ifdef _DEBUG
bool m_bDETAIL_BLEND_MODE;
#endif
public:
void SetDETAIL_BLEND_MODE( int i )
{
Assert( i >= 0 && i <= 7 );
m_nDETAIL_BLEND_MODE = i;
#ifdef _DEBUG
m_bDETAIL_BLEND_MODE = true;
#endif
}
void SetDETAIL_BLEND_MODE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 7 );
m_nDETAIL_BLEND_MODE = i ? 1 : 0;
#ifdef _DEBUG
m_bDETAIL_BLEND_MODE = true;
#endif
}
private:
int m_nSHADER_SRGB_READ;
#ifdef _DEBUG
bool m_bSHADER_SRGB_READ;
#endif
public:
void SetSHADER_SRGB_READ( int i )
{
Assert( i >= 0 && i <= 0 );
m_nSHADER_SRGB_READ = i;
#ifdef _DEBUG
m_bSHADER_SRGB_READ = true;
#endif
}
void SetSHADER_SRGB_READ( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nSHADER_SRGB_READ = i ? 1 : 0;
#ifdef _DEBUG
m_bSHADER_SRGB_READ = true;
#endif
}
private:
int m_nWORLD_NORMAL;
#ifdef _DEBUG
bool m_bWORLD_NORMAL;
#endif
public:
void SetWORLD_NORMAL( int i )
{
Assert( i >= 0 && i <= 0 );
m_nWORLD_NORMAL = i;
#ifdef _DEBUG
m_bWORLD_NORMAL = true;
#endif
}
void SetWORLD_NORMAL( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nWORLD_NORMAL = i ? 1 : 0;
#ifdef _DEBUG
m_bWORLD_NORMAL = true;
#endif
}
private:
int m_nCASCADED_SHADOW_MAPPING;
#ifdef _DEBUG
bool m_bCASCADED_SHADOW_MAPPING;
#endif
public:
void SetCASCADED_SHADOW_MAPPING( int i )
{
Assert( i >= 0 && i <= 0 );
m_nCASCADED_SHADOW_MAPPING = i;
#ifdef _DEBUG
m_bCASCADED_SHADOW_MAPPING = true;
#endif
}
void SetCASCADED_SHADOW_MAPPING( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nCASCADED_SHADOW_MAPPING = i ? 1 : 0;
#ifdef _DEBUG
m_bCASCADED_SHADOW_MAPPING = true;
#endif
}
private:
int m_nCSM_MODE;
#ifdef _DEBUG
bool m_bCSM_MODE;
#endif
public:
void SetCSM_MODE( int i )
{
Assert( i >= 0 && i <= 0 );
m_nCSM_MODE = i;
#ifdef _DEBUG
m_bCSM_MODE = true;
#endif
}
void SetCSM_MODE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nCSM_MODE = i ? 1 : 0;
#ifdef _DEBUG
m_bCSM_MODE = true;
#endif
}
private:
int m_nDECAL_BLEND_MODE;
#ifdef _DEBUG
bool m_bDECAL_BLEND_MODE;
#endif
public:
void SetDECAL_BLEND_MODE( int i )
{
Assert( i >= 0 && i <= 2 );
m_nDECAL_BLEND_MODE = i;
#ifdef _DEBUG
m_bDECAL_BLEND_MODE = true;
#endif
}
void SetDECAL_BLEND_MODE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 );
m_nDECAL_BLEND_MODE = i ? 1 : 0;
#ifdef _DEBUG
m_bDECAL_BLEND_MODE = true;
#endif
}
private:
int m_nTINTMASKTEXTURE;
#ifdef _DEBUG
bool m_bTINTMASKTEXTURE;
#endif
public:
void SetTINTMASKTEXTURE( int i )
{
Assert( i >= 0 && i <= 0 );
m_nTINTMASKTEXTURE = i;
#ifdef _DEBUG
m_bTINTMASKTEXTURE = true;
#endif
}
void SetTINTMASKTEXTURE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nTINTMASKTEXTURE = i ? 1 : 0;
#ifdef _DEBUG
m_bTINTMASKTEXTURE = true;
#endif
}
private:
int m_nDOPIXELFOG;
#ifdef _DEBUG
bool m_bDOPIXELFOG;
#endif
public:
void SetDOPIXELFOG( int i )
{
Assert( i >= 0 && i <= 0 );
m_nDOPIXELFOG = i;
#ifdef _DEBUG
m_bDOPIXELFOG = true;
#endif
}
void SetDOPIXELFOG( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nDOPIXELFOG = i ? 1 : 0;
#ifdef _DEBUG
m_bDOPIXELFOG = true;
#endif
}
public:
// CONSTRUCTOR
vertexlit_and_unlit_generic_bump_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
{
#ifdef _DEBUG
m_bSFM = false;
#endif // _DEBUG
m_nSFM = 0;
#ifdef _DEBUG
m_bCUBEMAP = false;
#endif // _DEBUG
m_nCUBEMAP = 0;
#ifdef _DEBUG
m_bDIFFUSELIGHTING = false;
#endif // _DEBUG
m_nDIFFUSELIGHTING = 0;
#ifdef _DEBUG
m_bLIGHTWARPTEXTURE = false;
#endif // _DEBUG
m_nLIGHTWARPTEXTURE = 0;
#ifdef _DEBUG
m_bSELFILLUM = false;
#endif // _DEBUG
m_nSELFILLUM = 0;
#ifdef _DEBUG
m_bSELFILLUMFRESNEL = false;
#endif // _DEBUG
m_nSELFILLUMFRESNEL = 0;
#ifdef _DEBUG
m_bNORMALMAPALPHAENVMAPMASK = false;
#endif // _DEBUG
m_nNORMALMAPALPHAENVMAPMASK = 0;
#ifdef _DEBUG
m_bHALFLAMBERT = false;
#endif // _DEBUG
m_nHALFLAMBERT = 0;
#ifdef _DEBUG
m_bFLASHLIGHT = false;
#endif // _DEBUG
m_nFLASHLIGHT = 0;
#ifdef _DEBUG
m_bDETAILTEXTURE = false;
#endif // _DEBUG
m_nDETAILTEXTURE = 0;
#ifdef _DEBUG
m_bDETAIL_BLEND_MODE = false;
#endif // _DEBUG
m_nDETAIL_BLEND_MODE = 0;
#ifdef _DEBUG
m_bSHADER_SRGB_READ = false;
#endif // _DEBUG
m_nSHADER_SRGB_READ = 0;
#ifdef _DEBUG
m_bWORLD_NORMAL = false;
#endif // _DEBUG
m_nWORLD_NORMAL = 0;
#ifdef _DEBUG
m_bCASCADED_SHADOW_MAPPING = false;
#endif // _DEBUG
m_nCASCADED_SHADOW_MAPPING = 0;
#ifdef _DEBUG
m_bCSM_MODE = false;
#endif // _DEBUG
m_nCSM_MODE = 0;
#ifdef _DEBUG
m_bDECAL_BLEND_MODE = false;
#endif // _DEBUG
m_nDECAL_BLEND_MODE = 0;
#ifdef _DEBUG
m_bTINTMASKTEXTURE = false;
#endif // _DEBUG
m_nTINTMASKTEXTURE = 0;
#ifdef _DEBUG
m_bDOPIXELFOG = true;
#endif // _DEBUG
m_nDOPIXELFOG = 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_bSFM && m_bCUBEMAP && m_bDIFFUSELIGHTING && m_bLIGHTWARPTEXTURE && m_bSELFILLUM && m_bSELFILLUMFRESNEL && m_bNORMALMAPALPHAENVMAPMASK && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bDETAILTEXTURE && m_bDETAIL_BLEND_MODE && m_bSHADER_SRGB_READ && m_bWORLD_NORMAL && m_bCASCADED_SHADOW_MAPPING && m_bCSM_MODE && m_bDECAL_BLEND_MODE && m_bTINTMASKTEXTURE && m_bDOPIXELFOG;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 24 * m_nSFM ) + ( 24 * m_nCUBEMAP ) + ( 48 * m_nDIFFUSELIGHTING ) + ( 96 * m_nLIGHTWARPTEXTURE ) + ( 192 * m_nSELFILLUM ) + ( 384 * m_nSELFILLUMFRESNEL ) + ( 768 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 1536 * m_nHALFLAMBERT ) + ( 1536 * m_nFLASHLIGHT ) + ( 3072 * m_nDETAILTEXTURE ) + ( 6144 * m_nDETAIL_BLEND_MODE ) + ( 49152 * m_nSHADER_SRGB_READ ) + ( 49152 * m_nWORLD_NORMAL ) + ( 49152 * m_nCASCADED_SHADOW_MAPPING ) + ( 49152 * m_nCSM_MODE ) + ( 49152 * m_nDECAL_BLEND_MODE ) + ( 147456 * m_nTINTMASKTEXTURE ) + ( 147456 * m_nDOPIXELFOG ) + 0;
}
};
#define shaderStaticTest_vertexlit_and_unlit_generic_bump_ps20 psh_forgot_to_set_static_SFM + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_DIFFUSELIGHTING + psh_forgot_to_set_static_LIGHTWARPTEXTURE + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_SELFILLUMFRESNEL + psh_forgot_to_set_static_NORMALMAPALPHAENVMAPMASK + psh_forgot_to_set_static_HALFLAMBERT + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_SHADER_SRGB_READ + psh_forgot_to_set_static_WORLD_NORMAL + psh_forgot_to_set_static_CASCADED_SHADOW_MAPPING + psh_forgot_to_set_static_CSM_MODE + psh_forgot_to_set_static_DECAL_BLEND_MODE + psh_forgot_to_set_static_TINTMASKTEXTURE + 0
class vertexlit_and_unlit_generic_bump_ps20_Dynamic_Index
{
private:
int m_nWRITEWATERFOGTODESTALPHA;
#ifdef _DEBUG
bool m_bWRITEWATERFOGTODESTALPHA;
#endif
public:
void SetWRITEWATERFOGTODESTALPHA( int i )
{
Assert( i >= 0 && i <= 1 );
m_nWRITEWATERFOGTODESTALPHA = i;
#ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = true;
#endif
}
void SetWRITEWATERFOGTODESTALPHA( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0;
#ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = true;
#endif
}
private:
int m_nNUM_LIGHTS;
#ifdef _DEBUG
bool m_bNUM_LIGHTS;
#endif
public:
void SetNUM_LIGHTS( int i )
{
Assert( i >= 0 && i <= 2 );
m_nNUM_LIGHTS = i;
#ifdef _DEBUG
m_bNUM_LIGHTS = true;
#endif
}
void SetNUM_LIGHTS( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 );
m_nNUM_LIGHTS = i ? 1 : 0;
#ifdef _DEBUG
m_bNUM_LIGHTS = true;
#endif
}
private:
int m_nAMBIENT_LIGHT;
#ifdef _DEBUG
bool m_bAMBIENT_LIGHT;
#endif
public:
void SetAMBIENT_LIGHT( int i )
{
Assert( i >= 0 && i <= 1 );
m_nAMBIENT_LIGHT = i;
#ifdef _DEBUG
m_bAMBIENT_LIGHT = true;
#endif
}
void SetAMBIENT_LIGHT( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 );
m_nAMBIENT_LIGHT = i ? 1 : 0;
#ifdef _DEBUG
m_bAMBIENT_LIGHT = true;
#endif
}
private:
int m_nCASCADE_SIZE;
#ifdef _DEBUG
bool m_bCASCADE_SIZE;
#endif
public:
void SetCASCADE_SIZE( int i )
{
Assert( i >= 0 && i <= 0 );
m_nCASCADE_SIZE = i;
#ifdef _DEBUG
m_bCASCADE_SIZE = true;
#endif
}
void SetCASCADE_SIZE( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nCASCADE_SIZE = i ? 1 : 0;
#ifdef _DEBUG
m_bCASCADE_SIZE = true;
#endif
}
private:
int m_nSTATICLIGHT3;
#ifdef _DEBUG
bool m_bSTATICLIGHT3;
#endif
public:
void SetSTATICLIGHT3( int i )
{
Assert( i >= 0 && i <= 0 );
m_nSTATICLIGHT3 = i;
#ifdef _DEBUG
m_bSTATICLIGHT3 = true;
#endif
}
void SetSTATICLIGHT3( bool i )
{
Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 0 );
m_nSTATICLIGHT3 = i ? 1 : 0;
#ifdef _DEBUG
m_bSTATICLIGHT3 = true;
#endif
}
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
vertexlit_and_unlit_generic_bump_ps20_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
{
#ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = false;
#endif // _DEBUG
m_nWRITEWATERFOGTODESTALPHA = 0;
#ifdef _DEBUG
m_bNUM_LIGHTS = false;
#endif // _DEBUG
m_nNUM_LIGHTS = 0;
#ifdef _DEBUG
m_bAMBIENT_LIGHT = false;
#endif // _DEBUG
m_nAMBIENT_LIGHT = 0;
#ifdef _DEBUG
m_bCASCADE_SIZE = false;
#endif // _DEBUG
m_nCASCADE_SIZE = 0;
#ifdef _DEBUG
m_bSTATICLIGHT3 = false;
#endif // _DEBUG
m_nSTATICLIGHT3 = 0;
#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_bWRITEWATERFOGTODESTALPHA && m_bNUM_LIGHTS && m_bAMBIENT_LIGHT && m_bCASCADE_SIZE && m_bSTATICLIGHT3 && m_bPIXELFOGTYPE;
Assert( bAllDynamicVarsDefined );
#endif // _DEBUG
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nNUM_LIGHTS ) + ( 6 * m_nAMBIENT_LIGHT ) + ( 12 * m_nCASCADE_SIZE ) + ( 12 * m_nSTATICLIGHT3 ) + ( 12 * m_nPIXELFOGTYPE ) + 0;
}
};
#define shaderDynamicTest_vertexlit_and_unlit_generic_bump_ps20 psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_AMBIENT_LIGHT + psh_forgot_to_set_dynamic_CASCADE_SIZE + psh_forgot_to_set_dynamic_STATICLIGHT3 + 0
static const ShaderComboInformation_t s_DynamicComboArray_vertexlit_and_unlit_generic_bump_ps20[6] =
{
{ "WRITEWATERFOGTODESTALPHA", 0, 1 },
{ "NUM_LIGHTS", 0, 2 },
{ "AMBIENT_LIGHT", 0, 1 },
{ "CASCADE_SIZE", 0, 0 },
{ "STATICLIGHT3", 0, 0 },
{ "PIXELFOGTYPE", 0, 1 },
};
static const ShaderComboInformation_t s_StaticComboArray_vertexlit_and_unlit_generic_bump_ps20[18] =
{
{ "SFM", 0, 0 },
{ "CUBEMAP", 0, 1 },
{ "DIFFUSELIGHTING", 0, 1 },
{ "LIGHTWARPTEXTURE", 0, 1 },
{ "SELFILLUM", 0, 1 },
{ "SELFILLUMFRESNEL", 0, 1 },
{ "NORMALMAPALPHAENVMAPMASK", 0, 1 },
{ "HALFLAMBERT", 0, 0 },
{ "FLASHLIGHT", 0, 1 },
{ "DETAILTEXTURE", 0, 1 },
{ "DETAIL_BLEND_MODE", 0, 7 },
{ "SHADER_SRGB_READ", 0, 0 },
{ "WORLD_NORMAL", 0, 0 },
{ "CASCADED_SHADOW_MAPPING", 0, 0 },
{ "CSM_MODE", 0, 0 },
{ "DECAL_BLEND_MODE", 0, 2 },
{ "TINTMASKTEXTURE", 0, 0 },
{ "DOPIXELFOG", 0, 0 },
};
static const ShaderComboSemantics_t vertexlit_and_unlit_generic_bump_ps20_combos =
{
"vertexlit_and_unlit_generic_bump_ps20", s_DynamicComboArray_vertexlit_and_unlit_generic_bump_ps20, 6, s_StaticComboArray_vertexlit_and_unlit_generic_bump_ps20, 18
};
class ConstructMe_vertexlit_and_unlit_generic_bump_ps20
{
public:
ConstructMe_vertexlit_and_unlit_generic_bump_ps20()
{
GetShaderDLL()->AddShaderComboInformation( &vertexlit_and_unlit_generic_bump_ps20_combos );
}
};
static ConstructMe_vertexlit_and_unlit_generic_bump_ps20 s_ConstructMe_vertexlit_and_unlit_generic_bump_ps20;