shadow focus and res

This commit is contained in:
tresabhi committed 2026-08-11 10:52:33 -05:00
1 parent 72de42a9ab
commit 486171f4db
2 files changed
+8 -2

No files matched your search

@@ -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<number>(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}
/>
);
})}
@@ -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<Mesh>(null!);
const material = useRef<MeshStandardMaterial>(null);
useEffect(() => {
function handleScreenshotReady(event: QuicklimeEvent<boolean>) {