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.
150 lines
3.9 KiB
150 lines
3.9 KiB
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
|
// 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 deferred_post_process_ps20b_Static_Index
|
|
{
|
|
private:
|
|
int m_nFOW;
|
|
#ifdef _DEBUG
|
|
bool m_bFOW;
|
|
#endif
|
|
public:
|
|
void SetFOW( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nFOW = i;
|
|
#ifdef _DEBUG
|
|
m_bFOW = true;
|
|
#endif
|
|
}
|
|
void SetFOW( bool i )
|
|
{
|
|
m_nFOW = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bFOW = true;
|
|
#endif
|
|
}
|
|
private:
|
|
int m_nDEBUG;
|
|
#ifdef _DEBUG
|
|
bool m_bDEBUG;
|
|
#endif
|
|
public:
|
|
void SetDEBUG( int i )
|
|
{
|
|
Assert( i >= 0 && i <= 1 );
|
|
m_nDEBUG = i;
|
|
#ifdef _DEBUG
|
|
m_bDEBUG = true;
|
|
#endif
|
|
}
|
|
void SetDEBUG( bool i )
|
|
{
|
|
m_nDEBUG = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bDEBUG = true;
|
|
#endif
|
|
}
|
|
public:
|
|
// CONSTRUCTOR
|
|
deferred_post_process_ps20b_Static_Index( IShaderShadow *pShaderShadow, IMaterialVar **params )
|
|
{
|
|
#ifdef _DEBUG
|
|
m_bFOW = false;
|
|
#endif // _DEBUG
|
|
m_nFOW = 0;
|
|
#ifdef _DEBUG
|
|
m_bDEBUG = false;
|
|
#endif // _DEBUG
|
|
m_nDEBUG = 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_bFOW && m_bDEBUG;
|
|
Assert( bAllStaticVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 4 * m_nFOW ) + ( 8 * m_nDEBUG ) + 0;
|
|
}
|
|
};
|
|
#define shaderStaticTest_deferred_post_process_ps20b psh_forgot_to_set_static_FOW + psh_forgot_to_set_static_DEBUG + 0
|
|
class deferred_post_process_ps20b_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 )
|
|
{
|
|
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 )
|
|
{
|
|
m_nPIXELFOGTYPE = i ? 1 : 0;
|
|
#ifdef _DEBUG
|
|
m_bPIXELFOGTYPE = true;
|
|
#endif
|
|
}
|
|
public:
|
|
// CONSTRUCTOR
|
|
deferred_post_process_ps20b_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 ) ;
|
|
}
|
|
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;
|
|
Assert( bAllDynamicVarsDefined );
|
|
#endif // _DEBUG
|
|
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + 0;
|
|
}
|
|
};
|
|
#define shaderDynamicTest_deferred_post_process_ps20b psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + 0
|