// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!! // ( $SFM == 0 ) && ( $UBERLIGHT == 1 ) // ( $FLASHLIGHT != 0 ) && ( $NUM_LIGHTS > 0 ) // ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 ) // ( $FLASHLIGHT == 0 ) && ( $UBERLIGHT == 1 ) // (! $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 ) // ( $WORLD_NORMAL == 1 ) && ( $FLASHLIGHTSHADOWS != 0 ) && ( $AMBIENT_LIGHT != 0 ) && ( $NUM_LIGHTS != 0 ) // ( $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_ps30_Static_Index { private: int m_nSFM; #ifdef _DEBUG bool m_bSFM; #endif public: void SetSFM( int i ) { Assert( i >= 0 && i <= 1 ); m_nSFM = i; #ifdef _DEBUG m_bSFM = true; #endif } void SetSFM( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); 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_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 ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 ); 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 ) { 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 <= 1 ); m_nWORLD_NORMAL = i; #ifdef _DEBUG m_bWORLD_NORMAL = true; #endif } void SetWORLD_NORMAL( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); 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 <= 1 ); 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 ) <= 1 ); 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 <= 3 ); m_nCSM_MODE = i; #ifdef _DEBUG m_bCSM_MODE = true; #endif } void SetCSM_MODE( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 3 ); 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 <= 1 ); m_nTINTMASKTEXTURE = i; #ifdef _DEBUG m_bTINTMASKTEXTURE = true; #endif } void SetTINTMASKTEXTURE( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); 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 <= 1 ); m_nDOPIXELFOG = i; #ifdef _DEBUG m_bDOPIXELFOG = true; #endif } void SetDOPIXELFOG( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nDOPIXELFOG = i ? 1 : 0; #ifdef _DEBUG m_bDOPIXELFOG = true; #endif } public: // CONSTRUCTOR vertexlit_and_unlit_generic_bump_ps30_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_bFLASHLIGHTDEPTHFILTERMODE = false; #endif // _DEBUG m_nFLASHLIGHTDEPTHFILTERMODE = 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 = !IS_FLAG_SET( MATERIAL_VAR_VERTEXFOG ) ? 1 : 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_bFLASHLIGHTDEPTHFILTERMODE && 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 ( 320 * m_nSFM ) + ( 640 * m_nCUBEMAP ) + ( 1280 * m_nDIFFUSELIGHTING ) + ( 2560 * m_nLIGHTWARPTEXTURE ) + ( 5120 * m_nSELFILLUM ) + ( 10240 * m_nSELFILLUMFRESNEL ) + ( 20480 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 40960 * m_nHALFLAMBERT ) + ( 40960 * m_nFLASHLIGHT ) + ( 81920 * m_nDETAILTEXTURE ) + ( 163840 * m_nDETAIL_BLEND_MODE ) + ( 1310720 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 3932160 * m_nSHADER_SRGB_READ ) + ( 3932160 * m_nWORLD_NORMAL ) + ( 7864320 * m_nCASCADED_SHADOW_MAPPING ) + ( 15728640 * m_nCSM_MODE ) + ( 62914560 * m_nDECAL_BLEND_MODE ) + ( 188743680 * m_nTINTMASKTEXTURE ) + ( 377487360 * m_nDOPIXELFOG ) + 0; } }; #define shaderStaticTest_vertexlit_and_unlit_generic_bump_ps30 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_FLASHLIGHTDEPTHFILTERMODE + 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_ps30_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 <= 4 ); m_nNUM_LIGHTS = i; #ifdef _DEBUG m_bNUM_LIGHTS = true; #endif } void SetNUM_LIGHTS( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 4 ); 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_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 ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nFLASHLIGHTSHADOWS = i ? 1 : 0; #ifdef _DEBUG m_bFLASHLIGHTSHADOWS = true; #endif } private: int m_nUBERLIGHT; #ifdef _DEBUG bool m_bUBERLIGHT; #endif public: void SetUBERLIGHT( int i ) { Assert( i >= 0 && i <= 1 ); m_nUBERLIGHT = i; #ifdef _DEBUG m_bUBERLIGHT = true; #endif } void SetUBERLIGHT( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nUBERLIGHT = i ? 1 : 0; #ifdef _DEBUG m_bUBERLIGHT = 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 <= 1 ); m_nSTATICLIGHT3 = i; #ifdef _DEBUG m_bSTATICLIGHT3 = true; #endif } void SetSTATICLIGHT3( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); 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_ps30_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_bFLASHLIGHTSHADOWS = false; #endif // _DEBUG m_nFLASHLIGHTSHADOWS = 0; #ifdef _DEBUG m_bUBERLIGHT = false; #endif // _DEBUG m_nUBERLIGHT = 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_bFLASHLIGHTSHADOWS && m_bUBERLIGHT && m_bCASCADE_SIZE && m_bSTATICLIGHT3 && m_bPIXELFOGTYPE; Assert( bAllDynamicVarsDefined ); #endif // _DEBUG return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nNUM_LIGHTS ) + ( 10 * m_nAMBIENT_LIGHT ) + ( 20 * m_nFLASHLIGHTSHADOWS ) + ( 40 * m_nUBERLIGHT ) + ( 80 * m_nCASCADE_SIZE ) + ( 80 * m_nSTATICLIGHT3 ) + ( 160 * m_nPIXELFOGTYPE ) + 0; } }; #define shaderDynamicTest_vertexlit_and_unlit_generic_bump_ps30 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_FLASHLIGHTSHADOWS + psh_forgot_to_set_dynamic_UBERLIGHT + 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_ps30[8] = { { "WRITEWATERFOGTODESTALPHA", 0, 1 }, { "NUM_LIGHTS", 0, 4 }, { "AMBIENT_LIGHT", 0, 1 }, { "FLASHLIGHTSHADOWS", 0, 1 }, { "UBERLIGHT", 0, 1 }, { "CASCADE_SIZE", 0, 0 }, { "STATICLIGHT3", 0, 1 }, { "PIXELFOGTYPE", 0, 1 }, }; static const ShaderComboInformation_t s_StaticComboArray_vertexlit_and_unlit_generic_bump_ps30[19] = { { "SFM", 0, 1 }, { "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 }, { "FLASHLIGHTDEPTHFILTERMODE", 0, 2 }, { "SHADER_SRGB_READ", 0, 0 }, { "WORLD_NORMAL", 0, 1 }, { "CASCADED_SHADOW_MAPPING", 0, 1 }, { "CSM_MODE", 0, 3 }, { "DECAL_BLEND_MODE", 0, 2 }, { "TINTMASKTEXTURE", 0, 1 }, { "DOPIXELFOG", 0, 1 }, }; static const ShaderComboSemantics_t vertexlit_and_unlit_generic_bump_ps30_combos = { "vertexlit_and_unlit_generic_bump_ps30", s_DynamicComboArray_vertexlit_and_unlit_generic_bump_ps30, 8, s_StaticComboArray_vertexlit_and_unlit_generic_bump_ps30, 19 }; class ConstructMe_vertexlit_and_unlit_generic_bump_ps30 { public: ConstructMe_vertexlit_and_unlit_generic_bump_ps30() { GetShaderDLL()->AddShaderComboInformation( &vertexlit_and_unlit_generic_bump_ps30_combos ); } }; static ConstructMe_vertexlit_and_unlit_generic_bump_ps30 s_ConstructMe_vertexlit_and_unlit_generic_bump_ps30;