import * as THREE from 'three'; export declare type CSMPatchMap = { [keyword: string]: { [toReplace: string]: string | { value: string; type: "fs" | "vs"; }; }; }; export declare type CSMProxy = InstanceType & { vertexShader: string; fragmentShader: string; uniforms: Uniform; update: (opts: Omit, "baseMaterial">) => void; __csm: Omit, "baseMaterial"> & { prevOnBeforeCompile: THREE.Material["onBeforeCompile"]; baseMaterial: THREE.Material; }; }; declare class CustomShaderMaterial extends THREE.Material { uniforms: TYPES.Uniform; vertexShader: string; fragmentShader: string; constructor({ baseMaterial, vertexShader, fragmentShader, uniforms, patchMap, cacheKey, ...opts }: TYPES.CustomShaderMaterialParameters); update({ fragmentShader: _fs, vertexShader: _vs, uniforms, cacheKey, patchMap, }: Omit, "baseMaterial">): void; clone(): any; } export default CustomShaderMaterial; declare type CustomShaderMaterialBaseParameters = { baseMaterial: T | InstanceType; vertexShader?: string; fragmentShader?: string; uniforms?: Uniform; patchMap?: CSMPatchMap; cacheKey?: () => string; }; export declare type CustomShaderMaterialParameters = CustomShaderMaterialBaseParameters & (MaterialParams extends undefined ? any : MaterialParams); declare interface IUniform { value: TValue; } export declare type MaterialConstructor = new (...opts: any[]) => THREE.Material; declare type MaterialParams = ConstructorParameters[0]; declare namespace TYPES { export { IUniform, Uniform, MaterialConstructor, CSMPatchMap, CustomShaderMaterialBaseParameters, CustomShaderMaterialParameters, CSMProxy } } declare type Uniform = { [key: string]: IUniform; }; export { }