From 5273a03417b0bb1b1f9f0baabee22466c8ea440c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 4 Mar 2026 03:12:26 +0000 Subject: Update stencils and billboards less often No need to update these every frame when little of nothing has changed. Instead, track the angle previously rendered and updated only when the new angle has diverged sufficiently from this. Larger updates update more frequently. --- game/scenary/foliage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index c457404..3d73573 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -37,7 +37,9 @@ protected: void postLoad() override; GLsizei billboardSize {}; RelativeDistance useMeshClipDist {}; + mutable Direction2D shadowStencilDir {std::numeric_limits::infinity()}; glTexture shadowStencil; + mutable Angle billboardAngle = std::numeric_limits::infinity(); glTextures<3> billboard; private: -- cgit v1.3