mirror of
https://github.com/celisej567/Fake-CSM-Mapbase.git
synced 2025-12-31 21:48:38 +03:00
fixes
-csm_ortho now have description. -fixed depth bias problem. -added csm_second_intensity convar. -maybe fixed angle problems.
This commit is contained in:
@@ -22,13 +22,15 @@ static ConVarRef mat_slopescaledepthbias_shadowmap("mat_slopescaledepthbias_shad
|
||||
static ConVarRef mat_depthbias_shadowmap("mat_depthbias_shadowmap");
|
||||
static ConVar scissor("r_flashlightscissor", "0");
|
||||
|
||||
static ConVar csm_ortho("csm_ortho","0");
|
||||
#ifdef MAPBASE
|
||||
static ConVar csm_ortho("csm_ortho","0", 0, "Turn light into ortho. Im lazy right now to make this works fine");
|
||||
ConVar csm_ortho_nearz("csm_ortho_nearz", "512");
|
||||
ConVar csm_ortho_left("csm_ortho_left", "-1000");
|
||||
ConVar csm_ortho_top("csm_ortho_top", "-1000");
|
||||
ConVar csm_ortho_bottom("csm_ortho_bottom", "1000");
|
||||
ConVar csm_ortho_right("csm_ortho_right", "1000");
|
||||
//ConVar csm_test_color_interpolation("csm_test_color_interpolation","0"); //<2F> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: main point for change angle of the light
|
||||
@@ -66,8 +68,7 @@ void C_LightOrigin::Simulate()
|
||||
BaseClass::Simulate();
|
||||
}
|
||||
|
||||
const char* filter = CommandLine()->ParmValue("-ptfilter", "0.5");
|
||||
ConVar bebra("csm_filter", filter);
|
||||
ConVar bebra("csm_filter", "1");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: main csm code
|
||||
|
||||
@@ -350,7 +350,7 @@ CEnvCascadeLight::CEnvCascadeLight(void)
|
||||
m_flFarZ = 16000.0f;
|
||||
m_nShadowQuality = 0;
|
||||
}
|
||||
|
||||
ConVar csm_second_intensity("csm_second_intensity", "2");
|
||||
void CEnvCascadeLight::Preparation()
|
||||
{
|
||||
CreateEntityByName("csmorigin");
|
||||
@@ -371,11 +371,12 @@ void CEnvCascadeLight::Preparation()
|
||||
//if second csm is exist
|
||||
if (CSMSecond)
|
||||
{
|
||||
CEnvCascadeLightSecond* SecondCSM = dynamic_cast<CEnvCascadeLightSecond*>(CSMSecond);
|
||||
CEnvCascadeLightSecond* SecondCSM = dynamic_cast<CEnvCascadeLightSecond*>(CSMSecond);
|
||||
SecondCSM->SetAbsAngles(GetAbsAngles());
|
||||
SecondCSM->SetAbsOrigin(GetAbsOrigin());
|
||||
SecondCSM->SetParent(GetBaseEntity());
|
||||
SecondCSM->m_LinearFloatLightColor = m_LinearFloatLightColor;
|
||||
SecondCSM->m_LinearFloatLightColor = m_LinearFloatLightColor * csm_second_intensity.GetFloat();
|
||||
|
||||
|
||||
DispatchSpawn(SecondCSM);
|
||||
}
|
||||
@@ -391,7 +392,7 @@ void CEnvCascadeLight::Preparation()
|
||||
}
|
||||
else
|
||||
{
|
||||
pEnv->SetAbsAngles(QAngle(-(GetLocalAngles().x - 90), GetLocalAngles().y,-GetLocalAngles().z));
|
||||
pEnv->SetAbsAngles(QAngle(-(GetLocalAngles().x - 90), -GetLocalAngles().y,-GetLocalAngles().z));
|
||||
|
||||
Msg("pEnv local angle = %f %f %f \n", pEnv->GetLocalAngles().x, pEnv->GetLocalAngles().y, pEnv->GetLocalAngles().z);
|
||||
|
||||
@@ -402,6 +403,7 @@ void CEnvCascadeLight::Preparation()
|
||||
float bibigon = defdist.GetFloat() / curdist.GetFloat();
|
||||
curFOV.SetValue(defFOV.GetFloat() * bibigon);
|
||||
m_flLightFOV = curFOV.GetFloat();
|
||||
//DispatchSpawn(CSMSecond);
|
||||
DispatchSpawn(CSMOrigin);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user