Added WIP v142 toolset support based on Source SDK 2013: Community Edition repo

This commit is contained in:
Blixibon
2021-07-12 14:47:34 -05:00
parent 7ce328cbb9
commit 9b795b3c51
58 changed files with 427 additions and 194 deletions
+3 -3
View File
@@ -425,11 +425,11 @@ void RayTracingEnvironment::Trace4Rays(const FourRays &rays, fltx4 TMin, fltx4 T
MulSIMD(
SubSIMD(ReplicateX4(CurNode->SplittingPlaneValue),
rays.origin[split_plane_number]),OneOverRayDir[split_plane_number]);
fltx4 active=CmpLeSIMD(TMin,TMax); // mask of which rays are active
fltx4 activeLocl=CmpLeSIMD(TMin,TMax); // mask of which rays are active
// now, decide how to traverse children. can either do front,back, or do front and push
// back.
fltx4 hits_front=AndSIMD(active,CmpGeSIMD(dist_to_sep_plane,TMin));
fltx4 hits_front=AndSIMD(activeLocl,CmpGeSIMD(dist_to_sep_plane,TMin));
if (! IsAnyNegative(hits_front))
{
// missed the front. only traverse back
@@ -440,7 +440,7 @@ void RayTracingEnvironment::Trace4Rays(const FourRays &rays, fltx4 TMin, fltx4 T
}
else
{
fltx4 hits_back=AndSIMD(active,CmpLeSIMD(dist_to_sep_plane,TMax));
fltx4 hits_back=AndSIMD(activeLocl,CmpLeSIMD(dist_to_sep_plane,TMax));
if (! IsAnyNegative(hits_back) )
{
// missed the back - only need to traverse front node
+5 -5
View File
@@ -155,14 +155,14 @@ void RayTracingEnvironment::RenderScene(
fltx4 MaxT=ldir.length();
ldir.VectorNormalizeFast();
// now, compute shadow flag
FourRays myrays;
myrays.origin=surface_pos;
FourRays myraysLocl;
myraysLocl.origin=surface_pos;
FourVectors epsilon=ldir;
epsilon*=0.01;
myrays.origin+=epsilon;
myrays.direction=ldir;
myraysLocl.origin+=epsilon;
myraysLocl.direction=ldir;
RayTracingResult shadowtest;
Trace4Rays(myrays,Four_Zeros,MaxT, &shadowtest);
Trace4Rays(myraysLocl,Four_Zeros,MaxT, &shadowtest);
fltx4 unshadowed=CmpGtSIMD(shadowtest.HitDistance,MaxT);
if (! (IsAllZeros(unshadowed)))
{