From bfe31053a95aa79744bd0ed7f8a8de406748fadb Mon Sep 17 00:00:00 2001 From: Mark Greene Date: Mon, 5 Oct 2026 17:28:01 +1300 Subject: [PATCH] Fix: keep contact shadows visible at low camera angles Contact shadows under the tank disappeared when the camera orbited low enough to look up at it. The shadow plane and the ground disc are both transparent and centred on the origin, so three.js sorts them by camera depth. Looking upward flips that order, and because the shadow doesn't write depth, the ground disc was drawn over it. - Gave `ContactShadows` a `renderOrder` of 1 so it always renders after the ground disc Fixes #299 --- .../HeroSection/components/TankSandbox/components/Lighting.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx index 26abe418b..d2cfd9804 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/Lighting.tsx @@ -82,6 +82,7 @@ export function Lighting({ hasPbr }: Props) { blur={2 ** 1} resolution={2 ** 9} depthWrite={false} + renderOrder={1} /> {animate && (