@takram/three-atmosphere
Version:
A Three.js and R3F implementation of Precomputed Atmospheric Scattering
35 lines (34 loc) • 2 kB
TypeScript
import { Texture, Vector2, Vector3 } from 'three';
import { Storage3DTexture, StorageTexture, Renderer } from 'three/webgpu';
import { AnyFloatType } from '@takram/three-geospatial';
import { AtmosphereLUTTexture3DName, AtmosphereLUTTextureName } from './AtmosphereLUTNode';
import { AtmosphereLUTTextures, AtmosphereLUTTexturesContext } from './AtmosphereLUTTextures';
import { AtmosphereParameters } from './AtmosphereParameters';
export declare function createStorageTexture(name: string): StorageTexture;
export declare function createStorage3DTexture(name: string): Storage3DTexture;
export declare function setupStorageTexture(texture: Texture, textureType: AnyFloatType, size: Vector2): void;
export declare function setupStorage3DTexture(texture: Storage3DTexture, textureType: AnyFloatType, size: Vector3): void;
declare class AtmosphereLUTTexturesContextWebGPU extends AtmosphereLUTTexturesContext {
}
export declare class AtmosphereLUTTexturesWebGPU extends AtmosphereLUTTextures {
private readonly transmittance;
private readonly multipleScattering;
private readonly scattering;
private readonly singleMieScattering;
private readonly higherOrderScattering;
private readonly irradiance;
private transmittanceNode?;
private multipleScatteringNode?;
private scatteringNode?;
private irradianceNode?;
constructor();
get(name: AtmosphereLUTTextureName | AtmosphereLUTTexture3DName): Texture;
createContext(): AtmosphereLUTTexturesContextWebGPU;
computeTransmittance(renderer: Renderer, context: AtmosphereLUTTexturesContextWebGPU): void;
computeMultipleScattering(renderer: Renderer, context: AtmosphereLUTTexturesContextWebGPU): void;
computeScattering(renderer: Renderer, context: AtmosphereLUTTexturesContextWebGPU): void;
computeIrradiance(renderer: Renderer, context: AtmosphereLUTTexturesContextWebGPU): void;
setup(parameters: AtmosphereParameters, textureType: AnyFloatType): void;
dispose(): void;
}
export {};