Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions mp/src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,7 @@ int C_NEO_Player::GetAttackerHits(const int attackerIdx) const

int C_NEO_Player::DrawModel(int flags)
{
int ret = BaseClass::DrawModel(flags);

int ret = BaseClass::DrawModel(flags); // NEO TODO (Adam) Do we need to draw each player model twice when in vision?
if (!ret) {
return ret;
}
Expand Down
15 changes: 15 additions & 0 deletions mp/src/game/shared/neo/neo_predicted_viewmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,21 @@ int CNEOPredictedViewModel::DrawModel(int flags)

return 0;
}
if (pPlayer->GetClass() == NEO_CLASS_SUPPORT && pPlayer->IsInVision())
{
IMaterial* pass = materials->FindMaterial("dev/thermal_third", TEXTURE_GROUP_MODEL);
Assert(pass && !pass->IsErrorMaterial());

if (pass && !pass->IsErrorMaterial())
{
// Render
modelrender->ForcedMaterialOverride(pass);
int ret = BaseClass::DrawModel(flags);
modelrender->ForcedMaterialOverride(NULL);

return ret;
}
}
}

return BaseClass::DrawModel(flags);
Expand Down
6 changes: 6 additions & 0 deletions mp/src/materialsystem/stdshaders/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ target_sources_grouped(
Neo_GaussianBlur_Shader.cpp
Neo_MotionVision_Shader_Pass1.cpp
Neo_MotionVision_Shader_Pass2.cpp
neo_motion_model_dx9.cpp
neo_motion_model_dx9_helper.cpp
neo_motion_model_dx9_helper.h
Neo_NightVision_Shader.cpp
Neo_Noise_Shader.cpp
Neo_SSAO_Combine_Shader.cpp
Neo_SSAO_Shader.cpp
Neo_TestShader.cpp
Neo_ThermalVision.cpp
neo_thermal_model_dx9.cpp
neo_thermal_model_dx9_helper.cpp
neo_thermal_model_dx9_helper.h
Neo_colorblind.cpp
Neo_refract.cpp
Neo_refract_dx9_helper.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ConVar mat_neo_mv_sensitivity("mat_neo_mv_sensitivity", "0.02", FCVAR_CHEAT, "Ho
ConVar mat_neo_mv_color_r("mat_neo_mv_color_r", "0.5", FCVAR_CHEAT, "Normalized RBGA Red color.", true, 0.0f, true, 1.0f);
ConVar mat_neo_mv_color_g("mat_neo_mv_color_g", "0.33", FCVAR_CHEAT, "Normalized RBGA Green color.", true, 0.0f, true, 1.0f);
ConVar mat_neo_mv_color_b("mat_neo_mv_color_b", "0.17", FCVAR_CHEAT, "Normalized RBGA Blue color.", true, 0.0f, true, 1.0f);
ConVar mat_neo_mv_color_a("mat_neo_mv_color_a", "0.165", FCVAR_CHEAT, "Normalized RBGA Alpha color.", true, 0.0f, true, 1.0f);
ConVar mat_neo_mv_color_a("mat_neo_mv_color_a", "0", FCVAR_CHEAT, "Normalized RBGA Alpha color.", true, 0.0f, true, 1.0f);
ConVar mat_neo_mv_speed_modifier("mat_neo_mv_max_speed_modifier", "0.1", FCVAR_CHEAT, "", true, 0.0f, true, 1.0f);

static ConVar neo_this_client_speed("neo_this_client_speed", "0", FCVAR_SPONLY, "", true, 0.0f, true, 1.0f);
Expand Down
4 changes: 2 additions & 2 deletions mp/src/materialsystem/stdshaders/Neo_ThermalVision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

ConVar mat_neo_tv_brightness_scale("mat_neo_tv_brightness_scale", "2", FCVAR_CHEAT);
ConVar mat_neo_tv_xoffset("mat_neo_tv_xoffset", "0.4", FCVAR_CHEAT);
ConVar mat_neo_tv_brightness_scale("mat_neo_tv_brightness_scale", "1", FCVAR_CHEAT);
ConVar mat_neo_tv_xoffset("mat_neo_tv_xoffset", "0.25", FCVAR_CHEAT);

BEGIN_SHADER_FLAGS(Neo_ThermalVision, "Help for my shader.", SHADER_NOT_EDITABLE)

Expand Down
237 changes: 237 additions & 0 deletions mp/src/materialsystem/stdshaders/fxctmp9/neo_motion_model_ps20b.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
#include "shaderlib/cshader.h"
class neo_motion_model_ps20b_Static_Index
{
private:
int m_nCONVERT_TO_SRGB;
#ifdef _DEBUG
bool m_bCONVERT_TO_SRGB;
#endif
public:
void SetCONVERT_TO_SRGB( int i )
{
Assert( i >= 0 && i <= 0 );
m_nCONVERT_TO_SRGB = i;
#ifdef _DEBUG
m_bCONVERT_TO_SRGB = true;
#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_nFLASHLIGHT;
#ifdef _DEBUG
bool m_bFLASHLIGHT;
#endif
public:
void SetFLASHLIGHT( int i )
{
Assert( i >= 0 && i <= 1 );
m_nFLASHLIGHT = i;
#ifdef _DEBUG
m_bFLASHLIGHT = true;
#endif
}
void SetFLASHLIGHT( bool i )
{
m_nFLASHLIGHT = i ? 1 : 0;
#ifdef _DEBUG
m_bFLASHLIGHT = true;
#endif
}
private:
int m_nFLASHLIGHTDEPTHFILTERMODE;
#ifdef _DEBUG
bool m_bFLASHLIGHTDEPTHFILTERMODE;
#endif
public:
void SetFLASHLIGHTDEPTHFILTERMODE( int i )
{
Assert( i >= 0 && i <= 2 );
m_nFLASHLIGHTDEPTHFILTERMODE = i;
#ifdef _DEBUG
m_bFLASHLIGHTDEPTHFILTERMODE = true;
#endif
}
void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
{
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
#ifdef _DEBUG
m_bFLASHLIGHTDEPTHFILTERMODE = true;
#endif
}
public:
neo_motion_model_ps20b_Static_Index( )
{
#ifdef _DEBUG
m_bCONVERT_TO_SRGB = false;
#endif // _DEBUG
m_nCONVERT_TO_SRGB = 0;
#ifdef _DEBUG
m_bFLASHLIGHT = false;
#endif // _DEBUG
m_nFLASHLIGHT = 0;
#ifdef _DEBUG
m_bFLASHLIGHTDEPTHFILTERMODE = false;
#endif // _DEBUG
m_nFLASHLIGHTDEPTHFILTERMODE = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllStaticVarsDefined = m_bCONVERT_TO_SRGB && m_bFLASHLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 80 * m_nCONVERT_TO_SRGB ) + ( 80 * m_nFLASHLIGHT ) + ( 160 * m_nFLASHLIGHTDEPTHFILTERMODE ) + 0;
}
};
#define shaderStaticTest_neo_motion_model_ps20b psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + 0
class neo_motion_model_ps20b_Dynamic_Index
{
private:
int m_nWRITEWATERFOGTODESTALPHA;
#ifdef _DEBUG
bool m_bWRITEWATERFOGTODESTALPHA;
#endif
public:
void SetWRITEWATERFOGTODESTALPHA( int i )
{
Assert( i >= 0 && i <= 1 );
m_nWRITEWATERFOGTODESTALPHA = i;
#ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = true;
#endif
}
void SetWRITEWATERFOGTODESTALPHA( bool i )
{
m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0;
#ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = true;
#endif
}
private:
int m_nPIXELFOGTYPE;
#ifdef _DEBUG
bool m_bPIXELFOGTYPE;
#endif
public:
void SetPIXELFOGTYPE( int i )
{
Assert( i >= 0 && i <= 1 );
m_nPIXELFOGTYPE = i;
#ifdef _DEBUG
m_bPIXELFOGTYPE = true;
#endif
}
void SetPIXELFOGTYPE( bool i )
{
m_nPIXELFOGTYPE = i ? 1 : 0;
#ifdef _DEBUG
m_bPIXELFOGTYPE = true;
#endif
}
private:
int m_nNUM_LIGHTS;
#ifdef _DEBUG
bool m_bNUM_LIGHTS;
#endif
public:
void SetNUM_LIGHTS( int i )
{
Assert( i >= 0 && i <= 4 );
m_nNUM_LIGHTS = i;
#ifdef _DEBUG
m_bNUM_LIGHTS = true;
#endif
}
void SetNUM_LIGHTS( bool i )
{
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
}
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
}
void SetFLASHLIGHTSHADOWS( bool i )
{
m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
#ifdef _DEBUG
m_bFLASHLIGHTSHADOWS = true;
#endif
}
public:
neo_motion_model_ps20b_Dynamic_Index()
{
#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;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllDynamicVarsDefined = m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS;
Assert( bAllDynamicVarsDefined );
#endif // _DEBUG
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + 0;
}
};
#define shaderDynamicTest_neo_motion_model_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 + 0
Loading