From 2a2b03d40578d7fa5910acbe298a1a3773ae5db4 Mon Sep 17 00:00:00 2001 From: tschumann Date: Sun, 7 Jan 2024 15:54:40 +1000 Subject: [PATCH] Improve vrad performance using fix from https://github.com/ValveSoftware/source-sdk-2013/pull/436 --- mp/src/raytrace/raytrace.cpp | 4 ++-- sp/src/raytrace/raytrace.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mp/src/raytrace/raytrace.cpp b/mp/src/raytrace/raytrace.cpp index 7b951dfb..4f6dad16 100644 --- a/mp/src/raytrace/raytrace.cpp +++ b/mp/src/raytrace/raytrace.cpp @@ -233,7 +233,7 @@ void CacheOptimizedTriangle::ChangeIntoIntersectionFormat(void) } -int n_intersection_calculations=0; +//int n_intersection_calculations=0; int CacheOptimizedTriangle::ClassifyAgainstAxisSplit(int split_plane, float split_value) { @@ -476,7 +476,7 @@ void RayTracingEnvironment::Trace4Rays(const FourRays &rays, fltx4 TMin, fltx4 T TriIntersectData_t const *tri = &( OptimizedTriangleList[tnum].m_Data.m_IntersectData ); if ( ( mailboxids[mbox_slot] != tnum ) && ( tri->m_nTriangleID != skip_id ) ) { - n_intersection_calculations++; + //n_intersection_calculations++; mailboxids[mbox_slot] = tnum; // compute plane intersection diff --git a/sp/src/raytrace/raytrace.cpp b/sp/src/raytrace/raytrace.cpp index 7b951dfb..4f6dad16 100644 --- a/sp/src/raytrace/raytrace.cpp +++ b/sp/src/raytrace/raytrace.cpp @@ -233,7 +233,7 @@ void CacheOptimizedTriangle::ChangeIntoIntersectionFormat(void) } -int n_intersection_calculations=0; +//int n_intersection_calculations=0; int CacheOptimizedTriangle::ClassifyAgainstAxisSplit(int split_plane, float split_value) { @@ -476,7 +476,7 @@ void RayTracingEnvironment::Trace4Rays(const FourRays &rays, fltx4 TMin, fltx4 T TriIntersectData_t const *tri = &( OptimizedTriangleList[tnum].m_Data.m_IntersectData ); if ( ( mailboxids[mbox_slot] != tnum ) && ( tri->m_nTriangleID != skip_id ) ) { - n_intersection_calculations++; + //n_intersection_calculations++; mailboxids[mbox_slot] = tnum; // compute plane intersection