// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!! // $DETAILTEXTURE && ( $BUMPMAP && !$DETAIL_ALPHA_MASK_BASE_TEXTURE ) // $VERTEXCOLOR && $BUMPMAP // $FLASHLIGHT && $SELFILLUM // $FLASHLIGHT && $DETAIL_ALPHA_MASK_BASE_TEXTURE // $FLASHLIGHT && $BUMPMAP // ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 ) [ps30] // ( $FLASHLIGHT == 0 ) && ( $UBERLIGHT == 1 ) // 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 worldtwotextureblend_ps30_Static_Index { 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_nBUMPMAP; #ifdef _DEBUG bool m_bBUMPMAP; #endif public: void SetBUMPMAP( int i ) { Assert( i >= 0 && i <= 1 ); m_nBUMPMAP = i; #ifdef _DEBUG m_bBUMPMAP = true; #endif } void SetBUMPMAP( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nBUMPMAP = i ? 1 : 0; #ifdef _DEBUG m_bBUMPMAP = 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_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_nDETAIL_ALPHA_MASK_BASE_TEXTURE; #ifdef _DEBUG bool m_bDETAIL_ALPHA_MASK_BASE_TEXTURE; #endif public: void SetDETAIL_ALPHA_MASK_BASE_TEXTURE( int i ) { Assert( i >= 0 && i <= 1 ); m_nDETAIL_ALPHA_MASK_BASE_TEXTURE = i; #ifdef _DEBUG m_bDETAIL_ALPHA_MASK_BASE_TEXTURE = true; #endif } void SetDETAIL_ALPHA_MASK_BASE_TEXTURE( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nDETAIL_ALPHA_MASK_BASE_TEXTURE = i ? 1 : 0; #ifdef _DEBUG m_bDETAIL_ALPHA_MASK_BASE_TEXTURE = 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_nSEAMLESS; #ifdef _DEBUG bool m_bSEAMLESS; #endif public: void SetSEAMLESS( int i ) { Assert( i >= 0 && i <= 1 ); m_nSEAMLESS = i; #ifdef _DEBUG m_bSEAMLESS = true; #endif } void SetSEAMLESS( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nSEAMLESS = i ? 1 : 0; #ifdef _DEBUG m_bSEAMLESS = 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 } public: // CONSTRUCTOR worldtwotextureblend_ps30_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params ) { #ifdef _DEBUG m_bDETAILTEXTURE = false; #endif // _DEBUG m_nDETAILTEXTURE = 0; #ifdef _DEBUG m_bBUMPMAP = false; #endif // _DEBUG m_nBUMPMAP = 0; #ifdef _DEBUG m_bVERTEXCOLOR = false; #endif // _DEBUG m_nVERTEXCOLOR = 0; #ifdef _DEBUG m_bSELFILLUM = false; #endif // _DEBUG m_nSELFILLUM = 0; #ifdef _DEBUG m_bDETAIL_ALPHA_MASK_BASE_TEXTURE = false; #endif // _DEBUG m_nDETAIL_ALPHA_MASK_BASE_TEXTURE = 0; #ifdef _DEBUG m_bFLASHLIGHT = false; #endif // _DEBUG m_nFLASHLIGHT = 0; #ifdef _DEBUG m_bSEAMLESS = false; #endif // _DEBUG m_nSEAMLESS = 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; } 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_bDETAILTEXTURE && m_bBUMPMAP && m_bVERTEXCOLOR && m_bSELFILLUM && m_bDETAIL_ALPHA_MASK_BASE_TEXTURE && m_bFLASHLIGHT && m_bSEAMLESS && m_bFLASHLIGHTDEPTHFILTERMODE && m_bSHADER_SRGB_READ; Assert( bAllStaticVarsDefined ); #endif // _DEBUG return ( 32 * m_nDETAILTEXTURE ) + ( 64 * m_nBUMPMAP ) + ( 128 * m_nVERTEXCOLOR ) + ( 256 * m_nSELFILLUM ) + ( 512 * m_nDETAIL_ALPHA_MASK_BASE_TEXTURE ) + ( 1024 * m_nFLASHLIGHT ) + ( 2048 * m_nSEAMLESS ) + ( 4096 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 12288 * m_nSHADER_SRGB_READ ) + 0; } }; #define shaderStaticTest_worldtwotextureblend_ps30 psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_BUMPMAP + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_DETAIL_ALPHA_MASK_BASE_TEXTURE + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_SHADER_SRGB_READ + 0 class worldtwotextureblend_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_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 } private: int m_nWRITE_DEPTH_TO_DESTALPHA; #ifdef _DEBUG bool m_bWRITE_DEPTH_TO_DESTALPHA; #endif public: void SetWRITE_DEPTH_TO_DESTALPHA( int i ) { Assert( i >= 0 && i <= 1 ); m_nWRITE_DEPTH_TO_DESTALPHA = i; #ifdef _DEBUG m_bWRITE_DEPTH_TO_DESTALPHA = true; #endif } void SetWRITE_DEPTH_TO_DESTALPHA( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nWRITE_DEPTH_TO_DESTALPHA = i ? 1 : 0; #ifdef _DEBUG m_bWRITE_DEPTH_TO_DESTALPHA = 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 } public: // CONSTRUCTOR worldtwotextureblend_ps30_Dynamic_Index( IShaderDynamicAPI *pShaderAPI ) { #ifdef _DEBUG m_bWRITEWATERFOGTODESTALPHA = false; #endif // _DEBUG m_nWRITEWATERFOGTODESTALPHA = 0; #ifdef _DEBUG m_bPIXELFOGTYPE = true; #endif // _DEBUG m_nPIXELFOGTYPE = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ; #ifdef _DEBUG m_bWRITE_DEPTH_TO_DESTALPHA = false; #endif // _DEBUG m_nWRITE_DEPTH_TO_DESTALPHA = 0; #ifdef _DEBUG m_bFLASHLIGHTSHADOWS = false; #endif // _DEBUG m_nFLASHLIGHTSHADOWS = 0; #ifdef _DEBUG m_bUBERLIGHT = false; #endif // _DEBUG m_nUBERLIGHT = 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 bAllDynamicVarsDefined = m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS && m_bUBERLIGHT; Assert( bAllDynamicVarsDefined ); #endif // _DEBUG return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 8 * m_nFLASHLIGHTSHADOWS ) + ( 16 * m_nUBERLIGHT ) + 0; } }; #define shaderDynamicTest_worldtwotextureblend_ps30 psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + psh_forgot_to_set_dynamic_UBERLIGHT + 0 static const ShaderComboInformation_t s_DynamicComboArray_worldtwotextureblend_ps30[5] = { { "WRITEWATERFOGTODESTALPHA", 0, 1 }, { "PIXELFOGTYPE", 0, 1 }, { "WRITE_DEPTH_TO_DESTALPHA", 0, 1 }, { "FLASHLIGHTSHADOWS", 0, 1 }, { "UBERLIGHT", 0, 1 }, }; static const ShaderComboInformation_t s_StaticComboArray_worldtwotextureblend_ps30[9] = { { "DETAILTEXTURE", 0, 1 }, { "BUMPMAP", 0, 1 }, { "VERTEXCOLOR", 0, 1 }, { "SELFILLUM", 0, 1 }, { "DETAIL_ALPHA_MASK_BASE_TEXTURE", 0, 1 }, { "FLASHLIGHT", 0, 1 }, { "SEAMLESS", 0, 1 }, { "FLASHLIGHTDEPTHFILTERMODE", 0, 2 }, { "SHADER_SRGB_READ", 0, 0 }, }; static const ShaderComboSemantics_t worldtwotextureblend_ps30_combos = { "worldtwotextureblend_ps30", s_DynamicComboArray_worldtwotextureblend_ps30, 5, s_StaticComboArray_worldtwotextureblend_ps30, 9 }; class ConstructMe_worldtwotextureblend_ps30 { public: ConstructMe_worldtwotextureblend_ps30() { GetShaderDLL()->AddShaderComboInformation( &worldtwotextureblend_ps30_combos ); } }; static ConstructMe_worldtwotextureblend_ps30 s_ConstructMe_worldtwotextureblend_ps30;