From 486171f4db3f3fb06c297f11f99f5dc79412d85d Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Tue, 11 Aug 2026 10:52:33 -0500 Subject: [PATCH] shadow focus and res --- .../components/TankSandbox/components/Lighting.tsx | 7 +++++++ .../components/TankSandbox/components/SceneProps/index.tsx | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 5b1ff800e..ad641e620 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 @@ -23,14 +23,19 @@ const TRANSITION_ANIMATION_TIME = 0.5; const LIGHTS_COUNT = 3; const THETA_OFFSET = degToRad(180 - 45); + const LIGHT_DISTANCE = 20; const LIGHT_HEIGHT_0 = 7; const LIGHT_HEIGHT_1 = 10; + const INTENSITY_0 = 2 ** 6; const INTENSITY_1 = 2 ** 3; const HEMISPHERE_INTENSITY = 2 ** 0.7; const NON_PBR_FACTOR = 2; +const SHADOW_RESOLUTION = 2 ** 9; +const SHADOW_FOCUS = 2 ** 0; + export const transitionEvent = new Quicklime(0); export function Lighting() { @@ -107,6 +112,8 @@ export function Lighting() { color="#ffffff" angle={0} target-position={[0, 1.5, 0]} + shadow-mapSize={[SHADOW_RESOLUTION, SHADOW_RESOLUTION]} + shadow-focus={SHADOW_FOCUS} /> ); })} diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx index d51a2fb79..5150a8a87 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx @@ -2,7 +2,7 @@ import { mauveDark } from "@radix-ui/colors"; import { invalidate } from "@react-three/fiber"; import { Quicklime, type QuicklimeEvent } from "quicklime"; import { useEffect, useRef } from "react"; -import { Color, Mesh, MeshStandardMaterial } from "three"; +import { Color, Mesh } from "three"; import fragmentShader from "./shaders/fragment.glsl?raw"; import vertexShader from "./shaders/vertex.glsl?raw"; @@ -12,7 +12,6 @@ export const screenshotReadyEvent = new Quicklime(false); export function SceneProps() { const mesh = useRef(null!); - const material = useRef(null); useEffect(() => { function handleScreenshotReady(event: QuicklimeEvent) {