diff --git a/engine/enginetrace.cpp b/engine/enginetrace.cpp index 6da97c1b..3e4222cc 100644 --- a/engine/enginetrace.cpp +++ b/engine/enginetrace.cpp @@ -2430,7 +2430,7 @@ CON_COMMAND_F( occlusion_stats, "Occlusion statistics; [-jitter] [-reset]", FCVA ConVar occlusion_test_margins( "occlusion_test_margins", "36", FCVAR_NONE, "Amount by which the player bounding box is expanded for occlusion test. This margin should be large enough to accommodate player movement within a frame or two, and the longest weapon they might hold. Shadow does not take this into account." ); // default: 360 (max speed) / 30 ( give it a couple of frames) + however much the biggest weapon can stick out ConVar occlusion_test_jump_margin( "occlusion_test_jump_margin", "12", FCVAR_NONE, "Amount by which the player bounding box is expanded up for occlusion test to account for jumping. This margin should be large enough to accommodate player movement within a frame or two. Affects both camera box and player box." ); // default: 360 (max speed) / 30 ( give it a couple of frames) + however much the biggest weapon can stick out -ConVar occlusion_test_shadow_max_distance( "occlusion_test_shadow_max_distance", FCVAR_NONE, "1500", "Max distance at which to consider shadows for occlusion computations" ); +ConVar occlusion_test_shadow_max_distance( "occlusion_test_shadow_max_distance", "1500", FCVAR_NONE, "Max distance at which to consider shadows for occlusion computations" ); ConVar occlusion_test_async( "occlusion_test_async", "0", FCVAR_NONE, "Enable asynchronous occlusion test in another thread; may save some server tick time at the cost of synchronization overhead with the async occlusion query thread" ); ConVar occlusion_test_async_move_tolerance( "occlusion_test_async_move_tolerance", "8.25", FCVAR_CHEAT ); ConVar occlusion_test_async_jitter( "occlusion_test_async_jitter", "2", FCVAR_CHEAT ); diff --git a/public/mathlib/ssemath.h b/public/mathlib/ssemath.h index 356714bc..87286662 100644 --- a/public/mathlib/ssemath.h +++ b/public/mathlib/ssemath.h @@ -2457,7 +2457,56 @@ FORCEINLINE void ConvertStoreAsIntsSIMD(intx4 * RESTRICT pDest, const fltx4 &vSr } +// // Some convenience operator overloads, which are just aliasing the functions above. +// Unneccessary on 360, as you already have them from xboxmath.h (same for PS3 PPU and SPU) +#if !defined(PLATFORM_PPC) && !defined( POSIX ) && !defined(SPU) +#if 1 // TODO: verify generation of non-bad code. +// Componentwise add +FORCEINLINE fltx4 operator+( FLTX4 a, FLTX4 b ) +{ + return AddSIMD( a, b ); +} +// Componentwise subtract +FORCEINLINE fltx4 operator-( FLTX4 a, FLTX4 b ) +{ + return SubSIMD( a, b ); +} + +// Componentwise multiply +FORCEINLINE fltx4 operator*( FLTX4 a, FLTX4 b ) +{ + return MulSIMD( a, b ); +} + +// No divide. You need to think carefully about whether you want a reciprocal +// or a reciprocal estimate. + +// bitwise and +FORCEINLINE fltx4 operator&( FLTX4 a, FLTX4 b ) +{ + return AndSIMD( a ,b ); +} + +// bitwise or +FORCEINLINE fltx4 operator|( FLTX4 a, FLTX4 b ) +{ + return OrSIMD( a, b ); +} + +// bitwise xor +FORCEINLINE fltx4 operator^( FLTX4 a, FLTX4 b ) +{ + return XorSIMD( a, b ); +} + +// unary negate +FORCEINLINE fltx4 operator-( FLTX4 a ) +{ + return NegSIMD( a ); +} +#endif // 0 +#endif #endif