|
|
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
// ( $SFM == 0 ) && ( $UBERLIGHT == 1 )
// !$WORLDVERTEXTRANSITION && $NORMALMAP2
// !$NORMALMAP && $NORMALMAP2
// !$DETAILTEXTURE && ( $DETAIL_BLEND_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
#include "shaderlib/cshader.h" class flashlight_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_nNORMALMAP; #ifdef _DEBUG bool m_bNORMALMAP; #endif public: void SetNORMALMAP( int i ) { Assert( i >= 0 && i <= 2 ); m_nNORMALMAP = i; #ifdef _DEBUG m_bNORMALMAP = true; #endif } void SetNORMALMAP( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 2 ); m_nNORMALMAP = i ? 1 : 0; #ifdef _DEBUG m_bNORMALMAP = true; #endif } private: int m_nNORMALMAP2; #ifdef _DEBUG bool m_bNORMALMAP2; #endif public: void SetNORMALMAP2( int i ) { Assert( i >= 0 && i <= 1 ); m_nNORMALMAP2 = i; #ifdef _DEBUG m_bNORMALMAP2 = true; #endif } void SetNORMALMAP2( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nNORMALMAP2 = i ? 1 : 0; #ifdef _DEBUG m_bNORMALMAP2 = true; #endif } private: int m_nWORLDVERTEXTRANSITION; #ifdef _DEBUG bool m_bWORLDVERTEXTRANSITION; #endif public: void SetWORLDVERTEXTRANSITION( int i ) { Assert( i >= 0 && i <= 1 ); m_nWORLDVERTEXTRANSITION = i; #ifdef _DEBUG m_bWORLDVERTEXTRANSITION = true; #endif } void SetWORLDVERTEXTRANSITION( bool i ) { Assert( ( i ? 1 : 0 ) >= 0 && ( i ? 1 : 0 ) <= 1 ); m_nWORLDVERTEXTRANSITION = i ? 1 : 0; #ifdef _DEBUG m_bWORLDVERTEXTRANSITION = 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_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 <= 11 ); 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 ) <= 11 ); m_nDETAIL_BLEND_MODE = i ? 1 : 0; #ifdef _DEBUG m_bDETAIL_BLEND_MODE = 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
flashlight_ps20_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params ) { #ifdef _DEBUG m_bSFM = false; #endif // _DEBUG
m_nSFM = 0; #ifdef _DEBUG m_bNORMALMAP = false; #endif // _DEBUG
m_nNORMALMAP = 0; #ifdef _DEBUG m_bNORMALMAP2 = false; #endif // _DEBUG
m_nNORMALMAP2 = 0; #ifdef _DEBUG m_bWORLDVERTEXTRANSITION = false; #endif // _DEBUG
m_nWORLDVERTEXTRANSITION = 0; #ifdef _DEBUG m_bSEAMLESS = false; #endif // _DEBUG
m_nSEAMLESS = 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_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_bNORMALMAP && m_bNORMALMAP2 && m_bWORLDVERTEXTRANSITION && m_bSEAMLESS && m_bDETAILTEXTURE && m_bDETAIL_BLEND_MODE && m_bDOPIXELFOG; Assert( bAllStaticVarsDefined ); #endif // _DEBUG
return ( 2 * m_nSFM ) + ( 2 * m_nNORMALMAP ) + ( 6 * m_nNORMALMAP2 ) + ( 12 * m_nWORLDVERTEXTRANSITION ) + ( 24 * m_nSEAMLESS ) + ( 48 * m_nDETAILTEXTURE ) + ( 96 * m_nDETAIL_BLEND_MODE ) + ( 1152 * m_nDOPIXELFOG ) + 0; } }; #define shaderStaticTest_flashlight_ps20 psh_forgot_to_set_static_SFM + psh_forgot_to_set_static_NORMALMAP + psh_forgot_to_set_static_NORMALMAP2 + psh_forgot_to_set_static_WORLDVERTEXTRANSITION + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + 0 class flashlight_ps20_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
flashlight_ps20_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_flashlight_ps20 0
static const ShaderComboInformation_t s_DynamicComboArray_flashlight_ps20[1] = { { "PIXELFOGTYPE", 0, 1 }, };
static const ShaderComboInformation_t s_StaticComboArray_flashlight_ps20[8] = { { "SFM", 0, 0 }, { "NORMALMAP", 0, 2 }, { "NORMALMAP2", 0, 1 }, { "WORLDVERTEXTRANSITION", 0, 1 }, { "SEAMLESS", 0, 1 }, { "DETAILTEXTURE", 0, 1 }, { "DETAIL_BLEND_MODE", 0, 11 }, { "DOPIXELFOG", 0, 0 }, }; static const ShaderComboSemantics_t flashlight_ps20_combos = { "flashlight_ps20", s_DynamicComboArray_flashlight_ps20, 1, s_StaticComboArray_flashlight_ps20, 8 };
class ConstructMe_flashlight_ps20 { public: ConstructMe_flashlight_ps20() { GetShaderDLL()->AddShaderComboInformation( &flashlight_ps20_combos ); } };
static ConstructMe_flashlight_ps20 s_ConstructMe_flashlight_ps20;
|