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.
665 lines
15 KiB
665 lines
15 KiB
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
|
// ( $FLASHLIGHT != 0 ) && ( $NUM_LIGHTS > 0 )
|
|
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 )
|
|
// (! $DETAILTEXTURE) && ( $DETAIL_BLEND_MODE != 0 )
|
|
// ( $SELFILLUMFRESNEL == 1 ) && ( $LIGHTWARPTEXTURE == 1 )
|
|
// ( $SELFILLUM == 0 ) && ( $SELFILLUMFRESNEL == 1 )
|
|
// ( $FLASHLIGHT == 1 ) && ( $SELFILLUMFRESNEL == 1 )
|
|
// ( $SELFILLUMFRESNEL == 1 ) && ( $DETAILTEXTURE == 1 )
|
|
// ( $SELFILLUMFRESNEL == 1 ) && ( $NORMALMAPALPHAENVMAPMASK == 1 )
|
|
// $NEBULA && ( $DETAILTEXTURE || $FLOWMAP || $DAMAGED )
|
|
// 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
|
|
// ( $FLOWMAP == 0 ) && ( $FLOW_DEBUG > 0 )
|
|
#include "shaderlib/cshader.h"
|
|
class vertexlit_sob_ps30_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 )
|
|
{
|
|
m_nCUBEMAP = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bCUBEMAP = 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 )
|
|
{
|
|
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 )
|
|
{
|
|
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 )
|
|
{
|
|
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 )
|
|
{
|
|
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 <= 1 );
|
|
m_nHALFLAMBERT = i;
|
|
#ifdef _DEBUG
|
|
m_bHALFLAMBERT = true;
|
|
#endif
|
|
}
|
|
void SetHALFLAMBERT( bool i )
|
|
{
|
|
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 )
|
|
{
|
|
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 )
|
|
{
|
|
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 <= 6 );
|
|
m_nDETAIL_BLEND_MODE = i;
|
|
#ifdef _DEBUG
|
|
m_bDETAIL_BLEND_MODE = true;
|
|
#endif
|
|
}
|
|
void SetDETAIL_BLEND_MODE( bool i )
|
|
{
|
|
m_nDETAIL_BLEND_MODE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bDETAIL_BLEND_MODE = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nFLASHLIGHTDEPTHFILTERMODE;
|
|
#ifdef _DEBUG
|
|
bool m_bFLASHLIGHTDEPTHFILTERMODE;
|
|
#endif
|
|
public:
|
|
void SetFLASHLIGHTDEPTHFILTERMODE( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 2 );
|
|
m_nFLASHLIGHTDEPTHFILTERMODE = i;
|
|
#ifdef _DEBUG
|
|
m_bFLASHLIGHTDEPTHFILTERMODE = true;
|
|
#endif
|
|
}
|
|
void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
|
|
{
|
|
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bFLASHLIGHTDEPTHFILTERMODE = 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 )
|
|
{
|
|
m_nSHADER_SRGB_READ = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bSHADER_SRGB_READ = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nRIMLIGHT;
|
|
#ifdef _DEBUG
|
|
bool m_bRIMLIGHT;
|
|
#endif
|
|
public:
|
|
void SetRIMLIGHT( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nRIMLIGHT = i;
|
|
#ifdef _DEBUG
|
|
m_bRIMLIGHT = true;
|
|
#endif
|
|
}
|
|
void SetRIMLIGHT( bool i )
|
|
{
|
|
m_nRIMLIGHT = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bRIMLIGHT = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nPHONGWARPTEXTURE;
|
|
#ifdef _DEBUG
|
|
bool m_bPHONGWARPTEXTURE;
|
|
#endif
|
|
public:
|
|
void SetPHONGWARPTEXTURE( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nPHONGWARPTEXTURE = i;
|
|
#ifdef _DEBUG
|
|
m_bPHONGWARPTEXTURE = true;
|
|
#endif
|
|
}
|
|
void SetPHONGWARPTEXTURE( bool i )
|
|
{
|
|
m_nPHONGWARPTEXTURE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bPHONGWARPTEXTURE = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nREFRACTFOG;
|
|
#ifdef _DEBUG
|
|
bool m_bREFRACTFOG;
|
|
#endif
|
|
public:
|
|
void SetREFRACTFOG( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nREFRACTFOG = i;
|
|
#ifdef _DEBUG
|
|
m_bREFRACTFOG = true;
|
|
#endif
|
|
}
|
|
void SetREFRACTFOG( bool i )
|
|
{
|
|
m_nREFRACTFOG = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bREFRACTFOG = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nBASECHROMA;
|
|
#ifdef _DEBUG
|
|
bool m_bBASECHROMA;
|
|
#endif
|
|
public:
|
|
void SetBASECHROMA( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nBASECHROMA = i;
|
|
#ifdef _DEBUG
|
|
m_bBASECHROMA = true;
|
|
#endif
|
|
}
|
|
void SetBASECHROMA( bool i )
|
|
{
|
|
m_nBASECHROMA = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bBASECHROMA = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nNEBULA;
|
|
#ifdef _DEBUG
|
|
bool m_bNEBULA;
|
|
#endif
|
|
public:
|
|
void SetNEBULA( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nNEBULA = i;
|
|
#ifdef _DEBUG
|
|
m_bNEBULA = true;
|
|
#endif
|
|
}
|
|
void SetNEBULA( bool i )
|
|
{
|
|
m_nNEBULA = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bNEBULA = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nFLOWMAP;
|
|
#ifdef _DEBUG
|
|
bool m_bFLOWMAP;
|
|
#endif
|
|
public:
|
|
void SetFLOWMAP( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nFLOWMAP = i;
|
|
#ifdef _DEBUG
|
|
m_bFLOWMAP = true;
|
|
#endif
|
|
}
|
|
void SetFLOWMAP( bool i )
|
|
{
|
|
m_nFLOWMAP = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bFLOWMAP = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nDAMAGED;
|
|
#ifdef _DEBUG
|
|
bool m_bDAMAGED;
|
|
#endif
|
|
public:
|
|
void SetDAMAGED( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nDAMAGED = i;
|
|
#ifdef _DEBUG
|
|
m_bDAMAGED = true;
|
|
#endif
|
|
}
|
|
void SetDAMAGED( bool i )
|
|
{
|
|
m_nDAMAGED = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bDAMAGED = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nDOPIXELFOG;
|
|
#ifdef _DEBUG
|
|
bool m_bDOPIXELFOG;
|
|
#endif
|
|
public:
|
|
void SetDOPIXELFOG( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nDOPIXELFOG = i;
|
|
#ifdef _DEBUG
|
|
m_bDOPIXELFOG = true;
|
|
#endif
|
|
}
|
|
void SetDOPIXELFOG( bool i )
|
|
{
|
|
m_nDOPIXELFOG = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bDOPIXELFOG = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nFLOW_DEBUG;
|
|
#ifdef _DEBUG
|
|
bool m_bFLOW_DEBUG;
|
|
#endif
|
|
public:
|
|
void SetFLOW_DEBUG( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 2 );
|
|
m_nFLOW_DEBUG = i;
|
|
#ifdef _DEBUG
|
|
m_bFLOW_DEBUG = true;
|
|
#endif
|
|
}
|
|
void SetFLOW_DEBUG( bool i )
|
|
{
|
|
m_nFLOW_DEBUG = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bFLOW_DEBUG = true;
|
|
#endif
|
|
}
|
|
public:
|
|
// CONSTRUCTOR
|
|
vertexlit_sob_ps30_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
|
|
{
|
|
#ifdef _DEBUG
|
|
m_bCUBEMAP = false;
|
|
#endif // _DEBUG
|
|
m_nCUBEMAP = 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_bFLASHLIGHTDEPTHFILTERMODE = false;
|
|
#endif // _DEBUG
|
|
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
|
#ifdef _DEBUG
|
|
m_bSHADER_SRGB_READ = false;
|
|
#endif // _DEBUG
|
|
m_nSHADER_SRGB_READ = 0;
|
|
#ifdef _DEBUG
|
|
m_bRIMLIGHT = false;
|
|
#endif // _DEBUG
|
|
m_nRIMLIGHT = 0;
|
|
#ifdef _DEBUG
|
|
m_bPHONGWARPTEXTURE = false;
|
|
#endif // _DEBUG
|
|
m_nPHONGWARPTEXTURE = 0;
|
|
#ifdef _DEBUG
|
|
m_bREFRACTFOG = false;
|
|
#endif // _DEBUG
|
|
m_nREFRACTFOG = 0;
|
|
#ifdef _DEBUG
|
|
m_bBASECHROMA = false;
|
|
#endif // _DEBUG
|
|
m_nBASECHROMA = 0;
|
|
#ifdef _DEBUG
|
|
m_bNEBULA = false;
|
|
#endif // _DEBUG
|
|
m_nNEBULA = 0;
|
|
#ifdef _DEBUG
|
|
m_bFLOWMAP = false;
|
|
#endif // _DEBUG
|
|
m_nFLOWMAP = 0;
|
|
#ifdef _DEBUG
|
|
m_bDAMAGED = false;
|
|
#endif // _DEBUG
|
|
m_nDAMAGED = 0;
|
|
#ifdef _DEBUG
|
|
m_bDOPIXELFOG = true;
|
|
#endif // _DEBUG
|
|
m_nDOPIXELFOG = !IS_FLAG_SET( MATERIAL_VAR_VERTEXFOG ) ? 1 : 0 ;
|
|
#ifdef _DEBUG
|
|
m_bFLOW_DEBUG = false;
|
|
#endif // _DEBUG
|
|
m_nFLOW_DEBUG = 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_bLIGHTWARPTEXTURE && m_bSELFILLUM && m_bSELFILLUMFRESNEL && m_bNORMALMAPALPHAENVMAPMASK && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bDETAILTEXTURE && m_bDETAIL_BLEND_MODE && m_bFLASHLIGHTDEPTHFILTERMODE && m_bSHADER_SRGB_READ && m_bRIMLIGHT && m_bPHONGWARPTEXTURE && m_bREFRACTFOG && m_bBASECHROMA && m_bNEBULA && m_bFLOWMAP && m_bDAMAGED && m_bDOPIXELFOG && m_bFLOW_DEBUG;
|
|
Assert( bAllStaticVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 40 * m_nCUBEMAP ) + ( 80 * m_nLIGHTWARPTEXTURE ) + ( 160 * m_nSELFILLUM ) + ( 320 * m_nSELFILLUMFRESNEL ) + ( 640 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 1280 * m_nHALFLAMBERT ) + ( 2560 * m_nFLASHLIGHT ) + ( 5120 * m_nDETAILTEXTURE ) + ( 10240 * m_nDETAIL_BLEND_MODE ) + ( 71680 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 215040 * m_nSHADER_SRGB_READ ) + ( 215040 * m_nRIMLIGHT ) + ( 430080 * m_nPHONGWARPTEXTURE ) + ( 860160 * m_nREFRACTFOG ) + ( 1720320 * m_nBASECHROMA ) + ( 3440640 * m_nNEBULA ) + ( 6881280 * m_nFLOWMAP ) + ( 13762560 * m_nDAMAGED ) + ( 27525120 * m_nDOPIXELFOG ) + ( 55050240 * m_nFLOW_DEBUG ) + 0;
|
|
}
|
|
};
|
|
#define shaderStaticTest_vertexlit_sob_ps30 psh_forgot_to_set_static_CUBEMAP + 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_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_SHADER_SRGB_READ + psh_forgot_to_set_static_RIMLIGHT + psh_forgot_to_set_static_PHONGWARPTEXTURE + psh_forgot_to_set_static_REFRACTFOG + psh_forgot_to_set_static_BASECHROMA + psh_forgot_to_set_static_NEBULA + psh_forgot_to_set_static_FLOWMAP + psh_forgot_to_set_static_DAMAGED + psh_forgot_to_set_static_FLOW_DEBUG + 0
|
|
class vertexlit_sob_ps30_Dynamic_Index
|
|
{
|
|
private:
|
|
int m_nNUM_LIGHTS;
|
|
#ifdef _DEBUG
|
|
bool m_bNUM_LIGHTS;
|
|
#endif
|
|
public:
|
|
void SetNUM_LIGHTS( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 4 );
|
|
m_nNUM_LIGHTS = i;
|
|
#ifdef _DEBUG
|
|
m_bNUM_LIGHTS = true;
|
|
#endif
|
|
}
|
|
void SetNUM_LIGHTS( bool i )
|
|
{
|
|
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 )
|
|
{
|
|
m_nAMBIENT_LIGHT = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bAMBIENT_LIGHT = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nFLASHLIGHTSHADOWS;
|
|
#ifdef _DEBUG
|
|
bool m_bFLASHLIGHTSHADOWS;
|
|
#endif
|
|
public:
|
|
void SetFLASHLIGHTSHADOWS( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nFLASHLIGHTSHADOWS = i;
|
|
#ifdef _DEBUG
|
|
m_bFLASHLIGHTSHADOWS = true;
|
|
#endif
|
|
}
|
|
void SetFLASHLIGHTSHADOWS( bool i )
|
|
{
|
|
m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bFLASHLIGHTSHADOWS = 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 )
|
|
{
|
|
m_nPIXELFOGTYPE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bPIXELFOGTYPE = true;
|
|
#endif
|
|
}
|
|
public:
|
|
// CONSTRUCTOR
|
|
vertexlit_sob_ps30_Dynamic_Index( IShaderDynamicAPI *pShaderAPI )
|
|
{
|
|
#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_bFLASHLIGHTSHADOWS = false;
|
|
#endif // _DEBUG
|
|
m_nFLASHLIGHTSHADOWS = 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_bNUM_LIGHTS && m_bAMBIENT_LIGHT && m_bFLASHLIGHTSHADOWS && m_bPIXELFOGTYPE;
|
|
Assert( bAllDynamicVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 1 * m_nNUM_LIGHTS ) + ( 5 * m_nAMBIENT_LIGHT ) + ( 10 * m_nFLASHLIGHTSHADOWS ) + ( 20 * m_nPIXELFOGTYPE ) + 0;
|
|
}
|
|
};
|
|
#define shaderDynamicTest_vertexlit_sob_ps30 psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_AMBIENT_LIGHT + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + 0
|