Fixed stdshaders
This commit is contained in:
parent
e1f9394cb0
commit
b9b7e6f3f5
43 changed files with 3717 additions and 2129 deletions
2
gamedata
2
gamedata
|
@ -1 +1 @@
|
|||
Subproject commit cb20bc91be258e948787a9bee8fd99c1cf658612
|
||||
Subproject commit d4bd0682aa304abce59901729d97f67d799629c1
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
#include "lightmappedgeneric_vs11.inc"
|
||||
#include "LightmappedGeneric_Decal.inc"
|
||||
#include "lightmappedgeneric_decal.inc"
|
||||
#include "mathlib/bumpvects.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
|
|
|
@ -180,7 +180,8 @@ BEGIN_VS_SHADER( DecalModulate_dx9,
|
|||
{
|
||||
DECLARE_DYNAMIC_VERTEX_SHADER( vertexlit_and_unlit_generic_vs20 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DYNAMIC_LIGHT, 0 ); // Use simplest possible vertex lighting, since ps is so simple
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT, 0); //
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_VERTEX, 0 ); //
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, 0); //
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DOWATERFOG, fogIndex );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( SKINNING, 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( LIGHTING_PREVIEW, 0 );
|
||||
|
@ -208,7 +209,8 @@ BEGIN_VS_SHADER( DecalModulate_dx9,
|
|||
|
||||
DECLARE_DYNAMIC_VERTEX_SHADER( vertexlit_and_unlit_generic_vs30 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DYNAMIC_LIGHT, 0 ); // Use simplest possible vertex lighting, since ps is so simple
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT, 0); //
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_VERTEX, 0 ); //
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, 0); //
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DOWATERFOG, fogIndex );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( SKINNING, pShaderAPI->GetCurrentNumBones() > 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( LIGHTING_PREVIEW, 0 );
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "UnlitTwoTexture.inc"
|
||||
#include "unlittwotexture.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "BaseVSShader.h"
|
||||
#include "convar.h"
|
||||
|
||||
#include "WorldVertexTransition.inc"
|
||||
#include "worldvertextransition.inc"
|
||||
#include "worldvertextransition_vs14.inc"
|
||||
#include "worldvertextransition_seamless.inc"
|
||||
#include "lightmappedgeneric_vs11.inc"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "Cable.inc"
|
||||
#include "cable.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
@ -113,7 +113,7 @@ BEGIN_VS_SHADER( Cable_DX8,
|
|||
}
|
||||
|
||||
// This is the light direction [0,1,0,0] * A * 0.5
|
||||
float lightDir[4] = {0, A*0.5f, 0, 0};
|
||||
float lightDir[4] = {0, A*0.5, 0, 0};
|
||||
if( g_pHardwareConfig->GetDXSupportLevel() >= 90)
|
||||
{
|
||||
SetVertexShaderConstantGammaToLinear( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, lightDir );
|
||||
|
|
|
@ -198,7 +198,7 @@ BEGIN_VS_SHADER_FLAGS( DepthWrite, "Help for Depth Write", SHADER_NOT_EDITABLE )
|
|||
vParms.y = 4000.0f; // arbitrary far
|
||||
vParms.z = 0.0f;
|
||||
vParms.w = 0.0f;
|
||||
pShaderAPI->SetPixelShaderConstant( 1, vParms.Base(), 1 );
|
||||
pShaderAPI->SetPixelShaderConstant( 1, vParms.Base(), 2 );
|
||||
|
||||
} // DYNAMIC_STATE
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
|
|||
// Debug force flesh on
|
||||
vVsConst0[3] = IS_PARAM_DEFINED( info.m_nflDebugForceFleshOn ) ? params[info.m_nflDebugForceFleshOn]->GetFloatValue() : kDefaultDebugForceFleshOn;
|
||||
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, vVsConst0 );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, vVsConst0, 1 );
|
||||
|
||||
// Flesh effect centers and radii
|
||||
float vVsConst1[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] };
|
||||
|
@ -265,7 +265,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
|
|||
vVsConst1[3] = 0.001f;
|
||||
vVsConst1[3] = 1.0f / vVsConst1[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
||||
}
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_1, vVsConst1 );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_1, vVsConst1, 1 );
|
||||
|
||||
float vVsConst2[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] };
|
||||
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius2 ) )
|
||||
|
@ -275,7 +275,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
|
|||
vVsConst2[3] = 0.001f;
|
||||
vVsConst2[3] = 1.0f / vVsConst2[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
||||
}
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_2, vVsConst2 );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_2, vVsConst2, 2 );
|
||||
|
||||
float vVsConst3[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] };
|
||||
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius3 ) )
|
||||
|
@ -285,7 +285,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
|
|||
vVsConst3[3] = 0.001f;
|
||||
vVsConst3[3] = 1.0f / vVsConst3[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
||||
}
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_3, vVsConst3 );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_3, vVsConst3, 3 );
|
||||
|
||||
float vVsConst4[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] };
|
||||
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius4 ) )
|
||||
|
@ -295,7 +295,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
|
|||
vVsConst4[3] = 0.001f;
|
||||
vVsConst4[3] = 1.0f / vVsConst4[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
||||
}
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, vVsConst4 );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, vVsConst4, 4 );
|
||||
|
||||
// Set Pixel Shader Combos
|
||||
if( g_pHardwareConfig->SupportsPixelShaders_2_b() )
|
||||
|
|
|
@ -1,38 +1,11 @@
|
|||
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
||||
// $USE_STATIC_CONTROL_FLOW && ( $NUM_LIGHTS > 0 )
|
||||
// ($SEPARATE_DETAIL_UVS) && ($SEAMLESS_DETAIL)
|
||||
// ($DONT_GAMMA_CONVERT_VERTEX_COLOR && ( ! $VERTEXCOLOR ) )
|
||||
// defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
|
||||
|
||||
#ifndef VERTEXLIT_AND_UNLIT_GENERIC_VS20_H
|
||||
#define VERTEXLIT_AND_UNLIT_GENERIC_VS20_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class vertexlit_and_unlit_generic_vs20_Static_Index
|
||||
{
|
||||
unsigned int m_nVERTEXCOLOR : 2;
|
||||
unsigned int m_nCUBEMAP : 2;
|
||||
unsigned int m_nHALFLAMBERT : 2;
|
||||
unsigned int m_nFLASHLIGHT : 2;
|
||||
unsigned int m_nSEAMLESS_BASE : 2;
|
||||
unsigned int m_nSEAMLESS_DETAIL : 2;
|
||||
unsigned int m_nSEPARATE_DETAIL_UVS : 2;
|
||||
unsigned int m_nUSE_STATIC_CONTROL_FLOW : 2;
|
||||
unsigned int m_nDONT_GAMMA_CONVERT_VERTEX_COLOR : 2;
|
||||
private:
|
||||
int m_nVERTEXCOLOR;
|
||||
#ifdef _DEBUG
|
||||
bool m_bVERTEXCOLOR : 1;
|
||||
bool m_bCUBEMAP : 1;
|
||||
bool m_bHALFLAMBERT : 1;
|
||||
bool m_bFLASHLIGHT : 1;
|
||||
bool m_bSEAMLESS_BASE : 1;
|
||||
bool m_bSEAMLESS_DETAIL : 1;
|
||||
bool m_bSEPARATE_DETAIL_UVS : 1;
|
||||
bool m_bUSE_STATIC_CONTROL_FLOW : 1;
|
||||
bool m_bDONT_GAMMA_CONVERT_VERTEX_COLOR : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bVERTEXCOLOR;
|
||||
#endif
|
||||
public:
|
||||
void SetVERTEXCOLOR( int i )
|
||||
{
|
||||
|
@ -40,133 +13,242 @@ public:
|
|||
m_nVERTEXCOLOR = i;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetVERTEXCOLOR( bool i )
|
||||
{
|
||||
m_nVERTEXCOLOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP( bool i )
|
||||
{
|
||||
m_nCUBEMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = 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 // _DEBUG
|
||||
#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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHT( bool i )
|
||||
{
|
||||
m_nFLASHLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEAMLESS_BASE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_BASE;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_BASE( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_BASE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_BASE( bool i )
|
||||
{
|
||||
m_nSEAMLESS_BASE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEAMLESS_DETAIL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_DETAIL;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_DETAIL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_DETAIL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_DETAIL( bool i )
|
||||
{
|
||||
m_nSEAMLESS_DETAIL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEPARATE_DETAIL_UVS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEPARATE_DETAIL_UVS;
|
||||
#endif
|
||||
public:
|
||||
void SetSEPARATE_DETAIL_UVS( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEPARATE_DETAIL_UVS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEPARATE_DETAIL_UVS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEPARATE_DETAIL_UVS( bool i )
|
||||
{
|
||||
m_nSEPARATE_DETAIL_UVS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEPARATE_DETAIL_UVS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nUSE_STATIC_CONTROL_FLOW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bUSE_STATIC_CONTROL_FLOW;
|
||||
#endif
|
||||
public:
|
||||
void SetUSE_STATIC_CONTROL_FLOW( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nUSE_STATIC_CONTROL_FLOW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bUSE_STATIC_CONTROL_FLOW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetUSE_STATIC_CONTROL_FLOW( bool i )
|
||||
{
|
||||
m_nUSE_STATIC_CONTROL_FLOW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bUSE_STATIC_CONTROL_FLOW = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDONT_GAMMA_CONVERT_VERTEX_COLOR;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDONT_GAMMA_CONVERT_VERTEX_COLOR;
|
||||
#endif
|
||||
public:
|
||||
void SetDONT_GAMMA_CONVERT_VERTEX_COLOR( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDONT_GAMMA_CONVERT_VERTEX_COLOR( bool i )
|
||||
{
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_vs20_Static_Index( )
|
||||
{
|
||||
m_nVERTEXCOLOR = 0;
|
||||
m_nCUBEMAP = 0;
|
||||
m_nHALFLAMBERT = 0;
|
||||
m_nFLASHLIGHT = 0;
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
m_nSEPARATE_DETAIL_UVS = 0;
|
||||
m_nUSE_STATIC_CONTROL_FLOW = 0;
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nVERTEXCOLOR = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bHALFLAMBERT = false;
|
||||
#endif // _DEBUG
|
||||
m_nHALFLAMBERT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEPARATE_DETAIL_UVS = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEPARATE_DETAIL_UVS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bUSE_STATIC_CONTROL_FLOW = false;
|
||||
#endif // _DEBUG
|
||||
m_nUSE_STATIC_CONTROL_FLOW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bUSE_STATIC_CONTROL_FLOW && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR );
|
||||
return ( 192 * m_nVERTEXCOLOR ) + ( 384 * m_nCUBEMAP ) + ( 768 * m_nHALFLAMBERT ) + ( 1536 * m_nFLASHLIGHT ) + ( 3072 * m_nSEAMLESS_BASE ) + ( 6144 * m_nSEAMLESS_DETAIL ) + ( 12288 * m_nSEPARATE_DETAIL_UVS ) + ( 24576 * m_nUSE_STATIC_CONTROL_FLOW ) + ( 49152 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + 0;
|
||||
// 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_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bUSE_STATIC_CONTROL_FLOW && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 384 * m_nVERTEXCOLOR ) + ( 768 * m_nCUBEMAP ) + ( 1536 * m_nHALFLAMBERT ) + ( 3072 * m_nFLASHLIGHT ) + ( 6144 * m_nSEAMLESS_BASE ) + ( 12288 * m_nSEAMLESS_DETAIL ) + ( 24576 * m_nSEPARATE_DETAIL_UVS ) + ( 49152 * m_nUSE_STATIC_CONTROL_FLOW ) + ( 98304 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_vs20 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_USE_STATIC_CONTROL_FLOW + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR
|
||||
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_vs20 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_USE_STATIC_CONTROL_FLOW + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR + 0
|
||||
class vertexlit_and_unlit_generic_vs20_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nCOMPRESSED_VERTS : 2;
|
||||
unsigned int m_nDYNAMIC_LIGHT : 2;
|
||||
unsigned int m_nSTATIC_LIGHT : 2;
|
||||
unsigned int m_nDOWATERFOG : 2;
|
||||
unsigned int m_nSKINNING : 2;
|
||||
unsigned int m_nLIGHTING_PREVIEW : 2;
|
||||
unsigned int m_nNUM_LIGHTS : 2;
|
||||
private:
|
||||
int m_nCOMPRESSED_VERTS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCOMPRESSED_VERTS : 1;
|
||||
bool m_bDYNAMIC_LIGHT : 1;
|
||||
bool m_bSTATIC_LIGHT : 1;
|
||||
bool m_bDOWATERFOG : 1;
|
||||
bool m_bSKINNING : 1;
|
||||
bool m_bLIGHTING_PREVIEW : 1;
|
||||
bool m_bNUM_LIGHTS : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bCOMPRESSED_VERTS;
|
||||
#endif
|
||||
public:
|
||||
void SetCOMPRESSED_VERTS( int i )
|
||||
{
|
||||
|
@ -174,91 +256,207 @@ public:
|
|||
m_nCOMPRESSED_VERTS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCOMPRESSED_VERTS( bool i )
|
||||
{
|
||||
m_nCOMPRESSED_VERTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDYNAMIC_LIGHT;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDYNAMIC_LIGHT;
|
||||
#endif
|
||||
public:
|
||||
void SetDYNAMIC_LIGHT( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDYNAMIC_LIGHT = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDYNAMIC_LIGHT = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSTATIC_LIGHT( int i )
|
||||
void SetDYNAMIC_LIGHT( bool i )
|
||||
{
|
||||
m_nDYNAMIC_LIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDYNAMIC_LIGHT = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_VERTEX;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_VERTEX;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_VERTEX( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSTATIC_LIGHT = i;
|
||||
m_nSTATIC_LIGHT_VERTEX = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT = true;
|
||||
#endif // _DEBUG
|
||||
m_bSTATIC_LIGHT_VERTEX = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSTATIC_LIGHT_VERTEX( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_VERTEX = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_VERTEX = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_LIGHTMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_LIGHTMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDOWATERFOG;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDOWATERFOG;
|
||||
#endif
|
||||
public:
|
||||
void SetDOWATERFOG( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDOWATERFOG = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDOWATERFOG( bool i )
|
||||
{
|
||||
m_nDOWATERFOG = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSKINNING;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSKINNING;
|
||||
#endif
|
||||
public:
|
||||
void SetSKINNING( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSKINNING = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSKINNING( bool i )
|
||||
{
|
||||
m_nSKINNING = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nLIGHTING_PREVIEW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW;
|
||||
#endif
|
||||
public:
|
||||
void SetLIGHTING_PREVIEW( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nLIGHTING_PREVIEW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTING_PREVIEW( bool i )
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nNUM_LIGHTS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bNUM_LIGHTS;
|
||||
#endif
|
||||
public:
|
||||
void SetNUM_LIGHTS( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 2 );
|
||||
m_nNUM_LIGHTS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetNUM_LIGHTS( bool i )
|
||||
{
|
||||
m_nNUM_LIGHTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_vs20_Dynamic_Index()
|
||||
{
|
||||
m_nCOMPRESSED_VERTS = 0;
|
||||
m_nDYNAMIC_LIGHT = 0;
|
||||
m_nSTATIC_LIGHT = 0;
|
||||
m_nDOWATERFOG = 0;
|
||||
m_nSKINNING = 0;
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
m_nNUM_LIGHTS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nCOMPRESSED_VERTS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDYNAMIC_LIGHT = false;
|
||||
m_bSTATIC_LIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nDYNAMIC_LIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_VERTEX = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_VERTEX = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = false;
|
||||
#endif // _DEBUG
|
||||
m_nDOWATERFOG = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = false;
|
||||
#endif // _DEBUG
|
||||
m_nSKINNING = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nNUM_LIGHTS = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bCOMPRESSED_VERTS && m_bDYNAMIC_LIGHT && m_bSTATIC_LIGHT && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bNUM_LIGHTS );
|
||||
return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDYNAMIC_LIGHT ) + ( 4 * m_nSTATIC_LIGHT ) + ( 8 * m_nDOWATERFOG ) + ( 16 * m_nSKINNING ) + ( 32 * m_nLIGHTING_PREVIEW ) + ( 64 * m_nNUM_LIGHTS ) + 0;
|
||||
// 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_bCOMPRESSED_VERTS && m_bDYNAMIC_LIGHT && m_bSTATIC_LIGHT_VERTEX && m_bSTATIC_LIGHT_LIGHTMAP && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bNUM_LIGHTS;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDYNAMIC_LIGHT ) + ( 4 * m_nSTATIC_LIGHT_VERTEX ) + ( 8 * m_nSTATIC_LIGHT_LIGHTMAP ) + ( 16 * m_nDOWATERFOG ) + ( 32 * m_nSKINNING ) + ( 64 * m_nLIGHTING_PREVIEW ) + ( 128 * m_nNUM_LIGHTS ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DYNAMIC_LIGHT + vsh_forgot_to_set_dynamic_STATIC_LIGHT + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_NUM_LIGHTS
|
||||
|
||||
|
||||
#endif // VERTEXLIT_AND_UNLIT_GENERIC_VS20_H
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DYNAMIC_LIGHT + vsh_forgot_to_set_dynamic_STATIC_LIGHT_VERTEX + vsh_forgot_to_set_dynamic_STATIC_LIGHT_LIGHTMAP + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_NUM_LIGHTS + 0
|
||||
|
|
|
@ -1,67 +1,11 @@
|
|||
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
||||
// ($PIXELFOGTYPE == 0) && ($WRITEWATERFOGTODESTALPHA != 0)
|
||||
// (! $DETAILTEXTURE) && ( $DETAIL_BLEND_MODE != 0 )
|
||||
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 )
|
||||
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTDEPTHFILTERMODE != 0 )
|
||||
// ( $SELFILLUM == 0 ) && ( $SELFILLUMFRESNEL == 1 )
|
||||
// ( $FLASHLIGHT == 1 ) && ( $SELFILLUMFRESNEL == 1 )
|
||||
// ( $FLASHLIGHT == 1 ) && ( $SELFILLUM == 1 )
|
||||
// ( $BLENDTINTBYBASEALPHA ) && ( $SELFILLUM )
|
||||
// $FASTPATH_NOBUMP && ( $RIMLIGHT || $DETAILTEXTURE || $PHONGWARPTEXTURE || $SELFILLUM || $BLENDTINTBYBASEALPHA )
|
||||
// defined $HDRTYPE && defined $HDRENABLED && !$HDRTYPE && $HDRENABLED
|
||||
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
||||
// defined $LIGHTING_PREVIEW && defined $HDRTYPE && $LIGHTING_PREVIEW && $HDRTYPE != 0
|
||||
// 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 $HDRTYPE && defined $HDRENABLED && !$HDRTYPE && $HDRENABLED
|
||||
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
||||
// defined $LIGHTING_PREVIEW && defined $HDRTYPE && $LIGHTING_PREVIEW && $HDRTYPE != 0
|
||||
// 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
|
||||
|
||||
#ifndef SKIN_PS20B_H
|
||||
#define SKIN_PS20B_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class skin_ps20b_Static_Index
|
||||
{
|
||||
unsigned int m_nCONVERT_TO_SRGB : 1;
|
||||
unsigned int m_nCUBEMAP : 2;
|
||||
unsigned int m_nSELFILLUM : 2;
|
||||
unsigned int m_nSELFILLUMFRESNEL : 2;
|
||||
unsigned int m_nFLASHLIGHT : 2;
|
||||
unsigned int m_nLIGHTWARPTEXTURE : 2;
|
||||
unsigned int m_nPHONGWARPTEXTURE : 2;
|
||||
unsigned int m_nWRINKLEMAP : 2;
|
||||
unsigned int m_nDETAIL_BLEND_MODE : 3;
|
||||
unsigned int m_nDETAILTEXTURE : 2;
|
||||
unsigned int m_nRIMLIGHT : 2;
|
||||
unsigned int m_nFLASHLIGHTDEPTHFILTERMODE : 2;
|
||||
unsigned int m_nFASTPATH_NOBUMP : 2;
|
||||
unsigned int m_nBLENDTINTBYBASEALPHA : 2;
|
||||
private:
|
||||
int m_nCONVERT_TO_SRGB;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCONVERT_TO_SRGB : 1;
|
||||
bool m_bCUBEMAP : 1;
|
||||
bool m_bSELFILLUM : 1;
|
||||
bool m_bSELFILLUMFRESNEL : 1;
|
||||
bool m_bFLASHLIGHT : 1;
|
||||
bool m_bLIGHTWARPTEXTURE : 1;
|
||||
bool m_bPHONGWARPTEXTURE : 1;
|
||||
bool m_bWRINKLEMAP : 1;
|
||||
bool m_bDETAIL_BLEND_MODE : 1;
|
||||
bool m_bDETAILTEXTURE : 1;
|
||||
bool m_bRIMLIGHT : 1;
|
||||
bool m_bFLASHLIGHTDEPTHFILTERMODE : 1;
|
||||
bool m_bFASTPATH_NOBUMP : 1;
|
||||
bool m_bBLENDTINTBYBASEALPHA : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bCONVERT_TO_SRGB;
|
||||
#endif
|
||||
public:
|
||||
void SetCONVERT_TO_SRGB( int i )
|
||||
{
|
||||
|
@ -69,184 +13,367 @@ public:
|
|||
m_nCONVERT_TO_SRGB = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCONVERT_TO_SRGB = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCONVERT_TO_SRGB( bool i )
|
||||
{
|
||||
m_nCONVERT_TO_SRGB = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCONVERT_TO_SRGB = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP( bool i )
|
||||
{
|
||||
m_nCUBEMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = 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 // _DEBUG
|
||||
#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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSELFILLUMFRESNEL( bool i )
|
||||
{
|
||||
m_nSELFILLUMFRESNEL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUMFRESNEL = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHT( bool i )
|
||||
{
|
||||
m_nFLASHLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTWARPTEXTURE( bool i )
|
||||
{
|
||||
m_nLIGHTWARPTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTWARPTEXTURE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetPHONGWARPTEXTURE( bool i )
|
||||
{
|
||||
m_nPHONGWARPTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONGWARPTEXTURE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nWRINKLEMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bWRINKLEMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetWRINKLEMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nWRINKLEMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bWRINKLEMAP = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetWRINKLEMAP( bool i )
|
||||
{
|
||||
m_nWRINKLEMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bWRINKLEMAP = 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 // _DEBUG
|
||||
#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_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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDETAILTEXTURE( bool i )
|
||||
{
|
||||
m_nDETAILTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetRIMLIGHT( bool i )
|
||||
{
|
||||
m_nRIMLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bRIMLIGHT = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nFASTPATH_NOBUMP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bFASTPATH_NOBUMP;
|
||||
#endif
|
||||
public:
|
||||
void SetFASTPATH_NOBUMP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nFASTPATH_NOBUMP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bFASTPATH_NOBUMP = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFASTPATH_NOBUMP( bool i )
|
||||
{
|
||||
m_nFASTPATH_NOBUMP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFASTPATH_NOBUMP = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nBLENDTINTBYBASEALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bBLENDTINTBYBASEALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetBLENDTINTBYBASEALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nBLENDTINTBYBASEALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
skin_ps20b_Static_Index()
|
||||
void SetBLENDTINTBYBASEALPHA( bool i )
|
||||
{
|
||||
m_nBLENDTINTBYBASEALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
skin_ps20b_Static_Index( )
|
||||
{
|
||||
m_nCONVERT_TO_SRGB = 0;
|
||||
m_nCUBEMAP = 0;
|
||||
m_nSELFILLUM = 0;
|
||||
m_nSELFILLUMFRESNEL = 0;
|
||||
m_nFLASHLIGHT = 0;
|
||||
m_nLIGHTWARPTEXTURE = 0;
|
||||
m_nPHONGWARPTEXTURE = 0;
|
||||
m_nWRINKLEMAP = 0;
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
m_nDETAILTEXTURE = 0;
|
||||
m_nRIMLIGHT = 0;
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
m_nFASTPATH_NOBUMP = 0;
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCONVERT_TO_SRGB = false;
|
||||
#endif // _DEBUG
|
||||
m_nCONVERT_TO_SRGB = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUM = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUMFRESNEL = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUMFRESNEL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTWARPTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTWARPTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONGWARPTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nPHONGWARPTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bWRINKLEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nWRINKLEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAIL_BLEND_MODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAILTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bRIMLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nRIMLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFASTPATH_NOBUMP = false;
|
||||
#endif // _DEBUG
|
||||
m_nFASTPATH_NOBUMP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bCONVERT_TO_SRGB && m_bCUBEMAP && m_bSELFILLUM && m_bSELFILLUMFRESNEL && m_bFLASHLIGHT && m_bLIGHTWARPTEXTURE && m_bPHONGWARPTEXTURE && m_bWRINKLEMAP && m_bDETAIL_BLEND_MODE && m_bDETAILTEXTURE && m_bRIMLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE && m_bFASTPATH_NOBUMP && m_bBLENDTINTBYBASEALPHA );
|
||||
return ( 80 * m_nCONVERT_TO_SRGB ) + ( 80 * m_nCUBEMAP ) + ( 160 * m_nSELFILLUM ) + ( 320 * m_nSELFILLUMFRESNEL ) + ( 640 * m_nFLASHLIGHT ) + ( 1280 * m_nLIGHTWARPTEXTURE ) + ( 2560 * m_nPHONGWARPTEXTURE ) + ( 5120 * m_nWRINKLEMAP ) + ( 10240 * m_nDETAIL_BLEND_MODE ) + ( 71680 * m_nDETAILTEXTURE ) + ( 143360 * m_nRIMLIGHT ) + ( 286720 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 860160 * m_nFASTPATH_NOBUMP ) + ( 1720320 * m_nBLENDTINTBYBASEALPHA ) + 0;
|
||||
// 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_bCONVERT_TO_SRGB && m_bCUBEMAP && m_bSELFILLUM && m_bSELFILLUMFRESNEL && m_bFLASHLIGHT && m_bLIGHTWARPTEXTURE && m_bPHONGWARPTEXTURE && m_bWRINKLEMAP && m_bDETAIL_BLEND_MODE && m_bDETAILTEXTURE && m_bRIMLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE && m_bFASTPATH_NOBUMP && m_bBLENDTINTBYBASEALPHA;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 160 * m_nCONVERT_TO_SRGB ) + ( 160 * m_nCUBEMAP ) + ( 320 * m_nSELFILLUM ) + ( 640 * m_nSELFILLUMFRESNEL ) + ( 1280 * m_nFLASHLIGHT ) + ( 2560 * m_nLIGHTWARPTEXTURE ) + ( 5120 * m_nPHONGWARPTEXTURE ) + ( 10240 * m_nWRINKLEMAP ) + ( 20480 * m_nDETAIL_BLEND_MODE ) + ( 143360 * m_nDETAILTEXTURE ) + ( 286720 * m_nRIMLIGHT ) + ( 573440 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 1720320 * m_nFASTPATH_NOBUMP ) + ( 3440640 * m_nBLENDTINTBYBASEALPHA ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_skin_ps20b psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_SELFILLUMFRESNEL + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_LIGHTWARPTEXTURE + psh_forgot_to_set_static_PHONGWARPTEXTURE + psh_forgot_to_set_static_WRINKLEMAP + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_RIMLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_FASTPATH_NOBUMP + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA
|
||||
|
||||
|
||||
#define shaderStaticTest_skin_ps20b psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_SELFILLUMFRESNEL + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_LIGHTWARPTEXTURE + psh_forgot_to_set_static_PHONGWARPTEXTURE + psh_forgot_to_set_static_WRINKLEMAP + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_RIMLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_FASTPATH_NOBUMP + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA + 0
|
||||
class skin_ps20b_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nWRITEWATERFOGTODESTALPHA : 2;
|
||||
unsigned int m_nPIXELFOGTYPE : 2;
|
||||
unsigned int m_nNUM_LIGHTS : 3;
|
||||
unsigned int m_nWRITE_DEPTH_TO_DESTALPHA : 2;
|
||||
unsigned int m_nFLASHLIGHTSHADOWS : 2;
|
||||
private:
|
||||
int m_nWRITEWATERFOGTODESTALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bWRITEWATERFOGTODESTALPHA : 1;
|
||||
bool m_bPIXELFOGTYPE : 1;
|
||||
bool m_bNUM_LIGHTS : 1;
|
||||
bool m_bWRITE_DEPTH_TO_DESTALPHA : 1;
|
||||
bool m_bFLASHLIGHTSHADOWS : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bWRITEWATERFOGTODESTALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetWRITEWATERFOGTODESTALPHA( int i )
|
||||
{
|
||||
|
@ -254,69 +381,157 @@ public:
|
|||
m_nWRITEWATERFOGTODESTALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bWRITEWATERFOGTODESTALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetPIXELFOGTYPE( bool i )
|
||||
{
|
||||
m_nPIXELFOGTYPE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPIXELFOGTYPE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetNUM_LIGHTS( bool i )
|
||||
{
|
||||
m_nNUM_LIGHTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetWRITE_DEPTH_TO_DESTALPHA( bool i )
|
||||
{
|
||||
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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTSHADOWS( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTSHADOWS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nPHONG_USE_EXPONENT_FACTOR;
|
||||
#ifdef _DEBUG
|
||||
bool m_bPHONG_USE_EXPONENT_FACTOR;
|
||||
#endif
|
||||
public:
|
||||
void SetPHONG_USE_EXPONENT_FACTOR( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nPHONG_USE_EXPONENT_FACTOR = i;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONG_USE_EXPONENT_FACTOR = true;
|
||||
#endif
|
||||
}
|
||||
void SetPHONG_USE_EXPONENT_FACTOR( bool i )
|
||||
{
|
||||
m_nPHONG_USE_EXPONENT_FACTOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONG_USE_EXPONENT_FACTOR = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
skin_ps20b_Dynamic_Index()
|
||||
{
|
||||
m_nWRITEWATERFOGTODESTALPHA = 0;
|
||||
m_nPIXELFOGTYPE = 0;
|
||||
m_nNUM_LIGHTS = 0;
|
||||
m_nWRITE_DEPTH_TO_DESTALPHA = 0;
|
||||
m_nFLASHLIGHTSHADOWS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bWRITEWATERFOGTODESTALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nWRITEWATERFOGTODESTALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPIXELFOGTYPE = false;
|
||||
#endif // _DEBUG
|
||||
m_nPIXELFOGTYPE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nNUM_LIGHTS = 0;
|
||||
#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_bPHONG_USE_EXPONENT_FACTOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nPHONG_USE_EXPONENT_FACTOR = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS );
|
||||
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + 0;
|
||||
// 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_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS && m_bPHONG_USE_EXPONENT_FACTOR;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + ( 80 * m_nPHONG_USE_EXPONENT_FACTOR ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_skin_ps20b psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS
|
||||
|
||||
|
||||
#endif // SKIN_PS20B_H
|
||||
#define shaderDynamicTest_skin_ps20b psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + psh_forgot_to_set_dynamic_PHONG_USE_EXPONENT_FACTOR + 0
|
||||
|
|
|
@ -1,67 +1,11 @@
|
|||
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
||||
// ($PIXELFOGTYPE == 0) && ($WRITEWATERFOGTODESTALPHA != 0)
|
||||
// (! $DETAILTEXTURE) && ( $DETAIL_BLEND_MODE != 0 )
|
||||
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 )
|
||||
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTDEPTHFILTERMODE != 0 )
|
||||
// ( $SELFILLUM == 0 ) && ( $SELFILLUMFRESNEL == 1 )
|
||||
// ( $FLASHLIGHT == 1 ) && ( $SELFILLUMFRESNEL == 1 )
|
||||
// ( $FLASHLIGHT == 1 ) && ( $SELFILLUM == 1 )
|
||||
// ( $BLENDTINTBYBASEALPHA ) && ( $SELFILLUM )
|
||||
// $FASTPATH_NOBUMP && ( $RIMLIGHT || $DETAILTEXTURE || $PHONGWARPTEXTURE || $SELFILLUM || $BLENDTINTBYBASEALPHA )
|
||||
// defined $HDRTYPE && defined $HDRENABLED && !$HDRTYPE && $HDRENABLED
|
||||
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
||||
// defined $LIGHTING_PREVIEW && defined $HDRTYPE && $LIGHTING_PREVIEW && $HDRTYPE != 0
|
||||
// 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 $HDRTYPE && defined $HDRENABLED && !$HDRTYPE && $HDRENABLED
|
||||
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
||||
// defined $LIGHTING_PREVIEW && defined $HDRTYPE && $LIGHTING_PREVIEW && $HDRTYPE != 0
|
||||
// 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
|
||||
|
||||
#ifndef SKIN_PS30_H
|
||||
#define SKIN_PS30_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class skin_ps30_Static_Index
|
||||
{
|
||||
unsigned int m_nCONVERT_TO_SRGB : 1;
|
||||
unsigned int m_nCUBEMAP : 2;
|
||||
unsigned int m_nSELFILLUM : 2;
|
||||
unsigned int m_nSELFILLUMFRESNEL : 2;
|
||||
unsigned int m_nFLASHLIGHT : 2;
|
||||
unsigned int m_nLIGHTWARPTEXTURE : 2;
|
||||
unsigned int m_nPHONGWARPTEXTURE : 2;
|
||||
unsigned int m_nWRINKLEMAP : 2;
|
||||
unsigned int m_nDETAIL_BLEND_MODE : 3;
|
||||
unsigned int m_nDETAILTEXTURE : 2;
|
||||
unsigned int m_nRIMLIGHT : 2;
|
||||
unsigned int m_nFLASHLIGHTDEPTHFILTERMODE : 2;
|
||||
unsigned int m_nFASTPATH_NOBUMP : 2;
|
||||
unsigned int m_nBLENDTINTBYBASEALPHA : 2;
|
||||
private:
|
||||
int m_nCONVERT_TO_SRGB;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCONVERT_TO_SRGB : 1;
|
||||
bool m_bCUBEMAP : 1;
|
||||
bool m_bSELFILLUM : 1;
|
||||
bool m_bSELFILLUMFRESNEL : 1;
|
||||
bool m_bFLASHLIGHT : 1;
|
||||
bool m_bLIGHTWARPTEXTURE : 1;
|
||||
bool m_bPHONGWARPTEXTURE : 1;
|
||||
bool m_bWRINKLEMAP : 1;
|
||||
bool m_bDETAIL_BLEND_MODE : 1;
|
||||
bool m_bDETAILTEXTURE : 1;
|
||||
bool m_bRIMLIGHT : 1;
|
||||
bool m_bFLASHLIGHTDEPTHFILTERMODE : 1;
|
||||
bool m_bFASTPATH_NOBUMP : 1;
|
||||
bool m_bBLENDTINTBYBASEALPHA : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bCONVERT_TO_SRGB;
|
||||
#endif
|
||||
public:
|
||||
void SetCONVERT_TO_SRGB( int i )
|
||||
{
|
||||
|
@ -69,184 +13,367 @@ public:
|
|||
m_nCONVERT_TO_SRGB = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCONVERT_TO_SRGB = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCONVERT_TO_SRGB( bool i )
|
||||
{
|
||||
m_nCONVERT_TO_SRGB = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCONVERT_TO_SRGB = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP( bool i )
|
||||
{
|
||||
m_nCUBEMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = 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 // _DEBUG
|
||||
#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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSELFILLUMFRESNEL( bool i )
|
||||
{
|
||||
m_nSELFILLUMFRESNEL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUMFRESNEL = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHT( bool i )
|
||||
{
|
||||
m_nFLASHLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTWARPTEXTURE( bool i )
|
||||
{
|
||||
m_nLIGHTWARPTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTWARPTEXTURE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetPHONGWARPTEXTURE( bool i )
|
||||
{
|
||||
m_nPHONGWARPTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONGWARPTEXTURE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nWRINKLEMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bWRINKLEMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetWRINKLEMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nWRINKLEMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bWRINKLEMAP = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetWRINKLEMAP( bool i )
|
||||
{
|
||||
m_nWRINKLEMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bWRINKLEMAP = 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 // _DEBUG
|
||||
#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_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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDETAILTEXTURE( bool i )
|
||||
{
|
||||
m_nDETAILTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetRIMLIGHT( bool i )
|
||||
{
|
||||
m_nRIMLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bRIMLIGHT = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nFASTPATH_NOBUMP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bFASTPATH_NOBUMP;
|
||||
#endif
|
||||
public:
|
||||
void SetFASTPATH_NOBUMP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nFASTPATH_NOBUMP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bFASTPATH_NOBUMP = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFASTPATH_NOBUMP( bool i )
|
||||
{
|
||||
m_nFASTPATH_NOBUMP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFASTPATH_NOBUMP = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nBLENDTINTBYBASEALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bBLENDTINTBYBASEALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetBLENDTINTBYBASEALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nBLENDTINTBYBASEALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
skin_ps30_Static_Index()
|
||||
void SetBLENDTINTBYBASEALPHA( bool i )
|
||||
{
|
||||
m_nBLENDTINTBYBASEALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
skin_ps30_Static_Index( )
|
||||
{
|
||||
m_nCONVERT_TO_SRGB = 0;
|
||||
m_nCUBEMAP = 0;
|
||||
m_nSELFILLUM = 0;
|
||||
m_nSELFILLUMFRESNEL = 0;
|
||||
m_nFLASHLIGHT = 0;
|
||||
m_nLIGHTWARPTEXTURE = 0;
|
||||
m_nPHONGWARPTEXTURE = 0;
|
||||
m_nWRINKLEMAP = 0;
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
m_nDETAILTEXTURE = 0;
|
||||
m_nRIMLIGHT = 0;
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
m_nFASTPATH_NOBUMP = 0;
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCONVERT_TO_SRGB = false;
|
||||
#endif // _DEBUG
|
||||
m_nCONVERT_TO_SRGB = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUM = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUMFRESNEL = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUMFRESNEL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTWARPTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTWARPTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONGWARPTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nPHONGWARPTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bWRINKLEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nWRINKLEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAIL_BLEND_MODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAILTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bRIMLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nRIMLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFASTPATH_NOBUMP = false;
|
||||
#endif // _DEBUG
|
||||
m_nFASTPATH_NOBUMP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bCONVERT_TO_SRGB && m_bCUBEMAP && m_bSELFILLUM && m_bSELFILLUMFRESNEL && m_bFLASHLIGHT && m_bLIGHTWARPTEXTURE && m_bPHONGWARPTEXTURE && m_bWRINKLEMAP && m_bDETAIL_BLEND_MODE && m_bDETAILTEXTURE && m_bRIMLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE && m_bFASTPATH_NOBUMP && m_bBLENDTINTBYBASEALPHA );
|
||||
return ( 80 * m_nCONVERT_TO_SRGB ) + ( 80 * m_nCUBEMAP ) + ( 160 * m_nSELFILLUM ) + ( 320 * m_nSELFILLUMFRESNEL ) + ( 640 * m_nFLASHLIGHT ) + ( 1280 * m_nLIGHTWARPTEXTURE ) + ( 2560 * m_nPHONGWARPTEXTURE ) + ( 5120 * m_nWRINKLEMAP ) + ( 10240 * m_nDETAIL_BLEND_MODE ) + ( 71680 * m_nDETAILTEXTURE ) + ( 143360 * m_nRIMLIGHT ) + ( 286720 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 860160 * m_nFASTPATH_NOBUMP ) + ( 1720320 * m_nBLENDTINTBYBASEALPHA ) + 0;
|
||||
// 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_bCONVERT_TO_SRGB && m_bCUBEMAP && m_bSELFILLUM && m_bSELFILLUMFRESNEL && m_bFLASHLIGHT && m_bLIGHTWARPTEXTURE && m_bPHONGWARPTEXTURE && m_bWRINKLEMAP && m_bDETAIL_BLEND_MODE && m_bDETAILTEXTURE && m_bRIMLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE && m_bFASTPATH_NOBUMP && m_bBLENDTINTBYBASEALPHA;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 160 * m_nCONVERT_TO_SRGB ) + ( 160 * m_nCUBEMAP ) + ( 320 * m_nSELFILLUM ) + ( 640 * m_nSELFILLUMFRESNEL ) + ( 1280 * m_nFLASHLIGHT ) + ( 2560 * m_nLIGHTWARPTEXTURE ) + ( 5120 * m_nPHONGWARPTEXTURE ) + ( 10240 * m_nWRINKLEMAP ) + ( 20480 * m_nDETAIL_BLEND_MODE ) + ( 143360 * m_nDETAILTEXTURE ) + ( 286720 * m_nRIMLIGHT ) + ( 573440 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 1720320 * m_nFASTPATH_NOBUMP ) + ( 3440640 * m_nBLENDTINTBYBASEALPHA ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_skin_ps30 psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_SELFILLUMFRESNEL + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_LIGHTWARPTEXTURE + psh_forgot_to_set_static_PHONGWARPTEXTURE + psh_forgot_to_set_static_WRINKLEMAP + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_RIMLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_FASTPATH_NOBUMP + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA
|
||||
|
||||
|
||||
#define shaderStaticTest_skin_ps30 psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_SELFILLUMFRESNEL + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_LIGHTWARPTEXTURE + psh_forgot_to_set_static_PHONGWARPTEXTURE + psh_forgot_to_set_static_WRINKLEMAP + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_RIMLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_FASTPATH_NOBUMP + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA + 0
|
||||
class skin_ps30_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nWRITEWATERFOGTODESTALPHA : 2;
|
||||
unsigned int m_nPIXELFOGTYPE : 2;
|
||||
unsigned int m_nNUM_LIGHTS : 3;
|
||||
unsigned int m_nWRITE_DEPTH_TO_DESTALPHA : 2;
|
||||
unsigned int m_nFLASHLIGHTSHADOWS : 2;
|
||||
private:
|
||||
int m_nWRITEWATERFOGTODESTALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bWRITEWATERFOGTODESTALPHA : 1;
|
||||
bool m_bPIXELFOGTYPE : 1;
|
||||
bool m_bNUM_LIGHTS : 1;
|
||||
bool m_bWRITE_DEPTH_TO_DESTALPHA : 1;
|
||||
bool m_bFLASHLIGHTSHADOWS : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bWRITEWATERFOGTODESTALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetWRITEWATERFOGTODESTALPHA( int i )
|
||||
{
|
||||
|
@ -254,69 +381,157 @@ public:
|
|||
m_nWRITEWATERFOGTODESTALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bWRITEWATERFOGTODESTALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetPIXELFOGTYPE( bool i )
|
||||
{
|
||||
m_nPIXELFOGTYPE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPIXELFOGTYPE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetNUM_LIGHTS( bool i )
|
||||
{
|
||||
m_nNUM_LIGHTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetWRITE_DEPTH_TO_DESTALPHA( bool i )
|
||||
{
|
||||
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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTSHADOWS( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTSHADOWS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nPHONG_USE_EXPONENT_FACTOR;
|
||||
#ifdef _DEBUG
|
||||
bool m_bPHONG_USE_EXPONENT_FACTOR;
|
||||
#endif
|
||||
public:
|
||||
void SetPHONG_USE_EXPONENT_FACTOR( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nPHONG_USE_EXPONENT_FACTOR = i;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONG_USE_EXPONENT_FACTOR = true;
|
||||
#endif
|
||||
}
|
||||
void SetPHONG_USE_EXPONENT_FACTOR( bool i )
|
||||
{
|
||||
m_nPHONG_USE_EXPONENT_FACTOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPHONG_USE_EXPONENT_FACTOR = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
skin_ps30_Dynamic_Index()
|
||||
{
|
||||
m_nWRITEWATERFOGTODESTALPHA = 0;
|
||||
m_nPIXELFOGTYPE = 0;
|
||||
m_nNUM_LIGHTS = 0;
|
||||
m_nWRITE_DEPTH_TO_DESTALPHA = 0;
|
||||
m_nFLASHLIGHTSHADOWS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bWRITEWATERFOGTODESTALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nWRITEWATERFOGTODESTALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPIXELFOGTYPE = false;
|
||||
#endif // _DEBUG
|
||||
m_nPIXELFOGTYPE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nNUM_LIGHTS = 0;
|
||||
#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_bPHONG_USE_EXPONENT_FACTOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nPHONG_USE_EXPONENT_FACTOR = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS );
|
||||
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + 0;
|
||||
// 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_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS && m_bPHONG_USE_EXPONENT_FACTOR;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + ( 80 * m_nPHONG_USE_EXPONENT_FACTOR ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_skin_ps30 psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS
|
||||
|
||||
|
||||
#endif // SKIN_PS30_H
|
||||
#define shaderDynamicTest_skin_ps30 psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + psh_forgot_to_set_dynamic_PHONG_USE_EXPONENT_FACTOR + 0
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
||||
// $USE_STATIC_CONTROL_FLOW && ( $NUM_LIGHTS > 0 )
|
||||
// defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
|
||||
|
||||
#ifndef SKIN_VS20_H
|
||||
#define SKIN_VS20_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class skin_vs20_Static_Index
|
||||
{
|
||||
unsigned int m_nUSE_STATIC_CONTROL_FLOW : 2;
|
||||
private:
|
||||
int m_nUSE_STATIC_CONTROL_FLOW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bUSE_STATIC_CONTROL_FLOW : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bUSE_STATIC_CONTROL_FLOW;
|
||||
#endif
|
||||
public:
|
||||
void SetUSE_STATIC_CONTROL_FLOW( int i )
|
||||
{
|
||||
|
@ -22,41 +13,42 @@ public:
|
|||
m_nUSE_STATIC_CONTROL_FLOW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bUSE_STATIC_CONTROL_FLOW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
skin_vs20_Static_Index()
|
||||
void SetUSE_STATIC_CONTROL_FLOW( bool i )
|
||||
{
|
||||
m_nUSE_STATIC_CONTROL_FLOW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bUSE_STATIC_CONTROL_FLOW = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
skin_vs20_Static_Index( )
|
||||
{
|
||||
m_nUSE_STATIC_CONTROL_FLOW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bUSE_STATIC_CONTROL_FLOW = false;
|
||||
#endif // _DEBUG
|
||||
m_nUSE_STATIC_CONTROL_FLOW = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bUSE_STATIC_CONTROL_FLOW );
|
||||
// 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_bUSE_STATIC_CONTROL_FLOW;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 48 * m_nUSE_STATIC_CONTROL_FLOW ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_skin_vs20 vsh_forgot_to_set_static_USE_STATIC_CONTROL_FLOW
|
||||
|
||||
|
||||
#define shaderStaticTest_skin_vs20 vsh_forgot_to_set_static_USE_STATIC_CONTROL_FLOW + 0
|
||||
class skin_vs20_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nCOMPRESSED_VERTS : 2;
|
||||
unsigned int m_nDOWATERFOG : 2;
|
||||
unsigned int m_nSKINNING : 2;
|
||||
unsigned int m_nLIGHTING_PREVIEW : 2;
|
||||
unsigned int m_nNUM_LIGHTS : 2;
|
||||
private:
|
||||
int m_nCOMPRESSED_VERTS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCOMPRESSED_VERTS : 1;
|
||||
bool m_bDOWATERFOG : 1;
|
||||
bool m_bSKINNING : 1;
|
||||
bool m_bLIGHTING_PREVIEW : 1;
|
||||
bool m_bNUM_LIGHTS : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bCOMPRESSED_VERTS;
|
||||
#endif
|
||||
public:
|
||||
void SetCOMPRESSED_VERTS( int i )
|
||||
{
|
||||
|
@ -64,69 +56,132 @@ public:
|
|||
m_nCOMPRESSED_VERTS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCOMPRESSED_VERTS( bool i )
|
||||
{
|
||||
m_nCOMPRESSED_VERTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDOWATERFOG;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDOWATERFOG;
|
||||
#endif
|
||||
public:
|
||||
void SetDOWATERFOG( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDOWATERFOG = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDOWATERFOG( bool i )
|
||||
{
|
||||
m_nDOWATERFOG = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSKINNING;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSKINNING;
|
||||
#endif
|
||||
public:
|
||||
void SetSKINNING( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSKINNING = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSKINNING( bool i )
|
||||
{
|
||||
m_nSKINNING = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nLIGHTING_PREVIEW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW;
|
||||
#endif
|
||||
public:
|
||||
void SetLIGHTING_PREVIEW( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nLIGHTING_PREVIEW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTING_PREVIEW( bool i )
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nNUM_LIGHTS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bNUM_LIGHTS;
|
||||
#endif
|
||||
public:
|
||||
void SetNUM_LIGHTS( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 2 );
|
||||
m_nNUM_LIGHTS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetNUM_LIGHTS( bool i )
|
||||
{
|
||||
m_nNUM_LIGHTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
skin_vs20_Dynamic_Index()
|
||||
{
|
||||
m_nCOMPRESSED_VERTS = 0;
|
||||
m_nDOWATERFOG = 0;
|
||||
m_nSKINNING = 0;
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
m_nNUM_LIGHTS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nCOMPRESSED_VERTS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = false;
|
||||
#endif // _DEBUG
|
||||
m_nDOWATERFOG = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = false;
|
||||
#endif // _DEBUG
|
||||
m_nSKINNING = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bNUM_LIGHTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nNUM_LIGHTS = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bCOMPRESSED_VERTS && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bNUM_LIGHTS );
|
||||
// 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_bCOMPRESSED_VERTS && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bNUM_LIGHTS;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDOWATERFOG ) + ( 4 * m_nSKINNING ) + ( 8 * m_nLIGHTING_PREVIEW ) + ( 16 * m_nNUM_LIGHTS ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_skin_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_NUM_LIGHTS
|
||||
|
||||
|
||||
#endif // SKIN_VS20_H
|
||||
#define shaderDynamicTest_skin_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_NUM_LIGHTS + 0
|
||||
|
|
|
@ -536,6 +536,27 @@ public:
|
|||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_LIGHTMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_LIGHTMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 0 );
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_ps20_Dynamic_Index()
|
||||
{
|
||||
|
@ -547,16 +568,20 @@ public:
|
|||
m_bLIGHTING_PREVIEW = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = 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_bPIXELFOGTYPE && m_bLIGHTING_PREVIEW; // && m_bSTATIC_LIGHT_LIGHTMAP
|
||||
bool bAllDynamicVarsDefined = m_bPIXELFOGTYPE && m_bLIGHTING_PREVIEW && m_bSTATIC_LIGHT_LIGHTMAP;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nLIGHTING_PREVIEW ) + 0;
|
||||
return ( 1 * m_nPIXELFOGTYPE ) + ( 2 * m_nLIGHTING_PREVIEW ) + ( 6 * m_nSTATIC_LIGHT_LIGHTMAP ) + 0;
|
||||
}
|
||||
};
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_ps20 psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + 0
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_ps20 psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + psh_forgot_to_set_dynamic_STATIC_LIGHT_LIGHTMAP + 0
|
||||
|
|
|
@ -1,58 +1,11 @@
|
|||
#ifndef VERTEXLIT_AND_UNLIT_GENERIC_PS20B_H
|
||||
#define VERTEXLIT_AND_UNLIT_GENERIC_PS20B_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class vertexlit_and_unlit_generic_ps20b_Static_Index
|
||||
{
|
||||
unsigned int m_nDETAILTEXTURE : 2;
|
||||
unsigned int m_nCUBEMAP : 2;
|
||||
unsigned int m_nDIFFUSELIGHTING : 2;
|
||||
unsigned int m_nENVMAPMASK : 2;
|
||||
unsigned int m_nBASEALPHAENVMAPMASK : 2;
|
||||
unsigned int m_nSELFILLUM : 2;
|
||||
unsigned int m_nVERTEXCOLOR : 2;
|
||||
unsigned int m_nFLASHLIGHT : 2;
|
||||
unsigned int m_nSELFILLUM_ENVMAPMASK_ALPHA : 2;
|
||||
unsigned int m_nDETAIL_BLEND_MODE : 4;
|
||||
unsigned int m_nSEAMLESS_BASE : 2;
|
||||
unsigned int m_nSEAMLESS_DETAIL : 2;
|
||||
unsigned int m_nDISTANCEALPHA : 2;
|
||||
unsigned int m_nDISTANCEALPHAFROMDETAIL : 2;
|
||||
unsigned int m_nSOFT_MASK : 2;
|
||||
unsigned int m_nOUTLINE : 2;
|
||||
unsigned int m_nOUTER_GLOW : 2;
|
||||
unsigned int m_nFLASHLIGHTDEPTHFILTERMODE : 2;
|
||||
unsigned int m_nDEPTHBLEND : 2;
|
||||
unsigned int m_nBLENDTINTBYBASEALPHA : 2;
|
||||
unsigned int m_nSRGB_INPUT_ADAPTER : 2;
|
||||
unsigned int m_nCUBEMAP_SPHERE_LEGACY : 2;
|
||||
private:
|
||||
int m_nDETAILTEXTURE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDETAILTEXTURE : 1;
|
||||
bool m_bCUBEMAP : 1;
|
||||
bool m_bDIFFUSELIGHTING : 1;
|
||||
bool m_bENVMAPMASK : 1;
|
||||
bool m_bBASEALPHAENVMAPMASK : 1;
|
||||
bool m_bSELFILLUM : 1;
|
||||
bool m_bVERTEXCOLOR : 1;
|
||||
bool m_bFLASHLIGHT : 1;
|
||||
bool m_bSELFILLUM_ENVMAPMASK_ALPHA : 1;
|
||||
bool m_bDETAIL_BLEND_MODE : 1;
|
||||
bool m_bSEAMLESS_BASE : 1;
|
||||
bool m_bSEAMLESS_DETAIL : 1;
|
||||
bool m_bDISTANCEALPHA : 1;
|
||||
bool m_bDISTANCEALPHAFROMDETAIL : 1;
|
||||
bool m_bSOFT_MASK : 1;
|
||||
bool m_bOUTLINE : 1;
|
||||
bool m_bOUTER_GLOW : 1;
|
||||
bool m_bFLASHLIGHTDEPTHFILTERMODE : 1;
|
||||
bool m_bDEPTHBLEND : 1;
|
||||
bool m_bBLENDTINTBYBASEALPHA : 1;
|
||||
bool m_bSRGB_INPUT_ADAPTER : 1;
|
||||
bool m_bCUBEMAP_SPHERE_LEGACY : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bDETAILTEXTURE;
|
||||
#endif
|
||||
public:
|
||||
void SetDETAILTEXTURE( int i )
|
||||
{
|
||||
|
@ -60,266 +13,567 @@ public:
|
|||
m_nDETAILTEXTURE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDETAILTEXTURE( bool i )
|
||||
{
|
||||
m_nDETAILTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP( bool i )
|
||||
{
|
||||
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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDIFFUSELIGHTING( bool i )
|
||||
{
|
||||
m_nDIFFUSELIGHTING = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDIFFUSELIGHTING = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nENVMAPMASK;
|
||||
#ifdef _DEBUG
|
||||
bool m_bENVMAPMASK;
|
||||
#endif
|
||||
public:
|
||||
void SetENVMAPMASK( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nENVMAPMASK = i;
|
||||
#ifdef _DEBUG
|
||||
m_bENVMAPMASK = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetENVMAPMASK( bool i )
|
||||
{
|
||||
m_nENVMAPMASK = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bENVMAPMASK = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nBASEALPHAENVMAPMASK;
|
||||
#ifdef _DEBUG
|
||||
bool m_bBASEALPHAENVMAPMASK;
|
||||
#endif
|
||||
public:
|
||||
void SetBASEALPHAENVMAPMASK( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nBASEALPHAENVMAPMASK = i;
|
||||
#ifdef _DEBUG
|
||||
m_bBASEALPHAENVMAPMASK = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetBASEALPHAENVMAPMASK( bool i )
|
||||
{
|
||||
m_nBASEALPHAENVMAPMASK = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBASEALPHAENVMAPMASK = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSELFILLUM( bool i )
|
||||
{
|
||||
m_nSELFILLUM = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetVERTEXCOLOR( bool i )
|
||||
{
|
||||
m_nVERTEXCOLOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHT( bool i )
|
||||
{
|
||||
m_nFLASHLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSELFILLUM_ENVMAPMASK_ALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSELFILLUM_ENVMAPMASK_ALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetSELFILLUM_ENVMAPMASK_ALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM_ENVMAPMASK_ALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSELFILLUM_ENVMAPMASK_ALPHA( bool i )
|
||||
{
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM_ENVMAPMASK_ALPHA = 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 <= 9 );
|
||||
m_nDETAIL_BLEND_MODE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAIL_BLEND_MODE = true;
|
||||
#endif // _DEBUG
|
||||
#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_nSEAMLESS_BASE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_BASE;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_BASE( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_BASE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_BASE( bool i )
|
||||
{
|
||||
m_nSEAMLESS_BASE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEAMLESS_DETAIL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_DETAIL;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_DETAIL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_DETAIL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_DETAIL( bool i )
|
||||
{
|
||||
m_nSEAMLESS_DETAIL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDISTANCEALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDISTANCEALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetDISTANCEALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDISTANCEALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDISTANCEALPHA( bool i )
|
||||
{
|
||||
m_nDISTANCEALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHA = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDISTANCEALPHAFROMDETAIL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDISTANCEALPHAFROMDETAIL;
|
||||
#endif
|
||||
public:
|
||||
void SetDISTANCEALPHAFROMDETAIL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDISTANCEALPHAFROMDETAIL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHAFROMDETAIL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDISTANCEALPHAFROMDETAIL( bool i )
|
||||
{
|
||||
m_nDISTANCEALPHAFROMDETAIL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHAFROMDETAIL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSOFT_MASK;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSOFT_MASK;
|
||||
#endif
|
||||
public:
|
||||
void SetSOFT_MASK( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSOFT_MASK = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSOFT_MASK = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSOFT_MASK( bool i )
|
||||
{
|
||||
m_nSOFT_MASK = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSOFT_MASK = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nOUTLINE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bOUTLINE;
|
||||
#endif
|
||||
public:
|
||||
void SetOUTLINE( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nOUTLINE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTLINE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetOUTLINE( bool i )
|
||||
{
|
||||
m_nOUTLINE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTLINE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nOUTER_GLOW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bOUTER_GLOW;
|
||||
#endif
|
||||
public:
|
||||
void SetOUTER_GLOW( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nOUTER_GLOW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTER_GLOW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetOUTER_GLOW( bool i )
|
||||
{
|
||||
m_nOUTER_GLOW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTER_GLOW = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDEPTHBLEND;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDEPTHBLEND;
|
||||
#endif
|
||||
public:
|
||||
void SetDEPTHBLEND( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDEPTHBLEND = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDEPTHBLEND = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDEPTHBLEND( bool i )
|
||||
{
|
||||
m_nDEPTHBLEND = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEPTHBLEND = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nBLENDTINTBYBASEALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bBLENDTINTBYBASEALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetBLENDTINTBYBASEALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nBLENDTINTBYBASEALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetBLENDTINTBYBASEALPHA( bool i )
|
||||
{
|
||||
m_nBLENDTINTBYBASEALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSRGB_INPUT_ADAPTER;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSRGB_INPUT_ADAPTER;
|
||||
#endif
|
||||
public:
|
||||
void SetSRGB_INPUT_ADAPTER( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSRGB_INPUT_ADAPTER = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSRGB_INPUT_ADAPTER = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSRGB_INPUT_ADAPTER( bool i )
|
||||
{
|
||||
m_nSRGB_INPUT_ADAPTER = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSRGB_INPUT_ADAPTER = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nCUBEMAP_SPHERE_LEGACY;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCUBEMAP_SPHERE_LEGACY;
|
||||
#endif
|
||||
public:
|
||||
void SetCUBEMAP_SPHERE_LEGACY( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nCUBEMAP_SPHERE_LEGACY = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP_SPHERE_LEGACY = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP_SPHERE_LEGACY( bool i )
|
||||
{
|
||||
m_nCUBEMAP_SPHERE_LEGACY = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP_SPHERE_LEGACY = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_ps20b_Static_Index( )
|
||||
{
|
||||
m_nDETAILTEXTURE = 0;
|
||||
m_nCUBEMAP = 0;
|
||||
m_nDIFFUSELIGHTING = 0;
|
||||
m_nENVMAPMASK = 0;
|
||||
m_nBASEALPHAENVMAPMASK = 0;
|
||||
m_nSELFILLUM = 0;
|
||||
m_nVERTEXCOLOR = 0;
|
||||
m_nFLASHLIGHT = 0;
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = 0;
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
m_nDISTANCEALPHA = 0;
|
||||
m_nDISTANCEALPHAFROMDETAIL = 0;
|
||||
m_nSOFT_MASK = 0;
|
||||
m_nOUTLINE = 0;
|
||||
m_nOUTER_GLOW = 0;
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
m_nDEPTHBLEND = 0;
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
m_nSRGB_INPUT_ADAPTER = 0;
|
||||
m_nCUBEMAP_SPHERE_LEGACY = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAILTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDIFFUSELIGHTING = false;
|
||||
#endif // _DEBUG
|
||||
m_nDIFFUSELIGHTING = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bENVMAPMASK = false;
|
||||
#endif // _DEBUG
|
||||
m_nENVMAPMASK = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBASEALPHAENVMAPMASK = false;
|
||||
#endif // _DEBUG
|
||||
m_nBASEALPHAENVMAPMASK = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUM = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nVERTEXCOLOR = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM_ENVMAPMASK_ALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAIL_BLEND_MODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nDISTANCEALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHAFROMDETAIL = false;
|
||||
#endif // _DEBUG
|
||||
m_nDISTANCEALPHAFROMDETAIL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSOFT_MASK = false;
|
||||
#endif // _DEBUG
|
||||
m_nSOFT_MASK = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTLINE = false;
|
||||
#endif // _DEBUG
|
||||
m_nOUTLINE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTER_GLOW = false;
|
||||
#endif // _DEBUG
|
||||
m_nOUTER_GLOW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEPTHBLEND = false;
|
||||
#endif // _DEBUG
|
||||
m_nDEPTHBLEND = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSRGB_INPUT_ADAPTER = false;
|
||||
#endif // _DEBUG
|
||||
m_nSRGB_INPUT_ADAPTER = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP_SPHERE_LEGACY = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP_SPHERE_LEGACY = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bDETAILTEXTURE && m_bCUBEMAP && m_bDIFFUSELIGHTING && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bVERTEXCOLOR && m_bFLASHLIGHT && m_bSELFILLUM_ENVMAPMASK_ALPHA && m_bDETAIL_BLEND_MODE && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bDISTANCEALPHA && m_bDISTANCEALPHAFROMDETAIL && m_bSOFT_MASK && m_bOUTLINE && m_bOUTER_GLOW && m_bFLASHLIGHTDEPTHFILTERMODE && m_bDEPTHBLEND && m_bBLENDTINTBYBASEALPHA && m_bSRGB_INPUT_ADAPTER && m_bCUBEMAP_SPHERE_LEGACY );
|
||||
return ( 6 * m_nDETAILTEXTURE ) + ( 12 * m_nCUBEMAP ) + ( 24 * m_nDIFFUSELIGHTING ) + ( 48 * m_nENVMAPMASK ) + ( 96 * m_nBASEALPHAENVMAPMASK ) + ( 192 * m_nSELFILLUM ) + ( 384 * m_nVERTEXCOLOR ) + ( 768 * m_nFLASHLIGHT ) + ( 1536 * m_nSELFILLUM_ENVMAPMASK_ALPHA ) + ( 3072 * m_nDETAIL_BLEND_MODE ) + ( 30720 * m_nSEAMLESS_BASE ) + ( 61440 * m_nSEAMLESS_DETAIL ) + ( 122880 * m_nDISTANCEALPHA ) + ( 245760 * m_nDISTANCEALPHAFROMDETAIL ) + ( 491520 * m_nSOFT_MASK ) + ( 983040 * m_nOUTLINE ) + ( 1966080 * m_nOUTER_GLOW ) + ( 3932160 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 11796480 * m_nDEPTHBLEND ) + ( 23592960 * m_nBLENDTINTBYBASEALPHA ) + ( 47185920 * m_nSRGB_INPUT_ADAPTER ) + ( 94371840 * m_nCUBEMAP_SPHERE_LEGACY ) + 0;
|
||||
// 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_bCUBEMAP && m_bDIFFUSELIGHTING && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bVERTEXCOLOR && m_bFLASHLIGHT && m_bSELFILLUM_ENVMAPMASK_ALPHA && m_bDETAIL_BLEND_MODE && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bDISTANCEALPHA && m_bDISTANCEALPHAFROMDETAIL && m_bSOFT_MASK && m_bOUTLINE && m_bOUTER_GLOW && m_bFLASHLIGHTDEPTHFILTERMODE && m_bDEPTHBLEND && m_bBLENDTINTBYBASEALPHA && m_bSRGB_INPUT_ADAPTER && m_bCUBEMAP_SPHERE_LEGACY;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 24 * m_nDETAILTEXTURE ) + ( 48 * m_nCUBEMAP ) + ( 96 * m_nDIFFUSELIGHTING ) + ( 192 * m_nENVMAPMASK ) + ( 384 * m_nBASEALPHAENVMAPMASK ) + ( 768 * m_nSELFILLUM ) + ( 1536 * m_nVERTEXCOLOR ) + ( 3072 * m_nFLASHLIGHT ) + ( 6144 * m_nSELFILLUM_ENVMAPMASK_ALPHA ) + ( 12288 * m_nDETAIL_BLEND_MODE ) + ( 122880 * m_nSEAMLESS_BASE ) + ( 245760 * m_nSEAMLESS_DETAIL ) + ( 491520 * m_nDISTANCEALPHA ) + ( 983040 * m_nDISTANCEALPHAFROMDETAIL ) + ( 1966080 * m_nSOFT_MASK ) + ( 3932160 * m_nOUTLINE ) + ( 7864320 * m_nOUTER_GLOW ) + ( 15728640 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 47185920 * m_nDEPTHBLEND ) + ( 94371840 * m_nBLENDTINTBYBASEALPHA ) + ( 188743680 * m_nSRGB_INPUT_ADAPTER ) + ( 377487360 * m_nCUBEMAP_SPHERE_LEGACY ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_ps20b psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_DIFFUSELIGHTING + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_SELFILLUM_ENVMAPMASK_ALPHA + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_SEAMLESS_BASE + psh_forgot_to_set_static_SEAMLESS_DETAIL + psh_forgot_to_set_static_DISTANCEALPHA + psh_forgot_to_set_static_DISTANCEALPHAFROMDETAIL + psh_forgot_to_set_static_SOFT_MASK + psh_forgot_to_set_static_OUTLINE + psh_forgot_to_set_static_OUTER_GLOW + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_DEPTHBLEND + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA + psh_forgot_to_set_static_SRGB_INPUT_ADAPTER + psh_forgot_to_set_static_CUBEMAP_SPHERE_LEGACY
|
||||
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_ps20b psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_DIFFUSELIGHTING + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_SELFILLUM_ENVMAPMASK_ALPHA + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_SEAMLESS_BASE + psh_forgot_to_set_static_SEAMLESS_DETAIL + psh_forgot_to_set_static_DISTANCEALPHA + psh_forgot_to_set_static_DISTANCEALPHAFROMDETAIL + psh_forgot_to_set_static_SOFT_MASK + psh_forgot_to_set_static_OUTLINE + psh_forgot_to_set_static_OUTER_GLOW + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_DEPTHBLEND + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA + psh_forgot_to_set_static_SRGB_INPUT_ADAPTER + psh_forgot_to_set_static_CUBEMAP_SPHERE_LEGACY + 0
|
||||
class vertexlit_and_unlit_generic_ps20b_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nLIGHTING_PREVIEW : 2;
|
||||
unsigned int m_nFLASHLIGHTSHADOWS : 2;
|
||||
private:
|
||||
int m_nLIGHTING_PREVIEW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW : 1;
|
||||
bool m_bFLASHLIGHTSHADOWS : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW;
|
||||
#endif
|
||||
public:
|
||||
void SetLIGHTING_PREVIEW( int i )
|
||||
{
|
||||
|
@ -327,36 +581,107 @@ public:
|
|||
m_nLIGHTING_PREVIEW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTING_PREVIEW( bool i )
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
vertexlit_and_unlit_generic_ps20b_Dynamic_Index( )
|
||||
void SetFLASHLIGHTSHADOWS( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTSHADOWS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_LIGHTMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_LIGHTMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDEBUG_LUXELS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDEBUG_LUXELS;
|
||||
#endif
|
||||
public:
|
||||
void SetDEBUG_LUXELS( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDEBUG_LUXELS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDEBUG_LUXELS = true;
|
||||
#endif
|
||||
}
|
||||
void SetDEBUG_LUXELS( bool i )
|
||||
{
|
||||
m_nDEBUG_LUXELS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEBUG_LUXELS = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_ps20b_Dynamic_Index()
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
m_nFLASHLIGHTSHADOWS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTSHADOWS = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHTSHADOWS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEBUG_LUXELS = false;
|
||||
#endif // _DEBUG
|
||||
m_nDEBUG_LUXELS = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bLIGHTING_PREVIEW && m_bFLASHLIGHTSHADOWS );
|
||||
return ( 1 * m_nLIGHTING_PREVIEW ) + ( 3 * m_nFLASHLIGHTSHADOWS ) + 0;
|
||||
// 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_bLIGHTING_PREVIEW && m_bFLASHLIGHTSHADOWS && m_bSTATIC_LIGHT_LIGHTMAP && m_bDEBUG_LUXELS;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nLIGHTING_PREVIEW ) + ( 3 * m_nFLASHLIGHTSHADOWS ) + ( 6 * m_nSTATIC_LIGHT_LIGHTMAP ) + ( 12 * m_nDEBUG_LUXELS ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_ps20b psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS
|
||||
|
||||
|
||||
#endif // VERTEXLIT_AND_UNLIT_GENERIC_PS20B_H
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_ps20b psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + psh_forgot_to_set_dynamic_STATIC_LIGHT_LIGHTMAP + psh_forgot_to_set_dynamic_DEBUG_LUXELS + 0
|
||||
|
|
|
@ -1,93 +1,11 @@
|
|||
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
||||
// ($DETAILTEXTURE == 0 ) && ( $DETAIL_BLEND_MODE != 0 )
|
||||
// ($DETAILTEXTURE == 0 ) && ( $SEAMLESS_DETAIL )
|
||||
// ($ENVMAPMASK || $SELFILLUM_ENVMAPMASK_ALPHA) && ($SEAMLESS_BASE || $SEAMLESS_DETAIL)
|
||||
// $BASEALPHAENVMAPMASK && $ENVMAPMASK
|
||||
// $BASEALPHAENVMAPMASK && $SELFILLUM
|
||||
// $SELFILLUM && $SELFILLUM_ENVMAPMASK_ALPHA
|
||||
// $SELFILLUM_ENVMAPMASK_ALPHA && (! $ENVMAPMASK)
|
||||
// $ENVMAPMASK && ($FLASHLIGHT || $FLASHLIGHTSHADOWS)
|
||||
// $BASEALPHAENVMAPMASK && ($SEAMLESS_BASE || $SEAMLESS_DETAIL)
|
||||
// ($DISTANCEALPHA == 0) && ($DISTANCEALPHAFROMDETAIL || $SOFT_MASK || $OUTLINE || $OUTER_GLOW)
|
||||
// ($DETAILTEXTURE == 0) && ($DISTANCEALPHAFROMDETAIL)
|
||||
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 )
|
||||
// ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTDEPTHFILTERMODE != 0 )
|
||||
// ($DISTANCEALPHA) && ($ENVMAPMASK || $BASEALPHAENVMAPMASK || $SELFILLUM || $SELFILLUM_ENVMAPMASK_ALPHA )
|
||||
// ($DISTANCEALPHA) && ($SEAMLESS_BASE || $SEAMLESS_DETAIL || $CUBEMAP || $LIGHTING_PREVIEW )
|
||||
// ($DISTANCEALPHA) && ($WRITEWATERFOGTODESTALPHA || $PIXELFOGTYPE || $FLASHLIGHT || $FLASHLIGHTSHADOWS || $SRGB_INPUT_ADAPTER )
|
||||
// $SEAMLESS_BASE && $SRGB_INPUT_ADAPTER
|
||||
// $SEAMLESS_BASE && ($BLENDTINTBYBASEALPHA )
|
||||
// ($BLENDTINTBYBASEALPHA) && ($SELFILLUM || (($DISTANCEALPHA) && ($DISTANCEALPHAFROMDETAIL == 0)) || $BASEALPHAENVMAPMASK)
|
||||
// $FLASHLIGHT && $CUBEMAP
|
||||
// $CUBEMAP_SPHERE_LEGACY && ($CUBEMAP == 0)
|
||||
// defined $HDRTYPE && defined $HDRENABLED && !$HDRTYPE && $HDRENABLED
|
||||
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
||||
// defined $LIGHTING_PREVIEW && defined $HDRTYPE && $LIGHTING_PREVIEW && $HDRTYPE != 0
|
||||
// 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 $HDRTYPE && defined $HDRENABLED && !$HDRTYPE && $HDRENABLED
|
||||
// defined $PIXELFOGTYPE && defined $WRITEWATERFOGTODESTALPHA && ( $PIXELFOGTYPE != 1 ) && $WRITEWATERFOGTODESTALPHA
|
||||
// defined $LIGHTING_PREVIEW && defined $HDRTYPE && $LIGHTING_PREVIEW && $HDRTYPE != 0
|
||||
// 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
|
||||
|
||||
#ifndef VERTEXLIT_AND_UNLIT_GENERIC_PS30_H
|
||||
#define VERTEXLIT_AND_UNLIT_GENERIC_PS30_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class vertexlit_and_unlit_generic_ps30_Static_Index
|
||||
{
|
||||
unsigned int m_nDETAILTEXTURE : 2;
|
||||
unsigned int m_nCUBEMAP : 2;
|
||||
unsigned int m_nDIFFUSELIGHTING : 2;
|
||||
unsigned int m_nENVMAPMASK : 2;
|
||||
unsigned int m_nBASEALPHAENVMAPMASK : 2;
|
||||
unsigned int m_nSELFILLUM : 2;
|
||||
unsigned int m_nVERTEXCOLOR : 2;
|
||||
unsigned int m_nFLASHLIGHT : 2;
|
||||
unsigned int m_nSELFILLUM_ENVMAPMASK_ALPHA : 2;
|
||||
unsigned int m_nDETAIL_BLEND_MODE : 4;
|
||||
unsigned int m_nSEAMLESS_BASE : 2;
|
||||
unsigned int m_nSEAMLESS_DETAIL : 2;
|
||||
unsigned int m_nDISTANCEALPHA : 2;
|
||||
unsigned int m_nDISTANCEALPHAFROMDETAIL : 2;
|
||||
unsigned int m_nSOFT_MASK : 2;
|
||||
unsigned int m_nOUTLINE : 2;
|
||||
unsigned int m_nOUTER_GLOW : 2;
|
||||
unsigned int m_nFLASHLIGHTDEPTHFILTERMODE : 2;
|
||||
unsigned int m_nDEPTHBLEND : 2;
|
||||
unsigned int m_nBLENDTINTBYBASEALPHA : 2;
|
||||
unsigned int m_nCUBEMAP_SPHERE_LEGACY : 2;
|
||||
private:
|
||||
int m_nDETAILTEXTURE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDETAILTEXTURE : 1;
|
||||
bool m_bCUBEMAP : 1;
|
||||
bool m_bDIFFUSELIGHTING : 1;
|
||||
bool m_bENVMAPMASK : 1;
|
||||
bool m_bBASEALPHAENVMAPMASK : 1;
|
||||
bool m_bSELFILLUM : 1;
|
||||
bool m_bVERTEXCOLOR : 1;
|
||||
bool m_bFLASHLIGHT : 1;
|
||||
bool m_bSELFILLUM_ENVMAPMASK_ALPHA : 1;
|
||||
bool m_bDETAIL_BLEND_MODE : 1;
|
||||
bool m_bSEAMLESS_BASE : 1;
|
||||
bool m_bSEAMLESS_DETAIL : 1;
|
||||
bool m_bDISTANCEALPHA : 1;
|
||||
bool m_bDISTANCEALPHAFROMDETAIL : 1;
|
||||
bool m_bSOFT_MASK : 1;
|
||||
bool m_bOUTLINE : 1;
|
||||
bool m_bOUTER_GLOW : 1;
|
||||
bool m_bFLASHLIGHTDEPTHFILTERMODE : 1;
|
||||
bool m_bDEPTHBLEND : 1;
|
||||
bool m_bBLENDTINTBYBASEALPHA : 1;
|
||||
bool m_bCUBEMAP_SPHERE_LEGACY : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bDETAILTEXTURE;
|
||||
#endif
|
||||
public:
|
||||
void SetDETAILTEXTURE( int i )
|
||||
{
|
||||
|
@ -95,255 +13,542 @@ public:
|
|||
m_nDETAILTEXTURE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDETAILTEXTURE( bool i )
|
||||
{
|
||||
m_nDETAILTEXTURE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP( bool i )
|
||||
{
|
||||
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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDIFFUSELIGHTING( bool i )
|
||||
{
|
||||
m_nDIFFUSELIGHTING = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDIFFUSELIGHTING = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nENVMAPMASK;
|
||||
#ifdef _DEBUG
|
||||
bool m_bENVMAPMASK;
|
||||
#endif
|
||||
public:
|
||||
void SetENVMAPMASK( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nENVMAPMASK = i;
|
||||
#ifdef _DEBUG
|
||||
m_bENVMAPMASK = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetENVMAPMASK( bool i )
|
||||
{
|
||||
m_nENVMAPMASK = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bENVMAPMASK = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nBASEALPHAENVMAPMASK;
|
||||
#ifdef _DEBUG
|
||||
bool m_bBASEALPHAENVMAPMASK;
|
||||
#endif
|
||||
public:
|
||||
void SetBASEALPHAENVMAPMASK( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nBASEALPHAENVMAPMASK = i;
|
||||
#ifdef _DEBUG
|
||||
m_bBASEALPHAENVMAPMASK = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetBASEALPHAENVMAPMASK( bool i )
|
||||
{
|
||||
m_nBASEALPHAENVMAPMASK = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBASEALPHAENVMAPMASK = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSELFILLUM( bool i )
|
||||
{
|
||||
m_nSELFILLUM = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetVERTEXCOLOR( bool i )
|
||||
{
|
||||
m_nVERTEXCOLOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHT( bool i )
|
||||
{
|
||||
m_nFLASHLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSELFILLUM_ENVMAPMASK_ALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSELFILLUM_ENVMAPMASK_ALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetSELFILLUM_ENVMAPMASK_ALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM_ENVMAPMASK_ALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSELFILLUM_ENVMAPMASK_ALPHA( bool i )
|
||||
{
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM_ENVMAPMASK_ALPHA = 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 <= 9 );
|
||||
m_nDETAIL_BLEND_MODE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAIL_BLEND_MODE = true;
|
||||
#endif // _DEBUG
|
||||
#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_nSEAMLESS_BASE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_BASE;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_BASE( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_BASE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_BASE( bool i )
|
||||
{
|
||||
m_nSEAMLESS_BASE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEAMLESS_DETAIL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_DETAIL;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_DETAIL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_DETAIL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_DETAIL( bool i )
|
||||
{
|
||||
m_nSEAMLESS_DETAIL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDISTANCEALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDISTANCEALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetDISTANCEALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDISTANCEALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDISTANCEALPHA( bool i )
|
||||
{
|
||||
m_nDISTANCEALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHA = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDISTANCEALPHAFROMDETAIL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDISTANCEALPHAFROMDETAIL;
|
||||
#endif
|
||||
public:
|
||||
void SetDISTANCEALPHAFROMDETAIL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDISTANCEALPHAFROMDETAIL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHAFROMDETAIL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDISTANCEALPHAFROMDETAIL( bool i )
|
||||
{
|
||||
m_nDISTANCEALPHAFROMDETAIL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHAFROMDETAIL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSOFT_MASK;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSOFT_MASK;
|
||||
#endif
|
||||
public:
|
||||
void SetSOFT_MASK( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSOFT_MASK = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSOFT_MASK = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSOFT_MASK( bool i )
|
||||
{
|
||||
m_nSOFT_MASK = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSOFT_MASK = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nOUTLINE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bOUTLINE;
|
||||
#endif
|
||||
public:
|
||||
void SetOUTLINE( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nOUTLINE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTLINE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetOUTLINE( bool i )
|
||||
{
|
||||
m_nOUTLINE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTLINE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nOUTER_GLOW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bOUTER_GLOW;
|
||||
#endif
|
||||
public:
|
||||
void SetOUTER_GLOW( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nOUTER_GLOW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTER_GLOW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetOUTER_GLOW( bool i )
|
||||
{
|
||||
m_nOUTER_GLOW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTER_GLOW = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDEPTHBLEND;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDEPTHBLEND;
|
||||
#endif
|
||||
public:
|
||||
void SetDEPTHBLEND( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDEPTHBLEND = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDEPTHBLEND = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDEPTHBLEND( bool i )
|
||||
{
|
||||
m_nDEPTHBLEND = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEPTHBLEND = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nBLENDTINTBYBASEALPHA;
|
||||
#ifdef _DEBUG
|
||||
bool m_bBLENDTINTBYBASEALPHA;
|
||||
#endif
|
||||
public:
|
||||
void SetBLENDTINTBYBASEALPHA( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nBLENDTINTBYBASEALPHA = i;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetBLENDTINTBYBASEALPHA( bool i )
|
||||
{
|
||||
m_nBLENDTINTBYBASEALPHA = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nCUBEMAP_SPHERE_LEGACY;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCUBEMAP_SPHERE_LEGACY;
|
||||
#endif
|
||||
public:
|
||||
void SetCUBEMAP_SPHERE_LEGACY( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nCUBEMAP_SPHERE_LEGACY = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP_SPHERE_LEGACY = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
vertexlit_and_unlit_generic_ps30_Static_Index()
|
||||
void SetCUBEMAP_SPHERE_LEGACY( bool i )
|
||||
{
|
||||
m_nCUBEMAP_SPHERE_LEGACY = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP_SPHERE_LEGACY = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_ps30_Static_Index( )
|
||||
{
|
||||
m_nDETAILTEXTURE = 0;
|
||||
m_nCUBEMAP = 0;
|
||||
m_nDIFFUSELIGHTING = 0;
|
||||
m_nENVMAPMASK = 0;
|
||||
m_nBASEALPHAENVMAPMASK = 0;
|
||||
m_nSELFILLUM = 0;
|
||||
m_nVERTEXCOLOR = 0;
|
||||
m_nFLASHLIGHT = 0;
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = 0;
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
m_nDISTANCEALPHA = 0;
|
||||
m_nDISTANCEALPHAFROMDETAIL = 0;
|
||||
m_nSOFT_MASK = 0;
|
||||
m_nOUTLINE = 0;
|
||||
m_nOUTER_GLOW = 0;
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
m_nDEPTHBLEND = 0;
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
m_nCUBEMAP_SPHERE_LEGACY = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAILTEXTURE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAILTEXTURE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDIFFUSELIGHTING = false;
|
||||
#endif // _DEBUG
|
||||
m_nDIFFUSELIGHTING = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bENVMAPMASK = false;
|
||||
#endif // _DEBUG
|
||||
m_nENVMAPMASK = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBASEALPHAENVMAPMASK = false;
|
||||
#endif // _DEBUG
|
||||
m_nBASEALPHAENVMAPMASK = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUM = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nVERTEXCOLOR = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSELFILLUM_ENVMAPMASK_ALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nSELFILLUM_ENVMAPMASK_ALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDETAIL_BLEND_MODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nDETAIL_BLEND_MODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nDISTANCEALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDISTANCEALPHAFROMDETAIL = false;
|
||||
#endif // _DEBUG
|
||||
m_nDISTANCEALPHAFROMDETAIL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSOFT_MASK = false;
|
||||
#endif // _DEBUG
|
||||
m_nSOFT_MASK = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTLINE = false;
|
||||
#endif // _DEBUG
|
||||
m_nOUTLINE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bOUTER_GLOW = false;
|
||||
#endif // _DEBUG
|
||||
m_nOUTER_GLOW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTDEPTHFILTERMODE = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEPTHBLEND = false;
|
||||
#endif // _DEBUG
|
||||
m_nDEPTHBLEND = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bBLENDTINTBYBASEALPHA = false;
|
||||
#endif // _DEBUG
|
||||
m_nBLENDTINTBYBASEALPHA = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP_SPHERE_LEGACY = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP_SPHERE_LEGACY = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bDETAILTEXTURE && m_bCUBEMAP && m_bDIFFUSELIGHTING && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bVERTEXCOLOR && m_bFLASHLIGHT && m_bSELFILLUM_ENVMAPMASK_ALPHA && m_bDETAIL_BLEND_MODE && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bDISTANCEALPHA && m_bDISTANCEALPHAFROMDETAIL && m_bSOFT_MASK && m_bOUTLINE && m_bOUTER_GLOW && m_bFLASHLIGHTDEPTHFILTERMODE && m_bDEPTHBLEND && m_bBLENDTINTBYBASEALPHA && m_bCUBEMAP_SPHERE_LEGACY );
|
||||
return ( 6 * m_nDETAILTEXTURE ) + ( 12 * m_nCUBEMAP ) + ( 24 * m_nDIFFUSELIGHTING ) + ( 48 * m_nENVMAPMASK ) + ( 96 * m_nBASEALPHAENVMAPMASK ) + ( 192 * m_nSELFILLUM ) + ( 384 * m_nVERTEXCOLOR ) + ( 768 * m_nFLASHLIGHT ) + ( 1536 * m_nSELFILLUM_ENVMAPMASK_ALPHA ) + ( 3072 * m_nDETAIL_BLEND_MODE ) + ( 30720 * m_nSEAMLESS_BASE ) + ( 61440 * m_nSEAMLESS_DETAIL ) + ( 122880 * m_nDISTANCEALPHA ) + ( 245760 * m_nDISTANCEALPHAFROMDETAIL ) + ( 491520 * m_nSOFT_MASK ) + ( 983040 * m_nOUTLINE ) + ( 1966080 * m_nOUTER_GLOW ) + ( 3932160 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 11796480 * m_nDEPTHBLEND ) + ( 23592960 * m_nBLENDTINTBYBASEALPHA ) + ( 47185920 * m_nCUBEMAP_SPHERE_LEGACY ) + 0;
|
||||
// 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_bCUBEMAP && m_bDIFFUSELIGHTING && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bVERTEXCOLOR && m_bFLASHLIGHT && m_bSELFILLUM_ENVMAPMASK_ALPHA && m_bDETAIL_BLEND_MODE && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bDISTANCEALPHA && m_bDISTANCEALPHAFROMDETAIL && m_bSOFT_MASK && m_bOUTLINE && m_bOUTER_GLOW && m_bFLASHLIGHTDEPTHFILTERMODE && m_bDEPTHBLEND && m_bBLENDTINTBYBASEALPHA && m_bCUBEMAP_SPHERE_LEGACY;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 24 * m_nDETAILTEXTURE ) + ( 48 * m_nCUBEMAP ) + ( 96 * m_nDIFFUSELIGHTING ) + ( 192 * m_nENVMAPMASK ) + ( 384 * m_nBASEALPHAENVMAPMASK ) + ( 768 * m_nSELFILLUM ) + ( 1536 * m_nVERTEXCOLOR ) + ( 3072 * m_nFLASHLIGHT ) + ( 6144 * m_nSELFILLUM_ENVMAPMASK_ALPHA ) + ( 12288 * m_nDETAIL_BLEND_MODE ) + ( 122880 * m_nSEAMLESS_BASE ) + ( 245760 * m_nSEAMLESS_DETAIL ) + ( 491520 * m_nDISTANCEALPHA ) + ( 983040 * m_nDISTANCEALPHAFROMDETAIL ) + ( 1966080 * m_nSOFT_MASK ) + ( 3932160 * m_nOUTLINE ) + ( 7864320 * m_nOUTER_GLOW ) + ( 15728640 * m_nFLASHLIGHTDEPTHFILTERMODE ) + ( 47185920 * m_nDEPTHBLEND ) + ( 94371840 * m_nBLENDTINTBYBASEALPHA ) + ( 188743680 * m_nCUBEMAP_SPHERE_LEGACY ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_ps30 psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_DIFFUSELIGHTING + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_SELFILLUM_ENVMAPMASK_ALPHA + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_SEAMLESS_BASE + psh_forgot_to_set_static_SEAMLESS_DETAIL + psh_forgot_to_set_static_DISTANCEALPHA + psh_forgot_to_set_static_DISTANCEALPHAFROMDETAIL + psh_forgot_to_set_static_SOFT_MASK + psh_forgot_to_set_static_OUTLINE + psh_forgot_to_set_static_OUTER_GLOW + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_DEPTHBLEND + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA + psh_forgot_to_set_static_CUBEMAP_SPHERE_LEGACY
|
||||
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_ps30 psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_DIFFUSELIGHTING + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_VERTEXCOLOR + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_SELFILLUM_ENVMAPMASK_ALPHA + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_SEAMLESS_BASE + psh_forgot_to_set_static_SEAMLESS_DETAIL + psh_forgot_to_set_static_DISTANCEALPHA + psh_forgot_to_set_static_DISTANCEALPHAFROMDETAIL + psh_forgot_to_set_static_SOFT_MASK + psh_forgot_to_set_static_OUTLINE + psh_forgot_to_set_static_OUTER_GLOW + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + psh_forgot_to_set_static_DEPTHBLEND + psh_forgot_to_set_static_BLENDTINTBYBASEALPHA + psh_forgot_to_set_static_CUBEMAP_SPHERE_LEGACY + 0
|
||||
class vertexlit_and_unlit_generic_ps30_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nLIGHTING_PREVIEW : 2;
|
||||
unsigned int m_nFLASHLIGHTSHADOWS : 2;
|
||||
private:
|
||||
int m_nLIGHTING_PREVIEW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW : 1;
|
||||
bool m_bFLASHLIGHTSHADOWS : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW;
|
||||
#endif
|
||||
public:
|
||||
void SetLIGHTING_PREVIEW( int i )
|
||||
{
|
||||
|
@ -351,36 +556,107 @@ public:
|
|||
m_nLIGHTING_PREVIEW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTING_PREVIEW( bool i )
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHTSHADOWS( bool i )
|
||||
{
|
||||
m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTSHADOWS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_LIGHTMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_LIGHTMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDEBUG_LUXELS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDEBUG_LUXELS;
|
||||
#endif
|
||||
public:
|
||||
void SetDEBUG_LUXELS( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDEBUG_LUXELS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDEBUG_LUXELS = true;
|
||||
#endif
|
||||
}
|
||||
void SetDEBUG_LUXELS( bool i )
|
||||
{
|
||||
m_nDEBUG_LUXELS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEBUG_LUXELS = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_ps30_Dynamic_Index()
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
m_nFLASHLIGHTSHADOWS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHTSHADOWS = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHTSHADOWS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDEBUG_LUXELS = false;
|
||||
#endif // _DEBUG
|
||||
m_nDEBUG_LUXELS = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bLIGHTING_PREVIEW && m_bFLASHLIGHTSHADOWS );
|
||||
return ( 1 * m_nLIGHTING_PREVIEW ) + ( 3 * m_nFLASHLIGHTSHADOWS ) + 0;
|
||||
// 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_bLIGHTING_PREVIEW && m_bFLASHLIGHTSHADOWS && m_bSTATIC_LIGHT_LIGHTMAP && m_bDEBUG_LUXELS;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nLIGHTING_PREVIEW ) + ( 3 * m_nFLASHLIGHTSHADOWS ) + ( 6 * m_nSTATIC_LIGHT_LIGHTMAP ) + ( 12 * m_nDEBUG_LUXELS ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_ps30 psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS
|
||||
|
||||
|
||||
#endif // VERTEXLIT_AND_UNLIT_GENERIC_PS30_H
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_ps30 psh_forgot_to_set_dynamic_LIGHTING_PREVIEW + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + psh_forgot_to_set_dynamic_STATIC_LIGHT_LIGHTMAP + psh_forgot_to_set_dynamic_DEBUG_LUXELS + 0
|
||||
|
|
|
@ -1,37 +1,11 @@
|
|||
// ALL SKIP STATEMENTS THAT AFFECT THIS SHADER!!!
|
||||
// ($SEPARATE_DETAIL_UVS) && ($SEAMLESS_DETAIL)
|
||||
// ($DONT_GAMMA_CONVERT_VERTEX_COLOR && ( ! $VERTEXCOLOR ) )
|
||||
// defined $LIGHTING_PREVIEW && defined $FASTPATH && $LIGHTING_PREVIEW && $FASTPATH
|
||||
|
||||
#ifndef VERTEXLIT_AND_UNLIT_GENERIC_VS30_H
|
||||
#define VERTEXLIT_AND_UNLIT_GENERIC_VS30_H
|
||||
|
||||
#include "shaderapi/ishaderapi.h"
|
||||
#include "shaderapi/ishadershadow.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
|
||||
#include "shaderlib/cshader.h"
|
||||
class vertexlit_and_unlit_generic_vs30_Static_Index
|
||||
{
|
||||
unsigned int m_nVERTEXCOLOR : 2;
|
||||
unsigned int m_nCUBEMAP : 2;
|
||||
unsigned int m_nHALFLAMBERT : 2;
|
||||
unsigned int m_nFLASHLIGHT : 2;
|
||||
unsigned int m_nSEAMLESS_BASE : 2;
|
||||
unsigned int m_nSEAMLESS_DETAIL : 2;
|
||||
unsigned int m_nSEPARATE_DETAIL_UVS : 2;
|
||||
unsigned int m_nDECAL : 2;
|
||||
unsigned int m_nDONT_GAMMA_CONVERT_VERTEX_COLOR : 2;
|
||||
private:
|
||||
int m_nVERTEXCOLOR;
|
||||
#ifdef _DEBUG
|
||||
bool m_bVERTEXCOLOR : 1;
|
||||
bool m_bCUBEMAP : 1;
|
||||
bool m_bHALFLAMBERT : 1;
|
||||
bool m_bFLASHLIGHT : 1;
|
||||
bool m_bSEAMLESS_BASE : 1;
|
||||
bool m_bSEAMLESS_DETAIL : 1;
|
||||
bool m_bSEPARATE_DETAIL_UVS : 1;
|
||||
bool m_bDECAL : 1;
|
||||
bool m_bDONT_GAMMA_CONVERT_VERTEX_COLOR : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bVERTEXCOLOR;
|
||||
#endif
|
||||
public:
|
||||
void SetVERTEXCOLOR( int i )
|
||||
{
|
||||
|
@ -39,133 +13,242 @@ public:
|
|||
m_nVERTEXCOLOR = i;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetVERTEXCOLOR( bool i )
|
||||
{
|
||||
m_nVERTEXCOLOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = 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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCUBEMAP( bool i )
|
||||
{
|
||||
m_nCUBEMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = 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 // _DEBUG
|
||||
#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 // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFLASHLIGHT( bool i )
|
||||
{
|
||||
m_nFLASHLIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEAMLESS_BASE;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_BASE;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_BASE( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_BASE = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_BASE( bool i )
|
||||
{
|
||||
m_nSEAMLESS_BASE = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEAMLESS_DETAIL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEAMLESS_DETAIL;
|
||||
#endif
|
||||
public:
|
||||
void SetSEAMLESS_DETAIL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEAMLESS_DETAIL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEAMLESS_DETAIL( bool i )
|
||||
{
|
||||
m_nSEAMLESS_DETAIL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSEPARATE_DETAIL_UVS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSEPARATE_DETAIL_UVS;
|
||||
#endif
|
||||
public:
|
||||
void SetSEPARATE_DETAIL_UVS( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSEPARATE_DETAIL_UVS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSEPARATE_DETAIL_UVS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSEPARATE_DETAIL_UVS( bool i )
|
||||
{
|
||||
m_nSEPARATE_DETAIL_UVS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEPARATE_DETAIL_UVS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDECAL;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDECAL;
|
||||
#endif
|
||||
public:
|
||||
void SetDECAL( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDECAL = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDECAL = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDECAL( bool i )
|
||||
{
|
||||
m_nDECAL = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDECAL = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDONT_GAMMA_CONVERT_VERTEX_COLOR;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDONT_GAMMA_CONVERT_VERTEX_COLOR;
|
||||
#endif
|
||||
public:
|
||||
void SetDONT_GAMMA_CONVERT_VERTEX_COLOR( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
vertexlit_and_unlit_generic_vs30_Static_Index()
|
||||
void SetDONT_GAMMA_CONVERT_VERTEX_COLOR( bool i )
|
||||
{
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_vs30_Static_Index( )
|
||||
{
|
||||
m_nVERTEXCOLOR = 0;
|
||||
m_nCUBEMAP = 0;
|
||||
m_nHALFLAMBERT = 0;
|
||||
m_nFLASHLIGHT = 0;
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
m_nSEPARATE_DETAIL_UVS = 0;
|
||||
m_nDECAL = 0;
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bVERTEXCOLOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nVERTEXCOLOR = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCUBEMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nCUBEMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bHALFLAMBERT = false;
|
||||
#endif // _DEBUG
|
||||
m_nHALFLAMBERT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bFLASHLIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nFLASHLIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_BASE = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_BASE = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEAMLESS_DETAIL = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEAMLESS_DETAIL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSEPARATE_DETAIL_UVS = false;
|
||||
#endif // _DEBUG
|
||||
m_nSEPARATE_DETAIL_UVS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDECAL = false;
|
||||
#endif // _DEBUG
|
||||
m_nDECAL = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = false;
|
||||
#endif // _DEBUG
|
||||
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bDECAL && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR );
|
||||
return ( 128 * m_nVERTEXCOLOR ) + ( 256 * m_nCUBEMAP ) + ( 512 * m_nHALFLAMBERT ) + ( 1024 * m_nFLASHLIGHT ) + ( 2048 * m_nSEAMLESS_BASE ) + ( 4096 * m_nSEAMLESS_DETAIL ) + ( 8192 * m_nSEPARATE_DETAIL_UVS ) + ( 16384 * m_nDECAL ) + ( 32768 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + 0;
|
||||
// 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_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bDECAL && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 256 * m_nVERTEXCOLOR ) + ( 512 * m_nCUBEMAP ) + ( 1024 * m_nHALFLAMBERT ) + ( 2048 * m_nFLASHLIGHT ) + ( 4096 * m_nSEAMLESS_BASE ) + ( 8192 * m_nSEAMLESS_DETAIL ) + ( 16384 * m_nSEPARATE_DETAIL_UVS ) + ( 32768 * m_nDECAL ) + ( 65536 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_vs30 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_DECAL + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR
|
||||
|
||||
|
||||
#define shaderStaticTest_vertexlit_and_unlit_generic_vs30 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_DECAL + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR + 0
|
||||
class vertexlit_and_unlit_generic_vs30_Dynamic_Index
|
||||
{
|
||||
unsigned int m_nCOMPRESSED_VERTS : 2;
|
||||
unsigned int m_nDYNAMIC_LIGHT : 2;
|
||||
unsigned int m_nSTATIC_LIGHT : 2;
|
||||
unsigned int m_nDOWATERFOG : 2;
|
||||
unsigned int m_nSKINNING : 2;
|
||||
unsigned int m_nLIGHTING_PREVIEW : 2;
|
||||
unsigned int m_nMORPHING : 2;
|
||||
private:
|
||||
int m_nCOMPRESSED_VERTS;
|
||||
#ifdef _DEBUG
|
||||
bool m_bCOMPRESSED_VERTS : 1;
|
||||
bool m_bDYNAMIC_LIGHT : 1;
|
||||
bool m_bSTATIC_LIGHT : 1;
|
||||
bool m_bDOWATERFOG : 1;
|
||||
bool m_bSKINNING : 1;
|
||||
bool m_bLIGHTING_PREVIEW : 1;
|
||||
bool m_bMORPHING : 1;
|
||||
#endif // _DEBUG
|
||||
bool m_bCOMPRESSED_VERTS;
|
||||
#endif
|
||||
public:
|
||||
void SetCOMPRESSED_VERTS( int i )
|
||||
{
|
||||
|
@ -173,91 +256,207 @@ public:
|
|||
m_nCOMPRESSED_VERTS = i;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCOMPRESSED_VERTS( bool i )
|
||||
{
|
||||
m_nCOMPRESSED_VERTS = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDYNAMIC_LIGHT;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDYNAMIC_LIGHT;
|
||||
#endif
|
||||
public:
|
||||
void SetDYNAMIC_LIGHT( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDYNAMIC_LIGHT = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDYNAMIC_LIGHT = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSTATIC_LIGHT( int i )
|
||||
void SetDYNAMIC_LIGHT( bool i )
|
||||
{
|
||||
m_nDYNAMIC_LIGHT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDYNAMIC_LIGHT = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_VERTEX;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_VERTEX;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_VERTEX( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSTATIC_LIGHT = i;
|
||||
m_nSTATIC_LIGHT_VERTEX = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT = true;
|
||||
#endif // _DEBUG
|
||||
m_bSTATIC_LIGHT_VERTEX = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSTATIC_LIGHT_VERTEX( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_VERTEX = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_VERTEX = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSTATIC_LIGHT_LIGHTMAP;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSTATIC_LIGHT_LIGHTMAP;
|
||||
#endif
|
||||
public:
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
void SetSTATIC_LIGHT_LIGHTMAP( bool i )
|
||||
{
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nDOWATERFOG;
|
||||
#ifdef _DEBUG
|
||||
bool m_bDOWATERFOG;
|
||||
#endif
|
||||
public:
|
||||
void SetDOWATERFOG( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nDOWATERFOG = i;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDOWATERFOG( bool i )
|
||||
{
|
||||
m_nDOWATERFOG = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSKINNING;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSKINNING;
|
||||
#endif
|
||||
public:
|
||||
void SetSKINNING( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSKINNING = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetSKINNING( bool i )
|
||||
{
|
||||
m_nSKINNING = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nLIGHTING_PREVIEW;
|
||||
#ifdef _DEBUG
|
||||
bool m_bLIGHTING_PREVIEW;
|
||||
#endif
|
||||
public:
|
||||
void SetLIGHTING_PREVIEW( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nLIGHTING_PREVIEW = i;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetLIGHTING_PREVIEW( bool i )
|
||||
{
|
||||
m_nLIGHTING_PREVIEW = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nMORPHING;
|
||||
#ifdef _DEBUG
|
||||
bool m_bMORPHING;
|
||||
#endif
|
||||
public:
|
||||
void SetMORPHING( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nMORPHING = i;
|
||||
#ifdef _DEBUG
|
||||
m_bMORPHING = true;
|
||||
#endif // _DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetMORPHING( bool i )
|
||||
{
|
||||
m_nMORPHING = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bMORPHING = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
vertexlit_and_unlit_generic_vs30_Dynamic_Index()
|
||||
{
|
||||
m_nCOMPRESSED_VERTS = 0;
|
||||
m_nDYNAMIC_LIGHT = 0;
|
||||
m_nSTATIC_LIGHT = 0;
|
||||
m_nDOWATERFOG = 0;
|
||||
m_nSKINNING = 0;
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
m_nMORPHING = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bCOMPRESSED_VERTS = false;
|
||||
#endif // _DEBUG
|
||||
m_nCOMPRESSED_VERTS = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDYNAMIC_LIGHT = false;
|
||||
m_bSTATIC_LIGHT = false;
|
||||
#endif // _DEBUG
|
||||
m_nDYNAMIC_LIGHT = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_VERTEX = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_VERTEX = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSTATIC_LIGHT_LIGHTMAP = false;
|
||||
#endif // _DEBUG
|
||||
m_nSTATIC_LIGHT_LIGHTMAP = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bDOWATERFOG = false;
|
||||
#endif // _DEBUG
|
||||
m_nDOWATERFOG = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSKINNING = false;
|
||||
#endif // _DEBUG
|
||||
m_nSKINNING = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bLIGHTING_PREVIEW = false;
|
||||
#endif // _DEBUG
|
||||
m_nLIGHTING_PREVIEW = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bMORPHING = false;
|
||||
#endif // _DEBUG
|
||||
m_nMORPHING = 0;
|
||||
}
|
||||
|
||||
int GetIndex() const
|
||||
int GetIndex()
|
||||
{
|
||||
Assert( m_bCOMPRESSED_VERTS && m_bDYNAMIC_LIGHT && m_bSTATIC_LIGHT && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bMORPHING );
|
||||
return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDYNAMIC_LIGHT ) + ( 4 * m_nSTATIC_LIGHT ) + ( 8 * m_nDOWATERFOG ) + ( 16 * m_nSKINNING ) + ( 32 * m_nLIGHTING_PREVIEW ) + ( 64 * m_nMORPHING ) + 0;
|
||||
// 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_bCOMPRESSED_VERTS && m_bDYNAMIC_LIGHT && m_bSTATIC_LIGHT_VERTEX && m_bSTATIC_LIGHT_LIGHTMAP && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bMORPHING;
|
||||
Assert( bAllDynamicVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDYNAMIC_LIGHT ) + ( 4 * m_nSTATIC_LIGHT_VERTEX ) + ( 8 * m_nSTATIC_LIGHT_LIGHTMAP ) + ( 16 * m_nDOWATERFOG ) + ( 32 * m_nSKINNING ) + ( 64 * m_nLIGHTING_PREVIEW ) + ( 128 * m_nMORPHING ) + 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_vs30 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DYNAMIC_LIGHT + vsh_forgot_to_set_dynamic_STATIC_LIGHT + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_MORPHING
|
||||
|
||||
|
||||
#endif // VERTEXLIT_AND_UNLIT_GENERIC_VS30_H
|
||||
#define shaderDynamicTest_vertexlit_and_unlit_generic_vs30 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DYNAMIC_LIGHT + vsh_forgot_to_set_dynamic_STATIC_LIGHT_VERTEX + vsh_forgot_to_set_dynamic_STATIC_LIGHT_LIGHTMAP + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_MORPHING + 0
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "BumpmappedEnvmap.inc"
|
||||
#include "bumpmappedenvmap.inc"
|
||||
|
||||
#include "lightmappedgeneric_vs11.inc"
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "screenspaceeffect_vs11.inc"
|
||||
#include "introscreenspaceeffect_ps11.inc"
|
||||
#include "ScreenSpaceEffect_vs11.inc"
|
||||
#include "IntroScreenSpaceEffect_ps11.inc"
|
||||
|
||||
DEFINE_FALLBACK_SHADER( IntroScreenSpaceEffect, IntroScreenSpaceEffect_dx80 )
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "LightmappedGeneric_Decal.inc"
|
||||
#include "lightmappedgeneric_decal.inc"
|
||||
#include "mathlib/bumpvects.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
|
|
|
@ -59,7 +59,7 @@ BEGIN_VS_SHADER_FLAGS( Occlusion_DX9, "Help for Occlusion", SHADER_NOT_EDITABLE
|
|||
SET_STATIC_PIXEL_SHADER( white_ps20 );
|
||||
|
||||
// Workaround for weird AMD bug - if sRGB write isn't enabled here then sRGB write enable in subsequent world rendering passes will randomly not take effect (even though we're enabling it) in the driver.
|
||||
if ( ( IsLinux() || IsWindows() || IsBSD() ) && gl_amd_occlusion_workaround.GetBool() )
|
||||
if ( ( IsLinux() || IsWindows() ) && gl_amd_occlusion_workaround.GetBool() )
|
||||
{
|
||||
pShaderShadow->EnableSRGBWrite( true );
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "ParticleSphere_vs11.inc"
|
||||
#include "particlesphere_vs11.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -132,16 +132,15 @@ BEGIN_VS_SHADER_FLAGS( ParticleSphere_DX9, "Help for BumpmappedEnvMap", SHADER_N
|
|||
// (It does this by seeing if the intensity*1/distSqr is > 1. If so, then it scales it so
|
||||
// it is equal to 1).
|
||||
const float *f = params[LIGHT_COLOR]->GetVecValue();
|
||||
Vector4D vLightColor( f[0], f[1], f[2], 0.f );
|
||||
Vector vLightColor( f[0], f[1], f[2] );
|
||||
float flScale = max( vLightColor.x, max( vLightColor.y, vLightColor.z ) );
|
||||
if ( flScale < 0.01f )
|
||||
flScale = 0.01f;
|
||||
|
||||
Vector4D vScaleVec = { flScale, flScale, flScale, 0.f };
|
||||
float vScaleVec[3] = { flScale, flScale, flScale };
|
||||
vLightColor /= flScale;
|
||||
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_1, vLightColor.Base() );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_2, vScaleVec.Base() );
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_2, vScaleVec );
|
||||
|
||||
pShaderAPI->SetPixelShaderFogParams( PSREG_FOG_PARAMS );
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "Refract_model_vs11.inc"
|
||||
#include "Refract_world_vs11.inc"
|
||||
#include "refract_model_vs11.inc"
|
||||
#include "refract_world_vs11.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "ShadowModel.inc"
|
||||
#include "shadowmodel.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
|
||||
#include "BaseVSShader.h"
|
||||
#include "ShatteredGlass.inc"
|
||||
#include "ShatteredGlass_EnvMap.inc"
|
||||
#include "ShatteredGlass_EnvMapSphere.inc"
|
||||
#include "shatteredglass.inc"
|
||||
#include "shatteredglass_envmap.inc"
|
||||
#include "shatteredglass_envmapsphere.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
static ConVar mat_fullbright( "mat_fullbright", "0", FCVAR_CHEAT );
|
||||
static ConVar r_lightwarpidentity( "r_lightwarpidentity", "0", FCVAR_CHEAT );
|
||||
static ConVar r_rimlight( "r_rimlight", "1", FCVAR_CHEAT );
|
||||
static ConVar r_rimlight( "r_rimlight", "1", FCVAR_NONE );
|
||||
|
||||
// Textures may be bound to the following samplers:
|
||||
// SHADER_SAMPLER0 Base (Albedo) / Gloss in alpha
|
||||
|
@ -270,6 +270,9 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
|
|||
|
||||
float flTintReplacementAmount = GetFloatParam( info.m_nTintReplacesBaseColor, params );
|
||||
|
||||
float flPhongExponentFactor = ( info.m_nPhongExponentFactor != -1 ) ? GetFloatParam( info.m_nPhongExponentFactor, params ) : 0.0f;
|
||||
const bool bHasPhongExponentFactor = flPhongExponentFactor != 0.0f;
|
||||
|
||||
BlendType_t nBlendType= pShader->EvaluateBlendRequirements( bBlendTintByBaseAlpha ? -1 : info.m_nBaseTexture, true );
|
||||
|
||||
bool bFullyOpaque = (nBlendType != BT_BLENDADD) && (nBlendType != BT_BLEND) && !bIsAlphaTested && !bHasFlashlight; //dest alpha is free for special use
|
||||
|
@ -676,6 +679,7 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
|
|||
SET_DYNAMIC_PIXEL_SHADER_COMBO( WRITE_DEPTH_TO_DESTALPHA, bWriteDepthToAlpha );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( PIXELFOGTYPE, pShaderAPI->GetPixelFogCombo() );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( FLASHLIGHTSHADOWS, bFlashlightShadows );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( PHONG_USE_EXPONENT_FACTOR, bHasPhongExponentFactor );
|
||||
SET_DYNAMIC_PIXEL_SHADER( skin_ps20b );
|
||||
}
|
||||
#ifndef _X360
|
||||
|
@ -697,6 +701,7 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
|
|||
SET_DYNAMIC_PIXEL_SHADER_COMBO( WRITE_DEPTH_TO_DESTALPHA, bWriteDepthToAlpha );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( PIXELFOGTYPE, pShaderAPI->GetPixelFogCombo() );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( FLASHLIGHTSHADOWS, bFlashlightShadows );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( PHONG_USE_EXPONENT_FACTOR, bHasPhongExponentFactor );
|
||||
SET_DYNAMIC_PIXEL_SHADER( skin_ps30 );
|
||||
|
||||
bool bUnusedTexCoords[3] = { false, false, !pShaderAPI->IsHWMorphingEnabled() || !bIsDecal };
|
||||
|
@ -806,6 +811,13 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
|
|||
float vSpecularTint[4] = {1, 1, 1, 4};
|
||||
pShaderAPI->GetWorldSpaceCameraPosition( vEyePos_SpecExponent );
|
||||
|
||||
// If we have a phong exponent factor, then use that as a multiplier against the texture.
|
||||
if ( bHasPhongExponentFactor )
|
||||
{
|
||||
vEyePos_SpecExponent[3] = flPhongExponentFactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use the alpha channel of the normal map for the exponent by default
|
||||
vEyePos_SpecExponent[3] = -1.f;
|
||||
if ( (info.m_nPhongExponent != -1) && params[info.m_nPhongExponent]->IsDefined() )
|
||||
|
@ -817,6 +829,7 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
|
|||
vEyePos_SpecExponent[3] = fValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get the tint parameter
|
||||
if ( (info.m_nPhongTint != -1) && params[info.m_nPhongTint]->IsDefined() )
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
// DYNAMIC: "WRITE_DEPTH_TO_DESTALPHA" "0..1" [ps30]
|
||||
// DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps20b]
|
||||
// DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps30]
|
||||
// DYNAMIC: "PHONG_USE_EXPONENT_FACTOR" "0..0" [ps20]
|
||||
// DYNAMIC: "PHONG_USE_EXPONENT_FACTOR" "0..1" [ps20b] [ps30] [PC]
|
||||
|
||||
|
||||
// SKIP: ($PIXELFOGTYPE == 0) && ($WRITEWATERFOGTODESTALPHA != 0)
|
||||
|
@ -76,7 +78,9 @@ const float4 g_EyePos_SpecExponent : register( PSREG_EYEPOS_SPEC_EXPONENT );
|
|||
const float4 g_FogParams : register( PSREG_FOG_PARAMS );
|
||||
const float4 g_FlashlightAttenuationFactors_RimMask : register( PSREG_FLASHLIGHT_ATTENUATION ); // On non-flashlight pass, x has rim mask control
|
||||
const float4 g_FlashlightPos_RimBoost : register( PSREG_FLASHLIGHT_POSITION_RIM_BOOST );
|
||||
const float4x4 g_FlashlightWorldToTexture : register( PSREG_FLASHLIGHT_TO_WORLD_TEXTURE );
|
||||
#if FLASHLIGHT
|
||||
const float4x4 g_FlashlightWorldToTexture : register( PSREG_FLASHLIGHT_TO_WORLD_TEXTURE );
|
||||
#endif
|
||||
const float4 g_FresnelSpecParams : register( PSREG_FRESNEL_SPEC_PARAMS ); // xyz are fresnel, w is specular boost
|
||||
const float4 g_SpecularRimParams : register( PSREG_SPEC_RIM_PARAMS ); // xyz are specular tint color, w is rim power
|
||||
PixelShaderLightInfo cLightInfo[3] : register( PSREG_LIGHT_INFO_ARRAY ); // 2 registers each - 6 registers total (4th light spread across w's)
|
||||
|
@ -96,6 +100,7 @@ const float4 g_ShaderControls : register( PSREG_CONSTANT_27 ); // x is
|
|||
#define g_fTintReplacementControl g_ShaderControls.z
|
||||
#define g_fInvertPhongMask g_ShaderControls.w
|
||||
|
||||
|
||||
sampler BaseTextureSampler : register( s0 ); // Base map, selfillum in alpha
|
||||
sampler SpecularWarpSampler : register( s1 ); // Specular warp sampler (for iridescence etc)
|
||||
sampler DiffuseWarpSampler : register( s2 ); // Lighting warp sampler (1D texture for diffuse lighting modification)
|
||||
|
@ -119,7 +124,6 @@ sampler DetailSampler : register( s13 ); // detail texture
|
|||
|
||||
sampler SelfIllumMaskSampler : register( s14 ); // selfillummask
|
||||
|
||||
|
||||
struct PS_INPUT
|
||||
{
|
||||
float4 baseTexCoordDetailTexCoord : TEXCOORD0; // xy=base zw=detail
|
||||
|
@ -258,7 +262,11 @@ float4 main( PS_INPUT i ) : COLOR
|
|||
[flatten]
|
||||
#endif
|
||||
|
||||
#if ( PHONG_USE_EXPONENT_FACTOR )
|
||||
fSpecExp = ( 1.0f + g_EyePos_SpecExponent.w * vSpecExpMap.r );
|
||||
#else
|
||||
fSpecExp = (g_EyePos_SpecExponent.w >= 0.0) ? g_EyePos_SpecExponent.w : (1.0f + 149.0f * vSpecExpMap.r);
|
||||
#endif
|
||||
|
||||
// If constant tint is negative, tint with albedo, based upon scalar tint map
|
||||
#if defined( _X360 )
|
||||
|
@ -286,6 +294,7 @@ float4 main( PS_INPUT i ) : COLOR
|
|||
}
|
||||
else
|
||||
{
|
||||
#if FLASHLIGHT
|
||||
float4 flashlightSpacePosition = mul( float4( vWorldPos, 1.0f ), g_FlashlightWorldToTexture );
|
||||
|
||||
DoSpecularFlashlight( g_FlashlightPos, vWorldPos, flashlightSpacePosition, worldSpaceNormal,
|
||||
|
@ -295,6 +304,7 @@ float4 main( PS_INPUT i ) : COLOR
|
|||
|
||||
// These two values are output
|
||||
diffuseLighting, specularLighting );
|
||||
#endif
|
||||
}
|
||||
|
||||
// If we didn't already apply Fresnel to specular warp, modulate the specular
|
||||
|
|
|
@ -120,7 +120,6 @@ $Project "stdshader_dx9"
|
|||
$File "particlelitgeneric_dx9.cpp"
|
||||
$File "particlelitgeneric_dx9_helper.cpp"
|
||||
$File "particlesphere_dx9.cpp"
|
||||
$File "pbr_dx9.cpp"
|
||||
$File "portal.cpp"
|
||||
$File "portalstaticoverlay.cpp"
|
||||
$File "portal_refract.cpp"
|
||||
|
@ -213,7 +212,6 @@ $Project "stdshader_dx9"
|
|||
$File "shader_constant_register_map.h"
|
||||
$File "skin_dx9_helper.h"
|
||||
$File "particlelitgeneric_dx9_helper.h"
|
||||
$File "pbr_common_ps2_3_x.h"
|
||||
$File "vertexlitgeneric_dx95_helper.h"
|
||||
$File "vortwarp_vs20_helper.h"
|
||||
$File "worldvertextransition_dx8_helper.h"
|
||||
|
|
|
@ -272,9 +272,6 @@ particlesphere_vs11.fxc
|
|||
particlesphere_ps2x.fxc
|
||||
particlesphere_vs20.fxc
|
||||
|
||||
pbr_ps20b.fxc
|
||||
pbr_vs20b.fxc
|
||||
|
||||
portal_ps11.fxc
|
||||
portal_vs11.fxc
|
||||
portal_ps2x.fxc
|
||||
|
|
|
@ -26,8 +26,6 @@ morphaccumulate_vs30.fxc
|
|||
morphaccumulate_ps30.fxc
|
||||
morphweight_vs30.fxc
|
||||
morphweight_ps30.fxc
|
||||
pbr_ps30.fxc
|
||||
pbr_vs30.fxc
|
||||
pyro_vision_ps2x.fxc
|
||||
pyro_vision_vs20.fxc
|
||||
skin_vs20.fxc
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "Teeth.inc"
|
||||
#include "teeth.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "UnlitTwoTexture.inc"
|
||||
#include "unlittwotexture.inc"
|
||||
#include "cloak_blended_pass_helper.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
// DYNAMIC: "LIGHTING_PREVIEW" "0..0" [XBOX]
|
||||
// DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps20b]
|
||||
// DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps30]
|
||||
// DYNAMIC: "STATIC_LIGHT_LIGHTMAP" "0..1" [ps20b] [ps30]
|
||||
// DYNAMIC: "STATIC_LIGHT_LIGHTMAP" "0..0" [ps20]
|
||||
// DYNAMIC: "DEBUG_LUXELS" "0..1" [ps20b] [ps30]
|
||||
|
||||
// detail blend mode 6 = ps20b only
|
||||
// SKIP: $DETAIL_BLEND_MODE == 6 [ps20]
|
||||
|
@ -71,6 +74,9 @@
|
|||
|
||||
// SKIP: $CUBEMAP_SPHERE_LEGACY && ($CUBEMAP == 0)
|
||||
|
||||
// Debugging luxels only makes sense if we have lightmaps on this geometry.
|
||||
// SKIP: ($STATIC_LIGHT_LIGHTMAP == 0) && ($DEBUG_LUXELS == 1)
|
||||
|
||||
#include "common_flashlight_fxc.h"
|
||||
#include "common_vertexlitgeneric_dx9.h"
|
||||
|
||||
|
@ -105,6 +111,7 @@ sampler FlashlightSampler : register( s7 );
|
|||
sampler ShadowDepthSampler : register( s8 ); // Flashlight shadow depth map sampler
|
||||
sampler DepthSampler : register( s10 ); //depth buffer sampler for depth blending
|
||||
sampler SelfIllumMaskSampler : register( s11 ); // selfillummask
|
||||
sampler LightMapSampler : register( s12 );
|
||||
|
||||
struct PS_INPUT
|
||||
{
|
||||
|
@ -167,6 +174,10 @@ const float4 g_OutlineParams : register( c9 );
|
|||
const float3 g_DetailTint : register( c10 );
|
||||
#endif
|
||||
|
||||
#if DEBUG_LUXELS
|
||||
const float4 g_LuxelScale : register( c11 );
|
||||
#endif
|
||||
|
||||
|
||||
// Calculate unified fog
|
||||
float CalcPixelFogFactorConst( float fPixelFogType, const float4 fogParams, const float flEyePosZ, const float flWorldPosZ, const float flProjPosZ )
|
||||
|
@ -331,12 +342,24 @@ float4 main( PS_INPUT i ) : COLOR
|
|||
}
|
||||
|
||||
float3 diffuseLighting = float3( 1.0f, 1.0f, 1.0f );
|
||||
if( bDiffuseLighting || bVertexColor && !( bVertexColor && bDiffuseLighting ) )
|
||||
if( bDiffuseLighting || bVertexColor )
|
||||
{
|
||||
diffuseLighting = i.color.rgb;
|
||||
}
|
||||
|
||||
#if STATIC_LIGHT_LIGHTMAP
|
||||
// This matches the behavior of vertex lighting, which multiplies by cOverbright (which is not accessible here)
|
||||
// And converts from Gamma space to Linear space before being used.
|
||||
float2 lightmapTexCoords = i.baseTexCoord.xy;
|
||||
#if DEBUG_LUXELS
|
||||
lightmapTexCoords.xy *= g_LuxelScale.xy;
|
||||
#endif
|
||||
float3 f3LightmapColor = GammaToLinear( 2.0f * tex2D( LightMapSampler, lightmapTexCoords ).rgb );
|
||||
diffuseLighting = f3LightmapColor;
|
||||
#endif
|
||||
|
||||
float3 albedo = baseColor;
|
||||
|
||||
if (bBlendTintByBaseAlpha)
|
||||
{
|
||||
float3 tintedColor = albedo * g_DiffuseModulation.rgb;
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
// STATIC: "DONT_GAMMA_CONVERT_VERTEX_COLOR" "0..1"
|
||||
// DYNAMIC: "COMPRESSED_VERTS" "0..1"
|
||||
// DYNAMIC: "DYNAMIC_LIGHT" "0..1"
|
||||
// DYNAMIC: "STATIC_LIGHT" "0..1"
|
||||
// DYNAMIC: "STATIC_LIGHT_VERTEX" "0..1"
|
||||
// DYNAMIC: "STATIC_LIGHT_LIGHTMAP" "0..1"
|
||||
// DYNAMIC: "DOWATERFOG" "0..1"
|
||||
// DYNAMIC: "SKINNING" "0..1"
|
||||
// DYNAMIC: "LIGHTING_PREVIEW" "0..1" [PC]
|
||||
|
@ -125,7 +126,7 @@ VS_OUTPUT main( const VS_INPUT v )
|
|||
VS_OUTPUT o = ( VS_OUTPUT )0;
|
||||
|
||||
bool bDynamicLight = DYNAMIC_LIGHT ? true : false;
|
||||
bool bStaticLight = STATIC_LIGHT ? true : false;
|
||||
bool bStaticLight = STATIC_LIGHT_VERTEX ? true : false;
|
||||
bool bDoLighting = !g_bVertexColor && (bDynamicLight || bStaticLight);
|
||||
|
||||
float4 vPosition = v.vPos;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "VertexLitGeneric_vs11.inc"
|
||||
#include "VertexLitGeneric_SelfIllumOnly.inc"
|
||||
#include "vertexlitgeneric_vs11.inc"
|
||||
#include "vertexlitgeneric_selfillumonly.inc"
|
||||
#include "emissive_scroll_blended_pass_helper.h"
|
||||
#include "flesh_interior_blended_pass_helper.h"
|
||||
#include "cloak_blended_pass_helper.h"
|
||||
|
|
|
@ -41,6 +41,7 @@ BEGIN_VS_SHADER( VertexLitGeneric, "Help for VertexLitGeneric" )
|
|||
SHADER_PARAM( SELFILLUMFRESNELMINMAXEXP, SHADER_PARAM_TYPE_VEC4, "0", "Self illum fresnel min, max, exp" )
|
||||
SHADER_PARAM( ALPHATESTREFERENCE, SHADER_PARAM_TYPE_FLOAT, "0.0", "" )
|
||||
SHADER_PARAM( FLASHLIGHTNOLAMBERT, SHADER_PARAM_TYPE_BOOL, "0", "Flashlight pass sets N.L=1.0" )
|
||||
SHADER_PARAM( LIGHTMAP, SHADER_PARAM_TYPE_TEXTURE, "shadertest/BaseTexture", "lightmap texture--will be bound by the engine")
|
||||
|
||||
// Debugging term for visualizing ambient data on its own
|
||||
SHADER_PARAM( AMBIENTONLY, SHADER_PARAM_TYPE_INTEGER, "0", "Control drawing of non-ambient light ()" )
|
||||
|
@ -53,6 +54,7 @@ BEGIN_VS_SHADER( VertexLitGeneric, "Help for VertexLitGeneric" )
|
|||
SHADER_PARAM( PHONGFRESNELRANGES, SHADER_PARAM_TYPE_VEC3, "[0 0.5 1]", "Parameters for remapping fresnel output" )
|
||||
SHADER_PARAM( PHONGBOOST, SHADER_PARAM_TYPE_FLOAT, "1.0", "Phong overbrightening factor (specular mask channel should be authored to account for this)" )
|
||||
SHADER_PARAM( PHONGEXPONENTTEXTURE, SHADER_PARAM_TYPE_TEXTURE, "shadertest/BaseTexture", "Phong Exponent map" )
|
||||
SHADER_PARAM( PHONGEXPONENTFACTOR, SHADER_PARAM_TYPE_FLOAT, "0.0", "When using a phong exponent texture, this will be multiplied by the 0..1 that comes out of the texture." )
|
||||
SHADER_PARAM( PHONG, SHADER_PARAM_TYPE_BOOL, "0", "enables phong lighting" )
|
||||
SHADER_PARAM( BASEMAPALPHAPHONGMASK, SHADER_PARAM_TYPE_INTEGER, "0", "indicates that there is no normal map and that the phong mask is in base alpha" )
|
||||
SHADER_PARAM( INVERTPHONGMASK, SHADER_PARAM_TYPE_INTEGER, "0", "invert the phong mask (0=full phong, 1=no phong)" )
|
||||
|
@ -163,6 +165,7 @@ BEGIN_VS_SHADER( VertexLitGeneric, "Help for VertexLitGeneric" )
|
|||
info.m_nEnvmapSaturation = ENVMAPSATURATION;
|
||||
info.m_nAlphaTestReference = ALPHATESTREFERENCE;
|
||||
info.m_nFlashlightNoLambert = FLASHLIGHTNOLAMBERT;
|
||||
info.m_nLightmap = LIGHTMAP;
|
||||
|
||||
info.m_nFlashlightTexture = FLASHLIGHTTEXTURE;
|
||||
info.m_nFlashlightTextureFrame = FLASHLIGHTTEXTUREFRAME;
|
||||
|
@ -178,6 +181,7 @@ BEGIN_VS_SHADER( VertexLitGeneric, "Help for VertexLitGeneric" )
|
|||
info.m_nDiffuseWarpTexture = LIGHTWARPTEXTURE;
|
||||
info.m_nPhongWarpTexture = PHONGWARPTEXTURE;
|
||||
info.m_nPhongBoost = PHONGBOOST;
|
||||
info.m_nPhongExponentFactor = PHONGEXPONENTFACTOR;
|
||||
info.m_nPhongFresnelRanges = PHONGFRESNELRANGES;
|
||||
info.m_nPhong = PHONG;
|
||||
info.m_nBaseMapAlphaPhongMask = BASEMAPALPHAPHONGMASK;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
static ConVar mat_fullbright( "mat_fullbright","0", FCVAR_CHEAT );
|
||||
static ConVar r_lightwarpidentity( "r_lightwarpidentity","0", FCVAR_CHEAT );
|
||||
static ConVar mat_luxels( "mat_luxels", "0", FCVAR_CHEAT );
|
||||
|
||||
|
||||
static inline bool WantsSkinShader( IMaterialVar** params, const VertexLitGeneric_DX9_Vars_t &info )
|
||||
|
@ -382,7 +383,8 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
|
||||
bool bIsAlphaTested = IS_FLAG_SET( MATERIAL_VAR_ALPHATEST ) != 0;
|
||||
bool bHasDiffuseWarp = (!bHasFlashlight || IsX360() ) && hasDiffuseLighting && (info.m_nDiffuseWarpTexture != -1) && params[info.m_nDiffuseWarpTexture]->IsTexture();
|
||||
|
||||
bool bHasLightmapTexture = IsTextureSet( info.m_nLightmap, params );
|
||||
bool bHasMatLuxel = bHasLightmapTexture && mat_luxels.GetBool();
|
||||
|
||||
//bool bNoCull = IS_FLAG_SET( MATERIAL_VAR_NOCULL );
|
||||
bool bFlashlightNoLambert = false;
|
||||
|
@ -622,6 +624,11 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
pShaderShadow->EnableTexture( SHADER_SAMPLER11, true ); // self illum mask
|
||||
}
|
||||
|
||||
|
||||
// Always enable this sampler, used for lightmaps depending on the dynamic combo.
|
||||
// Lightmaps are generated in gamma space, but not sRGB, so leave that disabled. Conversion is done in the shader.
|
||||
pShaderShadow->EnableTexture( SHADER_SAMPLER12, true );
|
||||
|
||||
bool bSRGBWrite = true;
|
||||
if( (info.m_nLinearWrite != -1) && (params[info.m_nLinearWrite]->GetIntValue() == 1) )
|
||||
{
|
||||
|
@ -1188,12 +1195,32 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
|
||||
|
||||
// Set up light combo state
|
||||
LightState_t lightState = {0, false, false};
|
||||
LightState_t lightState = { 0, false, false, false };
|
||||
if ( bVertexLitGeneric && (!bHasFlashlight || IsX360() ) )
|
||||
{
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
}
|
||||
|
||||
// Override the lighting desired if we have a lightmap set!
|
||||
if ( bHasLightmapTexture )
|
||||
{
|
||||
lightState.m_bStaticLightVertex = false;
|
||||
lightState.m_bStaticLightTexel = true;
|
||||
|
||||
// Usual case, not debugging.
|
||||
if (!bHasMatLuxel)
|
||||
{
|
||||
pShader->BindTexture(SHADER_SAMPLER12, info.m_nLightmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
float dimensions[] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
DynamicCmdsOut.BindStandardTexture( SHADER_SAMPLER12, TEXTURE_DEBUG_LUXELS );
|
||||
pShader->GetTextureDimensions( &dimensions[0], &dimensions[1], info.m_nLightmap );
|
||||
DynamicCmdsOut.SetPixelShaderConstant( 11, dimensions, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
MaterialFogMode_t fogType = pShaderAPI->GetSceneFogMode();
|
||||
int fogIndex = ( fogType == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ? 1 : 0;
|
||||
int numBones = pShaderAPI->GetCurrentNumBones();
|
||||
|
@ -1289,7 +1316,8 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
|
||||
DECLARE_DYNAMIC_VERTEX_SHADER( vertexlit_and_unlit_generic_vs20 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DYNAMIC_LIGHT, lightState.HasDynamicLight() );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT, lightState.m_bStaticLightVertex ? 1 : 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_VERTEX, lightState.m_bStaticLightVertex ? 1 : 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, lightState.m_bStaticLightTexel ? 1 : 0);
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DOWATERFOG, fogIndex );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( SKINNING, numBones > 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO(
|
||||
|
@ -1306,6 +1334,8 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
|
||||
// SET_DYNAMIC_PIXEL_SHADER_COMBO( PIXELFOGTYPE, pShaderAPI->GetPixelFogCombo() );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( FLASHLIGHTSHADOWS, bFlashlightShadows );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, lightState.m_bStaticLightTexel ? 1 : 0 );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( DEBUG_LUXELS, bHasMatLuxel ? 1 : 0 );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO(
|
||||
LIGHTING_PREVIEW,
|
||||
pShaderAPI->GetIntRenderingParameter(INT_RENDERPARM_ENABLE_FIXED_LIGHTING) );
|
||||
|
@ -1315,6 +1345,7 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
{
|
||||
DECLARE_DYNAMIC_PIXEL_SHADER( vertexlit_and_unlit_generic_ps20 );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( PIXELFOGTYPE, pShaderAPI->GetPixelFogCombo() );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, lightState.m_bStaticLightTexel ? 1 : 0 );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO(
|
||||
LIGHTING_PREVIEW,
|
||||
pShaderAPI->GetIntRenderingParameter(INT_RENDERPARM_ENABLE_FIXED_LIGHTING) );
|
||||
|
@ -1328,7 +1359,8 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
|
||||
DECLARE_DYNAMIC_VERTEX_SHADER( vertexlit_and_unlit_generic_vs30 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DYNAMIC_LIGHT, lightState.HasDynamicLight() );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT, lightState.m_bStaticLightVertex ? 1 : 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_VERTEX, lightState.m_bStaticLightVertex ? 1 : 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, lightState.m_bStaticLightTexel ? 1 : 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DOWATERFOG, fogIndex );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( SKINNING, numBones > 0 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( LIGHTING_PREVIEW,
|
||||
|
@ -1340,6 +1372,8 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
|||
DECLARE_DYNAMIC_PIXEL_SHADER( vertexlit_and_unlit_generic_ps30 );
|
||||
// SET_DYNAMIC_PIXEL_SHADER_COMBO( PIXELFOGTYPE, pShaderAPI->GetPixelFogCombo() );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( FLASHLIGHTSHADOWS, bFlashlightShadows );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( STATIC_LIGHT_LIGHTMAP, lightState.m_bStaticLightTexel ? 1 : 0 );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( DEBUG_LUXELS, bHasMatLuxel ? 1 : 0 );
|
||||
SET_DYNAMIC_PIXEL_SHADER_COMBO( LIGHTING_PREVIEW,
|
||||
pShaderAPI->GetIntRenderingParameter(INT_RENDERPARM_ENABLE_FIXED_LIGHTING) );
|
||||
SET_DYNAMIC_PIXEL_SHADER_CMD( DynamicCmdsOut, vertexlit_and_unlit_generic_ps30 );
|
||||
|
|
|
@ -54,6 +54,7 @@ struct VertexLitGeneric_DX9_Vars_t
|
|||
int m_nFlashlightNoLambert;
|
||||
int m_nFlashlightTexture;
|
||||
int m_nFlashlightTextureFrame;
|
||||
int m_nLightmap;
|
||||
|
||||
int m_nSelfIllumTint;
|
||||
int m_nSelfIllumFresnel;
|
||||
|
@ -67,6 +68,7 @@ struct VertexLitGeneric_DX9_Vars_t
|
|||
int m_nPhongWarpTexture;
|
||||
int m_nPhongBoost;
|
||||
int m_nPhongFresnelRanges;
|
||||
int m_nPhongExponentFactor;
|
||||
int m_nSelfIllumEnvMapMask_Alpha;
|
||||
int m_nAmbientOnly;
|
||||
int m_nHDRColorScale;
|
||||
|
@ -130,7 +132,6 @@ struct VertexLitGeneric_DX9_Vars_t
|
|||
int m_nBlendTintByBaseAlpha;
|
||||
|
||||
int m_nTintReplacesBaseColor;
|
||||
|
||||
};
|
||||
|
||||
void InitParamsVertexLitGeneric_DX9( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, bool bVertexLitGeneric, VertexLitGeneric_DX9_Vars_t &info );
|
||||
|
|
|
@ -161,7 +161,7 @@ BEGIN_VS_SHADER( VortWarp_dx8,
|
|||
pShaderAPI->SetPixelShaderConstant( 5, c5, 1 );
|
||||
|
||||
float curTime = pShaderAPI->CurrentTime();
|
||||
float selfIllumScroll[4] = { .11f * curTime, .124f * curTime, 0.0f, 0.0f };
|
||||
float selfIllumScroll[4] = { .11f * curTime, .124 * curTime, 0.0f, 0.0f };
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, selfIllumScroll, 1 );
|
||||
|
||||
vortwarp_vs11_Dynamic_Index vshIndex;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include "BaseVSShader.h"
|
||||
#include "mathlib/vmatrix.h"
|
||||
|
||||
#include "Water_vs11.inc"
|
||||
#include "WaterCheapPerVertexFresnel_vs11.inc"
|
||||
#include "WaterCheap_vs11.inc"
|
||||
#include "water_vs11.inc"
|
||||
#include "watercheappervertexfresnel_vs11.inc"
|
||||
#include "watercheap_vs11.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "BaseVSShader.h"
|
||||
#include "mathlib/vmatrix.h"
|
||||
|
||||
#include "Water_ps14.inc"
|
||||
#include "WaterCheap_vs14.inc"
|
||||
#include "water_ps14.inc"
|
||||
#include "watercheap_vs14.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "WorldVertexAlpha.inc"
|
||||
#include "worldvertexalpha.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "BaseVSShader.h"
|
||||
|
||||
#include "ScreenSpaceEffect.inc"
|
||||
#include "screenspaceeffect.inc"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
|
Loading…
Reference in a new issue