1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00

Added reverse-engineered interfaces lib code and hacked up tier1 and mathlib to build against the newer headers.

This commit is contained in:
Scott Ehlert
2012-05-21 02:49:35 -05:00
parent afaa180bbc
commit fb701bd569
77 changed files with 2753 additions and 431 deletions

View File

@ -27,12 +27,12 @@ void LightDesc_t::RecalculateDerivedValues(void)
{
// note - this quantity is very sensitive to round off error. the sse
// reciprocal approximation won't cut it here.
OneOver_ThetaDot_Minus_PhiDot=1.0/spread;
m_OneOverThetaDotMinusPhiDot=1.0/spread;
}
else
{
// hard falloff instead of divide by zero
OneOver_ThetaDot_Minus_PhiDot=1.0;
m_OneOverThetaDotMinusPhiDot=1.0;
}
}
if (m_Type==MATERIAL_LIGHT_DIRECTIONAL)
@ -140,7 +140,7 @@ void LightDesc_t::ComputeLightAtPoints( const FourVectors &pos, const FourVector
fltx4 dot2=SubSIMD(Four_Zeros,delta*m_Direction); // dot position with spot light dir for cone falloff
fltx4 cone_falloff_scale=MulSIMD(ReplicateX4(OneOver_ThetaDot_Minus_PhiDot),
fltx4 cone_falloff_scale=MulSIMD(ReplicateX4(m_OneOverThetaDotMinusPhiDot),
SubSIMD(dot2,ReplicateX4(m_PhiDot)));
cone_falloff_scale=MinSIMD(cone_falloff_scale,Four_Ones);
@ -236,7 +236,7 @@ void LightDesc_t::ComputeNonincidenceLightAtPoints( const FourVectors &pos, Four
fltx4 dot2=SubSIMD(Four_Zeros,delta*m_Direction); // dot position with spot light dir for cone falloff
fltx4 cone_falloff_scale=MulSIMD(ReplicateX4(OneOver_ThetaDot_Minus_PhiDot),
fltx4 cone_falloff_scale=MulSIMD(ReplicateX4(m_OneOverThetaDotMinusPhiDot),
SubSIMD(dot2,ReplicateX4(m_PhiDot)));
cone_falloff_scale=MinSIMD(cone_falloff_scale,Four_Ones);