Skip to content

LightState_t fix #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion materialsystem/stdshaders/example_model_dx9_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void DrawExampleModel_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** param
pShaderAPI->BindStandardTexture( SHADER_SAMPLER0, TEXTURE_WHITE );
}

LightState_t lightState = { 0, false, false };
LightState_t lightState = LightState_t();
bool bFlashlightShadows = false;
if( bHasFlashlight )
{
Expand Down
2 changes: 1 addition & 1 deletion materialsystem/stdshaders/eye_refract_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void Draw_Eyes_Refract_Internal( CBaseVSShader *pShader, IMaterialVar** params,
if ( bDrawFlashlightAdditivePass == true )
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, flashlightState.m_vecLightOrigin.Base(), 1 );

LightState_t lightState = { 0, false, false };
LightState_t lightState = LightState_t();
if ( bDrawFlashlightAdditivePass == false )
{
pShaderAPI->GetDX9LightState( &lightState );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
bool bUseStaticControlFlow = g_pHardwareConfig->SupportsStaticControlFlow();

// Set Vertex Shader Combos
LightState_t lightState = { 0, false, false };
LightState_t lightState = LightState_t();
pShaderAPI->GetDX9LightState( &lightState );
DECLARE_DYNAMIC_VERTEX_SHADER( flesh_interior_blended_pass_vs20 );
SET_DYNAMIC_VERTEX_SHADER_COMBO( DOWATERFOG, pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void DrawParticleLitGeneric_DX9( CBaseVSShader *pShader, IMaterialVar** params,
pShader->BindTexture( SHADER_SAMPLER7, info.m_nFlashlightTexture, info.m_nFlashlightTextureFrame );
}

LightState_t lightState = { 0, false, false };
LightState_t lightState = LightState_t();
if( !hasFlashlight )
pShaderAPI->GetDX9LightState( &lightState );

Expand Down
2 changes: 1 addition & 1 deletion materialsystem/stdshaders/pyro_vision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ BEGIN_VS_SHADER( pyro_vision, "Help for pyro vision" )
DynamicCmdsOut.SetPixelShaderConstant( 12, vParms.Base() );

int numBones = pShaderAPI->GetCurrentNumBones();
LightState_t lightState = { 0, false, false };
LightState_t lightState = LightState_t();
if ( bVertexLit && !bFullBright )
{
pShaderAPI->GetDX9LightState( &lightState );
Expand Down
2 changes: 1 addition & 1 deletion materialsystem/stdshaders/skin_dx9_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
}
}

LightState_t lightState = { 0, false, false };
LightState_t lightState = LightState_t();
bool bFlashlightShadows = false;
if( bHasFlashlight )
{
Expand Down
2 changes: 1 addition & 1 deletion materialsystem/stdshaders/vertexlitgeneric_dx9_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial


// Set up light combo state
LightState_t lightState = {0, false, false};
LightState_t lightState = LightState_t();
if ( bVertexLitGeneric && (!bHasFlashlight || IsX360() ) )
{
pShaderAPI->GetDX9LightState( &lightState );
Expand Down
2 changes: 1 addition & 1 deletion materialsystem/stdshaders/vortwarp_dx9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ void DrawVortWarp_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDyn
}

// Set up light combo state
LightState_t lightState = {0, false, false};
LightState_t lightState = LightState_t();
if ( bVertexLitGeneric && !hasFlashlight )
{
pShaderAPI->GetDX9LightState( &lightState );
Expand Down