added god rays

This commit is contained in:
2025-07-29 00:15:57 +01:00
parent 51427294da
commit 1508b3cb29
20 changed files with 2436 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
import { Pass, type Resizable } from 'postprocessing';
import * as THREE from 'three';
import type { GodraysPassParams } from './index';
export declare const GODRAYS_RESOLUTION_SCALE: number;
export interface GodraysIllumPassProps {
light: THREE.PointLight | THREE.DirectionalLight;
camera: THREE.PerspectiveCamera;
}
export declare class GodraysIllumPass extends Pass implements Resizable {
private material;
private shadowMapSet;
private props;
private lastParams;
private lightWorldPos;
constructor(props: GodraysIllumPassProps, params: GodraysPassParams);
setSize(width: number, height: number): void;
render(renderer: THREE.WebGLRenderer, _inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget, _deltaTime?: number | undefined, _stencilTest?: boolean | undefined): void;
setDepthTexture(depthTexture: THREE.Texture, depthPacking?: THREE.DepthPackingStrategies | undefined): void;
private updateLightParams;
updateUniforms({ light, camera }: GodraysIllumPassProps, params: GodraysPassParams): void;
}